diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-07-12 14:27:50 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-07-12 14:27:50 +0000 |
commit | 0e1c42b8d66aa4af20d74edd428ae40d71bb6058 (patch) | |
tree | 694b2754a484aa78f594e0553409ae6095704bd5 /acinclude.m4 | |
parent | e67a4497b19db3eed2d6bbeca9826483a1163799 (diff) | |
download | mpfr-0e1c42b8d66aa4af20d74edd428ae40d71bb6058.tar.gz |
[acinclude.m4] For the _Float128 / __float128 detection, changed
AC_COMPILE_IFELSE to AC_LINK_IFELSE since an error may occur only
at link time, such as under NetBSD:
https://mail-index.netbsd.org/pkgsrc-users/2018/02/02/msg026220.html
https://mail-index.netbsd.org/pkgsrc-users/2018/02/05/msg026238.html
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12915 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index d020527bf..1219404cb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -683,15 +683,19 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ dnl Check if _Float128 or __float128 is available. We also require the dnl compiler to support hex constants with the f128 or q suffix (this dnl prevents the _Float128 support with GCC's -std=c90, but who cares?). +dnl Note: We use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE since an +dnl error may occur only at link time, such as under NetBSD: +dnl https://mail-index.netbsd.org/pkgsrc-users/2018/02/02/msg026220.html +dnl https://mail-index.netbsd.org/pkgsrc-users/2018/02/05/msg026238.html if test "$enable_float128" != no; then AC_MSG_CHECKING(if compiler knows _Float128 with hex constants) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[_Float128 x = 0x1.fp+16383f128;]])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[_Float128 x = 0x1.fp+16383f128;]])], [AC_MSG_RESULT(yes) AC_DEFINE([MPFR_WANT_FLOAT128],1,[Build float128 functions])], [AC_MSG_RESULT(no) AC_MSG_CHECKING(if __float128 can be used as a fallback) dnl Use the q suffix in this case. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #define _Float128 __float128 _Float128 x = 0x1.fp+16383q;]])], [AC_MSG_RESULT(yes) |