summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEhren Bendler <a5ehren@gmail.com>2020-07-14 22:38:38 -0400
committerDaniel Stenberg <daniel@haxx.se>2020-07-27 15:18:13 +0200
commit14e63c19a080a7666cffe435a0aa3d455cfec5f9 (patch)
tree2f0bce67ee77e89eb289c76a336b2e0054f55c54 /configure.ac
parentba390221ef2609a2d9ae856e9ac4ff267340f106 (diff)
downloadcurl-14e63c19a080a7666cffe435a0aa3d455cfec5f9.tar.gz
configure: cleanup wolfssl + pkg-config conflicts when cross compiling.
Also choose a different wolfSSL function to test for NTLM support. Fixes #5605 Closes #5682
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac29
1 files changed, 20 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 03fbda34d..3d40872ec 100755
--- a/configure.ac
+++ b/configure.ac
@@ -2381,6 +2381,7 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
OPT_WOLFSSL=""
fi
+ dnl try pkg-config magic
CURL_CHECK_PKGCONFIG(wolfssl, [$wolfpkg])
AC_MSG_NOTICE([Check dir $wolfpkg])
@@ -2399,9 +2400,12 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
wolfssllibpath=`echo $addld | $SED -e 's/^-L//'`
else
addlib=-lwolfssl
- addld=-L$OPT_WOLFSSL/lib$libsuff
- addcflags=-I$OPT_WOLFSSL/include
- wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
+ dnl use system defaults if user does not supply a path
+ if test -n "$OPT_WOLFSSL"; then
+ addld=-L$OPT_WOLFSSL/lib$libsuff
+ addcflags=-I$OPT_WOLFSSL/include
+ wolfssllibpath=$OPT_WOLFSSL/lib$libsuff
+ fi
fi
if test "x$USE_WOLFSSL" != "xyes"; then
@@ -2453,7 +2457,7 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
dnl wolfssl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
AX_COMPILE_CHECK_SIZEOF(long long)
- LIBS="-lwolfssl -lm $LIBS"
+ LIBS="$addlib -lm $LIBS"
dnl Recent WolfSSL versions build without SSLv3 by default
dnl WolfSSL needs configure --enable-opensslextra to have *get_peer*
@@ -2465,12 +2469,19 @@ if test -z "$ssl_backends" -o "x$OPT_WOLFSSL" != xno; then
dnl if this symbol is present, we want the include path to include the
dnl OpenSSL API root as well
- AC_CHECK_FUNC(wolfSSL_DES_set_odd_parity,
+ AC_CHECK_FUNC(wolfSSL_DES_ecb_encrypt,
[
- AC_DEFINE(HAVE_WOLFSSL_DES_SET_ODD_PARITY, 1,
- [if you have wolfSSL_DES_set_odd_parity])
- CPPFLAGS="$addcflags/wolfssl $CPPFLAGS"
- AC_MSG_NOTICE([Add $addcflags/wolfssl to CPPFLAGS])
+ AC_DEFINE(HAVE_WOLFSSL_DES_ECB_ENCRYPT, 1,
+ [if you have wolfSSL_DES_ecb_encrypt])
+ if test -n "$addcflags"; then
+ CPPFLAGS="$addcflags/wolfssl $CPPFLAGS"
+ AC_MSG_NOTICE([Add $addcflags/wolfssl to CPPFLAGS])
+ else
+ dnl user didn't give a path, so guess/hope they installed wolfssl
+ dnl headers to system default location
+ CPPFLAGS="-I$includedir/wolfssl $CPPFLAGS"
+ AC_MSG_NOTICE([Add $includedir/wolfssl to CPPFLAGS])
+ fi
WOLFSSL_NTLM=1
]
)