Check for gmp when checking for mpfr
authorTom Tromey <tom@tromey.com>
Sun, 16 Sep 2018 15:52:09 +0000 (09:52 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 17 Sep 2018 19:51:38 +0000 (13:51 -0600)
There was a report on irc that the gdb check for mpfr failed when only
static libraries are available.  The issue is that mpfr depends on
gmp, but this is not handled explicitly by gdb.

Ideally upstream would switch to pkg-config.  Or even more ideally, we
would incorporate pkg-config into the compiler and not mess with any
of this.

Meanwhile, this changes gdb's configure to add gmp to the link line
when checking for mpfr.

gdb/ChangeLog
2018-09-17  Tom Tromey  <tom@tromey.com>

* configure: Rebuild.
* configure.ac: Use gmp as a library dependency when checking for
mpfr.

gdb/ChangeLog
gdb/configure
gdb/configure.ac

index ba27302..43c4753 100644 (file)
@@ -1,3 +1,9 @@
+2018-09-17  Tom Tromey  <tom@tromey.com>
+
+       * configure: Rebuild.
+       * configure.ac: Use gmp as a library dependency when checking for
+       mpfr.
+
 2018-09-17  Pedro Alves  <palves@redhat.com>
 
        * python/py-inferior.c (find_inferior_object): Delete.
index d92a256..e011b77 100755 (executable)
@@ -9837,7 +9837,7 @@ fi
   rpathdirs=
   ltrpathdirs=
   names_already_handled=
-  names_next_round='mpfr '
+  names_next_round='mpfr gmp'
   while test -n "$names_next_round"; do
     names_this_round="$names_next_round"
     names_next_round=
index e38604c..f658da8 100644 (file)
@@ -682,7 +682,7 @@ if test "${with_mpfr}" = no; then
   AC_MSG_WARN([MPFR support disabled; some features may be unavailable.])
   HAVE_LIBMPFR=no
 else
-  AC_LIB_HAVE_LINKFLAGS([mpfr], [], [#include <mpfr.h>],
+  AC_LIB_HAVE_LINKFLAGS([mpfr], [gmp], [#include <mpfr.h>],
                        [mpfr_exp_t exp; mpfr_t x;
                         mpfr_frexp (&exp, x, x, MPFR_RNDN);])
   if test "$HAVE_LIBMPFR" != yes; then