]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix detection of sys/sysctl.h detection (#511)
authorAmos Jeffries <yadij@users.noreply.github.com>
Mon, 18 Nov 2019 12:06:56 +0000 (01:06 +1300)
committerAmos Jeffries <yadij@users.noreply.github.com>
Fri, 3 Jan 2020 22:38:44 +0000 (11:38 +1300)
Make sure we test the EUI specific headers using same flags
chosen for final build operations. This should make the
test detect the header as unavailable if the user options
would make the compiler #warning be a fatal error later.

configure.ac

index 2a6fa6acc813d8caed6dd0bdc09d4dafcb54fc40..6c93de0691248c1eb13182ac5b53b1991fdcd04c 100644 (file)
@@ -1131,6 +1131,10 @@ AC_ARG_ENABLE(eui,
 SQUID_YESNO([$enableval],[--disable-eui expects no arguments])
 ])
 if test "x${enable_eui:=yes}" = "xyes" ; then
+  SQUID_STATE_SAVE(LIBEUI)
+  # GLIBC 2.30 deprecates sysctl.h. Test with the same flags that (may) break includes later.
+  CFLAGS=$SQUID_CFLAGS
+  CXXFLAGS=$SQUID_CXXFLAGS
   case "$squid_host_os" in
     linux|solaris|freebsd|openbsd|netbsd|cygwin)
       ${TRUE}
@@ -1170,6 +1174,7 @@ include <windows.h>
 #include <sys/param.h>
 #endif
   ]])
+  SQUID_STATE_ROLLBACK(LIBEUI)
 fi
 AC_SUBST(EUILIB)
 AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui])