]> arthur.barton.de Git - netatalk.git/blobdiff - macros/ssl-check.m4
Add a timeout when reading data from afpd client in cnid_metad, from Tsiyon Sadiky...
[netatalk.git] / macros / ssl-check.m4
index 8e82adae55bbb9cc0c73cc3546568e77e471cca4..75365b1a65e69e57af3e462d334a1abe2eeb4cb4 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: ssl-check.m4,v 1.8.6.2 2003-10-29 23:53:24 bfernhomberg Exp $
+dnl $Id: ssl-check.m4,v 1.8.6.4 2004-08-11 03:03:50 bfernhomberg Exp $
 dnl Autoconf macro to check for SSL or OpenSSL
 
 AC_DEFUN([AC_CRYPT], [
@@ -37,18 +37,24 @@ AC_DEFUN([AC_PATH_SSL], [
        SSL_CFLAGS=""
        SSL_LIBS=""
        saved_LIBS=$LIBS
+       saved_CFLAGS=$CFLAGS
        compile_ssl=no
 
+       dnl make sure atalk_libname is defined beforehand
+       [[ -n "$atalk_libname" ]] || AC_MSG_ERROR([internal error, atalk_libname undefined])
+
        if test "$tryssl" = "yes"; then
                AC_MSG_CHECKING([for SSL])
-               for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl /usr/local/ssl ; do
+               for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/$atalk_libname/openssl /usr/local/ssl /usr/$atalk_libname/ssl /usr/local /usr/pkg /opt /opt/openssl /usr/local/ssl ; do
                        if test -f "$ssldir/include/openssl/cast.h" ; then
                                SSL_CFLAGS="$SSL_CFLAGS -I$ssldir/include -I$ssldir/include/openssl"
-                               SSL_LIBS="$SSL_LIBS -L$ssldir/lib -L$ssldir -lcrypto"
+                               SSL_LIBS="$SSL_LIBS -L$ssldir/$atalk_libname -L$ssldir -lcrypto"
                                if test "x$need_dash_r" = "xyes"; then
-                                       SSL_LIBS="$SSL_LIBS -R$ssldir/lib -R$ssldir"
+                                       SSL_LIBS="$SSL_LIBS -R$ssldir/$atalk_libname -R$ssldir"
                                fi
                                AC_MSG_RESULT([$ssldir (enabling RANDNUM and DHX support)])
+                               CFLAGS="$CFLAGS $SSL_CFLAGS"
+                               LIBS="$LIBS $SSL_LIBS"
 
 dnl FIXME: The following looks crude and probably doesn't work properly.
                                dnl Check for the crypto library:
@@ -59,6 +65,8 @@ dnl FIXME: The following looks crude and probably doesn't work properly.
                                AC_DEFINE(OPENSSL_DHX,  1, [Define if the OpenSSL DHX modules should be built])
                                AC_DEFINE(UAM_DHX,      1, [Define if the DHX UAM modules should be compiled])
                                compile_ssl=yes
+                               CFLAGS=$saved_CFLAGS
+                               LIBS=$saved_LIBS
                                break
                        fi
                done