diff options
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 29 |
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 ] ) |