]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 519] Allow dynamic SSL libraries
authorHarlan Stenn <stenn@ntp.org>
Wed, 26 Oct 2005 00:15:47 +0000 (20:15 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 26 Oct 2005 00:15:47 +0000 (20:15 -0400)
bk: 435ecab37RnR0mEdjBf9AAmtuZsRlQ

configure.ac
ntpd/ntpd.c

index c9586cef92e62c89dcd7bf91bc94b9c16e1ff28e..4232976f89dd9a099d1d385012d6c39b8123372d 100644 (file)
@@ -2784,7 +2784,7 @@ AC_ARG_WITH(openssl-libdir,
 case "$ans" in
  no) ;;
  yes) # Look in:
-    ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
+    ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib"
     ;;
  *) # Look where they said
     ;;
@@ -2799,6 +2799,7 @@ case "$ans" in
            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
@@ -2823,7 +2824,7 @@ AC_ARG_WITH(openssl-incdir,
 case "$ans" in
  no) ;;
  yes) # look in:
-    ans="/usr/include /usr/local/include /usr/local/ssl/include"
+    ans="/usr/include /usr/sfw/include /usr/local/include /usr/local/ssl/include"
     ;;
  *) # Look where they said
     ;;
index b03bbfc0f6476ea6cc60aaa7e27c308586416abe..64739a4912025f5ec8731e377c1de125f3a4ddf5 100644 (file)
@@ -449,6 +449,15 @@ ntpdmain(
        }
 #endif
 
+#ifdef OPENSSL
+       if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) {
+               msyslog(LOG_ERR,
+                   "ntpd: OpenSSL version mismatch. Built against %lx, you have %lx\n",
+                   OPENSSL_VERSION_NUMBER, SSLeay());
+               exit(1);
+       }
+#endif
+
 #ifdef SYS_WINNT
        /*
         * Initialize the time structures and variables