]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: properly detect Iphlpapi.h on windows
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 18 May 2011 01:03:37 +0000 (03:03 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 18 May 2011 01:03:37 +0000 (03:03 +0200)
configure.ac

index 23c0bab15f62df0c0753c55a827feb75444e9c27..c13296a1c9e16ac8e7bdae445a8eec9ac2f38d7e 100644 (file)
@@ -1042,8 +1042,8 @@ if test "x${enable_eui:=yes}" = "xyes" ; then
       AC_MSG_WARN([EUI support probably will not work on host $host.])
       ;;
   esac
+  #Iphlpapi.h check delayed after winsock2.h
   AC_CHECK_HEADERS( \
-    Iphlpapi.h \
     net/if_dl.h \
     sys/sockio.h \
     sys/param.h
@@ -2508,6 +2508,10 @@ AC_SEARCH_LIBS([yp_match], [nsl nss_nis nss_nisplus])
 dnl Check for Winsock only on MinGW, on Cygwin we must use emulated BSD socket API
 if test "x$squid_host_os" = "xmingw" ; then
   SQUID_CHECK_WINSOCK_LIB
+  AC_CHECK_HEADERS(Iphlpapi.h,,,[
+#if HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif])
 fi
 
 # check that we have unix sockets