#include <sys/param.h>
#endif
])
+
+dnl
+dnl thanks to autogen, for the template..
+dnl
+dnl @synopsis AC_TEST_CHECKFORHUGEOBJECTS
+dnl
+dnl Test whether -fhuge-objects is available with this c++ compiler. gcc-29.5 series compilers need this on some platform with large objects.
+dnl
+AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[
+ AC_MSG_CHECKING([whether compiler accepts -fhuge-objects])
+ AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[
+ ac_cv_test_checkforhugeobjects=`echo "int foo;" > conftest.cc
+${CXX} -Werror -fhuge-objects -c conftest.cc 2>/dev/null
+res=$?
+rm -f conftest.*
+echo yes
+exit $res` 2> /dev/null
+ if [[ $? -ne 0 ]]
+ then ac_cv_test_checkforhugeobjects=no
+ else if [[ -z "$ac_cv_test_checkforhugeobjects" ]]
+ then ac_cv_test_checkforhugeobjects=yes
+ fi ; fi
+ ]) # end of CACHE_VAL
+ AC_MSG_RESULT([${ac_cv_test_checkforhugeobjects}])
+
+ if test "X${ac_cv_test_checkforhugeobjects}" != Xno
+ then
+ HUGE_OBJECT_FLAG="-fhuge-objects"
+ else
+ HUGE_OBJECT_FLAG=""
+ fi
+]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS
dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.346 2003/08/16 01:03:09 robertc Exp $
+dnl $Id: configure.in,v 1.347 2003/08/19 00:15:01 robertc Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE(squid, 3.0-PRE3-CVS)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.346 $)dnl
+AC_REVISION($Revision: 1.347 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
AC_SUBST(SQUID_CFLAGS)
AC_SUBST(SQUID_CXXFLAGS)
+AC_TEST_CHECKFORHUGEOBJECTS
+SQUID_CXXFLAGS="$SQUID_CXXFLAGS $HUGE_OBJECT_FLAG"
+
dnl Set LDFLAGS
if test -z "$PRESET_LDFLAGS"; then
if test "$GCC" = "yes"; then
--- /dev/null
+dnl
+dnl thanks to autogen, for the template..
+dnl
+dnl @synopsis AC_TEST_CHECKFORHUGEOBJECTS
+dnl
+dnl Test whether -fhuge-objects is available with this c++ compiler. gcc-29.5 series compilers need this on some platform with large objects.
+dnl
+AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[
+ AC_MSG_CHECKING([whether compiler accepts -fhuge-objects])
+ AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[
+ ac_cv_test_checkforhugeobjects=`echo "int foo;" > conftest.cc
+${CXX} -Werror -fhuge-objects -c conftest.cc 2>/dev/null
+res=$?
+rm -f conftest.*
+echo yes
+exit $res` 2> /dev/null
+ if [[ $? -ne 0 ]]
+ then ac_cv_test_checkforhugeobjects=no
+ else if [[ -z "$ac_cv_test_checkforhugeobjects" ]]
+ then ac_cv_test_checkforhugeobjects=yes
+ fi ; fi
+ ]) # end of CACHE_VAL
+ AC_MSG_RESULT([${ac_cv_test_checkforhugeobjects}])
+
+ if test "X${ac_cv_test_checkforhugeobjects}" != Xno
+ then
+ HUGE_OBJECT_FLAG="-fhuge-objects"
+ else
+ HUGE_OBJECT_FLAG=""
+ fi
+]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS
AM_CONFIG_HEADER([config.h])
SquidInline="yes"
- AC_ARG_ENABLE(inline,
+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
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])
- else
- AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
- fi
+ [ 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])
+else
+ AC_DEFINE(_SQUID_INLINE_,, [Keyword used by squid for inlining methods])
+fi
# Checks for programs.
- AC_PROG_CXX
- AC_PROG_CC
- AC_PROG_MAKE_SET
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_MAKE_SET
# for old automakes - like squid-cache.orgs!
- AM_INIT_AUTOMAKE(libTrie, 0.1)
- AM_MAINTAINER_MODE
- AC_PROG_RANLIB
-
- dnl set useful flags
- if test "$GCC" = "yes"; then
- TRIE_CFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
- TRIE_CXXFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wcomments"
- else
- TRIE_CFLAGS=
- TRIE_CXXFLAGS=
- fi
- AC_SUBST(TRIE_CFLAGS)
- AC_SUBST(TRIE_CXXFLAGS)
+AM_INIT_AUTOMAKE(libTrie, 0.1)
+AM_MAINTAINER_MODE
+AC_PROG_RANLIB
+
+dnl set useful flags
+if test "$GCC" = "yes"; then
+ TRIE_CFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
+ TRIE_CXXFLAGS="-Werror -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wcomments"
+else
+ TRIE_CFLAGS=
+ TRIE_CXXFLAGS=
+fi
+
+AC_TEST_CHECKFORHUGEOBJECTS
+TRIE_CXXFLAGS="$TRIE_CXXFLAGS $HUGE_OBJECT_FLAG"
+
+AC_SUBST(TRIE_CFLAGS)
+AC_SUBST(TRIE_CXXFLAGS)
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_TYPE_SIZE_T
+AC_C_CONST
+AC_TYPE_SIZE_T
# Checks for library functions.
- AC_CONFIG_FILES([Makefile
- include/Makefile
- src/Makefile
- test/Makefile])
- AC_OUTPUT
+AC_CONFIG_FILES([Makefile
+ include/Makefile
+ src/Makefile
+ test/Makefile])
+AC_OUTPUT