]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
added --with-ssl option to drill configuration (needed on for instance solaris on...
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Mon, 12 Dec 2005 14:27:30 +0000 (14:27 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Mon, 12 Dec 2005 14:27:30 +0000 (14:27 +0000)
drill/configure.ac

index 46039cacd6d81c1e3119e57880bca49f7368e384..ea4d7685ee4f5b5de3eee56efbc0819620226bb8 100644 (file)
@@ -19,6 +19,42 @@ AC_CHECK_HEADERS(sys/param.h sys/mount.h,,, [AC_INCLUDES_DEFAULT]
   ] 
 ])
 
+AC_ARG_WITH(ssl, AC_HELP_STRING([--with-ssl=pathname],
+                                    [enable SSL (will check /usr/local/ssl
+                            /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr)]),[
+        ],[
+            withval="yes"
+        ])
+    if test x_$withval != x_no; then
+        AC_MSG_CHECKING(for SSL)
+        if test x_$withval = x_ -o x_$withval = x_yes; then
+            withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
+        fi
+        for dir in $withval; do
+            ssldir="$dir"
+            if test -f "$dir/include/openssl/ssl.h"; then
+                found_ssl="yes";
+                AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.])
+                CPPFLAGS="$CPPFLAGS -I$ssldir/include";
+                break;
+            fi
+        done
+        if test x_$found_ssl != x_yes; then
+            AC_MSG_ERROR(Cannot find the SSL libraries in $withval)
+        else
+            AC_MSG_RESULT(found in $ssldir)
+            HAVE_SSL=yes
+            LDFLAGS="$LDFLAGS -L$ssldir/lib";
+#            CPPFLAGS="$CPPFLAGS -DHAVE_SSL -I$ssldir/include";
+            AC_CHECK_LIB(crypto, HMAC_CTX_init,, [
+                    AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required])
+                ])
+        fi
+        AC_SUBST(HAVE_SSL)
+    fi
+
+
+
 # check for ldns
 AC_ARG_WITH(ldns, 
        AC_HELP_STRING([--with-ldns=PATH        specify prefix of path of ldns library to use])