]> git.pld-linux.org Git - packages/ntp.git/blob - ntp-openssl_check.patch
- TODO cosmetics
[packages/ntp.git] / ntp-openssl_check.patch
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
4 @@ -3247,7 +3247,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 @@ -3257,39 +3256,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 /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 + *)
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 +  ;;
54  esac
55 -AC_MSG_RESULT([$ans])
56  
57  AC_MSG_CHECKING([for openssl include directory])
58  AC_ARG_WITH(openssl-incdir,
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 @@
75   no)
76      ;;
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
83 @@ -3349,11 +3315,9 @@
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  
95 Only in ntp-4.2.6p1: configure.ac~
This page took 0.027052 seconds and 3 git commands to generate.