summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in68
1 files changed, 43 insertions, 25 deletions
diff --git a/configure.in b/configure.in
index e266c8878bf..3dfbe913727 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.1.8-beta)
+AM_INIT_AUTOMAKE(mysql, 5.1.9-beta)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
@@ -1502,16 +1502,37 @@ else
fi
#---END:
-# Check for dlopen, needed for user definable functions
-# This must be checked after threads on AIX
-# We only need this for mysqld, not for the clients.
+# dlopen, dlerror
+case "$with_mysqld_ldflags " in
+
+ *"-static "*)
+ # No need to check for dlopen when mysqld is linked with
+ # -all-static or -static as it won't be able to load any functions.
+ # NOTE! It would be better if it was possible to test if dlopen
+ # can be used, but a good way to test it couldn't be found
+
+ ;;
+
+ *)
+ # Check for dlopen, needed for user definable functions
+ # This must be checked after threads on AIX
+ # We only need this for mysqld, not for the clients.
+
+ my_save_LIBS="$LIBS"
+ LIBS=""
+ AC_CHECK_LIB(dl,dlopen)
+ LIBDL=$LIBS
+ LIBS="$my_save_LIBS"
+ AC_SUBST(LIBDL)
+
+ my_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBDL"
+ AC_CHECK_FUNCS(dlopen dlerror)
+ LIBS="$my_save_LIBS"
+
+ ;;
+esac
-my_save_LIBS="$LIBS"
-LIBS=""
-AC_CHECK_LIB(dl,dlopen)
-LIBDL=$LIBS
-LIBS="$my_save_LIBS"
-AC_SUBST(LIBDL)
# System characteristics
case $SYSTEM_TYPE in
@@ -1587,18 +1608,20 @@ else
CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS"
fi
-if test "$with_debug" = "no"
-then
- AC_ARG_WITH([fast-mutexes],
- AC_HELP_STRING([--with-fast-mutexes],
- [Compile with fast mutexes (default is disabled)]),
- [with_fast_mutexes=$withval], [with_fast_mutexes=no])
-fi
+AC_ARG_WITH([fast-mutexes],
+ AC_HELP_STRING([--with-fast-mutexes],
+ [Compile with fast mutexes (default is disabled)]),
+ [with_fast_mutexes=$withval], [with_fast_mutexes=no])
-if test "$with_fast_mutexes" = "yes"
+if test "$with_fast_mutexes" != "no"
then
- AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1],
- [Define to 1 if you want to use fast mutexes])
+ if test "$with_debug" != "no"
+ then
+ AC_MSG_WARN(['--with-fast-mutexes' ignored when '--with-debug' is given])
+ else
+ AC_DEFINE([MY_PTHREAD_FASTMUTEX], [1],
+ [Define to 1 if you want to use fast mutexes])
+ fi
fi
# Force static compilation to avoid linking problems/get more speed
@@ -1897,11 +1920,6 @@ then
fi]
)
-my_save_LIBS="$LIBS"
-LIBS="$LIBS $LIBDL"
-AC_CHECK_FUNCS(dlopen dlerror)
-LIBS="$my_save_LIBS"
-
# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,