From 81858c0efa0079ff1320ba097f32a3c6657ddcef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Mar 2006 09:51:08 +0100 Subject: Bug#11835 CREATE FUNCTION crashes server - Don't look for 'dl_open' if mysqld is compiled with "-all-static" configure.in: No need to check for dlopen when mysqld is linked with -all-static as it won't be able to load any functions (and in some cases segfaults) --- configure.in | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index b230b7f042e..9749833f635 100644 --- a/configure.in +++ b/configure.in @@ -1632,16 +1632,35 @@ 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 + + *-all-static*) + # No need to check for dlopen when mysqld is linked with + # -all-static as it won't be able to load any functions. + + ;; + + *) + # 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 @@ -2005,11 +2024,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, -- cgit v1.2.1 From 680ba0b7d93a2429cc24ae6e397e0a789b4e269d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 20 Mar 2006 19:55:38 +0100 Subject: Don't look for "dlopen" if server linked with -static or -all-static flag. Update after review configure.in: Don't look for "dlopen" if server linked with -static or -all-static flag --- configure.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index e8e2bdb7951..7fe92ad1467 100644 --- a/configure.in +++ b/configure.in @@ -1545,11 +1545,13 @@ fi #---END: # dlopen, dlerror -case $with_mysqld_ldflags in +case "$with_mysqld_ldflags " in - *-all-static*) + *"-static "*) # No need to check for dlopen when mysqld is linked with - # -all-static as it won't be able to load any functions. + # -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 ;; -- cgit v1.2.1