diff options
author | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
commit | 139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch) | |
tree | 7d77d6f1073f8090f275b30cb3f10254497da243 /configure.in | |
parent | b3f7eac5301529c2d069ebe4d0558980412af3a2 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz |
Merge with 5.2
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 82 |
1 files changed, 38 insertions, 44 deletions
diff --git a/configure.in b/configure.in index ed253b9a8e2..1eca0e23567 100644 --- a/configure.in +++ b/configure.in @@ -12,6 +12,7 @@ dnl dnl When changing the major version number please also check the switch dnl statement in mysqlbinlog::check_master_version(). You may also need dnl to update version.c in ndb. + dnl dnl When merging new MySQL releases, update the version number to match the dnl MySQL version number. @@ -720,6 +721,17 @@ AC_ARG_ENABLE(assembler, [ ENABLE_ASSEMBLER=no ] ) +# Don't use assembler if building on Solaris with native linker +# and with embedded. Because our asm code is not PIC and solaris ld +# aborts with an error when creating .so +if test "x$ENABLE_ASSEMBLER" = "xyes" -a \ + "x$LD_VERSION_SCRIPT" = "x" -a \ + "x$with_embedded_server" = "xyes" -a \ + `expr "$SYSTEM_TYPE" : "^.*solaris"` -gt 0; then + ENABLE_ASSEMBLER=no + AC_MSG_WARN([No assembler functions when non-GNU linker is used and embedded-server is enabled]) +fi + AC_MSG_CHECKING(if we should use assembler functions) # For now we only support assembler on i386 and sparc systems AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $CCAS $CCASFLAGS -c strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;)) @@ -953,46 +965,6 @@ struct request_info *req; ]) AC_SUBST(WRAPLIBS) -if test "$TARGET_LINUX" = "true"; then - AC_ARG_WITH(pstack, - [ --with-pstack Use the pstack backtrace library], - [ USE_PSTACK=$withval ], - [ USE_PSTACK=no ]) - pstack_libs= - pstack_dir= - if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" - then - have_libiberty= have_libbfd= - my_save_LIBS="$LIBS" -dnl I have no idea if this is a good test - can not find docs for libiberty - AC_CHECK_LIB([iberty], [fdmatch], - [have_libiberty=yes - AC_CHECK_LIB([bfd], [bfd_openr], [have_libbfd=yes], , [-liberty])]) - LIBS="$my_save_LIBS" - - if test x"$have_libiberty" = xyes -a x"$have_libbfd" = xyes - then - pstack_dir="pstack" - pstack_libs="../pstack/libpstack.a -lbfd -liberty" - # We must link staticly when using pstack - with_mysqld_ldflags="-all-static" - AC_SUBST([pstack_dir]) - AC_SUBST([pstack_libs]) - AC_DEFINE([USE_PSTACK], [1], [the pstack backtrace library]) -dnl This check isn't needed, but might be nice to give some feedback.... -dnl AC_CHECK_HEADER(libiberty.h, -dnl have_libiberty_h=yes, -dnl have_libiberty_h=no) - else - USE_PSTACK="no" - fi - else - USE_PSTACK="no" - fi -fi -AC_MSG_CHECKING([if we should use pstack]) -AC_MSG_RESULT([$USE_PSTACK]) - # Check for gtty if termio.h doesn't exists if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no" then @@ -1221,7 +1193,7 @@ dnl Is this the right match for DEC OSF on alpha? sql/Makefile.in) # Use gen_lex_hash.linux instead of gen_lex_hash # Add library dependencies to mysqld_DEPENDENCIES - lib_DEPENDENCIES="\$(pstack_libs) \$(openssl_libs) \$(yassl_libs)" + lib_DEPENDENCIES="\$(openssl_libs) \$(yassl_libs)" cat > $filesed << EOF s,\(\./gen_lex_hash\)\$(EXEEXT),\1.linux, s%\(mysqld_DEPENDENCIES = \)%\1$lib_DEPENDENCIES % @@ -1601,6 +1573,31 @@ else fi fi +# +# Solaris bug http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6611808 +# Detect and work around. +# +AC_MSG_CHECKING([for OpenSolaris Bug 6611808]) +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror" +AC_COMPILE_IFELSE([ + #include <pthread.h> + void dummy() {} + int main() + { + pthread_once_t once_control = { PTHREAD_ONCE_INIT }; + pthread_once(&once_control, dummy); + return 0; + } +], [ + AC_DEFINE([PTHREAD_ONCE_INITIALIZER], [{PTHREAD_ONCE_INIT}], + [See OpenSolaris Bug 6611808]) + AC_MSG_RESULT([yes]) +], [ + AC_MSG_RESULT([no]) +]); +CFLAGS="$save_CFLAGS" + #---START: Used in for client configure # Must be checked after, because strtok_r may be in -lpthread # On AIX strtok_r is in libc_r @@ -2940,9 +2937,6 @@ esac AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) # Output results -if test -d "$srcdir/pstack" ; then - AC_CONFIG_FILES(pstack/Makefile pstack/aout/Makefile) -fi if test -d "$srcdir/cmd-line-utils/readline" ; then AC_CONFIG_FILES(cmd-line-utils/readline/Makefile) fi |