As reported in the PR, the in-tree build of GMP fails for BSD.
The reason is that with_gmp is set if there is a gmp.h under
/usr/local – such that in-tree GMP is build but later not used,
which causes build fails if /usr/local has no proper GMP.
Fixed by skipping the setting of with_gmp if there is an
in-tree GMP.
Patch was tested by the PR creator.
OK for the trunk? (Other branches?)
Tobias
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander
Walter
configure: Fix in-tree building of GMP on BSD (PR97302)
ChangeLog:
PR target/97302
* configure.ac: Only set with_gmp to /usr/local
if not building in tree.
* configure: Regenerate.
diff --git a/configure b/configure
index 057b88966e4..2b805dbd26a 100755
--- a/configure
+++ b/configure
@@ -3764,6 +3764,7 @@ case "${target}" in
;;
*-*-freebsd*)
if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && ! test -d ${srcdir}/gmp \
&& test -f /usr/local/include/gmp.h; then
with_gmp=/usr/local
fi
diff --git a/configure.ac b/configure.ac
index 392389fb2fb..e0da73548c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1038,6 +1038,7 @@ case "${target}" in
;;
*-*-freebsd*)
if test "x$with_gmp" = x && test "x$with_gmp_dir" = x \
+ && ! test -d ${srcdir}/gmp \
&& test -f /usr/local/include/gmp.h; then
with_gmp=/usr/local
fi