From beef0bf08e472b609f1cf653f4607e5981e9e23a Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Wed, 18 Jun 2003 22:08:04 +0200 Subject: - Added /usr/lib64 to the path to search for libssl.a (required on AMD64) - fixed a typo --- acinclude.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 4d7900acc3d..abeb2024f4a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -711,7 +711,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ done for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/openssl \ -/usr/lib /opt/ssl/lib /opt/openssl/lib /usr/local/lib/ ; do +/usr/lib /usr/lib64 /opt/ssl/lib /opt/openssl/lib /usr/local/lib/ ; do if test -f $d/libssl.a ; then OPENSSL_LIB=$d fi @@ -721,7 +721,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ echo "Could not find an installation of OpenSSL" if test -n "$OPENSSL_LIB" ; then if test "$IS_LINUX" = "true"; then - echo "Looks like you've forgotted to install OpenSSL development RPM" + echo "Looks like you've forgotten to install OpenSSL development RPM" fi fi exit 1 -- cgit v1.2.1 From 4542d142d780cb7e9a80398e0015d32638aaa7cd Mon Sep 17 00:00:00 2001 From: "monty@narttu.mysql.fi" <> Date: Tue, 15 Jul 2003 13:10:20 +0300 Subject: Portability fixes --- acinclude.m4 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index abeb2024f4a..f7d89ecf35a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -126,12 +126,19 @@ AC_DEFUN(MYSQL_CHECK_ZLIB_WITH_COMPRESS, [ save_LIBS="$LIBS" LIBS="-l$1 $LIBS" AC_CACHE_CHECK([if libz with compress], mysql_cv_compress, -[AC_TRY_LINK([#include +[AC_TRY_RUN([#include #ifdef __cplusplus extern "C" #endif -], -[ return compress(0, (unsigned long*) 0, "", 0); +int main(int argv, char **argc) +{ + return 0; +} + +int link_test() +{ + return compress(0, (unsigned long*) 0, "", 0); +} ], mysql_cv_compress=yes, mysql_cv_compress=no)]) if test "$mysql_cv_compress" = "yes" then -- cgit v1.2.1 From 428e34813905ee18f276981d5b15354b74725174 Mon Sep 17 00:00:00 2001 From: "monty@mashka.(none)" <> Date: Fri, 18 Jul 2003 12:35:29 +0300 Subject: Portability fixes for Redhat 9 --- acinclude.m4 | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index f7d89ecf35a..3bee4e7a874 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -713,7 +713,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ /usr/include/ssl /opt/ssl/include /opt/openssl/include \ /usr/local/ssl/include /usr/local/include ; do if test -f $d/openssl/ssl.h ; then - OPENSSL_INCLUDE=$d + OPENSSL_INCLUDE=-I$d fi done @@ -724,6 +724,15 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ fi done + # On RedHat 9 we need kerberos to compile openssl + for d in /usr/kerberos/include + do + if test -f $d/krb5.h ; then + OPENSSL_INCLUDE="$OPENSSL_INCLUDE -I$d" + fi + done + + if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INCLUDE" ; then echo "Could not find an installation of OpenSSL" if test -n "$OPENSSL_LIB" ; then @@ -756,9 +765,9 @@ AC_MSG_CHECKING(for OpenSSL) openssl_libs="-L$OPENSSL_LIB -lssl -lcrypto" # Don't set openssl_includes to /usr/include as this gives us a lot of # compiler warnings when using gcc 3.x - if test "$OPENSSL_INCLUDE" != "/usr/include" + if test "$OPENSSL_INCLUDE" != "-I/usr/include" then - openssl_includes="-I$OPENSSL_INCLUDE" + openssl_includes="$OPENSSL_INCLUDE" fi AC_DEFINE(HAVE_OPENSSL) -- cgit v1.2.1 From 5603456e4f2467c808b1afc60064acd023732bb3 Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Tue, 22 Jul 2003 15:04:37 +0500 Subject: Bug #554: Support for --with-openssl[=DIR] Here is fix for bug 554. Added configure options --with-openssl-includes[=DIR] and --with-openssl-libs[=DIR] --- acinclude.m4 | 55 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 13 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 3bee4e7a874..cc38b271ee6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -709,20 +709,37 @@ AC_DEFUN(MYSQL_CHECK_VIO, [ ]) AC_DEFUN(MYSQL_FIND_OPENSSL, [ - for d in /usr/ssl/include /usr/local/ssl/include /usr/include \ + incs="$1" + libs="$2" + case "$incs---$libs" in + default---default ) + for d in /usr/ssl/include /usr/local/ssl/include /usr/include \ /usr/include/ssl /opt/ssl/include /opt/openssl/include \ /usr/local/ssl/include /usr/local/include ; do - if test -f $d/openssl/ssl.h ; then - OPENSSL_INCLUDE=-I$d - fi - done + if test -f $d/openssl/ssl.h ; then + OPENSSL_INCLUDE=-I$d + fi + done - for d in /usr/ssl/lib /usr/local/ssl/lib /usr/lib/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/local/lib/ ; do - if test -f $d/libssl.a ; then - OPENSSL_LIB=$d - fi - done + if test -f $d/libssl.a ; then + OPENSSL_LIB=$d + fi + done + ;; + default---* | *---default | yes---* | *---yes ) + AC_MSG_ERROR([if either 'includes' or 'libs' is specified, both must be specified]) + ;; + * ) + if test -f $incs/openssl/ssl.h ; then + OPENSSL_INCLUDE=-I$incs + fi + if test -f $libs/libssl.a ; then + OPENSSL_LIB=$libs + fi + ;; + esac # On RedHat 9 we need kerberos to compile openssl for d in /usr/kerberos/include @@ -752,11 +769,23 @@ AC_MSG_CHECKING(for OpenSSL) [openssl="$withval"], [openssl=no]) - openssl_libs="" - openssl_includes="" + AC_ARG_WITH([openssl-includes], + [ + --with-openssl-includes=DIR + Find OpenSSL headers in DIR], + [openssl_includes="$withval"], + [openssl_includes=default]) + + AC_ARG_WITH([openssl-libs], + [ + --with-openssl-libs=DIR + Find OpenSSL libraries in DIR], + [openssl_libs="$withval"], + [openssl_libs=default]) + if test "$openssl" = "yes" then - MYSQL_FIND_OPENSSL + MYSQL_FIND_OPENSSL([$openssl_includes], [$openssl_libs]) #force VIO use vio_dir="vio" vio_libs="../vio/libvio.la" -- cgit v1.2.1 From 4ddbb817d545d0650934cbe5e0e5df28bfb87ff7 Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Tue, 22 Jul 2003 19:56:52 +0500 Subject: Bug #554: Support for --with-openssl[=DIR] --- acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index cc38b271ee6..746ea80d4fb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -728,7 +728,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ fi done ;; - default---* | *---default | yes---* | *---yes ) + default---* | *---default ) AC_MSG_ERROR([if either 'includes' or 'libs' is specified, both must be specified]) ;; * ) -- cgit v1.2.1 From 06623670c3a6ac84ff7a082251bc99bdeb40c565 Mon Sep 17 00:00:00 2001 From: "serg@serg.mylan" <> Date: Wed, 23 Jul 2003 16:13:07 +0200 Subject: --with-openssl-includes/libraries --- acinclude.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 746ea80d4fb..6ca600d29f3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -712,7 +712,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ incs="$1" libs="$2" case "$incs---$libs" in - default---default ) + ---) for d in /usr/ssl/include /usr/local/ssl/include /usr/include \ /usr/include/ssl /opt/ssl/include /opt/openssl/include \ /usr/local/ssl/include /usr/local/include ; do @@ -728,7 +728,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ fi done ;; - default---* | *---default ) + ---* | *---) AC_MSG_ERROR([if either 'includes' or 'libs' is specified, both must be specified]) ;; * ) @@ -774,14 +774,14 @@ AC_MSG_CHECKING(for OpenSSL) --with-openssl-includes=DIR Find OpenSSL headers in DIR], [openssl_includes="$withval"], - [openssl_includes=default]) + [openssl_includes=""]) AC_ARG_WITH([openssl-libs], [ --with-openssl-libs=DIR Find OpenSSL libraries in DIR], [openssl_libs="$withval"], - [openssl_libs=default]) + [openssl_libs=""]) if test "$openssl" = "yes" then -- cgit v1.2.1 From 1dfaccb0164336aa004ea373a67bc8735a290b80 Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Fri, 25 Jul 2003 09:25:50 +0500 Subject: Fix: remove compile warnings on RH(with openssl) --- acinclude.m4 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 6ca600d29f3..b558e952543 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -745,7 +745,7 @@ AC_DEFUN(MYSQL_FIND_OPENSSL, [ for d in /usr/kerberos/include do if test -f $d/krb5.h ; then - OPENSSL_INCLUDE="$OPENSSL_INCLUDE -I$d" + OPENSSL_KERBEROS_INCLUDE="$d" fi done @@ -794,10 +794,15 @@ AC_MSG_CHECKING(for OpenSSL) openssl_libs="-L$OPENSSL_LIB -lssl -lcrypto" # Don't set openssl_includes to /usr/include as this gives us a lot of # compiler warnings when using gcc 3.x + openssl_includes="" if test "$OPENSSL_INCLUDE" != "-I/usr/include" then openssl_includes="$OPENSSL_INCLUDE" fi + if test "$OPENSSL_KERBEROS_INCLUDE" + then + openssl_includes="$openssl_includes -I$OPENSSL_KERBEROS_INCLUDE" + fi AC_DEFINE(HAVE_OPENSSL) # openssl-devel-0.9.6 requires dlopen() and we can't link staticly -- cgit v1.2.1 From 3c007c3de99def8c2294b67669132fcacd82d657 Mon Sep 17 00:00:00 2001 From: "lenz@mysql.com" <> Date: Fri, 1 Aug 2003 10:21:41 +0200 Subject: - portability fixes: put string tests in double quotes (BUG#974). Thanks to Alex Kiernan for the hint. --- acinclude.m4 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index b558e952543..3b9b7ce13b6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -50,7 +50,7 @@ mysql_cv_btype_last_arg_accept=none ], [int a = accept(1, (struct sockaddr *) 0, (socklen_t *) 0); return (a != 0);], mysql_cv_btype_last_arg_accept=socklen_t)] -if test $mysql_cv_btype_last_arg_accept = none; then +if test "$mysql_cv_btype_last_arg_accept" = "none"; then [AC_TRY_COMPILE([#if defined(inline) #undef inline #endif @@ -61,7 +61,7 @@ if test $mysql_cv_btype_last_arg_accept = none; then [int a = accept(1, (struct sockaddr *) 0, (size_t *) 0); return (a != 0);], mysql_cv_btype_last_arg_accept=size_t)] fi -if test $mysql_cv_btype_last_arg_accept = none; then +if test "$mysql_cv_btype_last_arg_accept" = "none"; then mysql_cv_btype_last_arg_accept=int fi) AC_LANG_RESTORE @@ -353,11 +353,11 @@ AC_CACHE_VAL(mysql_cv_termcap_lib, [AC_CHECK_LIB(termcap, tgetent, mysql_cv_termcap_lib=libtermcap, mysql_cv_termcap_lib=NOT_FOUND)])])]) AC_MSG_CHECKING(for termcap functions library) -if test $mysql_cv_termcap_lib = NOT_FOUND; then +if test "$mysql_cv_termcap_lib" = "NOT_FOUND"; then AC_MSG_ERROR([No curses/termcap library found]) -elif test $mysql_cv_termcap_lib = libtermcap; then +elif test "$mysql_cv_termcap_lib" = "libtermcap"; then TERMCAP_LIB=-ltermcap -elif test $mysql_cv_termcap_lib = libncurses; then +elif test "$mysql_cv_termcap_lib" = "libncurses"; then TERMCAP_LIB=-lncurses else TERMCAP_LIB=-lcurses @@ -413,7 +413,7 @@ AC_CACHE_VAL(mysql_cv_can_redecl_getpw, extern struct passwd *getpwent();], [struct passwd *z; z = getpwent();], mysql_cv_can_redecl_getpw=yes,mysql_cv_can_redecl_getpw=no)]) AC_MSG_RESULT($mysql_cv_can_redecl_getpw) -if test $mysql_cv_can_redecl_getpw = no; then +if test "$mysql_cv_can_redecl_getpw" = "no"; then AC_DEFINE(HAVE_GETPW_DECLS) fi ]) @@ -425,7 +425,7 @@ AC_CACHE_VAL(mysql_cv_tiocgwinsz_in_ioctl, #include ], [int x = TIOCGWINSZ;], mysql_cv_tiocgwinsz_in_ioctl=yes,mysql_cv_tiocgwinsz_in_ioctl=no)]) AC_MSG_RESULT($mysql_cv_tiocgwinsz_in_ioctl) -if test $mysql_cv_tiocgwinsz_in_ioctl = yes; then +if test "$mysql_cv_tiocgwinsz_in_ioctl" = "yes"; then AC_DEFINE(GWINSZ_IN_SYS_IOCTL) fi ]) @@ -437,7 +437,7 @@ AC_CACHE_VAL(mysql_cv_fionread_in_ioctl, #include ], [int x = FIONREAD;], mysql_cv_fionread_in_ioctl=yes,mysql_cv_fionread_in_ioctl=no)]) AC_MSG_RESULT($mysql_cv_fionread_in_ioctl) -if test $mysql_cv_fionread_in_ioctl = yes; then +if test "$mysql_cv_fionread_in_ioctl" = "yes"; then AC_DEFINE(FIONREAD_IN_SYS_IOCTL) fi ]) @@ -449,7 +449,7 @@ AC_CACHE_VAL(mysql_cv_tiocstat_in_ioctl, #include ], [int x = TIOCSTAT;], mysql_cv_tiocstat_in_ioctl=yes,mysql_cv_tiocstat_in_ioctl=no)]) AC_MSG_RESULT($mysql_cv_tiocstat_in_ioctl) -if test $mysql_cv_tiocstat_in_ioctl = yes; then +if test "$mysql_cv_tiocstat_in_ioctl" = "yes"; then AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL) fi ]) @@ -482,7 +482,7 @@ AC_CACHE_VAL(mysql_cv_dirent_has_dino, struct dirent d; int z; z = d.d_ino; ], mysql_cv_dirent_has_dino=yes, mysql_cv_dirent_has_dino=no)]) AC_MSG_RESULT($mysql_cv_dirent_has_dino) -if test $mysql_cv_dirent_has_dino = yes; then +if test "$mysql_cv_dirent_has_dino" = "yes"; then AC_DEFINE(STRUCT_DIRENT_HAS_D_INO) fi ]) @@ -501,7 +501,7 @@ extern "C" void (*signal ()) ();], [int i;], mysql_cv_void_sighandler=yes, mysql_cv_void_sighandler=no)])dnl AC_MSG_RESULT($mysql_cv_void_sighandler) -if test $mysql_cv_void_sighandler = yes; then +if test "$mysql_cv_void_sighandler" = "yes"; then AC_DEFINE(VOID_SIGHANDLER) fi ]) @@ -560,7 +560,7 @@ then AC_CACHE_CHECK([for working alloca.h], ac_cv_header_alloca_h, [AC_TRY_LINK([#include ], [char *p = alloca(2 * sizeof(int));], ac_cv_header_alloca_h=yes, ac_cv_header_alloca_h=no)]) - if test $ac_cv_header_alloca_h = yes + if test "$ac_cv_header_alloca_h" = "yes" then AC_DEFINE(HAVE_ALLOCA) fi @@ -584,11 +584,11 @@ then #endif ], [char *p = (char *) alloca(1);], ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)]) - if test $ac_cv_func_alloca_works = yes; then + if test "$ac_cv_func_alloca_works" = "yes"; then AC_DEFINE(HAVE_ALLOCA) fi - if test $ac_cv_func_alloca_works = no; then + if test "$ac_cv_func_alloca_works" = "no"; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, @@ -604,7 +604,7 @@ then wenotbecray #endif ], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) - if test $ac_cv_os_cray = yes; then + if test "$ac_cv_os_cray" = "yes"; then for ac_func in _getb67 GETB67 getb67; do AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func) break]) @@ -812,7 +812,7 @@ AC_MSG_CHECKING(for OpenSSL) case "$CLIENT_EXTRA_LDFLAGS $MYSQLD_EXTRA_LDFLAGS" in *-all-static*) using_static="yes" ;; esac - if test $using_static = "yes" + if test "$using_static" = "yes" then echo "You can't use the --all-static link option when using openssl." exit 1 -- cgit v1.2.1