Skip to content

Commit cddbad1

Browse files
committed
[autotools] adjust build with wolfssl crypto
adjust build with wolfssl crypto lighttpd src/sys-crypto-md.h prefers crypto from libs in the following order (using first available): nettle, mbedtls, wolfssl, openssl, gnutls, nss (unless FORCE_*_CRYPTO defined, in which case the specified lib is used) wolfssl openssl compatibility layer requires its include paths include both the wolfssl location and wolfssl/openssl which exposed wolfssl compatibility layer for openssl, and potentially messing up builds of lighttpd mod_openssl or sys-crypto-md.h. When lighttpd mod_wolfssl was created, the dependency on wolfssl compatibility layer for openssl was also removed. The adjustments to configure.ac in this commit does not expose wolfssl/openssl/*, only the include of wolfssl/, when a non-default path is specified --with-wolfssl=/path/to/wolfssl-install-location
1 parent 7e45b2f commit cddbad1

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

configure.ac

+7-12
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,11 @@ AC_ARG_WITH([wolfssl],
691691
AC_MSG_RESULT([$WITH_WOLFSSL])
692692
AM_CONDITIONAL([BUILD_WITH_WOLFSSL], test ! "$WITH_WOLFSSL" = no)
693693

694-
if test "$WITH_WOLFSSL" != no; then
695-
CPPFLAGS_SAVE="${CPPFLAGS}"
696-
LDFLAGS_SAVE="${LDFLAGS}"
697-
if test "$WITH_WOLFSSL" != yes; then
698-
WOLFSSL_CFLAGS="-I$WITH_WOLFSSL/include -I$WITH_WOLFSSL/include/wolfssl"
694+
if test "$WITH_WOLFSSL" != "no"; then
695+
if test "$WITH_WOLFSSL" != "yes"; then
696+
CPPFLAGS="$CPPFLAGS -I$WITH_WOLFSSL/include"
697+
LDFLAGS="$LDFLAGS -L$WITH_WOLFSSL/lib"
698+
WOLFSSL_CFLAGS="-I$WITH_WOLFSSL/include"
699699
WOLFSSL_LIBS="-L$WITH_WOLFSSL/lib -lwolfssl"
700700
LDFLAGS="${LDFLAGS} -L$WITH_WOLFSSL/lib"
701701
else
@@ -724,13 +724,8 @@ if test "$WITH_WOLFSSL" != no; then
724724

725725
AC_SUBST([WOLFSSL_CFLAGS])
726726
AC_SUBST([WOLFSSL_LIBS])
727-
if test "$WITH_OPENSSL" = no; then
728-
CRYPTO_LIB="$WOLFSSL_CRYPTO_LIB"
729-
AC_SUBST([CRYPTO_LIB])
730-
else
731-
CPPFLAGS="${CPPFLAGS_SAVE}"
732-
LDFLAGS="${LDFLAGS_SAVE}"
733-
fi
727+
CRYPTO_LIB="$WOLFSSL_CRYPTO_LIB"
728+
AC_SUBST([CRYPTO_LIB])
734729
fi
735730

736731
dnl Check for mbedTLS

0 commit comments

Comments
 (0)