Pull from CVS head:
authornbk <nbk>
Wed, 21 Dec 2005 15:40:40 +0000 (15:40 +0000)
committernbk <nbk>
Wed, 21 Dec 2005 15:40:40 +0000 (15:40 +0000)
Use the user-supplied options for the tests, too.

src/modules/rlm_otp/configure.in

index 5ea3ce8..c54c49e 100644 (file)
@@ -26,29 +26,33 @@ if test x$with_[]modname != xno; then
        otp_ldflags="-L$withval $otp_ldflags")
        AC_ARG_WITH(rlm-otp-include-dir,
        [  --with-rlm-otp-include-dir    directory for otp includes],
-       otp_cflags="-I$withval $otp_cflags")
-
-       dnl extra argument: --openssl-includes=dir
-       AC_ARG_WITH(openssl-includes,
-       [  --with-openssl-includes=DIR   directory to look for OpenSSL include files],
-       otp_cflags="-I$withval $otp_cflags")
+       otp_cflags="$otp_cflags -I$withval")
 
        dnl extra argument: --openssl-libraries=dir
        AC_ARG_WITH(openssl-libraries,
        [  --with-openssl-libraries=DIR  directory to look for OpenSSL library files],
        otp_ldflags="-L$withval $otp_ldflags")
 
+       dnl extra argument: --openssl-includes=dir
+       AC_ARG_WITH(openssl-includes,
+       [  --with-openssl-includes=DIR   directory to look for OpenSSL include files],
+       otp_cflags="$otp_cflags -I$withval")
 
        dnl ############################################################
        dnl # Check for libraries
        dnl ############################################################
 
+       old_LDFLAGS="$LDFLAGS"
+       LDFLAGS="$otp_ldflags $LDFLAGS"
        AC_CHECK_LIB(ssl, SSL_new, [], [ fail="$fail openssl-libs" ])
+       LDFLAGS="$old_LDFLAGS"
 
        dnl ############################################################
        dnl # Check for header files
        dnl ############################################################
 
+       old_CFLAGS="$CFLAGS"
+       CFLAGS="$CFLAGS $otp_cflags"
        AC_CHECK_HEADERS( \
                openssl/des.h \
                openssl/hmac.h \
@@ -58,6 +62,7 @@ if test x$with_[]modname != xno; then
                [],
                [ fail="$fail openssl-includes" ]
        )
+       CFLAGS="$old_CFLAGS"
 
        targetname=modname     # keep this!  Don't change!
 else