summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in67
1 files changed, 61 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 57c32fbca64..2c2d27136c0 100644
--- a/configure.in
+++ b/configure.in
@@ -13,7 +13,7 @@ AC_CANONICAL_SYSTEM
#
# When merging new MySQL releases, update the version number to match the
# MySQL version number, but reset the maria subrelease (-beta1).
-AM_INIT_AUTOMAKE(mysql, 5.1.35-maria-beta1)
+AM_INIT_AUTOMAKE(mysql, 5.1.39-maria-beta1)
AM_CONFIG_HEADER([include/config.h:config.h.in])
PROTOCOL_VERSION=10
@@ -605,10 +605,11 @@ AC_SUBST(NOINST_LDFLAGS)
# Check if we are using Linux and a glibc compiled with static nss
# (this is true on the MySQL build machines to avoid NSS problems)
#
+AC_CHECK_TOOL([NM], [nm])
if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
then
- tmp=`nm /usr/lib*/libc.a | grep _nss_files_getaliasent_r`
+ tmp=`$NM ${other_libc_lib:-/usr/lib*}/libc.a | grep _nss_files_getaliasent_r1`
if test -n "$tmp"
then
STATIC_NSS_FLAGS="-lc -lnss_files -lnss_dns -lresolv"
@@ -1626,7 +1627,7 @@ esac
# Build optimized or debug version ?
# First check for gcc and g++
-if test "$ac_cv_prog_gcc" = "yes"
+if test "$GCC" = "yes"
then
DEBUG_CFLAGS="-g"
DEBUG_OPTIMIZE_CC="-O"
@@ -1634,9 +1635,16 @@ then
else
DEBUG_CFLAGS="-g"
DEBUG_OPTIMIZE_CC=""
- OPTIMIZE_CFLAGS="-O"
+ case $SYSTEM_TYPE in
+ *solaris*)
+ OPTIMIZE_CFLAGS="-O1"
+ ;;
+ *)
+ OPTIMIZE_CFLAGS="-O"
+ ;;
+ esac
fi
-if test "$ac_cv_prog_cxx_g" = "yes"
+if test "$GXX" = "yes"
then
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX="-O"
@@ -1644,7 +1652,14 @@ then
else
DEBUG_CXXFLAGS="-g"
DEBUG_OPTIMIZE_CXX=""
- OPTIMIZE_CXXFLAGS="-O"
+ case $SYSTEM_TYPE in
+ *solaris*)
+ OPTIMIZE_CXXFLAGS="-O1"
+ ;;
+ *)
+ OPTIMIZE_CXXFLAGS="-O"
+ ;;
+ esac
fi
case $SYSTEM_TYPE in
@@ -2088,6 +2103,25 @@ case "$mysql_cv_sys_os" in
# unsupported priority values are passed to pthread_setschedprio.
# Since the only supported value is 1, treat it as inexistent.
;;
+ SunOS) # Bug#42599 error: `pthread_setschedprio' was not declared in this scope
+ # In some installations, the pthread.h header used by GCC does not
+ # declare the pthread_setscheprio prototype, but the function is
+ # implemented. Since the function is used in C++ code, ensure that
+ # the function prototype is present.
+ AC_MSG_CHECKING([whether pthread_setschedprio is declared])
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([#include <pthread.h>],
+ [(void)(pthread_setschedprio);])],
+ [ac_cv_func_pthread_setschedprio=yes],
+ [ac_cv_func_pthread_setschedprio=no])
+ AC_LANG_POP([C++])
+ AC_MSG_RESULT([$ac_cv_func_pthread_setschedprio])
+ if test "$ac_cv_func_pthread_setschedprio" = yes; then
+ AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, 1,
+ [Define to 1 if you have the `pthread_setschedprio' function.])
+ fi
+ ;;
*) AC_CHECK_FUNCS(pthread_setschedprio)
;;
esac
@@ -2097,6 +2131,27 @@ esac
AC_MSG_CHECKING(for isinf in <math.h>)
AC_TRY_LINK([#include <math.h>], [float f = 0.0; int r = isinf(f); return r],
AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(whether isinf() is safe to use in C code)
+ AC_TRY_RUN([
+#include <math.h>
+int main()
+{
+ double a= 10.0;
+ double b= 1e308;
+
+ return !isinf(a * b);
+}
+],
+ [AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)
+ AC_DEFINE([HAVE_BROKEN_ISINF], [1],
+ [Define to 1 if isinf() uses 80-bit register for intermediate values])
+ ],
+ [
+# Let's be optimistic when cross-compiling, since the only compiler known
+# to be affected by this isinf() bug is GCC 4.3 on 32-bit x86.
+ AC_MSG_RESULT([[cross-compiling, assuming 'yes']])
+ ])
AC_MSG_CHECKING(whether isinf() can be used in C++ code)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS