Commit abccc9a9 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/46520 (libquadmath: fails at link test on bare irons)

2010-12-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/46520
        * configure.ac: Use GCC_TRY_COMPILE_OR_LINK instead of
        AC_TRY_LINK and cache libquad_have_float128.
        * configure: Regenerate.

From-SVN: r167605
parent 11afe8e8
2010-12-08 Tobias Burnus <burnus@net-b.de> 2010-12-08 Tobias Burnus <burnus@net-b.de>
PR fortran/46520
* configure.ac: Use GCC_TRY_COMPILE_OR_LINK instead of
AC_TRY_LINK and cache libquad_have_float128.
* configure: Regenerate.
2010-12-08 Tobias Burnus <burnus@net-b.de>
PR fortran/46543 PR fortran/46543
* configure.ac: Add texinfo checks. * configure.ac: Add texinfo checks.
* Makefile.am: Handle .texi documentation. * Makefile.am: Handle .texi documentation.
......
...@@ -11941,6 +11941,54 @@ fi ...@@ -11941,6 +11941,54 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __float128 is supported" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __float128 is supported" >&5
$as_echo_n "checking whether __float128 is supported... " >&6; } $as_echo_n "checking whether __float128 is supported... " >&6; }
if test "${libquad_cv_have_float128+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
typedef _Complex float __attribute__((mode(TC))) __complex128;
__float128 foo (__float128 x)
{
__complex128 z1, z2;
z1 = x;
z2 = x / 7.Q;
z2 /= z1;
return (__float128) z2;
}
__float128 bar (__float128 x)
{
return x * __builtin_huge_valq ();
}
int
main ()
{
foo (1.2Q);
bar (1.2Q);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
libquad_cv_have_float128=yes
else
libquad_cv_have_float128=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
if test x$gcc_no_link = xyes; then if test x$gcc_no_link = xyes; then
as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi fi
...@@ -11979,20 +12027,20 @@ main () ...@@ -11979,20 +12027,20 @@ main ()
_ACEOF _ACEOF
if ac_fn_c_try_link "$LINENO"; then : if ac_fn_c_try_link "$LINENO"; then :
libquad_have_float128=yes libquad_cv_have_float128=yes
else else
libquad_have_float128=no libquad_cv_have_float128=no
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libquad_have_float128" >&5 fi
$as_echo "$libquad_have_float128" >&6; } fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libquad_cv_have_float128" >&5
$as_echo "$libquad_cv_have_float128" >&6; }
if test "x$libquad_have_float128" = xyes; then if test "x$libquad_cv_have_float128" = xyes; then
BUILD_LIBQUADMATH_TRUE= BUILD_LIBQUADMATH_TRUE=
BUILD_LIBQUADMATH_FALSE='#' BUILD_LIBQUADMATH_FALSE='#'
else else
......
...@@ -149,8 +149,8 @@ AM_CONDITIONAL(LIBQUAD_USE_SYMVER, [test "x$quadmath_use_symver" != xno]) ...@@ -149,8 +149,8 @@ AM_CONDITIONAL(LIBQUAD_USE_SYMVER, [test "x$quadmath_use_symver" != xno])
AM_CONDITIONAL(LIBQUAD_USE_SYMVER_GNU, [test "x$quadmath_use_symver" = xgnu]) AM_CONDITIONAL(LIBQUAD_USE_SYMVER_GNU, [test "x$quadmath_use_symver" = xgnu])
AM_CONDITIONAL(LIBQUAD_USE_SYMVER_SUN, [test "x$quadmath_use_symver" = xsun]) AM_CONDITIONAL(LIBQUAD_USE_SYMVER_SUN, [test "x$quadmath_use_symver" = xsun])
AC_MSG_CHECKING([whether __float128 is supported]) AC_CACHE_CHECK([whether __float128 is supported], [libquad_cv_have_float128],
AC_TRY_LINK([ [GCC_TRY_COMPILE_OR_LINK([
typedef _Complex float __attribute__((mode(TC))) __complex128; typedef _Complex float __attribute__((mode(TC))) __complex128;
__float128 foo (__float128 x) __float128 foo (__float128 x)
...@@ -173,20 +173,11 @@ AC_MSG_CHECKING([whether __float128 is supported]) ...@@ -173,20 +173,11 @@ AC_MSG_CHECKING([whether __float128 is supported])
foo (1.2Q); foo (1.2Q);
bar (1.2Q); bar (1.2Q);
],[ ],[
libquad_have_float128=yes libquad_cv_have_float128=yes
],[ ],[
libquad_have_float128=no libquad_cv_have_float128=no
]) ])])
AC_MSG_RESULT([$libquad_have_float128]) AM_CONDITIONAL(BUILD_LIBQUADMATH, [test "x$libquad_cv_have_float128" = xyes])
dnl
dnl Enable the following for a stand-alone library:
dnl
dnl if test $libquad_have_float128 = no; then
dnl AC_MSG_ERROR([__float128 support is required to build this library.])
dnl fi
AM_CONDITIONAL(BUILD_LIBQUADMATH, [test "x$libquad_have_float128" = xyes])
AC_CACHE_SAVE AC_CACHE_SAVE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment