From: Wouter Wijngaards Date: Tue, 14 Jun 2016 10:04:15 +0000 (+0000) Subject: - Fix windows link of ssl with crypt32. X-Git-Tag: release-1.5.10~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86aa83e46f5b4c7591083ce6fb857d057a14b6f6;p=thirdparty%2Funbound.git - Fix windows link of ssl with crypt32. git-svn-id: file:///svn/unbound/trunk@3787 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure b/configure index e694c7ecb..689961c5b 100755 --- a/configure +++ b/configure @@ -17398,6 +17398,47 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libssl needs -lcrypt32" >&5 +$as_echo_n "checking if libssl needs -lcrypt32... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char OPENSSL_config (); +int +main () +{ +return OPENSSL_config (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + LIBS="$BAKLIBS" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + LIBS="$BAKLIBS" + SSLLIB="$SSLLIB -lcrypt32" + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LibreSSL" >&5 $as_echo_n "checking for LibreSSL... " >&6; } if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then diff --git a/configure.ac b/configure.ac index 099fda63a..e1820e174 100644 --- a/configure.ac +++ b/configure.ac @@ -647,6 +647,20 @@ if test $USE_NSS = "no" -a $USE_NETTLE = "no"; then ACX_WITH_SSL ACX_LIB_SSL SSLLIB="-lssl" + +# check if -lcrypt32 is needed because CAPIENG needs that. (on windows) +BAKLIBS="$LIBS" +LIBS="-lssl $LIBS" +AC_MSG_CHECKING([if libssl needs -lcrypt32]) +AC_TRY_LINK_FUNC([OPENSSL_config], [ + AC_MSG_RESULT([no]) + LIBS="$BAKLIBS" +], [ + AC_MSG_RESULT([yes]) + LIBS="$BAKLIBS" + SSLLIB="$SSLLIB -lcrypt32" +]) + AC_MSG_CHECKING([for LibreSSL]) if grep VERSION_TEXT $ssldir/include/openssl/opensslv.h | grep "LibreSSL" >/dev/null; then AC_MSG_RESULT([yes]) diff --git a/doc/Changelog b/doc/Changelog index bbc1ad9b4..6a51e317e 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,7 @@ - Fix 775: unbound-host and unbound-anchor crash on windows, ignore null delete for wsaevent. - Fix spelling in freebind option man page text. + - Fix windows link of ssl with crypt32. 13 June 2016: Ralph - Use QTYPE=A for QNAME minimisation.