diff --git a/configure b/configure index 4cc938ebb7d..f2ec106a86e 100755 --- a/configure +++ b/configure @@ -3762,6 +3762,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 c78d9cbea62..115db3f402a 100644 --- a/configure.ac +++ b/configure.ac @@ -1037,6 +1037,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