From: Wouter Wijngaards Date: Tue, 5 Sep 2017 08:28:39 +0000 (+0000) Subject: - Fix #1434: Fix windows openssl 1.1.0 linking. X-Git-Tag: release-1.6.6rc2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edd22eb36cfe3cf7a0cd5d8758b588f4f7674beb;p=thirdparty%2Funbound.git - Fix #1434: Fix windows openssl 1.1.0 linking. git-svn-id: file:///svn/unbound/trunk@4338 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/acx_nlnetlabs.m4 b/acx_nlnetlabs.m4 index a6c174f1c..8eccc15b0 100644 --- a/acx_nlnetlabs.m4 +++ b/acx_nlnetlabs.m4 @@ -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. diff --git a/configure b/configure index 38083add6..2821d3209 100755 --- 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 diff --git a/configure.ac b/configure.ac index 035dd249c..23a318ee5 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/doc/Changelog b/doc/Changelog index 7ba78b144..5aa5ff930 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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 diff --git a/makedist.sh b/makedist.sh index d38669334..cf830291a 100755 --- a/makedist.sh +++ b/makedist.sh @@ -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"