- Fix #1434: Fix windows openssl 1.1.0 linking.

git-svn-id: file:///svn/unbound/trunk@4338 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2017-09-05 08:28:39 +00:00
parent eb25148123
commit edd22eb36c
5 changed files with 30 additions and 11 deletions

View file

@ -688,8 +688,8 @@ AC_DEFUN([ACX_SSL_CHECKS], [
# check if -lwsock32 or -lgdi32 are needed. # check if -lwsock32 or -lgdi32 are needed.
BAKLIBS="$LIBS" BAKLIBS="$LIBS"
BAKSSLLIBS="$LIBSSL_LIBS" BAKSSLLIBS="$LIBSSL_LIBS"
LIBS="$LIBS -lgdi32" LIBS="$LIBS -lgdi32 -lws2_32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32" LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
AC_MSG_CHECKING([if -lcrypto needs -lgdi32]) AC_MSG_CHECKING([if -lcrypto needs -lgdi32])
AC_TRY_LINK([], [ AC_TRY_LINK([], [
int HMAC_Update(void); int HMAC_Update(void);
@ -839,8 +839,12 @@ dnl see if on windows
if test "$ac_cv_header_windows_h" = "yes"; then if test "$ac_cv_header_windows_h" = "yes"; then
AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used])
USE_WINSOCK="1" USE_WINSOCK="1"
if echo $LIBS | grep 'lws2_32' >/dev/null; then
:
else
LIBS="$LIBS -lws2_32" LIBS="$LIBS -lws2_32"
fi fi
fi
], ],
dnl no quick getaddrinfo, try mingw32 and winsock2 library. dnl no quick getaddrinfo, try mingw32 and winsock2 library.
ORIGLIBS="$LIBS" ORIGLIBS="$LIBS"

15
configure vendored
View file

@ -17261,8 +17261,8 @@ $as_echo "no" >&6; }
# check if -lwsock32 or -lgdi32 are needed. # check if -lwsock32 or -lgdi32 are needed.
BAKLIBS="$LIBS" BAKLIBS="$LIBS"
BAKSSLLIBS="$LIBSSL_LIBS" BAKSSLLIBS="$LIBSSL_LIBS"
LIBS="$LIBS -lgdi32" LIBS="$LIBS -lgdi32 -lws2_32"
LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32" LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -lgdi32" >&5
$as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; } $as_echo_n "checking if -lcrypto needs -lgdi32... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext 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 if test "$on_mingw" = yes; then
staticexe="-all-static" staticexe="-all-static"
# for static compile, include gdi32 and zlib here. # 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
fi fi
@ -19015,8 +19020,12 @@ if test "$ac_cv_header_windows_h" = "yes"; then
$as_echo "#define USE_WINSOCK 1" >>confdefs.h $as_echo "#define USE_WINSOCK 1" >>confdefs.h
USE_WINSOCK="1" USE_WINSOCK="1"
if echo $LIBS | grep 'lws2_32' >/dev/null; then
:
else
LIBS="$LIBS -lws2_32" LIBS="$LIBS -lws2_32"
fi fi
fi
else else
ORIGLIBS="$LIBS" ORIGLIBS="$LIBS"

View file

@ -1126,7 +1126,12 @@ if test x_$enable_static_exe = x_yes; then
if test "$on_mingw" = yes; then if test "$on_mingw" = yes; then
staticexe="-all-static" staticexe="-all-static"
# for static compile, include gdi32 and zlib here. # 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
fi fi

View file

@ -1,5 +1,6 @@
4 September 2017: Ralph 4 September 2017: Ralph
- Fix #1412: QNAME minimisation strict mode not honored - Fix #1412: QNAME minimisation strict mode not honored
- Fix #1434: Fix windows openssl 1.1.0 linking.
4 September 2017: Wouter 4 September 2017: Wouter
- tag 1.6.6rc1 - tag 1.6.6rc1

View file

@ -87,7 +87,7 @@ question () {
# working directory. # working directory.
cleanup () { cleanup () {
info "Deleting temporary working directory." info "Deleting temporary working directory."
cd $cwd && rm -rf $temp_dir #cd $cwd && rm -rf $temp_dir
} }
error_cleanup () { error_cleanup () {
@ -254,9 +254,9 @@ if [ "$DOWIN" = "yes" ]; then
# cross-compilation and it is not used anyway # cross-compilation and it is not used anyway
# before 1.0.1i need --cross-compile-prefix=i686-w64-mingw32- # before 1.0.1i need --cross-compile-prefix=i686-w64-mingw32-
if test "$mw64" = "mingw64"; then if test "$mw64" = "mingw64"; then
sslflags="no-asm -DOPENSSL_NO_CAPIENG mingw64" sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw64"
else else
sslflags="no-asm -DOPENSSL_NO_CAPIENG mingw" sslflags="no-shared no-asm -DOPENSSL_NO_CAPIENG mingw"
fi fi
info "winssl: Configure $sslflags" 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" 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"