From: Amos Jeffries Date: Thu, 11 Sep 2008 05:19:13 +0000 (+1200) Subject: Fix compile errors X-Git-Tag: SQUID_3_1_0_1~49^2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7e513e94e59b55cd40026fde527d8a436edaa26;p=thirdparty%2Fsquid.git Fix compile errors My braindead alteration to pass the base data and config directories to the code for use at compile-time backfired with ./configure adding variable names intended for automake into the autoconf.h file for build. This approach drops any fancy definition/substitution attempts and simply adds an compiler flag parameter to every object build. --- diff --git a/configure.in b/configure.in index 63e65b7ea7..072d171e91 100755 --- a/configure.in +++ b/configure.in @@ -31,8 +31,12 @@ AC_PROG_CXX AC_CANONICAL_HOST dnl Make location configure settings available to the code -AC_DEFINE_UNQUOTED([DEFAULT_SQUID_CONFIG_DIR], "${sysconfdir}" , [Location of Configuration files] ) -AC_DEFINE_UNQUOTED([DEFAULT_SQUID_DATA_DIR], "${datadir}" , [Location of other data files] ) +dnl Pass squid data directory (icons, errors etc) base location to code files as a compiler define +CFLAGS="-DDEFAULT_SQUID_DATA_DIR=\"$datadir\" $CFLAGS" +CXXFLAGS="-DDEFAULT_SQUID_DATA_DIR=\"$datadir\" $CXXFLAGS" +dnl Pass squid.conf directory base location to code files as a compiler define +CFLAGS="-DDEFAULT_SQUID_CONFIG_DIR=\"$sysconfdir\" $CFLAGS" +CXXFLAGS="-DDEFAULT_SQUID_CONFIG_DIR=\"$sysconfdir\" $CXXFLAGS" use_loadable_modules=1 AC_MSG_CHECKING(whether to use loadable modules) @@ -54,7 +58,7 @@ AC_ARG_ENABLE(loadable-modules, use_loadable_modules=yes; AC_MSG_RESULT([$use_loadable_modules, implicitly]) ] -) +) AM_CONDITIONAL(USE_LOADABLE_MODULES, test $use_loadable_modules = yes)