From: Amos Jeffries Date: Sun, 6 Dec 2009 03:32:43 +0000 (+1300) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_0_STABLE21~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dee4170c450db3a193c26ed8d8cd4d44631535ec;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Make huge-objects macro only test for GCC --- diff --git a/acinclude.m4 b/acinclude.m4 index 43d4af62cc..cd602795b0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -69,7 +69,9 @@ 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 +HUGE_OBJECT_FLAG="" AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[ + if test "$GCC" = "yes"; then AC_MSG_CHECKING([whether compiler accepts -fhuge-objects]) AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[ ac_cv_test_checkforhugeobjects=`echo "int main(int argc, char **argv) { int foo; }" > conftest.cc @@ -89,7 +91,6 @@ exit $res` if test "X${ac_cv_test_checkforhugeobjects}" != Xno then HUGE_OBJECT_FLAG="-fhuge-objects" - else - HUGE_OBJECT_FLAG="" fi + fi #gcc ]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS diff --git a/configure.in b/configure.in index 4acaceb16d..69a06e177e 100644 --- a/configure.in +++ b/configure.in @@ -191,8 +191,10 @@ fi AC_SUBST(SQUID_CFLAGS) AC_SUBST(SQUID_CXXFLAGS) -AC_TEST_CHECKFORHUGEOBJECTS -SQUID_CXXFLAGS="$SQUID_CXXFLAGS $HUGE_OBJECT_FLAG" +if test "$GCC" = "yes"; then + AC_TEST_CHECKFORHUGEOBJECTS + SQUID_CXXFLAGS="$SQUID_CXXFLAGS $HUGE_OBJECT_FLAG" +fi dnl Set LDFLAGS if test -z "$PRESET_LDFLAGS"; then diff --git a/lib/libTrie/acinclude.m4 b/lib/libTrie/acinclude.m4 index a9e4caf9d4..981bfbbc1b 100644 --- a/lib/libTrie/acinclude.m4 +++ b/lib/libTrie/acinclude.m4 @@ -5,11 +5,13 @@ 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 +HUGE_OBJECT_FLAG="" AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[ + if test "$GCC" = "yes"; then 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 + ac_cv_test_checkforhugeobjects=`echo "int main(int argc, char **argv) { int foo; }" > conftest.cc +${CXX} -Werror -fhuge-objects -o conftest.bin conftest.cc 2>/dev/null res=$? rm -f conftest.* echo yes @@ -25,7 +27,7 @@ exit $res` if test "X${ac_cv_test_checkforhugeobjects}" != Xno then HUGE_OBJECT_FLAG="-fhuge-objects" - else - HUGE_OBJECT_FLAG="" fi + fi #gcc ]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS + diff --git a/lib/libTrie/configure.in b/lib/libTrie/configure.in index b879e622e5..dc44050a50 100644 --- a/lib/libTrie/configure.in +++ b/lib/libTrie/configure.in @@ -65,8 +65,10 @@ else TRIE_CXXFLAGS= fi -AC_TEST_CHECKFORHUGEOBJECTS -TRIE_CXXFLAGS="$TRIE_CXXFLAGS $HUGE_OBJECT_FLAG" +if test "$GCC" = "yes" ; then + AC_TEST_CHECKFORHUGEOBJECTS + TRIE_CXXFLAGS="$TRIE_CXXFLAGS $HUGE_OBJECT_FLAG" +fi AC_SUBST(TRIE_CFLAGS) AC_SUBST(TRIE_CXXFLAGS)