]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed fhuge-objects detection in libTrie
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 27 Nov 2009 11:57:34 +0000 (12:57 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 27 Nov 2009 11:57:34 +0000 (12:57 +0100)
acinclude.m4
lib/libTrie/acinclude.m4

index 72bb8956ee9eacf2fde29336830c362ab15c1697..5d262fc91074f4ba2c1d72c4ed05bd7b2bd09bba 100644 (file)
@@ -69,6 +69,7 @@ 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])
@@ -90,10 +91,8 @@ exit $res`
   if test "X${ac_cv_test_checkforhugeobjects}" != Xno
   then
     HUGE_OBJECT_FLAG="-fhuge-objects"
-  else
-    HUGE_OBJECT_FLAG=""
   fi
- 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
+