]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: Implemented working check for libiphlpapi
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sun, 27 May 2012 23:46:56 +0000 (17:46 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 27 May 2012 23:46:56 +0000 (17:46 -0600)
acinclude/lib-checks.m4
configure.ac

index eca0a3846696c42541499cc1d0764f65002e5d5b..798769a5c4901e73105ebd38bc5f3dba7329ef4f 100644 (file)
@@ -72,3 +72,25 @@ regex_t t; regcomp(&t,"",0);]])],
     [ squid_cv_regex_works=no ])
   ])
 ])
+
+
+AC_DEFUN([SQUID_CHECK_LIBIPHLPAPI],[
+  AC_CACHE_CHECK([for libIpHlpApi],squid_cv_have_libiphlpapi,[
+    SQUID_STATE_SAVE(iphlpapi)
+    LIBS="$LIBS -liphlpapi"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <windows.h>
+#include <winsock2.h>
+#include <iphlpapi.h>
+]], [[
+  MIB_IPNETTABLE i;
+  unsigned long isz=sizeof(i);
+  GetIpNetTable(&i,&isz,FALSE);
+    ]])],
+    [squid_cv_have_libiphlpapi=yes
+     SQUID_STATE_COMMIT(iphlpapi)],
+    [squid_cv_have_libiphlpapi=no
+     SQUID_STATE_ROLLBACK(iphlpapi)])
+  ])
+  SQUID_STATE_ROLLBACK(iphlpapi)
+])
index 857c4849abd84aa8a1f36ec8dda0769c9f7ffe58..b46c61029355f7bfd618096489542c91c6c06166 100644 (file)
@@ -1135,6 +1135,7 @@ if test "x${enable_eui:=yes}" = "xyes" ; then
 #endif
   ]])
 fi
+AC_SUBST(EUILIB)
 AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui])
 SQUID_DEFINE_BOOL(USE_SQUID_EUI,$enable_eui,
    [Define this to include code which lets you use ethernet addresses. This code uses API initially defined in 4.4-BSD.])