[squid-dev] [PATCH] search for header files in well-known local directories

Kinkie gkinkie at gmail.com
Sun Jan 3 11:14:37 UTC 2016


Hi,
  the attached patch for configure.ac tries to locate local header
files in system-local directories.
It fixes the build on MacOS/MacPorts which places GnuTLS headers in
/opt/local/include.
The search is not performed if the builder predefines CPPFLAGS.

-- 
    Francesco
-------------- next part --------------
=== modified file 'configure.ac'
--- configure.ac	2016-01-03 10:45:27 +0000
+++ configure.ac	2016-01-03 10:58:12 +0000
@@ -31,11 +31,21 @@
 PRESET_CXXFLAGS="$CXXFLAGS"
 PRESET_LDFLAGS="$LDFLAGS"
 
-dnl Set default LDFLAGS
+# Set default LDFLAGS
 if test "x$LDFLAGS" = "x" ; then
   LDFLAGS="-g"
 fi
 
+# Look for system-local headers
+if test "x$CPPFLAGS" = "x"; then
+  for d in /usr/local /opt/local /opt
+  do
+    if test -d $d/include; then
+      CPPFLAGS="$CPPFLAGS -I$d/include"
+    fi
+  done
+fi
+
 # Check for GNU cc
 AC_PROG_CC
 AM_PROG_CC_C_O



More information about the squid-dev mailing list