Allow EAP-SIM, EAP-TLS and EAP-TTLS to find the default OpenSSL installation
authorphampson <phampson>
Thu, 5 Feb 2004 07:29:57 +0000 (07:29 +0000)
committerphampson <phampson>
Thu, 5 Feb 2004 07:29:57 +0000 (07:29 +0000)
without needed parameters, like EAP-PEAP already does.
Pointed out by Lars Boegild Thomsen

src/modules/rlm_eap/types/rlm_eap_peap/configure.in
src/modules/rlm_eap/types/rlm_eap_sim/configure.in
src/modules/rlm_eap/types/rlm_eap_tls/configure.in
src/modules/rlm_eap/types/rlm_eap_ttls/configure.in

index f9fb72f..98d5507 100644 (file)
@@ -84,9 +84,9 @@ if test x$with_[]modname != xno; then
            fail="$fail libssl"
     fi
 
-AC_CHECK_HEADERS( \
-       openssl/err.h \
-       openssl/engine.h
+       AC_CHECK_HEADERS( \
+               openssl/err.h \
+               openssl/engine.h \
        )
 
        targetname=modname
index 44f3e62..b1ac4e6 100644 (file)
@@ -9,17 +9,53 @@ if test x$with_[]modname != xno; then
 
        AC_PROG_CC
 
-       if test "x$OPENSSL_INCLUDE" != "x"; then
-         SMART_CFLAGS="-I$OPENSSL_INCLUDE"
-       else
-         fail="$fail (openssl/ssl.h)"
+       dnl #
+       dnl # extra argument: --openssl-includes=dir
+       dnl #
+       AC_ARG_WITH(openssl-includes,
+       [  --with-openssl-includes=DIR       Directory to look for OpenSSL include files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
+               SMART_CFLAGS="$SMART_CFLAGS -I$withval"
+               ;;
+         esac ]
+       )
+
+       dnl #
+       dnl # extra argument: --openssl-libraries=dir
+       dnl #
+       AC_ARG_WITH(openssl-libraries,
+       [  --with-openssl-libraries=DIR      Directory to look for OpenSSL library files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
+               SMART_LIBS="$SMART_LIBS -L$withval"
+               ;;
+         esac ]
+       )
+
+       smart_try_dir=$rlm_eap_peap_inc_dir
+       AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
+       if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
+               fail="$fail (openssl/ssl.h)"
        fi
 
-       if test "x$OPENSSL_LIBS" != "x"; then
-         SMART_LIBS="-L$OPENSSL_LIBS -lcrypto -lssl"
-       else
-         fail="$fail libssl"
-        fi
+       smart_try_dir=$rlm_eap_peap_lib_dir
+       AC_SMART_CHECK_LIB(crypto, DH_new)
+    if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
+           fail="$fail libcrypto"
+    fi
+
+       AC_SMART_CHECK_LIB(ssl, SSL_new)
+    if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
+           fail="$fail libssl"
+    fi
+
+       AC_CHECK_HEADERS( \
+               openssl/err.h \
+               openssl/engine.h \
+       )
 
        targetname=modname
 else
index e39ec61..2fba8bc 100644 (file)
@@ -9,17 +9,53 @@ if test x$with_[]modname != xno; then
 
        AC_PROG_CC
 
-       if test "x$OPENSSL_INCLUDE" != "x"; then
-         SMART_CFLAGS="-I$OPENSSL_INCLUDE"
-       else
-         fail="$fail (openssl/ssl.h)"
+       dnl #
+       dnl # extra argument: --openssl-includes=dir
+       dnl #
+       AC_ARG_WITH(openssl-includes,
+       [  --with-openssl-includes=DIR       Directory to look for OpenSSL include files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
+               SMART_CFLAGS="$SMART_CFLAGS -I$withval"
+               ;;
+         esac ]
+       )
+
+       dnl #
+       dnl # extra argument: --openssl-libraries=dir
+       dnl #
+       AC_ARG_WITH(openssl-libraries,
+       [  --with-openssl-libraries=DIR      Directory to look for OpenSSL library files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
+               SMART_LIBS="$SMART_LIBS -L$withval"
+               ;;
+         esac ]
+       )
+
+       smart_try_dir=$rlm_eap_peap_inc_dir
+       AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
+       if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
+               fail="$fail (openssl/ssl.h)"
        fi
 
-       if test "x$OPENSSL_LIBS" != "x"; then
-         SMART_LIBS="-L$OPENSSL_LIBS -lcrypto -lssl"
-       else
-         fail="$fail libssl"
-        fi
+       smart_try_dir=$rlm_eap_peap_lib_dir
+       AC_SMART_CHECK_LIB(crypto, DH_new)
+    if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
+           fail="$fail libcrypto"
+    fi
+
+       AC_SMART_CHECK_LIB(ssl, SSL_new)
+    if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
+           fail="$fail libssl"
+    fi
+
+       AC_CHECK_HEADERS( \
+               openssl/err.h \
+               openssl/engine.h \
+       )
 
        targetname=modname
 else
index 36fba19..bd39c3d 100644 (file)
@@ -9,17 +9,53 @@ if test x$with_[]modname != xno; then
 
        AC_PROG_CC
 
-       if test "x$OPENSSL_INCLUDE" != "x"; then
-         SMART_CFLAGS="-I$OPENSSL_INCLUDE"
-       else
-         fail="$fail (openssl/ssl.h)"
+       dnl #
+       dnl # extra argument: --openssl-includes=dir
+       dnl #
+       AC_ARG_WITH(openssl-includes,
+       [  --with-openssl-includes=DIR       Directory to look for OpenSSL include files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
+               SMART_CFLAGS="$SMART_CFLAGS -I$withval"
+               ;;
+         esac ]
+       )
+
+       dnl #
+       dnl # extra argument: --openssl-libraries=dir
+       dnl #
+       AC_ARG_WITH(openssl-libraries,
+       [  --with-openssl-libraries=DIR      Directory to look for OpenSSL library files],
+       [ case "$withval" in
+           *)
+               rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
+               SMART_LIBS="$SMART_LIBS -L$withval"
+               ;;
+         esac ]
+       )
+
+       smart_try_dir=$rlm_eap_peap_inc_dir
+       AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
+       if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
+               fail="$fail (openssl/ssl.h)"
        fi
 
-       if test "x$OPENSSL_LIBS" != "x"; then
-         SMART_LIBS="-L$OPENSSL_LIBS -lcrypto -lssl"
-       else
-         fail="$fail libssl"
-        fi
+       smart_try_dir=$rlm_eap_peap_lib_dir
+       AC_SMART_CHECK_LIB(crypto, DH_new)
+    if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
+           fail="$fail libcrypto"
+    fi
+
+       AC_SMART_CHECK_LIB(ssl, SSL_new)
+    if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
+           fail="$fail libssl"
+    fi
+
+       AC_CHECK_HEADERS( \
+               openssl/err.h \
+               openssl/engine.h \
+       )
 
        targetname=modname
 else