Alan DeKok wrote:
Gary Algier <[EMAIL PROTECTED]> wrote:

Swapping
the tests fails because it won't look for -lcrypto until too late.  I
think the tests need to be rewritten.


That's nice. Do you have a patch?

Yes. See attached.

5 files modified:
    aclocal.m4 -- The AC_SMART_CHECK_LIB macro was modified to allow arguments
                  before (not needed here) and after (for -lcrypto) the library.
    configure.in (in 2 places) -- Modified to:
                  a) Not try to link -lssl unless -lcrypto worked
                  b) Pass -lcrypto to AC_SMART_CHECK_LIB
    configure (in 2 places) -- I did not include these as they can
                  be regenerated with autoconf.  I tried the first
                  time, but my email was too large so it was rejected.


Alan DeKok.



--
Gary Algier, WB2FWZ          gaa at ulticom.com             +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054      Fax:+1 856 866 2033

Nielsen's First Law of Computer Manuals:
     People don't read documentation voluntarily.

Index: aclocal.m4
===================================================================
RCS file: /u/itsrc/cvs/security/radius/freeradius/aclocal.m4,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -u -r1.1.1.1 -r1.1.1.1.2.1
--- aclocal.m4  10 Nov 2003 21:46:37 -0000      1.1.1.1
+++ aclocal.m4  11 Nov 2003 22:21:07 -0000      1.1.1.1.2.1
@@ -4037,21 +4037,21 @@
 dnl #  Try to link it first, using the default libs && library paths
 dnl #
   old_LIBS="$LIBS"
-  LIBS="$LIBS -l$1"
+  LIBS="$LIBS $3 -l$1 $4"
   AC_TRY_LINK([extern char $2();],
               [ $2()],
-             smart_lib="-l$1")
+             smart_lib="$3 -l$1 $4")
 
   if test "x$smart_lib" = "x"; then
     AC_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}])
     AC_LOCATE_DIR(smart_lib_dir,[lib$1.a])
 
     for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
-      LIBS="$old_LIBS -L$try -l$1"
+      LIBS="$old_LIBS -L$try $3 -l$1 $4"
 
       AC_TRY_LINK([extern char $2();],
                   [ $2()],
-                 smart_lib="-L$try -l$1")
+                 smart_lib="-L$try $3 -l$1 $4")
       if test "x$smart_lib" != "x"; then
         break;
       fi
Index: src/modules/rlm_eap/types/rlm_eap_tls/configure.in
===================================================================
RCS file: 
/u/itsrc/cvs/security/radius/freeradius/src/modules/rlm_eap/types/rlm_eap_tls/configure.in,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -u -r1.1.1.1 -r1.1.1.1.2.1
--- src/modules/rlm_eap/types/rlm_eap_tls/configure.in  10 Nov 2003 21:46:56 -0000     
 1.1.1.1
+++ src/modules/rlm_eap/types/rlm_eap_tls/configure.in  11 Nov 2003 22:21:50 -0000     
 1.1.1.1.2.1
@@ -53,7 +53,9 @@
            fail="$fail libcrypto"
     fi
 
-       AC_SMART_CHECK_LIB(ssl, SSL_new)
+        if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
+           AC_SMART_CHECK_LIB(ssl, SSL_new, , -lcrypto)
+        fi
     if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
            fail="$fail libssl"
     fi
Index: src/modules/rlm_ldap/configure.in
===================================================================
RCS file: /u/itsrc/cvs/security/radius/freeradius/src/modules/rlm_ldap/configure.in,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.2.1
diff -u -u -r1.1.1.1 -r1.1.1.1.2.1
--- src/modules/rlm_ldap/configure.in   10 Nov 2003 21:46:52 -0000      1.1.1.1
+++ src/modules/rlm_ldap/configure.in   11 Nov 2003 22:21:51 -0000      1.1.1.1.2.1
@@ -49,7 +49,9 @@
 
        AC_SMART_CHECK_LIB(sasl, sasl_encode)
        AC_SMART_CHECK_LIB(crypto, DH_new)
-       AC_SMART_CHECK_LIB(ssl, SSL_new)
+       if test "x$ac_cv_lib_crypto_DH_new" = "xyes"; then
+         AC_SMART_CHECK_LIB(ssl, SSL_new, ,-lcrypto)
+       fi
 
        smart_try_dir=$rlm_ldap_lib_dir
        AC_SMART_CHECK_LIB(lber, ber_init)

Reply via email to