]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Eventually we will want to only find openssl once regardless of how
authorRoy T. Fielding <fielding@apache.org>
Thu, 10 May 2001 01:47:47 +0000 (01:47 +0000)
committerRoy T. Fielding <fielding@apache.org>
Thu, 10 May 2001 01:47:47 +0000 (01:47 +0000)
many modules depend on it, so make the check an autoconf macro.
Note that this still isn't being checked "the autoconf way", but it
is better than what we have now.

I'm not sure about the -R stuff, but I am told that Solaris won't
build without it.  This is something that should be tested using
AC_TRY_LINK rather than assuming openssl isn't already on the ld path.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/ssl@89063 13f79535-47bb-0310-9956-ffa450edef68

config.m4

index dcc98c30026ce1974498ebf2f9625d5793f81f08..86313301ee4bfc203ccdb58fb4b963898a0cf50d 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -78,105 +78,7 @@ ssl_util_table.lo dnl
 "
 dnl #  hook module into the Autoconf mechanism (--enable-ssl option)
 APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [
-
-    dnl #  hook into Autoconf mechanism (--with-ssl[=DIR] option)
-    AC_MSG_CHECKING(for SSL/TLS toolkit base)
-    ssltk_base="SYSTEM"
-    AC_ARG_WITH(ssl, [  --with-ssl[=DIR]        SSL/TLS toolkit (OpenSSL)], [
-        if test ".$withval" != .yes -a ".$withval" != .; then
-            ssltk_base="$withval"
-            if test ! -d $ssltk_base; then
-                AC_MSG_ERROR([invalid SSL/TLS toolkit base directory $ssltk_base])
-            fi
-        fi
-    ])
-    AC_MSG_RESULT($ssltk_base)
-    
-    dnl #   determine SSL/TLS toolkit frontend (openssl binary)
-    AC_MSG_CHECKING(for SSL/TLS toolkit frontend)
-    ssltk_frontend=""
-    if test ".$ssltk_base" = .SYSTEM; then
-        for p in . `echo $PATH | sed -e 's/:/ /g'` /usr/local/openssl/bin /usr/local/ssl/bin; do
-            if test -f "$p/openssl"; then
-                ssltk_frontend="$p/openssl"
-                break
-            fi
-        done
-        if test ".$ssltk_frontend" = .; then
-            AC_MSG_ERROR(['openssl' not found in $PATH])
-        fi
-    else
-        if test -f "$ssltk_base/bin/openssl"; then
-            ssltk_frontend="$ssltk_base/bin/openssl"
-        else
-            AC_MSG_ERROR(['openssl' not found in $ssltk_base/bin/])
-        fi
-    fi
-    AC_MSG_RESULT($ssltk_frontend)
-
-    dnl #   determine SSL/TLS toolkit version
-    AC_MSG_CHECKING(for SSL/TLS toolkit version)
-    ssltk_version="`$ssltk_frontend version`"
-    case "$ssltk_version" in
-        *0.9.[[6789]]* ) ;;
-        * ) AC_MSG_ERROR([SSL/TLS toolkit version $ssltk_version not supported]) ;;
-    esac
-    AC_MSG_RESULT($ssltk_version)
-
-    dnl #   determine SSL/TLS toolkit include directory
-    AC_MSG_CHECKING(for SSL/TLS toolkit includes)
-    ssltk_incdir=""
-    if test ".$ssltk_base" = .SYSTEM; then
-        for p in . /usr/local/openssl/include /usr/local/ssl/include /usr/local/include/ssl /usr/local/include /usr/include/ssl /usr/include; do
-            if test -f "$p/openssl/ssl.h"; then
-                ssltk_incdir="$p"
-                break
-            fi
-        done
-        if test ".$ssltk_incdir" = .; then
-            AC_MSG_ERROR([OpenSSL headers not found])
-        fi
-    else
-        if test -f "$ssltk_base/include/openssl/ssl.h"; then
-            ssltk_incdir="$ssltk_base/include"
-        else
-            AC_MSG_ERROR([OpenSSL headers not found under $ssltk_base])
-        fi
-    fi
-    AC_MSG_RESULT($ssltk_incdir)
-
-    dnl #   determine SSL/TLS toolkit library directory
-    AC_MSG_CHECKING(for SSL/TLS toolkit libraries)
-    ssltk_libdir=""
-    if test ".$ssltk_base" = .SYSTEM; then
-        for p in . /usr/local/openssl/lib /usr/local/ssl/lib /usr/local/lib/ssl /usr/local/lib /usr/lib/ssl /usr/lib /lib; do
-            if test -f "$p/libssl.a" -o -f "$p/libssl.so"; then
-                ssltk_libdir="$p"
-                break
-            fi
-        done
-        if test ".$ssltk_libdir" = .; then
-            AC_MSG_ERROR([OpenSSL libraries not found])
-        fi
-    else
-        if test -f "$ssltk_base/libssl.a" -o -f "$ssltk_base/libssl.so"; then
-            ssltk_libdir="$ssltk_base"
-        elif test -f "$ssltk_base/lib/libssl.a" -o -f "$ssltk_base/lib/libssl.so"; then
-            ssltk_libdir="$ssltk_base/lib"
-        else
-            AC_MSG_ERROR([OpenSSL libraries not found under $ssltk_base])
-        fi
-    fi
-    AC_MSG_RESULT($ssltk_libdir)
-
-    dnl #  annotate the Apache build environment with determined information
-    if test ".$ssltk_incdir" != "./usr/include"; then
-        APR_ADDTO(INCLUDES, [-I$ssltk_incdir])
-    fi
-    if test ".$ssltk_libdir" != "./usr/lib"; then
-        APR_ADDTO(LIBS, [-L$ssltk_libdir])
-    fi
-    APR_ADDTO(LIBS, [-lssl -lcrypto])
+    APACHE_CHECK_SSL_TOOLKIT
 ])
 
 dnl #  end of module specific part