Browse Source

[build] use pkg-config with wolfssl

master
Glenn Strauss 3 months ago
parent
commit
8f31ed7fe1
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      configure.ac

+ 9
- 2
configure.ac View File

@ -722,10 +722,17 @@ if test "$WITH_WOLFSSL" != no; then
if test "$WITH_WOLFSSL" != yes; then
WOLFSSL_CFLAGS="-I$WITH_WOLFSSL/include -I$WITH_WOLFSSL/include/wolfssl"
WOLFSSL_LIBS="-L$WITH_WOLFSSL/lib -lwolfssl"
CPPFLAGS="${CPPFLAGS} $WOLFSSL_CFLAGS"
LDFLAGS="${LDFLAGS} $WOLFSSL_LIBS"
LDFLAGS="${LDFLAGS} -L$WITH_WOLFSSL/lib"
else
PKG_CHECK_MODULES([WOLFSSL], [wolfssl], [], [
AC_MSG_ERROR([wolfssl not found, install it or build without --with-wolfssl])
])
if test "$WOLFSSL_LIBS" != "-lwolfssl"; then
LDFLAGS="${LDFLAGS} ${WOLFSSL_LIBS% -lwolfssl}"
fi
fi
CPPFLAGS="${CPPFLAGS} $WOLFSSL_CFLAGS"
AC_CHECK_HEADERS([wolfssl/ssl.h], [], [
AC_MSG_ERROR([wolfssl headers not found. install them or build without --with-wolfssl])
])


Loading…
Cancel
Save