]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #1434: Fix windows openssl 1.1.0 linking.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Sep 2017 08:28:39 +0000 (08:28 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 5 Sep 2017 08:28:39 +0000 (08:28 +0000)
git-svn-id: file:///svn/unbound/trunk@4338 be551aaa-1e26-0410-a405-d3ace91eadb9

acx_nlnetlabs.m4
configure
configure.ac
doc/Changelog
makedist.sh

index a6c174f1c4210f21aaae3367dfa0a795b91d59d6..8eccc15b0d80874b9bb2700fd0cb72094a8adbc2 100644 (file)
@@ -688,8 +688,8 @@ AC_DEFUN([ACX_SSL_CHECKS], [
                 # check if -lwsock32 or -lgdi32 are needed.    
                 BAKLIBS="$LIBS"
                 BAKSSLLIBS="$LIBSSL_LIBS"
-                LIBS="$LIBS -lgdi32"
-                LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
+               LIBS="$LIBS -lgdi32 -lws2_32"
+               LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
                 AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
                 AC_TRY_LINK([], [
                     int HMAC_Update(void);
@@ -839,7 +839,11 @@ dnl see if on windows
 if test "$ac_cv_header_windows_h" = "yes"; then
        AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used])
        USE_WINSOCK="1"
-       LIBS="$LIBS -lws2_32"
+       if echo $LIBS | grep 'lws2_32' >/dev/null; then
+               :
+       else
+               LIBS="$LIBS -lws2_32"
+       fi
 fi
 ],
 dnl no quick getaddrinfo, try mingw32 and winsock2 library.
index 38083add628c9060691489d00d5060cc20707bbd..2821d3209fbd89f0fd0fe139726eed2e581d6631 100755 (executable)
--- a/configure
+++ b/configure
@@ -17261,8 +17261,8 @@ $as_echo "no" >&6; }
                 # check if -lwsock32 or -lgdi32 are needed.
                 BAKLIBS="$LIBS"
                 BAKSSLLIBS="$LIBSSL_LIBS"
-                LIBS="$LIBS -lgdi32"
-                LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32"
+               LIBS="$LIBS -lgdi32 -lws2_32"
+               LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
 $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -18657,7 +18657,12 @@ if test x_$enable_static_exe = x_yes; then
        if test "$on_mingw" = yes; then
                staticexe="-all-static"
                # for static compile, include gdi32 and zlib here.
-               LIBS="$LIBS -lgdi32 -lz"
+               if echo $LIBS | grep 'lgdi32' >/dev/null; then
+                       :
+               else
+                       LIBS="$LIBS -lgdi32"
+               fi
+               LIBS="$LIBS -lz"
        fi
 fi
 
@@ -19015,7 +19020,11 @@ if test "$ac_cv_header_windows_h" = "yes"; then
 $as_echo "#define USE_WINSOCK 1" >>confdefs.h
 
        USE_WINSOCK="1"
-       LIBS="$LIBS -lws2_32"
+       if echo $LIBS | grep 'lws2_32' >/dev/null; then
+               :
+       else
+               LIBS="$LIBS -lws2_32"
+       fi
 fi
 
 else
index 035dd249cc7658b9a4839954503e38933c8afc25..23a318ee5b77c924a20f1b38d7ca3aa7845429bb 100644 (file)
@@ -1126,7 +1126,12 @@ if test x_$enable_static_exe = x_yes; then
        if test "$on_mingw" = yes; then
                staticexe="-all-static"
                # for static compile, include gdi32 and zlib here.
-               LIBS="$LIBS -lgdi32 -lz"
+               if echo $LIBS | grep 'lgdi32' >/dev/null; then
+                       :
+               else
+                       LIBS="$LIBS -lgdi32"
+               fi
+               LIBS="$LIBS -lz"
        fi
 fi
 
index 7ba78b144154fa218dab950ed6b3777e8799e2a6..5aa5ff930c54bcf34cdaeebbf1d68b032b7fe058 100644 (file)
@@ -1,5 +1,6 @@
 4 September 2017: Ralph
        - Fix #1412: QNAME minimisation strict mode not honored
+       - Fix #1434: Fix windows openssl 1.1.0 linking.
 
 4 September 2017: Wouter
        - tag 1.6.6rc1
index d386693343dda8dea6643e05a5169613f4e033a6..cf830291a757d912ae287afd541c51a2ded58ce4 100755 (executable)
@@ -87,7 +87,7 @@ question () {
 # working directory.
 cleanup () {
     info "Deleting temporary working directory."
-    cd $cwd && rm -rf $temp_dir
+    #cd $cwd && rm -rf $temp_dir
 }
 
 error_cleanup () {
@@ -254,9 +254,9 @@ if [ "$DOWIN" = "yes" ]; then
                # cross-compilation and it is not used anyway
                # before 1.0.1i need --cross-compile-prefix=i686-w64-mingw32-
                if test "$mw64" = "mingw64"; then
-                       sslflags="no-asm -DOPENSSL_NO_CAPIENG mingw64"
+                       sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64"
                else
-                       sslflags="no-asm -DOPENSSL_NO_CAPIENG mingw"
+                       sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw"
                fi
                info "winssl: Configure $sslflags"
                CC=${warch}-w64-mingw32-gcc AR=${warch}-w64-mingw32-ar RANLIB=${warch}-w64-mingw32-ranlib WINDRES=${warch}-w64-mingw32-windres ./Configure --prefix="$sslinstall" $sslflags || error_cleanup "OpenSSL Configure failed"