]>
Commit | Line | Data |
---|---|---|
90a82b10 JK |
1 | diff -dur -x '*.orig' ntp-4.2.6p1.orig/configure.ac ntp-4.2.6p1/configure.ac |
2 | --- ntp-4.2.6p1.orig/configure.ac 2010-05-24 20:26:21.000000000 +0200 | |
3 | +++ ntp-4.2.6p1/configure.ac 2010-05-24 20:32:57.000000000 +0200 | |
121d6d6f | 4 | @@ -3247,7 +3247,6 @@ |
6754e9cd AM |
5 | AC_SUBST(OPENSSL_INC) |
6 | AC_SUBST(OPENSSL_LIB) | |
b0c43197 | 7 | |
400e3fbb | 8 | -AC_MSG_CHECKING([for openssl library directory]) |
b0c43197 JK |
9 | AC_ARG_WITH(openssl-libdir, |
10 | AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]), | |
6754e9cd | 11 | [ans=$withval], |
90a82b10 JK |
12 | @@ -3257,39 +3256,14 @@ |
13 | esac]) | |
b0c43197 JK |
14 | case "$ans" in |
15 | no) ;; | |
90a82b10 JK |
16 | - yes) # Look in: |
17 | - ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib /lib" | |
18 | - ;; | |
19 | - *) # Look where they said | |
20 | - ;; | |
21 | -esac | |
22 | -case "$ans" in | |
23 | - no) ;; | |
b0c43197 JK |
24 | - *) # Look for libcrypto.a and libssl.a: |
25 | - for i in $ans no | |
26 | - do | |
27 | - case "$host" in | |
28 | - *-*-darwin*) | |
29 | - test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break | |
30 | - ;; | |
31 | - *) | |
6754e9cd | 32 | - test -f $i/libcrypto.so -a -f $i/libssl.so && break |
b0c43197 JK |
33 | - test -f $i/libcrypto.a -a -f $i/libssl.a && break |
34 | - ;; | |
35 | - esac | |
36 | - done | |
37 | - case "$i" in | |
38 | - no) | |
39 | - ans=no | |
40 | - OPENSSL_LIB= | |
41 | - ;; | |
42 | - *) ans=$i | |
43 | - OPENSSL_LIB=$ans | |
44 | - ;; | |
45 | - esac | |
121d6d6f JK |
46 | - ;; |
47 | + *) | |
48 | + if test "$ans" != "yes" ; then | |
49 | + LDFLAGS="$LDFLAGS -L$ans" | |
50 | + fi | |
51 | + AC_CHECK_LIB([crypto],[DES_crypt],[AC_SUBST(LCRYPTO,[-lcrypto])]) | |
52 | + AC_CHECK_LIB([ssl],[SSL_CTX_new],[AC_SUBST(LSSL,[-lssl])]) | |
53 | + ;; | |
b0c43197 | 54 | esac |
400e3fbb | 55 | -AC_MSG_RESULT([$ans]) |
b0c43197 | 56 | |
400e3fbb | 57 | AC_MSG_CHECKING([for openssl include directory]) |
b0c43197 | 58 | AC_ARG_WITH(openssl-incdir, |
90a82b10 JK |
59 | @@ -3301,14 +3275,6 @@ |
60 | esac]) | |
61 | case "$ans" in | |
62 | no) ;; | |
63 | - yes) # look in: | |
64 | - ans="/usr/include /usr/sfw/include /usr/local/include /usr/local/ssl/include" | |
65 | - ;; | |
66 | - *) # Look where they said | |
67 | - ;; | |
68 | -esac | |
69 | -case "$ans" in | |
70 | - no) ;; | |
71 | *) # look for openssl/opensslconf.h: | |
72 | for i in $ans no | |
73 | do | |
74 | @@ -3335,7 +3301,7 @@ | |
121d6d6f JK |
75 | no) |
76 | ;; | |
b0c43197 JK |
77 | yes|openssl) |
78 | - if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC" | |
79 | + if test -z "$LCRYPTO" -o -z "$OPENSSL_INC" | |
80 | then | |
81 | ans=no | |
82 | else | |
90a82b10 | 83 | @@ -3349,11 +3315,9 @@ |
121d6d6f JK |
84 | yes) |
85 | # We have OpenSSL inc/lib - use them. | |
86 | CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC" | |
87 | - LDFLAGS="$LDFLAGS -L$OPENSSL_LIB" | |
88 | case "$need_dash_r" in | |
89 | 1) LDFLAGS="$LDFLAGS -R$OPENSSL_LIB" | |
90 | esac | |
91 | - AC_SUBST(LCRYPTO, [-lcrypto]) | |
92 | AC_DEFINE(OPENSSL, , [Use OpenSSL?]) | |
93 | esac | |
94 | ||
90a82b10 | 95 | Only in ntp-4.2.6p1: configure.ac~ |