Skip to content

Commit 463b34e

Browse files
author
[email protected]/kent-amd64.(none)
committed
zlib.m4:
Only require the more recent zlibCompileFlags() when building the server, client zlib don't need it. Makefile.am: Always build the bundled zlib static only configure.in: Look for dlopen() even if --with-mysqld-ldflags constains "-static", as this is not the same as the flag to "ld", it just informs "libtool" to link static with libraries created part of the build, even if there exists shared versions. make_binary_distribution.sh: Real "mysqlmanager" executable might be in ".libs"
1 parent 6249bb3 commit 463b34e

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

config/ac-macros/zlib.m4

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,25 @@ AC_SUBST([zlib_dir])
1010
mysql_cv_compress="yes"
1111
])
1212

13-
dnl Auxiliary macro to check for zlib at given path
13+
dnl Auxiliary macro to check for zlib at given path.
14+
dnl We are strict with the server, as "archive" engine
15+
dnl needs zlibCompileFlags(), but for client only we
16+
dnl are less strict, and take the zlib we find.
1417

1518
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
1619
save_CPPFLAGS="$CPPFLAGS"
1720
save_LIBS="$LIBS"
1821
CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
1922
LIBS="$LIBS $ZLIB_LIBS"
23+
if test X"$with_server" = Xno
24+
then
25+
zlibsym=zlibVersion
26+
else
27+
zlibsym=zlibCompileFlags
28+
fi
2029
AC_CACHE_VAL([mysql_cv_compress],
2130
[AC_TRY_LINK([#include <zlib.h>],
22-
[return zlibCompileFlags();],
31+
[return $zlibsym();],
2332
[mysql_cv_compress="yes"
2433
AC_MSG_RESULT([ok])],
2534
[mysql_cv_compress="no"])

configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1601,9 +1601,9 @@ fi
16011601
# dlopen, dlerror
16021602
case "$with_mysqld_ldflags " in
16031603

1604-
*"-static "*)
1604+
*"-all-static "*)
16051605
# No need to check for dlopen when mysqld is linked with
1606-
# -all-static or -static as it won't be able to load any functions.
1606+
# -all-static as it won't be able to load any functions.
16071607
# NOTE! It would be better if it was possible to test if dlopen
16081608
# can be used, but a good way to test it couldn't be found
16091609

scripts/make_binary_distribution.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ if [ $BASE_SYSTEM != "netware" ] ; then
115115
chmod o-rwx $BASE/data $BASE/data/*
116116
fi
117117

118-
# Copy files if they exists, warn for those that don't
118+
# Copy files if they exists, warn for those that don't.
119+
# Note that when listing files to copy, we might list the file name
120+
# twice, once in the directory location where it is build, and a
121+
# second time in the ".libs" location. In the case the firs one
122+
# is a wrapper script, the second one will overwrite it with the
123+
# binary file.
119124
copyfileto()
120125
{
121126
destdir=$1
@@ -165,6 +170,7 @@ if [ $BASE_SYSTEM = "netware" ] ; then
165170
# For all other platforms:
166171
else
167172
BIN_FILES="$BIN_FILES \
173+
server-tools/instance-manager/.libs/mysqlmanager \
168174
client/mysqltestmanagerc \
169175
client/mysqltestmanager-pwgen tools/mysqltestmanager \
170176
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \

zlib/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ LIBS= $(NON_THREADED_LIBS)
2121

2222
pkglib_LTLIBRARIES=libz.la
2323

24-
libz_la_LDFLAGS= -version-info 3:3:2
24+
# We are never interested in a shared version
25+
libz_la_LDFLAGS= -static
2526

2627
noinst_HEADERS= crc32.h deflate.h inffast.h inffixed.h inflate.h \
2728
inftrees.h trees.h zconf.h zlib.h zutil.h

0 commit comments

Comments
 (0)