From a0896ac4bfdd5f3433b37ccf282e205ba05ba283 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Thu, 4 Feb 2016 15:25:01 +0100 Subject: [PATCH] Rearange link lib order for mingw --- configure.ac | 9 +++++---- m4/acx_openssl.m4 | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index c63cacac..21f5a32a 100644 --- a/configure.ac +++ b/configure.ac @@ -201,6 +201,11 @@ case "$enable_native_stub_dnssec" in ;; esac +# search to set include and library paths right +# find libidn (no libidn on windows though) +AC_CHECK_HEADERS([windows.h winsock.h stdio.h winsock2.h ws2tcpip.h],,, [AC_INCLUDES_DEFAULT]) +ACX_CHECK_GETADDRINFO_WITH_INCLUDES + USE_NSS="no" # openssl if test $USE_NSS = "no"; then @@ -444,10 +449,6 @@ case "$enable_stub_only" in ;; esac -# search to set include and library paths right -# find libidn (no libidn on windows though) -AC_CHECK_HEADERS([windows.h winsock.h stdio.h winsock2.h ws2tcpip.h],,, [AC_INCLUDES_DEFAULT]) -ACX_CHECK_GETADDRINFO_WITH_INCLUDES if test "$USE_WINSOCK" = 1; then AC_MSG_NOTICE([ Building on Windows ... YES! ]) AC_DEFINE_UNQUOTED([GETDNS_ON_WINDOWS], [1], [Define this to enable Windows build.]) diff --git a/m4/acx_openssl.m4 b/m4/acx_openssl.m4 index 0b2885f7..485f6599 100644 --- a/m4/acx_openssl.m4 +++ b/m4/acx_openssl.m4 @@ -48,8 +48,8 @@ AC_DEFUN([ACX_SSL_CHECKS], [ fi AC_MSG_CHECKING([for HMAC_CTX_init in -lcrypto]) - LIBS="$LIBS -lssl -lcrypto" - LIBSSL_LIBS="$LIBSSL_LIBS -lssl -lcrypto" + LIBS="-lssl -lcrypto $LIBS" + LIBSSL_LIBS="-lssl -lcrypto $LIBSSL_LIBS" AC_TRY_LINK(, [ int HMAC_CTX_init(void); (void)HMAC_CTX_init(); @@ -101,11 +101,11 @@ AC_CHECK_HEADERS([openssl/err.h],,, [AC_INCLUDES_DEFAULT]) AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl TLS v1.2 requires OpenSSL 1.0.1 -AC_CHECK_LIB(ssl, TLSv1_2_client_method,AC_DEFINE([HAVE_TLS_v1_2], [1], +AC_CHECK_FUNC(TLSv1_2_client_method,AC_DEFINE([HAVE_TLS_v1_2], [1], [Define if you have libssl with tls 1.2]),[AC_MSG_WARN([Cannot find TLSv1_2_client_method in libssl library. TLS will not be available.])]) dnl Native OpenSSL hostname verification requires OpenSSL 1.0.2 -AC_CHECK_LIB(ssl, SSL_CTX_get0_param,AC_DEFINE([HAVE_SSL_HN_AUTH], [1], +AC_CHECK_FUNC(SSL_CTX_get0_param,AC_DEFINE([HAVE_SSL_HN_AUTH], [1], [Define if you have libssl with host name verification]),[AC_MSG_WARN([Cannot find SSL_CTX_get0_param in libssl library. TLS hostname verification will not be available.])]) ])