summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 970336af518..08e8918b0df 100644
--- a/configure.in
+++ b/configure.in
@@ -524,6 +524,13 @@ AC_ARG_WITH(mit-threads,
if test "$with_mit_threads" = "yes"
then
enable_largefile="no" # Will not work on Linux.
+ if test "$GXX" = "yes"
+ then
+ # Needed for gcc 3.0
+ CCLD=g++
+ export CCLD
+ AC_SUBST(CCLD)
+ fi
fi
# Set flags if we want to force to use pthreads
@@ -1596,13 +1603,17 @@ ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
-# Do not treat warnings as errors if we are linking agaist other libc
+
+# Do not treat warnings as errors if we are linking against other libc
# this is to work around gcc not being permissive on non-system includes
# with respect to ANSI C++
-if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
+# We also remove the -fbranch-probabilities option as this will give warnings
+# about not profiled code, which confuses configure
+if test "$ac_cv_prog_gxx" = "yes" -a "$with_other_libc" = "no"
then
- CXXFLAGS="$CXXFLAGS -Werror"
+ CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed 's/-fbranch-probabilities//'`
fi
+
AC_TRY_COMPILE(
[#undef inline
#if !defined(SCO) && !defined(__osf__) && !defined(_REENTRANT)