summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/ac-macros/misc.m45
-rw-r--r--config/ac-macros/openssl.m46
-rw-r--r--config/ac-macros/yassl.m415
-rw-r--r--config/ac-macros/zlib.m415
4 files changed, 24 insertions, 17 deletions
diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4
index 5346b81fb03..d8199f5970e 100644
--- a/config/ac-macros/misc.m4
+++ b/config/ac-macros/misc.m4
@@ -361,7 +361,8 @@ AC_CACHE_VAL(mysql_cv_termcap_lib,
[AC_CHECK_LIB(ncurses, tgetent, mysql_cv_termcap_lib=libncurses,
[AC_CHECK_LIB(curses, tgetent, mysql_cv_termcap_lib=libcurses,
[AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap,
- mysql_cv_termcap_lib=NOT_FOUND)])])])
+ [AC_CHECK_LIB(tinfo, tgetent, mysql_cv_termcap_lib=libtinfo,
+ mysql_cv_termcap_lib=NOT_FOUND)])])])])
AC_MSG_CHECKING(for termcap functions library)
if test "$mysql_cv_termcap_lib" = "NOT_FOUND"; then
AC_MSG_ERROR([No curses/termcap library found])
@@ -369,6 +370,8 @@ elif test "$mysql_cv_termcap_lib" = "libtermcap"; then
TERMCAP_LIB=-ltermcap
elif test "$mysql_cv_termcap_lib" = "libncurses"; then
TERMCAP_LIB=-lncurses
+elif test "$mysql_cv_termcap_lib" = "libtinfo"; then
+TERMCAP_LIB=-ltinfo
else
TERMCAP_LIB=-lcurses
fi
diff --git a/config/ac-macros/openssl.m4 b/config/ac-macros/openssl.m4
index aa46dd45360..1f9d53abe01 100644
--- a/config/ac-macros/openssl.m4
+++ b/config/ac-macros/openssl.m4
@@ -14,7 +14,8 @@ AC_DEFUN([MYSQL_FIND_OPENSSL], [
for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \
/usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib \
/usr/freeware/lib32 /usr/local/lib/ ; do
- if test -f $d/libssl.a || test -f $d/libssl.so || test -f $d/libssl.dylib ; then
+ # Just to be safe, we test for ".so" anyway
+ if test -f $d/libssl.a || test -f $d/libssl.so || test -f $d/libssl$shrext_cmds ; then
OPENSSL_LIB=$d
fi
done
@@ -26,7 +27,8 @@ AC_DEFUN([MYSQL_FIND_OPENSSL], [
if test -f $incs/openssl/ssl.h ; then
OPENSSL_INCLUDE=-I$incs
fi
- if test -f $libs/libssl.a || test -f $libs/libssl.so || test -f $libs/libssl.dylib ; then
+ # Just to be safe, we test for ".so" anyway
+ if test -f $libs/libssl.a || test -f $libs/libssl.so || test -f $libs/libssl$shrext_cmds ; then
OPENSSL_LIB=$libs
fi
;;
diff --git a/config/ac-macros/yassl.m4 b/config/ac-macros/yassl.m4
index b4160ad2a99..906a65a2fc3 100644
--- a/config/ac-macros/yassl.m4
+++ b/config/ac-macros/yassl.m4
@@ -1,8 +1,3 @@
-AC_CONFIG_FILES(extra/yassl/Makefile dnl
-extra/yassl/taocrypt/Makefile dnl
-extra/yassl/taocrypt/src/Makefile dnl
-extra/yassl/src/Makefile)
-
AC_DEFUN([MYSQL_CHECK_YASSL], [
AC_MSG_CHECKING(for yaSSL)
AC_ARG_WITH([yassl], [ --with-yassl Include the yaSSL support],,)
@@ -14,10 +9,13 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
AC_MSG_ERROR([Cannot configure MySQL to use yaSSL and OpenSSL simultaneously.])
fi
AC_MSG_RESULT([using bundled yaSSL])
- yassl_dir="extra/yassl"
+ AC_CONFIG_FILES(extra/yassl/Makefile dnl
+ extra/yassl/taocrypt/Makefile dnl
+ extra/yassl/taocrypt/src/Makefile dnl
+ extra/yassl/src/Makefile)
+ yassl_dir="yassl"
yassl_libs="-L\$(top_srcdir)/extra/yassl/src -lyassl -L\$(top_srcdir)/extra/yassl/taocrypt/src -ltaocrypt"
yassl_includes="-I\$(top_srcdir)/extra/yassl/include"
- yassl_libs_with_path="\$(top_srcdir)/extra/yassl/src/libyassl.la \$(top_srcdir)/extra/yassl/taocrypt/src/libtaocrypt.la"
AC_DEFINE([HAVE_OPENSSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
AC_DEFINE([HAVE_YASSL], [1], [Defined by configure. Using yaSSL for OpenSSL emulation.])
# System specific checks
@@ -38,8 +36,7 @@ AC_DEFUN([MYSQL_CHECK_YASSL], [
AC_MSG_RESULT(no)
fi
AC_SUBST(yassl_libs)
- AC_SUBST(yassl_libs_with_path)
AC_SUBST(yassl_includes)
AC_SUBST(yassl_dir)
- AM_CONDITIONAL([HAVE_YASSL], [ test "with_yassl" = "yes" ])
+ AM_CONDITIONAL([HAVE_YASSL], [ test "$with_yassl" = "yes" ])
])
diff --git a/config/ac-macros/zlib.m4 b/config/ac-macros/zlib.m4
index ec55f19b98f..23cc132aca8 100644
--- a/config/ac-macros/zlib.m4
+++ b/config/ac-macros/zlib.m4
@@ -13,9 +13,9 @@ mysql_cv_compress="yes"
dnl Auxiliary macro to check for zlib at given path
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
-save_INCLUDES="$INCLUDES"
+save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
-INCLUDES="$INCLUDES $ZLIB_INCLUDES"
+CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
LIBS="$LIBS $ZLIB_LIBS"
AC_CACHE_VAL([mysql_cv_compress],
[AC_TRY_LINK([#include <zlib.h>],
@@ -24,7 +24,7 @@ AC_CACHE_VAL([mysql_cv_compress],
AC_MSG_RESULT([ok])],
[mysql_cv_compress="no"])
])
-INCLUDES="$save_INCLUDES"
+CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
])
@@ -63,7 +63,7 @@ case $SYSTEM_TYPE in
;;
*)
AC_ARG_WITH([zlib-dir],
- AC_HELP_STRING([--with-zlib-dir=DIR],
+ AC_HELP_STRING([--with-zlib-dir=no|bundled|DIR],
[Provide MySQL with a custom location of
compression library. Given DIR, zlib binary is
assumed to be in $DIR/lib and header files
@@ -89,8 +89,9 @@ case $SYSTEM_TYPE in
fi
;;
*)
+ # Just to be safe, we test for ".so" anyway
if test \( -f "$mysql_zlib_dir/lib/libz.a" -o -f "$mysql_zlib_dir/lib/libz.so" -o \
- -f "$mysql_zlib_dir/lib/libz.sl" -o -f "$mysql_zlib_dir/lib/libz.dylib" \) \
+ -f "$mysql_zlib_dir/lib/libz$shrext_cmds" \) \
-a -f "$mysql_zlib_dir/include/zlib.h"; then
ZLIB_INCLUDES="-I$mysql_zlib_dir/include"
ZLIB_LIBS="-L$mysql_zlib_dir/lib -lz"
@@ -112,6 +113,10 @@ case $SYSTEM_TYPE in
fi
;;
esac
+if test -n "$zlib_dir"
+then
+ AC_CONFIG_FILES(zlib/Makefile)
+fi
])
dnl ------------------------------------------------------------------------