]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Dec 2009 03:32:43 +0000 (16:32 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 6 Dec 2009 03:32:43 +0000 (16:32 +1300)
Make huge-objects macro only test for GCC

acinclude.m4
configure.in
lib/libTrie/acinclude.m4
lib/libTrie/configure.in

index 43d4af62ccc2a7ac2f3b4d3d0043b094ad4bfca0..cd602795b0fa557540fbf02bd9a75d6c8a5f6f73 100644 (file)
@@ -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
index 4acaceb16d214a72b69b771098e50bcf6fd7901c..69a06e177e01a2c512ec9aabcceba786c3af91ef 100644 (file)
@@ -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
index a9e4caf9d4f34f47e8f3e0bda96bf8d96f7ec04e..981bfbbc1b2bde4408c5b3234996efd9f2228277 100644 (file)
@@ -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
+
index b879e622e58e762c876a32ab9630d67572e5f316..dc44050a508546c59b0699f61040668ec76f3512 100644 (file)
@@ -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)