diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 97 |
1 files changed, 81 insertions, 16 deletions
diff --git a/configure.in b/configure.in index d68a4121642..a291ce73210 100644 --- a/configure.in +++ b/configure.in @@ -9,8 +9,8 @@ AC_CANONICAL_SYSTEM # remember to also update version.c in ndb # # When changing major version number please also check switch statement -# in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.37) +# in client/mysqlbinlog.cc:check_master_version(). +AM_INIT_AUTOMAKE(mysql, 5.4.2-beta) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -51,6 +51,7 @@ sinclude(config/ac-macros/check_cpu.m4) sinclude(config/ac-macros/character_sets.m4) sinclude(config/ac-macros/compiler_flag.m4) sinclude(config/ac-macros/plugins.m4) +sinclude(config/ac-macros/dtrace.m4) sinclude(config/ac-macros/ha_ndbcluster.m4) sinclude(config/ac-macros/large_file.m4) sinclude(config/ac-macros/misc.m4) @@ -862,6 +863,8 @@ then AC_CHECK_DECLS(SHM_HUGETLB, AC_DEFINE([HAVE_LARGE_PAGES], [1], [Define if you have large pages support]) + AC_DEFINE([HAVE_LARGE_PAGE_OPTION], [1], + [Define if you have large page option]) AC_DEFINE([HUGETLB_USE_PROC_MEMINFO], [1], [Define if /proc/meminfo shows the huge page size (Linux only)]) , , @@ -869,6 +872,20 @@ then #include <sys/shm.h> ] ) +else +# For large pages support on Solaris +AC_CHECK_DECLS(MHA_MAPSIZE_VA, + AC_DEFINE([HAVE_SOLARIS_LARGE_PAGES], [1], + [Define to 1 if you have large pages support]) + AC_DEFINE([HAVE_LARGE_PAGE_OPTION], [1], + [Define if you have large page option]) + , , + [ +#include <sys/mman.h> + ] +) + + fi #-------------------------------------------------------------------- @@ -1777,6 +1794,32 @@ if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then [Define to 1 if compiler provides atomic builtins.]) fi +AC_CACHE_CHECK([whether the OS provides atomic_* functions like Solaris], + [mysql_cv_solaris_atomic], [AC_TRY_RUN([ +#include <atomic.h> +int +main() +{ + int foo = -10; int bar = 10; + if (atomic_add_int_nv((uint_t *)&foo, bar) || foo) + return -1; + bar = atomic_swap_uint((uint_t *)&foo, (uint_t)bar); + if (bar || foo != 10) + return -1; + bar = atomic_cas_uint((uint_t *)&bar, (uint_t)foo, 15); + if (bar) + return -1; + return 0; +} +], [mysql_cv_solaris_atomic=yes], + [mysql_cv_solaris_atomic=no], + [mysql_cv_solaris_atomic=no])]) + +if test "x$mysql_cv_solaris_atomic" = xyes; then + AC_DEFINE(HAVE_SOLARIS_ATOMIC, 1, + [Define to 1 if OS provides atomic_* functions like Solaris.]) +fi + # Force static compilation to avoid linking problems/get more speed AC_ARG_WITH(mysqld-ldflags, [ --with-mysqld-ldflags Extra linking arguments for mysqld], @@ -2376,6 +2419,42 @@ fi fi #---END: +#Check for x86 PAUSE instruction +AC_MSG_CHECKING("for x86 PAUSE instruction") +# We have to actually try running the test program, because of a bug +# in Solaris on x86_64, where it wrongly reports that PAUSE is not +# supported when trying to run an application. See +# http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 +AC_TRY_RUN([ + int main() { + __asm__ __volatile__ ("pause"); + return 0; + } + ], + [x86_pause_exists=yes], + [x86_pause_exists=no], + [x86_pause_exists=no] # Cross-compile, assume no PAUSE instruction +) +AC_TRY_RUN([ + int main() { + __asm__ __volatile__ ("rep; nop"); + return 0; + } + ], + [x86_fake_pause_exists=yes], + [x86_fake_pause_exists=no], + [x86_fake_pause_exists=no] # Cross-compile, assume no x86 NOP instruction +) +if test "$x86_pause_exists" = "yes" +then + AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) +else + if test "$x86_fake_pause_exists" = "yes" + then + AC_DEFINE([HAVE_FAKE_PAUSE_INSTRUCTION], [1], [Does x86 NOP instruction exist]) + fi +fi + # Check if pthread_attr_setscope() exists AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope, AC_TRY_LINK( @@ -2517,19 +2596,6 @@ then [Access checks in embedded library]) fi -tools_dirs="" - -AC_ARG_WITH([mysqlmanager], - AC_HELP_STRING([--with-mysqlmanager], [Build the mysqlmanager binary: yes/no (default: build if server is built.)]),,) - -if test "$with_mysqlmanager" = "yes" -o \ - '(' "$with_mysqlmanager:$with_server" = ":yes" -a \ - -d "$srcdir/server-tools" ')' ; then - tools_dirs="server-tools" -fi - -AC_SUBST(tools_dirs) - #MYSQL_CHECK_CPU libmysqld_dirs= @@ -2859,7 +2925,6 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl dbug/Makefile scripts/Makefile include/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl - server-tools/Makefile server-tools/instance-manager/Makefile dnl cmd-line-utils/Makefile cmd-line-utils/libedit/Makefile dnl libmysqld/Makefile libmysqld/examples/Makefile dnl mysql-test/Makefile mysql-test/lib/My/SafeProcess/Makefile dnl |