summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-09-19 10:59:02 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-09-19 10:59:02 +0000
commit0ec300131449794834163345ee533c6469c0ee89 (patch)
tree42102339200552e708c6c46de1c533f0d749debb /configure.ac
parent648463cd1f6731d9f2b7c82682ae0be903285099 (diff)
downloadmpfr-0ec300131449794834163345ee533c6469c0ee89.tar.gz
[configure.ac] Do not split "Setup GMP detection". When building
MPFR against mini-gmp, do not run any "Setup GMP detection" test (in particular, no longer check gmp.h, as it is useless). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@13224 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac102
1 files changed, 49 insertions, 53 deletions
diff --git a/configure.ac b/configure.ac
index fe5990c0b..dd0d8baad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -544,10 +544,59 @@ TUNE_LIBS="$LIBS"
LIBS="$old_LIBS"
AC_SUBST(TUNE_LIBS)
+dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
+dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
+dnl the precedence over the run path, so that if a compatible MPFR library
+dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
+dnl MPFR library will be this library instead of the MPFR library from the
+dnl build tree. Other OS with the same issue might be added later.
+dnl
+dnl References:
+dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
+dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
+dnl
+dnl We need to check whether --disable-new-dtags is supported as alternate
+dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
+dnl
+case $host in
+ *-*-linux*)
+ if test -n "$LD_LIBRARY_PATH"; then
+ saved_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--disable-new-dtags"
+ AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+int main (void) { return 0; }
+ ]])],
+ [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
+ [AC_MSG_RESULT(no)
+ LDFLAGS="$saved_LDFLAGS"
+ ])
+ fi
+ ;;
+esac
+
+dnl
+dnl For mpfr-longlong.h - TODO: should be replaced (see acinclude.m4).
+dnl
+
+GMP_C_ATTRIBUTE_MODE
+
+
dnl
dnl Setup GMP detection
dnl
+if test -z "$mini_gmp_path" ; then
+
+dnl Avoid a configure failure with automatic dependency tracking due to
+dnl libminigmp_la_SOURCES = $(mini_gmp_path)/mini-gmp.h [...]
+dnl in src/Makefile.am; this failure comes from the fact that lines with
+dnl $(mini_gmp_path)/$(DEPDIR)/... are added to src/Makefile even though
+dnl the rules related to $(mini_gmp_path) are in an Automake conditional
+dnl that is false when $mini_gmp_path is an empty string. This is probably
+dnl a bug in Automake.
+mini_gmp_path=.
+
dnl Check GMP Header
AC_MSG_CHECKING(for gmp.h)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -601,59 +650,6 @@ error
;;
esac
-dnl Under Linux, make sure that the old dtags are used if LD_LIBRARY_PATH
-dnl is defined. The issue is that with the new dtags, LD_LIBRARY_PATH has
-dnl the precedence over the run path, so that if a compatible MPFR library
-dnl is installed in some directory from $LD_LIBRARY_PATH, then the tested
-dnl MPFR library will be this library instead of the MPFR library from the
-dnl build tree. Other OS with the same issue might be added later.
-dnl
-dnl References:
-dnl https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859732
-dnl http://lists.gnu.org/archive/html/libtool/2017-05/msg00000.html
-dnl
-dnl We need to check whether --disable-new-dtags is supported as alternate
-dnl linkers may be used (e.g., with tcc: CC=tcc LD=tcc).
-dnl
-case $host in
- *-*-linux*)
- if test -n "$LD_LIBRARY_PATH"; then
- saved_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,--disable-new-dtags"
- AC_MSG_CHECKING(whether --disable-new-dtags is supported by the linker)
- AC_LINK_IFELSE([AC_LANG_SOURCE([[
-int main (void) { return 0; }
- ]])],
- [AC_MSG_RESULT(yes (use it since LD_LIBRARY_PATH is set))],
- [AC_MSG_RESULT(no)
- LDFLAGS="$saved_LDFLAGS"
- ])
- fi
- ;;
-esac
-
-dnl
-dnl For mpfr-longlong.h - TODO: should be replaced (see acinclude.m4).
-dnl
-
-GMP_C_ATTRIBUTE_MODE
-
-
-dnl
-dnl Setup GMP detection (continued)
-dnl
-
-if test -z "$mini_gmp_path" ; then
-
-dnl Avoid a configure failure with automatic dependency tracking due to
-dnl libminigmp_la_SOURCES = $(mini_gmp_path)/mini-gmp.h [...]
-dnl in src/Makefile.am; this failure comes from the fact that lines with
-dnl $(mini_gmp_path)/$(DEPDIR)/... are added to src/Makefile even though
-dnl the rules related to $(mini_gmp_path) are in an Automake conditional
-dnl that is false when $mini_gmp_path is an empty string. This is probably
-dnl a bug in Automake.
-mini_gmp_path=.
-
dnl Check minimal GMP version
dnl We only guarantee that with a *functional* and recent enough GMP version,
dnl MPFR will compile; we do not guarantee that GMP will compile.