]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: support customization of --prefix= via compat/autoconf.h
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 04:27:26 +0000 (22:27 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 Oct 2012 04:27:26 +0000 (22:27 -0600)
Rather than defining DEFAULT_PREFIX on the compiler command line this
builds its value into autoconf.h for use whenever needed. Avoiding
otential issues with buggy Makefile.am coding.

Also allows the --prefix value to be sourced from the autoconf internal
default settings instead of requiring a manual --prefix parameter for
SNMP module to build and link properly.

configure.ac
src/snmp/Makefile.am

index e57d727253d82d9c86d52f6f045eeadd5a75ca0c..5c8771b4d80bb921cc920d8364176715c8b5aa30 100644 (file)
@@ -104,6 +104,14 @@ fi
 AR_R="$AR r"
 AC_SUBST(AR_R)
 
+# pre-define DEFAULT_PREFIX, some modules need it.
+if test "${prefix}" = "NONE" ; then
+  squid_prefix=$ac_default_prefix
+else
+  squid_prefix=$prefix
+fi
+AC_DEFINE_UNQUOTED(DEFAULT_PREFIX,[$squid_prefix],[The install prefix])
+
 AC_ARG_ENABLE(strict-error-checking,
   AS_HELP_STRING([--disable-strict-error-checking],[By default squid is compiled
                  with all possible static compiler error-checks enabled.
index 39d6036c2665430b432e5218fa1c65977de3f221..3100a4e8898ca1810fc5017704525fed3b1ff32a 100644 (file)
@@ -20,5 +20,3 @@ libsnmp_la_SOURCES = \
        Session.h \
        Var.cc \
        Var.h
-
-DEFS += -DDEFAULT_PREFIX=\"$(prefix)\"