]> www.infradead.org Git - users/dwmw2/openconnect.git/commitdiff
Fix openssl dependency in openssl.pc
authorDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 25 Sep 2016 19:32:17 +0000 (20:32 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 25 Sep 2016 19:32:17 +0000 (20:32 +0100)
When we discover a native system OpenSSL without pkg-config, don't
require openssl in openconnect.pc; instead add $OPENSSL_LIBS to
Libs.private. Only when we found it automatically though; when we
use --with-openssl=/where/I/built/openssl then we build statically
anyway so there's no need.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
configure.ac
openconnect.pc.in

index 696f51323f37da04c01a2a6cb590bb38f7c82311..f437c76d9c1fa03b10b34c6450b5af1cc4184742 100644 (file)
@@ -303,7 +303,7 @@ if test "$ssl_library" = ""; then
     if test "$with_gnutls" = "yes" -o "$with_openssl" = "no"; then
            AC_MSG_ERROR([Suitable GnuTLS required but not found])
     elif test "$with_openssl" = "yes" -o "$with_openssl" = ""; then
-        PKG_CHECK_MODULES(OPENSSL, openssl, [],
+        PKG_CHECK_MODULES(OPENSSL, openssl, [AC_SUBST(SSL_PC, [openssl])],
            [oldLIBS="$LIBS"
             LIBS="$LIBS -lssl -lcrypto"
             AC_MSG_CHECKING([for OpenSSL without pkg-config])
@@ -316,7 +316,8 @@ if test "$ssl_library" = ""; then
                                OpenSSL_add_all_algorithms();])],
                        [AC_MSG_RESULT(yes)
                         AC_SUBST([OPENSSL_LIBS], ["-lssl -lcrypto"])
-                        AC_SUBST([OPENSSL_CFLAGS], [])],
+                        AC_SUBST([OPENSSL_CFLAGS], [])]
+                        AC_SUBST([openssl_pc_libs], [$OPENSSL_LIBS]),
                        [AC_MSG_RESULT(no)
                         AC_ERROR([Could not build against OpenSSL])])
             LIBS="$oldLIBS"])
@@ -449,7 +450,6 @@ case "$ssl_library" in
 
        dtls=yes
        AC_DEFINE(OPENCONNECT_OPENSSL, 1, [Using OpenSSL])
-       AC_SUBST(SSL_PC, [openssl])
        AC_SUBST(SSL_LIBS, ['$(OPENSSL_LIBS)'])
        AC_SUBST(SSL_CFLAGS, ['$(OPENSSL_CFLAGS)'])
        ;;
index ef66071332649632f6801d2dda5baa374e12a1ca..6e750733f135ecb94fadc0c1eeab61a6aa98590c 100644 (file)
@@ -9,5 +9,5 @@ Description: OpenConnect VPN client
 Version: @VERSION@
 Requires.private: @LIBPROXY_PC@ @ZLIB_PC@ @LIBLZ4_PC@ @SSL_PC@ @P11KIT_PC@ @LIBSTOKEN_PC@ @LIBPSKC_PC@ @LIBPCSCLITE_PC@ libxml-2.0
 Libs: -L${libdir} -lopenconnect
-Libs.private: @INTL_LIBS@ @system_pcsc_libs@
+Libs.private: @INTL_LIBS@ @system_pcsc_libs@ @openssl_pc_libs@
 Cflags: -I${includedir}