diff -dur -x '*.orig' ntp-4.2.6p1.orig/configure.ac ntp-4.2.6p1/configure.ac --- ntp-4.2.6p1.orig/configure.ac 2010-05-24 20:26:21.000000000 +0200 +++ ntp-4.2.6p1/configure.ac 2010-05-24 20:32:57.000000000 +0200 @@ -3247,7 +3247,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], @@ -3257,39 +3256,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 /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, @@ -3301,14 +3275,6 @@ esac]) case "$ans" in no) ;; - yes) # look in: - ans="/usr/include /usr/sfw/include /usr/local/include /usr/local/ssl/include" - ;; - *) # Look where they said - ;; -esac -case "$ans" in - no) ;; *) # look for openssl/opensslconf.h: for i in $ans no do @@ -3335,7 +3301,7 @@ no) ;; yes|openssl) - if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC" + if test -z "$LCRYPTO" -o -z "$OPENSSL_INC" then ans=no else @@ -3349,11 +3315,9 @@ yes) # We have OpenSSL inc/lib - use them. 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?]) esac Only in ntp-4.2.6p1: configure.ac~