------------------------------------------------------------ revno: 12351 revision-id: squid3@treenet.co.nz-20121010013631-a4o4h5gkdvf86wg4 parent: squid3@treenet.co.nz-20121010013503-i2me53ii2l0zbw5t committer: Amos Jeffries branch nick: 3.3 timestamp: Tue 2012-10-09 19:36:31 -0600 message: Portability: support customization of --prefix= via compat/autoconf.h Rather than defining DEFAULT_PREFIX on the compiler command line this builds its value into autoconf.h for use whenever needed. Avoiding potential 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. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121010013631-a4o4h5gkdvf86wg4 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 820219583fe5d17c2b102d30c6996b66693add07 # timestamp: 2012-10-10 01:38:45 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121010013503-\ # i2me53ii2l0zbw5t # # Begin patch === modified file 'configure.ac' --- configure.ac 2012-10-10 01:35:03 +0000 +++ configure.ac 2012-10-10 01:36:31 +0000 @@ -104,6 +104,14 @@ 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. === modified file 'src/snmp/Makefile.am' --- src/snmp/Makefile.am 2011-02-03 11:07:27 +0000 +++ src/snmp/Makefile.am 2012-10-10 01:36:31 +0000 @@ -20,5 +20,3 @@ Session.h \ Var.cc \ Var.h - -DEFS += -DDEFAULT_PREFIX=\"$(prefix)\"