From cda5e7474d1310d7d233bd0c4ed1a23db6619a6d Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 7 Oct 2012 22:27:26 -0600 Subject: [PATCH] Windows: 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 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 | 8 ++++++++ src/snmp/Makefile.am | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e57d727253..5c8771b4d8 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)\" -- 2.47.3