diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-06-07 12:47:04 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-06-07 12:47:04 +0400 |
commit | f29d24b0f88b67504bc701b6f2773a0109ad6154 (patch) | |
tree | 4268070936d3c9dbd27165b1d9c1593e17ec0d61 /configure.in | |
parent | 9b5312db1d78247b893066205cffe8b32e0f573d (diff) | |
parent | 60a9d9bbb94ac03159bcc2d75b649abb1c9dc956 (diff) | |
download | mariadb-git-f29d24b0f88b67504bc701b6f2773a0109ad6154.tar.gz |
Manual merge from mysql-trunk-bugfixing.
Conflicts:
- BUILD/SETUP.sh
- mysql-test/mysql-test-run.pl
- mysql-test/r/partition_error.result
- mysql-test/t/disabled.def
- mysql-test/t/partition_error.test
- sql/share/errmsg-utf8.txt
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 86 |
1 files changed, 83 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 26f31dfd844..5de43fc7951 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ dnl -*- ksh -*- dnl Process this file with autoconf to produce a configure script. -# Copyright (C) 2008-2009 Sun Microsystems, Inc +# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1013,6 +1013,66 @@ else AC_MSG_RESULT([yes]) fi +#-------------------------------------------------------------------------- +# Check if struct sockaddr_in::sin_len is available +#-------------------------------------------------------------------------- + +AC_CACHE_CHECK( + [if sockaddr_in::sin_len is available], + mysql_cv_have_sockaddr_in_sin_len, + AC_TRY_COMPILE( + [ + #ifdef WIN32 + #include <winsock2.h> + #else + #include <sys/types.h> + #include <netinet/in.h> + #include <sys/socket.h> + #endif + ], + [unsigned int i = sizeof(((struct sockaddr_in *) 0)->sin_len)], + mysql_cv_have_sockaddr_in_sin_len=yes, + mysql_cv_have_sockaddr_in_sin_len=no)) + +if test "$mysql_cv_have_sockaddr_in_sin_len" = "yes"; then + AC_DEFINE( + [HAVE_SOCKADDR_IN_SIN_LEN], + [1], + [If sockaddr_in::sin_len is available]) +fi + +#-------------------------------------------------------------------------- +# Check if struct sockaddr_in6::sin6_len is available +#-------------------------------------------------------------------------- + +AC_CACHE_CHECK( + [if sockaddr_in6::sin6_len is available], + mysql_cv_have_sockaddr_in6_sin6_len, + AC_TRY_COMPILE( + [ + #ifdef WIN32 + #include <winsock2.h> + #else + #include <sys/types.h> + #include <netinet/in.h> + #include <sys/socket.h> + #endif + + #ifdef HAVE_NETINET_IN6_H + #include <netinet/in6.h> + #endif + ], + [unsigned int i = sizeof(((struct sockaddr_in6 *) 0)->sin6_len)], + mysql_cv_have_sockaddr_in6_sin6_len=yes, + mysql_cv_have_sockaddr_in6_sin6_len=no)) + +if test "$mysql_cv_have_sockaddr_in_sin6_len" = "yes"; then + AC_DEFINE( + [HAVE_SOCKADDR_IN6_SIN6_LEN], + [1], + [If sockaddr_in6::sin6_len is available]) +fi + #-------------------------------------------------------------------- # Check for TCP wrapper support #-------------------------------------------------------------------- @@ -1236,14 +1296,22 @@ case $SYSTEM_TYPE in fi ;; *freebsd*|*dragonfly*) - AC_MSG_WARN([Adding fix for interrupted reads]) + dnl These dependencies have not really been checked for some time OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'` - if test "$OSVERSION" -gt "480100" && \ + if test "$OSVERSION" -gt "600000" + then + # Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more + AC_MSG_WARN([Adding fix for broken realpath]) + CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH" + CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_REALPATH" + elif test "$OSVERSION" -gt "480100" && \ test "$OSVERSION" -lt "500000" || \ test "$OSVERSION" -gt "500109" then + AC_MSG_WARN([Adding fix for interrupted reads]) CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000" else + AC_MSG_WARN([Adding fix for interrupted reads and broken realpath]) CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH" CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH" fi @@ -1845,6 +1913,17 @@ else CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS" fi +AC_ARG_WITH([valgrind], + [AS_HELP_STRING([--with-valgrind], + [Valgrind instrumentation @<:@default=no@:>@])], + [], [with_valgrind=no]) + +if test "$with_valgrind" != "no" +then + AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h], + [AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])]) +fi + # Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it. AC_MSG_CHECKING(if Debug Sync Facility should be enabled.) AC_ARG_ENABLE(debug_sync, @@ -3122,6 +3201,7 @@ esac AC_SUBST([RDTSC_SPARC_ASSEMBLY]) + #-------------------------------------------------------------------- # Output results #-------------------------------------------------------------------- |