The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / libeXosip2 / 0002-use-pkg-config-to-detect-openssl.patch
1 configure: use pkg-config to find openssl
2
3 The current check is broken for static linking, since the openssl
4 libs need to be linked against libz, which is missing in the link
5 command when doing a static build:
6     http://autobuild.buildroot.net/results/787/787cd9992b00d8008641af208f5fb7c4afb40b06/build-end.log
7
8 Instead of trying convoluted tests to decide what additional libs
9 are required, just delegate this job to pkg-config.
10
11 At the same time, fix a few legacy, deprecated constructs in favour
12 of their new counterparts.
13
14 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
15
16 ---
17 Upstream status: submitted, but no public mailing list (sent to the
18 mail documented in: http://www.antisip.com/doc/exosip2/index.html )
19
20 diff -durN libeXosip2-3.6.0.orig/configure.in libeXosip2-3.6.0/configure.in
21 --- libeXosip2-3.6.0.orig/configure.in  2014-06-22 23:58:26.549487427 +0200
22 +++ libeXosip2-3.6.0/configure.in       2014-06-22 23:59:12.822008499 +0200
23 @@ -44,7 +44,7 @@
24  AC_CONFIG_AUX_DIR(scripts)
25  AC_CONFIG_HEADERS(config.h)
26  AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
27 -AM_ACLOCAL_INCLUDE(scripts)
28 +AC_CONFIG_MACRO_DIR([scripts])
29  
30  AC_CANONICAL_HOST
31  
32 @@ -371,13 +371,15 @@
33  
34  AC_ARG_ENABLE(openssl,
35         [  --enable-openssl        enable support for openssl],
36 -       enable_openssl=$enableval,enable_openssl="yes")
37 +       enable_openssl=$enableval,enable_openssl="auto")
38  
39 -if test "$enable_openssl" = "yes" ; then
40 -       AC_CHECK_HEADERS(openssl/ssl.h)
41 -       AC_CHECK_LIB(ssl,SSL_CTX_new,[EXOSIP_LIB="$EXOSIP_LIB -lssl"])
42 -       AC_CHECK_LIB(crypto,X509_get_issuer_name,[EXOSIP_LIB="$EXOSIP_LIB -lcrypto"])
43 -fi
44 +AS_IF([test "$enable_openssl" = "yes" -o "$enable_openssl" = "auto"],
45 +      [PKG_CHECK_MODULES([SSL], [openssl],
46 +                         [EXOSIP_LIB="$EXOSIP_LIB $SSL_LIBS"],
47 +                         [AS_IF([test "$enable_openssl" = "yes"],
48 +                                [AC_MSG_ERROR([can not find openssl])])
49 +                         ])
50 +      ])
51  
52  AC_ARG_ENABLE(srvrec,
53         [  --enable-srvrec         enable support for SRV records DNS queries (yes) ],
54 diff -durN build/libeXosip2-3.6.0.orig/Makefile.am build/libeXosip2-3.6.0/Makefile.am
55 --- libeXosip2-3.6.0.orig/Makefile.am   2014-06-23 00:14:25.328226745 +0200
56 +++ libeXosip2-3.6.0/Makefile.am        2014-06-23 00:14:38.296371236 +0200
57 @@ -1,4 +1,4 @@
58 -
59 +ACLOCAL_AMFLAGS = -I scripts
60  EXTRA_DIST = README autogen.sh
61  
62  SUBDIRS = scripts platform src include tools help