]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 30 Nov 2009 10:54:47 +0000 (23:54 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 30 Nov 2009 10:54:47 +0000 (23:54 +1300)
Fixed fhuge-objects detection in libTrie

acinclude.m4
lib/libTrie/acinclude.m4

index 95e7a8827aad661c555dcf3a9d4e786461f68f51..5d262fc91074f4ba2c1d72c4ed05bd7b2bd09bba 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,9 +91,8 @@ 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 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
+