From: Tobias Brunner Date: Thu, 30 Jan 2020 12:55:51 +0000 (+0100) Subject: wolfssl: Use pkg-config to check for wolfSSL X-Git-Tag: 5.8.3dr1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cb4af66968a5760eb07bc415c87aff21ed785f7;p=thirdparty%2Fstrongswan.git wolfssl: Use pkg-config to check for wolfSSL The other checks trigger an automatic install of the old and incompatible Ubuntu package on LGTM. --- diff --git a/configure.ac b/configure.ac index e226678fbe..10a3a9dca4 100644 --- a/configure.ac +++ b/configure.ac @@ -1143,11 +1143,9 @@ if test x$openssl = xtrue; then fi if test x$wolfssl = xtrue; then - wolfssl_lib=wolfssl - AC_CHECK_LIB([$wolfssl_lib],[wolfSSL_Init],[LIBS="$LIBS"], - [AC_MSG_ERROR([wolfSSL lib$wolfssl_lib not found])],[$DLLIB]) - AC_SUBST(WOLFSSL_LIB, [-l$wolfssl_lib]) - AC_CHECK_HEADER([wolfssl/options.h],,[AC_MSG_ERROR([wolfSSL header wolfssl/options.h not found!])]) + PKG_CHECK_MODULES(wolfssl, [wolfssl]) + AC_SUBST(wolfssl_CFLAGS) + AC_SUBST(wolfssl_LIBS) fi if test x$gcrypt = xtrue; then diff --git a/src/libstrongswan/plugins/wolfssl/Makefile.am b/src/libstrongswan/plugins/wolfssl/Makefile.am index 5f3080a271..1f31bf6138 100644 --- a/src/libstrongswan/plugins/wolfssl/Makefile.am +++ b/src/libstrongswan/plugins/wolfssl/Makefile.am @@ -2,7 +2,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/libstrongswan AM_CFLAGS = \ - $(PLUGIN_CFLAGS) + $(PLUGIN_CFLAGS) \ + $(wolfssl_CFLAGS) if MONOLITHIC noinst_LTLIBRARIES = libstrongswan-wolfssl.la @@ -32,4 +33,4 @@ libstrongswan_wolfssl_la_SOURCES = \ libstrongswan_wolfssl_la_LDFLAGS = -module -avoid-version -libstrongswan_wolfssl_la_LIBADD = $(WOLFSSL_LIB) +libstrongswan_wolfssl_la_LIBADD = $(wolfssl_LIBS)