dnl prediction unit in some cases. We use it in the AssertThrow
dnl macros.
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
dnl Usage: DEAL_II_HAVE_BUILTIN_EXPECT
dnl
dnl -------------------------------------------------------------
AC_DEFUN(DEAL_II_HAVE_BUILTIN_EXPECT, dnl
[
- AC_MSG_CHECKING(for __builtin_expect)
- AC_LANG(C++)
- CXXFLAGS="$CXXFLAGSG"
- AC_TRY_COMPILE(
- [
- bool f();
- ],
- [
- if (__builtin_expect(f(),false));
- ],
- [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_BUILTIN_EXPECT, 1,
- [Define if the compiler provides __builtin_expect])
- ],
- [
- AC_MSG_RESULT(no)
- ])
+ if test ! "x$GXX_VERSION" = "xportland_group" ; then
+ AC_MSG_CHECKING(for __builtin_expect)
+ AC_LANG(C++)
+ CXXFLAGS="$CXXFLAGSG"
+ AC_TRY_COMPILE(
+ [
+ bool f();
+ ],
+ [
+ if (__builtin_expect(f(),false));
+ ],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BUILTIN_EXPECT, 1,
+ [Define if the compiler provides __builtin_expect])
+ ],
+ [
+ AC_MSG_RESULT(no)
+ ])
+ fi
])
#! /bin/sh
-# From configure.in Revision: 13617 .
+# From configure.in Revision: 13905 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for deal.II 5.3.pre.
#
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:$LINENO: checking for __builtin_expect" >&5
+ if test ! "x$GXX_VERSION" = "xportland_group" ; then
+ echo "$as_me:$LINENO: checking for __builtin_expect" >&5
echo $ECHO_N "checking for __builtin_expect... $ECHO_C" >&6
- ac_ext=cc
+ ac_ext=cc
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
- CXXFLAGS="$CXXFLAGSG"
- cat >conftest.$ac_ext <<_ACEOF
+ CXXFLAGS="$CXXFLAGSG"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
- bool f();
+ bool f();
int
main ()
{
- if (__builtin_expect(f(),false));
+ if (__builtin_expect(f(),false));
;
return 0;
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:$LINENO: result: yes" >&5
+ echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
sed 's/^/| /' conftest.$ac_ext >&5
- echo "$as_me:$LINENO: result: no" >&5
+ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
echo "$as_me:$LINENO: checking for __verbose_terminate_handler" >&5