]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use AC_TRY_LINK, not AC_TRY_COMPILE, as suggested today on the mailing list, to check...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Mar 2007 18:16:50 +0000 (18:16 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Mar 2007 18:16:50 +0000 (18:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@14599 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/aclocal.m4
deal.II/configure

index da511197b75fa4367d4d3825c6df16077edcc488..a0064cbfdb013fb9f640d5e7abc482c285043d40 100644 (file)
@@ -3995,7 +3995,8 @@ dnl
 dnl Annoyingly, the Portland Group compiler compiles code with
 dnl __builtin_expect just fine, but then doesn't want to link it,
 dnl saying it doesn't know this function. So simply not test for
-dnl __builtin_expect with that compiler.
+dnl __builtin_expect with that compiler, and to be extrasure make 
+dnl sure we're doing the right thing also link .
 dnl
 dnl Usage: DEAL_II_HAVE_BUILTIN_EXPECT
 dnl
@@ -4006,9 +4007,9 @@ AC_DEFUN(DEAL_II_HAVE_BUILTIN_EXPECT, dnl
     AC_MSG_CHECKING(for __builtin_expect)
     AC_LANG(C++)
     CXXFLAGS="$CXXFLAGSG"
-    AC_TRY_COMPILE(
+    AC_TRY_LINK(
       [
-         bool f();
+         bool f() {}
       ],
       [
          if (__builtin_expect(f(),false));
index 1e9871a07b08b02af728788764374d85818cfaaa..7b21bbcf92e6bc2b3e923cefa092bc3a9b98cfbb 100755 (executable)
@@ -7417,7 +7417,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-         bool f();
+         bool f() {}
 
 int
 main ()
@@ -7429,9 +7429,9 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
@@ -7445,7 +7445,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; } &&
-        { ac_try='test -s conftest.$ac_objext'
+        { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -7469,7 +7469,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
 echo "${ECHO_T}no" >&6
 
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
   fi
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.