diff -dur ntp-4.2.0.orig/configure.ac ntp-4.2.0/configure.ac --- ntp-4.2.0.orig/configure.ac 2004-11-19 21:00:04.000000000 +0100 +++ ntp-4.2.0/configure.ac 2004-11-19 21:53:20.876855603 +0100 @@ -3012,7 +3012,6 @@ AC_SUBST(OPENSSL_INC) AC_SUBST(OPENSSL_LIB) -AC_MSG_CHECKING(for openssl library directory) AC_ARG_WITH(openssl-libdir, AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]), [ans=$withval], @@ -3022,39 +3021,14 @@ esac]) case "$ans" in no) ;; - yes) # Look in: - ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib" - ;; - *) # Look where they said - ;; -esac -case "$ans" in - no) ;; - *) # Look for libcrypto.a and libssl.a: - for i in $ans no - do - case "$host" in - *-*-darwin*) - test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break - ;; - *) - test -f $i/libcrypto.so -a -f $i/libssl.so && break - test -f $i/libcrypto.a -a -f $i/libssl.a && break - ;; - esac - done - case "$i" in - no) - ans=no - OPENSSL_LIB= - ;; - *) ans=$i - OPENSSL_LIB=$ans - ;; - esac + *) + if test "$ans" != "yes" ; then + LDFLAGS="$LDFLAGS -L$ans" + fi + AC_CHECK_LIB([crypto],[DES_crypt],[AC_SUBST(LCRYPTO,[-lcrypto])]) + AC_CHECK_LIB([ssl],[SSL_CTX_new],[AC_SUBST(LSSL,[-lssl])]) ;; esac -AC_MSG_RESULT($ans) AC_MSG_CHECKING(for openssl include directory) AC_ARG_WITH(openssl-incdir, @@ -3098,19 +3072,17 @@ case "$ans" in no) ;; yes|openssl) - if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC" + if test -z "$LCRYPTO" -o -z "$OPENSSL_INC" then ans=no else # We have OpenSSL inc/lib - use them. ans=openssl CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC" - LDFLAGS="$LDFLAGS -L$OPENSSL_LIB" case "$need_dash_r" in 1) LDFLAGS="$LDFLAGS -R$OPENSSL_LIB" ;; esac - AC_SUBST(LCRYPTO, [-lcrypto]) AC_DEFINE(OPENSSL, , [Use OpenSSL?]) AC_CHECK_FUNCS(EVP_md2 EVP_mdc2) fi