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.
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.
Session.h \
Var.cc \
Var.h
-
-DEFS += -DDEFAULT_PREFIX=\"$(prefix)\"