Skip to content

Commit

Permalink
Fix openssl dependency in openssl.pc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 25, 2016
1 parent 7f5fee6 commit d329533
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions configure.ac
Expand Up @@ -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])
Expand All @@ -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"])
Expand Down Expand Up @@ -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)'])
;;
Expand Down
2 changes: 1 addition & 1 deletion openconnect.pc.in
Expand Up @@ -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}

0 comments on commit d329533

Please sign in to comment.