]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix compile errors
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 11 Sep 2008 05:19:13 +0000 (17:19 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 11 Sep 2008 05:19:13 +0000 (17:19 +1200)
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.

configure.in

index 63e65b7ea745006f737c5ac84d4b6ba96095bb17..072d171e91c3812bfb35dc7e89144738d3babccc 100755 (executable)
@@ -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)