From: Amos Jeffries Date: Wed, 10 Oct 2012 01:36:31 +0000 (-0600) Subject: Portability: support customization of --prefix= via compat/autoconf.h X-Git-Tag: SQUID_3_3_0_1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e18679dc4924e76507176bde65450cac989c3a0;p=thirdparty%2Fsquid.git 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. --- diff --git a/configure.ac b/configure.ac index 99eaab554f..072f58a25d 100644 --- a/configure.ac +++ b/configure.ac @@ -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. diff --git a/src/snmp/Makefile.am b/src/snmp/Makefile.am index 39d6036c26..3100a4e889 100644 --- a/src/snmp/Makefile.am +++ b/src/snmp/Makefile.am @@ -20,5 +20,3 @@ libsnmp_la_SOURCES = \ Session.h \ Var.cc \ Var.h - -DEFS += -DDEFAULT_PREFIX=\"$(prefix)\"