summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-02-05 01:21:16 +0300
committerunknown <konstantin@mysql.com>2005-02-05 01:21:16 +0300
commitfe83a1938d51c2fe780631911282902aeae1c0a9 (patch)
tree24ce2a2e56f50a77ba3664ff0b5fec28c4292aad /acinclude.m4
parent2f91118458995b9fe780aa7a5a664765572cdc30 (diff)
downloadmariadb-git-fe83a1938d51c2fe780631911282902aeae1c0a9.tar.gz
A fix for Bug#6273 "building fails on link": we should not use
CLIENT_LIBS in mysql_config as CLIENT_LIBS point to builddir when we use the bundled zlib. acinclude.m4: Extend MYSQL_CHECK_ZLIB_WITH_COMPRESS m4 macro to substitute ZLIB_DEPS - this is a special version of ZLIB_LIBS to use in mysql_config configure.in: Remove NON_THREADED_CLIENT_LIBS which weren't really NON_THREADED_CLIENT_LIBS and use NON_THREADED_LIBS instead. AC_SUBST NON_THREADED_LIBS and STATIC_NSS_FLAGS as they're now needed inside mysql_config.sh scripts/Makefile.am: Add STATIC_NSS_FLAGS, NON_THREADED_LIBS and ZLIB_DEPS to sed substitution list. scripts/mysql_config.sh: We can't use CLIENT_LIBS as in case when we use the bundled zlib it has a reference to $(top_builddir)/zlib. libs and libs_r now need to be specified explicitly. zlib/Makefile.am: Install libz.la in case it's used by MySQL: this way we guarantee that paths printed by mysql_config are valid in all cases.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m416
1 files changed, 13 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index d7e22332655..5ddd8952c42 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -194,6 +194,8 @@ dnl Define zlib paths to point at bundled zlib
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
ZLIB_LIBS="\$(top_builddir)/zlib/libz.la"
+dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps.
+ZLIB_DEPS="-lz"
zlib_dir="zlib"
AC_SUBST([zlib_dir])
mysql_cv_compress="yes"
@@ -235,8 +237,13 @@ dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
dnl macro bails out with error.
dnl
dnl If the library was found, this function #defines HAVE_COMPRESS
-dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include) and
-dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz).
+dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
+dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
+dnl used in mysql_config and is always the same as ZLIB_LIBS except to
+dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
+dnl build dir ($top_builddir/zlib), while mysql_config must point to the
+dnl installation dir ($pkglibdir), so ZLIB_DEPS is set to point to
+dnl $pkglibdir.
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
AC_MSG_CHECKING([for zlib compression library])
@@ -285,7 +292,11 @@ case $SYSTEM_TYPE in
;;
esac
if test "$mysql_cv_compress" = "yes"; then
+ if test "x$ZLIB_DEPS" = "x"; then
+ ZLIB_DEPS="$ZLIB_LIBS"
+ fi
AC_SUBST([ZLIB_LIBS])
+ AC_SUBST([ZLIB_DEPS])
AC_SUBST([ZLIB_INCLUDES])
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
fi
@@ -1039,7 +1050,6 @@ AC_MSG_CHECKING(for OpenSSL)
echo "You can't use the --all-static link option when using openssl."
exit 1
fi
- NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs"
else
AC_MSG_RESULT(no)
if test ! -z "$openssl_includes"