summaryrefslogtreecommitdiff
path: root/config/ac-macros/zlib.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/ac-macros/zlib.m4')
-rw-r--r--config/ac-macros/zlib.m413
1 files changed, 11 insertions, 2 deletions
diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
index a01d13937ff..74de715e424 100644
--- a/config/ac-macros/zlib.m4
+++ b/config/ac-macros/zlib.m4
@@ -10,16 +10,25 @@ AC_SUBST([zlib_dir])
mysql_cv_compress="yes"
])
-dnl Auxiliary macro to check for zlib at given path
+dnl Auxiliary macro to check for zlib at given path.
+dnl We are strict with the server, as "archive" engine
+dnl needs zlibCompileFlags(), but for client only we
+dnl are less strict, and take the zlib we find.
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
LIBS="$LIBS $ZLIB_LIBS"
+if test X"$with_server" = Xno
+then
+ zlibsym=zlibVersion
+else
+ zlibsym=zlibCompileFlags
+fi
AC_CACHE_VAL([mysql_cv_compress],
[AC_TRY_LINK([#include <zlib.h>],
- [return zlibCompileFlags();],
+ [return $zlibsym();],
[mysql_cv_compress="yes"
AC_MSG_RESULT([ok])],
[mysql_cv_compress="no"])