]> git.pld-linux.org Git - packages/ntp.git/blob - ntp-openssl_check.patch
- up to 4.2.4p0
[packages/ntp.git] / ntp-openssl_check.patch
1 diff -dur ntp-4.2.0.orig/configure.ac ntp-4.2.0/configure.ac
2 --- ntp-4.2.0.orig/configure.ac 2004-11-19 21:00:04.000000000 +0100
3 +++ ntp-4.2.0/configure.ac      2004-11-19 21:53:20.876855603 +0100
4 @@ -3012,7 +3012,6 @@
5  AC_SUBST(OPENSSL_INC)
6  AC_SUBST(OPENSSL_LIB)
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],
12 @@ -3022,39 +3021,14 @@
13  esac])
14  case "$ans" in
15   no) ;;
16 - yes) # Look in:
17 -    ans="/usr/lib /usr/lib/openssl /usr/sfw/lib /usr/local/lib /usr/local/ssl/lib"
18 -    ;;
19 - *) # Look where they said
20 -    ;;
21 -esac
22 -case "$ans" in
23 - no) ;;
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 -        *)
32 -           test -f $i/libcrypto.so -a -f $i/libssl.so && break
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
46 +  *)
47 +   if test "$ans" != "yes" ; then
48 +       LDFLAGS="$LDFLAGS -L$ans"
49 +   fi
50 +   AC_CHECK_LIB([crypto],[DES_crypt],[AC_SUBST(LCRYPTO,[-lcrypto])])
51 +   AC_CHECK_LIB([ssl],[SSL_CTX_new],[AC_SUBST(LSSL,[-lssl])])
52      ;;
53  esac
54 -AC_MSG_RESULT($ans)
55  
56  AC_MSG_CHECKING(for openssl include directory)
57  AC_ARG_WITH(openssl-incdir,
58 @@ -3098,19 +3072,17 @@
59  case "$ans" in
60   no) ;;
61   yes|openssl)
62 -    if test -z "$OPENSSL_LIB" -o -z "$OPENSSL_INC"
63 +    if test -z "$LCRYPTO" -o -z "$OPENSSL_INC"
64      then
65         ans=no
66      else
67         # We have OpenSSL inc/lib - use them.
68         ans=openssl
69         CPPFLAGS="$CPPFLAGS -I$OPENSSL_INC"
70 -       LDFLAGS="$LDFLAGS -L$OPENSSL_LIB"
71         case "$need_dash_r" in
72          1) LDFLAGS="$LDFLAGS -R$OPENSSL_LIB"
73             ;;
74         esac
75 -       AC_SUBST(LCRYPTO, [-lcrypto])
76         AC_DEFINE(OPENSSL, , [Use OpenSSL?])
77         AC_CHECK_FUNCS(EVP_md2 EVP_mdc2)
78      fi
79
This page took 0.036812 seconds and 4 git commands to generate.