From: Amos Jeffries Date: Tue, 27 Jan 2009 00:22:12 +0000 (+1300) Subject: Fix ESI breaks with --disable-optimizations X-Git-Tag: SQUID_3_2_0_1~1239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ea2728e3dfd02501f9428c3712b3c9023f7d5fec;p=thirdparty%2Fsquid.git Fix ESI breaks with --disable-optimizations Turns out the libTrie configure script shares some macro handling which needed a re-sync with the main squid script. TODO: These should really be made into shared macros. --- diff --git a/lib/libTrie/configure.in b/lib/libTrie/configure.in index 7861a54a14..b879e622e5 100644 --- a/lib/libTrie/configure.in +++ b/lib/libTrie/configure.in @@ -5,27 +5,48 @@ AM_CONFIG_HEADER([config.h]) AC_CONFIG_AUX_DIR(cfgaux) SquidInline="yes" + +AC_ARG_ENABLE(optimizations, + AC_HELP_STRING([--disable-optimizations], + [Don't compile Squid with compiler optimizations enabled. + Optimization is good for production builds, but not + good for debugging. During development, use + --disable-optimizations to reduce compilation times + and allow easier debugging. This option implicitly + also enabled --disable-inline]), +[ if test "$enableval" = "no" ; then + AC_MSG_NOTICE([Disabling compiler optimizations (-O flag)]) + CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`" + CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`" + SquidInline="no" + fi +]) + AC_ARG_ENABLE(inline, - [ --disable-inline Don't compile trivial methods as inline. Squid - is coded with much of the code able to be inlined.< Inlining is good for production builds, but not - good for development. During development, use - --disable-inline to reduce compilation times and - allow incremental builds to be quick. For - production builds, or load tests, use - --enable-inline to have squid make all trivial - methods inlinable by the compiler.], - [ if test "$enableval" = "no" ; then - SquidInline="no" - fi - ]) + AC_HELP_STRING([--disable-inline], + [Don't compile trivial methods as inline. Squid + is coded with much of the code able to be inlined. + Inlining is good for production builds, but not + good for development. During development, use + --disable-inline to reduce compilation times and + allow incremental builds to be quick. For + production builds, or load tests, use + --enable-inline to have squid make all trivial + methods inlinable by the compiler.]), +[ if test "$enableval" = "no" ; then + SquidInline="no" + fi +]) if test "$SquidInline" = "yes" ; then - AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods]) - AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file]) + AC_DEFINE(_SQUID_INLINE_, inline, [Keyword used by squid for inlining methods]) + AC_DEFINE(_USE_INLINE_,, [Include inline methods into header file]) else - AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods]) + AC_MSG_NOTICE([Inlining optimization disabled]) + AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods]) fi + # Checks for programs. AC_PROG_CXX AC_PROG_CC diff --git a/lib/libTrie/include/Trie.h b/lib/libTrie/include/Trie.h index 0b482aa421..927aea4437 100644 --- a/lib/libTrie/include/Trie.h +++ b/lib/libTrie/include/Trie.h @@ -82,8 +82,7 @@ public: * present or cannot be added. */ - bool add - (char const *, size_t, void *); + bool add(char const *, size_t, void *); private: TrieNode *head; diff --git a/lib/libTrie/src/Trie.cc b/lib/libTrie/src/Trie.cc index 4d09503d37..5d5c6dc133 100644 --- a/lib/libTrie/src/Trie.cc +++ b/lib/libTrie/src/Trie.cc @@ -24,6 +24,10 @@ #include "TrieNode.h" #include "TrieCharTransform.h" +#ifndef _USE_INLINE_ +#include "Trie.cci" +#endif + Trie::Trie (TrieCharTransform *aTransform) : head (0) , transform (aTransform) {} @@ -76,7 +80,3 @@ extern "C" int TrieAdd (void *aTrie, char const *aString, size_t theLength, void return ((Trie *)aTrie)->add (aString, theLength, privatedata); } - -#ifndef _USE_INLINE_ -#include "Trie.cci" -#endif diff --git a/src/Makefile.am b/src/Makefile.am index 9e16c4ebb2..24ff3a6a66 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -919,7 +919,7 @@ ufsdump_LDADD = \ libauth.la \ icmp/libicmp.la icmp/libicmp-core.la \ ip/libip.la \ - -L../lib \ + -L../lib -lmiscutil \ @XTRA_OBJS@ \ @REPL_OBJS@ \ @STORE_OBJS@ \ @@ -929,7 +929,6 @@ ufsdump_LDADD = \ @SNMPLIB@ \ ${ADAPTATION_LIBS} \ @SSLLIB@ \ - -lmiscutil \ @XTRA_LIBS@ \ @EPOLL_LIBS@ \ @MINGW_LIBS@