diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/configure.ac')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/configure.ac | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/configure.ac b/Build/source/libs/mpfr/mpfr-src/configure.ac index 50535c7964d..369a602205f 100644 --- a/Build/source/libs/mpfr/mpfr-src/configure.ac +++ b/Build/source/libs/mpfr/mpfr-src/configure.ac @@ -1,8 +1,8 @@ dnl Process this file with autoconf to produce a configure script. AC_COPYRIGHT([ -Copyright 1999-2015 Free Software Foundation, Inc. -Contributed by the AriC and Caramel projects, INRIA. +Copyright 1999-2016 Free Software Foundation, Inc. +Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -23,7 +23,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., ]) dnl Add check-news when it checks for more than 15 lines -AC_INIT([MPFR],[3.1.3]) +AC_INIT([MPFR],[3.1.4]) dnl Older Automake versions than 1.13 may still be supported, but no longer dnl tested, and many things have changed in 1.13. Moreover the INSTALL file @@ -402,7 +402,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ dnl Configs for Windows DLLs. dnl libtool requires "-no-undefined" for win32 dll -dnl It also disables the tests involving the linking with LIBGMP if DLL dnl dnl "-Wl,output-def" is used to get a .def file for use by MS lib to make dnl a .lib import library, described in the manual. @@ -419,7 +418,6 @@ case $host in if test "$enable_shared" = yes; then MPFR_LDFLAGS="$MPFR_LDFLAGS -no-undefined" LIBMPFR_LDFLAGS="$LIBMPFR_LDFLAGS -Wl,--output-def,.libs/libmpfr-4.dll.def" - dont_link_with_gmp="yes" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "gmp.h" #if !__GMP_LIBGMP_DLL @@ -473,6 +471,23 @@ error AC_MSG_ERROR([GMP 4.1.0 min required]) ]) +dnl Check if gmp.h is usable at link time; this may detect errors such as +dnl with GMP 4.1, which uses "extern __inline__" unconditionally with all +dnl GCC versions, which breaks by default with GCC 5. +dnl Note: No linking is done against the GMP library at this time, as we +dnl do not use any GMP symbol. The goal of this test is to avoid obscure +dnl errors with the following gmp.h tests. +AC_MSG_CHECKING(usable gmp.h at link time) +AC_LINK_IFELSE([AC_LANG_PROGRAM([[ +#include "gmp.h" +]],[[]])],[AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([There is an incompatibility between gmp.h and the compiler. +See 'config.log' for details. +Such an incompatibility is known between GMP 4.1, which uses +"extern __inline__" with all GCC versions, and GCC 5.]) +]) + dnl Check if we can use internal header files of GMP (only --with-gmp-build) if test "$use_gmp_build" = yes ; then AC_MSG_CHECKING(for gmp internal files) @@ -510,18 +525,9 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_ERROR([GMP_NUMB_BITS and sizeof(mp_limb_t) are not consistent. You probably need to change some of the GMP or MPFR compile options. See 'config.log' for details (search for GMP_NUMB_BITS).])], - [AC_MSG_RESULT([can't test])]) + [AC_MSG_RESULT([cannot test])]) -dnl We really need to link using libtool. But it is impossible with the current -dnl libtool. -dnl The practical problems appear only under MS Windows since the library name -dnl is libgmp-3 (due to libtool versionning). The best solution -dnl is to believe it works under MS-Windows. -if test "$dont_link_with_gmp" = yes ; then -LIBS="-lgmp $LIBS" -else - dnl Check if we can link with GMP AC_CHECK_LIB(gmp, __gmpz_init, [LIBS="-lgmp $LIBS"], [AC_MSG_ERROR(libgmp not found or uses a different ABI (including static vs shared). @@ -576,7 +582,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ AC_MSG_WARN([LIBS="$LIBS"]) AC_MSG_WARN([Temporary LD_RUN_PATH was "$LD_RUN_PATH".]) AC_MSG_WARN([==========================================================]) - ],AC_MSG_RESULT([can not test]) + ],AC_MSG_RESULT([cannot test]) ) LD_RUN_PATH="$saved_LD_RUN_PATH" @@ -592,9 +598,6 @@ dnl (see above). dnl Same for __gmpn_sbpi1_divappr_q. AC_CHECK_FUNCS([__gmpn_rootrem __gmpn_sbpi1_divappr_q]) -dnl End of tests which need to link with GMP. -fi - dnl Remove also many MACROS (AC_DEFINE) which are unused by MPFR dnl and polluate (and slow down because libtool has to parse them) the build. if test -f confdefs.h; then |