]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
update acx_nlnetlabs with ws2_32 link.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 9 May 2018 12:58:06 +0000 (14:58 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 9 May 2018 12:58:06 +0000 (14:58 +0200)
acx_nlnetlabs.m4

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.