From: Amos Jeffries Date: Mon, 18 Nov 2019 12:06:56 +0000 (+1300) Subject: Fix detection of sys/sysctl.h detection (#511) X-Git-Tag: SQUID_5_0_1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=195ec8477565885e8f0975865a32bb716ea56272;p=thirdparty%2Fsquid.git Fix detection of sys/sysctl.h detection (#511) 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. --- diff --git a/configure.ac b/configure.ac index a1f2823a19..7cc0dfd9ec 100644 --- a/configure.ac +++ b/configure.ac @@ -1109,6 +1109,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} @@ -1148,6 +1152,7 @@ include #include #endif ]]) + SQUID_STATE_ROLLBACK(LIBEUI) fi AC_SUBST(EUILIB) AC_MSG_NOTICE([EUI (MAC address) controls enabled: $enable_eui])