]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Dec 2011 13:49:30 +0000 (13:49 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 5 Dec 2011 13:49:30 +0000 (13:49 +0000)
git-svn-id: file:///svn/unbound/trunk@2561 be551aaa-1e26-0410-a405-d3ace91eadb9

acx_nlnetlabs.m4
configure
doc/Changelog

index 4739a5de77e21acc3d7ecee0bf5814b380e2a4b2..06f23810c9f94d534f03c7ce706630e308d28463 100644 (file)
@@ -2,7 +2,8 @@
 # Copyright 2009, Wouter Wijngaards, NLnet Labs.   
 # BSD licensed.
 #
-# Version 16
+# Version 17
+# 2011-12-05 Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
 # 2011-11-10 Fix FLTO test to not drop a.out in current directory.
 # 2011-11-01 Fix FLTO test for llvm on Lion.
 # 2011-08-01 Fix nonblock test (broken at v13).
@@ -794,7 +795,13 @@ int main() {
 }
 ]])],
 dnl this case on linux, solaris, bsd
-[ac_cv_func_getaddrinfo="yes"],
+[ac_cv_func_getaddrinfo="yes"
+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"
+fi
+],
 dnl no quick getaddrinfo, try mingw32 and winsock2 library.
 ORIGLIBS="$LIBS"
 LIBS="$LIBS -lws2_32"
index 0c84b8bbf07c378a23d61ec27b151c4db960661f..1b47f73d3fe05118ed630777091280a2a1d03c37 100755 (executable)
--- a/configure
+++ b/configure
@@ -16990,6 +16990,13 @@ int main() {
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_func_getaddrinfo="yes"
+if test "$ac_cv_header_windows_h" = "yes"; then
+
+$as_echo "#define USE_WINSOCK 1" >>confdefs.h
+
+       USE_WINSOCK="1"
+fi
+
 else
   ORIGLIBS="$LIBS"
 LIBS="$LIBS -lws2_32"
index fcf23355aae20391b3912b0b1b6e387b72c9f5de..186ce33266f069116195e71f78419a5cc85d3963 100644 (file)
@@ -1,3 +1,6 @@
+5 December 2011: Wouter
+       - Fix getaddrinfowithincludes on windows with fedora16 mingw32-gcc.
+
 2 December 2011: Wouter
        - configure generated with autoconf 2.68.