summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-02-02 17:23:20 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-02-02 17:23:20 +0000
commit882ebb6b2415d671e654d0a0ee25a54f535d06af (patch)
tree5993e8e396c6f1e1004827dfdabc9ca61e2f1fee /acinclude.m4
parentdbe01262a656636d5ccd3db3860345bb416c6f71 (diff)
downloadmpfr-882ebb6b2415d671e654d0a0ee25a54f535d06af.tar.gz
[acinclude.m4] Fixed _mulx_u64 detection to avoid failures in tests
with ICC 15: we need an AC_RUN_IFELSE, not just an AC_LINK_IFELSE. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11251 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m420
1 files changed, 12 insertions, 8 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index a5fcfc7da..6db71d813 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -482,18 +482,22 @@ static int f (double (*func)(double)) { return 0; }
],[AC_MSG_RESULT(no)])
dnl Check if _mulx_u64 is provided
-dnl Note: This intrinsic is not standard, and ideally more checks should
-dnl be done to make sure that the MPFR code matches what is expected on
-dnl all compilers that provide it.
+dnl Note: This intrinsic is not standard. We need a run because
+dnl it may be provided but not working as expected (with ICC 15,
+dnl one gets an "Illegal instruction").
AC_MSG_CHECKING([for _mulx_u64])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+AC_RUN_IFELSE([AC_LANG_PROGRAM([[
#include <immintrin.h>
]], [[
return _mulx_u64(17, 42, (unsigned long long *) 0);
-]])], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_MULX_U64, 1,[Have _mulx_u64 function])
-],[AC_MSG_RESULT(no)])
+]])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MULX_U64, 1,[Have a working _mulx_u64 function])
+ ],
+ [AC_MSG_RESULT(no)
+ ],
+ [AC_MSG_RESULT([cannot test, assume no])
+ ])
LIBS="$saved_LIBS"