From: Henrik Nordstrom Date: Fri, 23 Jan 2009 23:04:56 +0000 (+0100) Subject: Move -DDFAULT_SQUID_DATA_DIR & CONFIG_DIR from CFLAGS to DEFS X-Git-Tag: SQUID_3_2_0_1~1226^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aa55a81fa5a11c7999264af0e193a1f14da95577;p=thirdparty%2Fsquid.git Move -DDFAULT_SQUID_DATA_DIR & CONFIG_DIR from CFLAGS to DEFS For some reason gcc on OpenBSD does not like having these in CFLAGS when running configure. However works fine having them expanded in src/Makefile DEFS variable just like -DDEFAULT_SQUID_CONFIG_FILE --- diff --git a/configure.in b/configure.in index 70d847769c..373fac191c 100644 --- a/configure.in +++ b/configure.in @@ -30,14 +30,6 @@ AC_LANG_C AC_PROG_CXX AC_CANONICAL_HOST -dnl Make location configure settings available to the code -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" - dnl Make the squid top srcdir available to sub-packages as --with-squid=PATH new_configure_args="$ac_configure_args --with-squid=$ac_abs_confdir" ac_configure_args="$new_configure_args" diff --git a/src/Makefile.am b/src/Makefile.am index 9e16c4ebb2..af927b32c7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1023,9 +1023,9 @@ DiskIO_DiskDaemon_diskd_LDADD = $(top_builddir)/lib/libmiscutil.a @XTRA_LIBS@ DEFAULT_HTTP_PORT = @CACHE_HTTP_PORT@ DEFAULT_ICP_PORT = @CACHE_ICP_PORT@ DEFAULT_PREFIX = $(prefix) -DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf DEFAULT_CONFIG_DIR = $(sysconfdir) -DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf +DEFAULT_CONFIG_FILE = $(DEFAULT_CONFIG_DIR)/squid.conf +DEFAULT_MIME_TABLE = $(DEFAULT_CONFIG_DIR)/mime.conf DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'` DEFAULT_LOG_PREFIX = @DEFAULT_LOG_DIR@ DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log @@ -1042,7 +1042,8 @@ DEFAULT_ERROR_DIR = $(datadir)/errors DEFAULT_MIB_PATH = $(datadir)/mib.txt DEFAULT_HOSTS = @OPT_DEFAULT_HOSTS@ -DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" +# Make location configure settings available to the code +DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\" $(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h