]> git.pld-linux.org Git - packages/ntp.git/blame - ntp-openssl_check.patch
- Avoid building conflicting md5 functions if they are available
[packages/ntp.git] / ntp-openssl_check.patch
CommitLineData
b0c43197
JK
1diff -dur ntp-4.2.0.orig/configure.in ntp-4.2.0/configure.in
2--- ntp-4.2.0.orig/configure.in 2004-11-19 21:00:04.000000000 +0100
3+++ ntp-4.2.0/configure.in 2004-11-19 21:53:20.876855603 +0100
4@@ -2576,44 +2576,19 @@
5
6 AC_SUBST(MAKE_NTP_KEYGEN)
7
8-AC_MSG_CHECKING(for openssl library directory)
9 AC_ARG_WITH(openssl-libdir,
10 AC_HELP_STRING([--with-openssl-libdir], [+ =/something/reasonable]),
11 [ans=$withval], [ans=yes])
12 case "$ans" in
13 no) ;;
14- yes) # Look in:
15- ans="/usr/lib /usr/lib/openssl /usr/local/lib /usr/local/ssl/lib"
16- ;;
17- *) # Look where they said
18- ;;
19-esac
20-case "$ans" in
21- no) ;;
22- *) # Look for libcrypto.a and libssl.a:
23- for i in $ans no
24- do
25- case "$host" in
26- *-*-darwin*)
27- test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
28- ;;
29- *)
30- test -f $i/libcrypto.a -a -f $i/libssl.a && break
31- ;;
32- esac
33- done
34- case "$i" in
35- no)
36- ans=no
37- OPENSSL_LIB=
38- ;;
39- *) ans=$i
40- OPENSSL_LIB=$ans
41- ;;
42- esac
43- ;;
44+ *)
45+ if test "$ans" != "yes" ; then
46+ LDFLAGS="$LDFLAGS -L$ans"
47+ fi
48+ AC_CHECK_LIB([crypto],[DES_crypt],[AC_SUBST(LCRYPTO,[-lcrypto])])
49+ AC_CHECK_LIB([ssl],[SSL_CTX_new],[AC_SUBST(LSSL,[-lssl])])
50+ ;;
51 esac
52-AC_MSG_RESULT($ans)
53
54 AC_MSG_CHECKING(for openssl include directory)
55 AC_ARG_WITH(openssl-incdir,
56@@ -2653,15 +2628,13 @@
57 case "$ans" in
58 no) ;;
59 yes|openssl)
60- if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
61+ if test -z "$LCRYPTO" -o -z "$OPENSSL_INC"
62 then
63 ans=no
64 else
65 # We have OpenSSL inc/lib - use them.
66 ans=openssl
67 CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
68- LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
69- AC_SUBST(LCRYPTO, [-lcrypto])
70 MAKE_NTP_KEYGEN=ntp-keygen
71 AC_DEFINE(OPENSSL, , [Use OpenSSL?])
72 AC_CHECK_FUNCS(EVP_md2 EVP_mdc2)
This page took 0.04056 seconds and 4 git commands to generate.