]> arthur.barton.de Git - netatalk.git/blobdiff - macros/ssl-check.m4
Use three-argument AC_DEFINE and AC_DEFINE_UNQUOTED to fix a deprecation
[netatalk.git] / macros / ssl-check.m4
index 62ef137e8e6797c1bba4a508bf285186f875fb91..8a9ef9b3f63935b3bdec987f725ec0bcef2b048f 100644 (file)
@@ -1,19 +1,21 @@
-dnl $Id: ssl-check.m4,v 1.2 2001-10-28 12:09:17 srittau Exp $
+dnl $Id: ssl-check.m4,v 1.8 2003-01-29 00:16:31 srittau Exp $
 dnl Autoconf macro to check for SSL or OpenSSL
 
 AC_DEFUN([AC_PATH_SSL], [
-       tryssl=yes
-
-       AC_ARG_WITH(ssl-dir, [
-  --with-ssl-dir=PATH     specify path to OpenSSL installation (must contain
+       AC_ARG_WITH(ssl-dir, [  --with-ssl-dir=PATH     specify path to OpenSSL installation (must contain
                           lib and include dirs)],
                [
-                       if test "x$withval" != "xno"; then
-                               tryssldir=$withval
-                       else
+                       if test "x$withval" = "xno"; then
                                tryssl=no
+                       elif test "x$withval" = "xyes"; then
+                               tryssl=yes
+                               tryssldir=
+                       else
+                               dnl FIXME: should only try in $withval
+                               tryssl=yes
+                               tryssldir="$withval"
                        fi
-               ]
+               ], [tryssl=yes]
        )
 
        SSL_CFLAGS=""
@@ -26,18 +28,19 @@ AC_DEFUN([AC_PATH_SSL], [
                        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"
-                               if test "$need_dash_r" = "yes"; then
+                               if test "x$need_dash_r" = "xyes"; then
                                        SSL_LIBS="$SSL_LIBS -R$ssldir/lib -R$ssldir"
                                fi
                                AC_MSG_RESULT([$ssldir (enabling RANDNUM and DHX support)])
 
+dnl FIXME: The following looks crude and probably doesn't work properly.
                                dnl Check for the crypto library:
                                AC_CHECK_LIB(crypto, main)
                                dnl Check for "DES" library (for SSLeay, not openssl):
                                AC_CHECK_LIB(des, main)
 
-                               AC_DEFINE(OPENSSL_DHX,  1)
-                               AC_DEFINE(UAM_DHX,      1)
+                               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
                                break
                        fi