diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2019-09-04 12:38:10 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2019-09-04 12:38:10 +0000 |
commit | 7969c8c192fbb0b2f00408d3f852ff2b6eec362f (patch) | |
tree | 19fe84783f6fbc31cb14704d2599665c8cea2c43 /acinclude.m4 | |
parent | da64111e4b9d5cb7077abeafdd766b87ce752645 (diff) | |
download | mpfr-7969c8c192fbb0b2f00408d3f852ff2b6eec362f.tar.gz |
[acinclude.m4] Fixed MPFR_C_LONG_DOUBLE_FORMAT macro for MS-Windows.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13599 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 6b871c152..bf0a42125 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1025,13 +1025,15 @@ dnl IA-64 is 16 bytes in LP64 mode, or 12 bytes in ILP32 mode. The dnl relevant part in all cases (big and little endian) consists of the dnl first 10 bytes. dnl -dnl We compile and link (with "-o conftest") instead of just compiling -dnl (with "-c"), so that this test works with GCC's and clang's LTO -dnl (-flto). If we just compile with LTO, the generated object file -dnl does not contain the structure as is. This new test is inspired -dnl by the one used by GMP for the double type: +dnl We compile and link (with "-o conftest$EXEEXT") instead of just +dnl compiling (with "-c"), so that this test works with GCC's and +dnl clang's LTO (-flto). If we just compile with LTO, the generated +dnl object file does not contain the structure as is. This new test +dnl is inspired by the one used by GMP for the double type: dnl https://gmplib.org/repo/gmp/rev/33eb0998a052 dnl https://gmplib.org/repo/gmp/rev/cbc6dbf95a10 +dnl "$EXEEXT" had to be added, otherwise the test was failing on +dnl MS-Windows (see Autoconf manual). dnl dnl Enhancements: dnl @@ -1081,7 +1083,7 @@ int main (void) { } ] EOF - mpfr_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest >&AS_MESSAGE_LOG_FD 2>&1" + mpfr_compile="$CC $CFLAGS $CPPFLAGS conftest.c -o conftest$EXEEXT >&AS_MESSAGE_LOG_FD 2>&1" if AC_TRY_EVAL(mpfr_compile); then cat >conftest.awk <<\EOF [ @@ -1361,11 +1363,11 @@ END { } ] EOF - mpfr_cv_c_long_double_format=`od -b conftest | $AWK -f conftest.awk` + mpfr_cv_c_long_double_format=`od -b conftest$EXEEXT | $AWK -f conftest.awk` case $mpfr_cv_c_long_double_format in unknown*) - echo "cannot match anything, conftest contains" >&AS_MESSAGE_LOG_FD - od -b conftest >&AS_MESSAGE_LOG_FD + echo "cannot match anything, conftest$EXEEXT contains" >&AS_MESSAGE_LOG_FD + od -b conftest$EXEEXT >&AS_MESSAGE_LOG_FD ;; esac else |