From: bangerth Date: Mon, 26 Mar 2007 18:16:50 +0000 (+0000) Subject: Use AC_TRY_LINK, not AC_TRY_COMPILE, as suggested today on the mailing list, to check... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ffb61b070d72ab4e5ffcc4c33f6554b10d7bbe2;p=dealii-svn.git Use AC_TRY_LINK, not AC_TRY_COMPILE, as suggested today on the mailing list, to check for __builtin_expect. git-svn-id: https://svn.dealii.org/trunk@14599 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/aclocal.m4 b/deal.II/aclocal.m4 index da511197b7..a0064cbfdb 100644 --- a/deal.II/aclocal.m4 +++ b/deal.II/aclocal.m4 @@ -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)); diff --git a/deal.II/configure b/deal.II/configure index 1e9871a07b..7b21bbcf92 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -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