]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix windows link of ssl with crypt32.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Jun 2016 10:04:15 +0000 (10:04 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 14 Jun 2016 10:04:15 +0000 (10:04 +0000)
git-svn-id: file:///svn/unbound/trunk@3787 be551aaa-1e26-0410-a405-d3ace91eadb9

configure
configure.ac
doc/Changelog

index e694c7ecbe2447c31beffcf824ebc57ca0196428..689961c5b58152ddcc554bb1ce4e7a6d3e6166d0 100755 (executable)
--- a/configure
+++ b/configure
 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
index 099fda63a7413f5ea78d2e6ce047923b468c049d..e1820e1742b4932463e89d09484c94843e38ec0c 100644 (file)
@@ -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])
index bbc1ad9b48b20ac9c725d556d48f64dfb23b41ea..6a51e317e450c4fea46136d5add8d76f21630c42 100644 (file)
@@ -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.