Stop `configure` and throw an error when `--with-gmp`, `--with-gmp-lib`
or `--with-gmp-include` is passed without an argument.
If someone by mistake passes any of those options using the option only
or sepparated by a space instead of `=` it currently tries to build it.
Since this syntax is valid in several programs (i.e. those built using
getopt_long), throwing an error might prevent build-time issues.
ChangeLog:
* configure.ac: Validate the value passed for `--with-gmp`,
`--with-gmp-include` and `--with-gmp-lib` to detect 'yes' (no
argument)
* configure: Regenerate `configure` with `autoreconf-2.69`.
Signed-off-by: Agatha Isabelle Moreira <[email protected]>
---
configure | 5 +++++
configure.ac | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/configure b/configure
index 2c977bd7b9e..02cd3bb7997 100755
--- a/configure
+++ b/configure
@@ -9176,6 +9176,11 @@ fi
+case "|x$with_gmp|x$with_gmp_include|x$with_gmp_lib|" in
+ *"|xyes|"*)
+ as_fn_error $? "--with-gmp{,-include,-lib} requires a PATH argument"
"$LINENO" 5
+ ;;
+esac
if test "x$with_gmp" != x; then
gmplibs="-L$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
diff --git a/configure.ac b/configure.ac
index 4997e2d6f5f..ed66e1ea2e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1770,6 +1770,11 @@ AC_ARG_WITH(gmp-lib,
[specify directory for the installed GMP library])])
+case "|x$with_gmp|x$with_gmp_include|x$with_gmp_lib|" in
+ *"|xyes|"*)
+ AC_MSG_ERROR([--with-gmp{,-include,-lib} requires a PATH argument])
+ ;;
+esac
if test "x$with_gmp" != x; then
gmplibs="-L$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
--
2.54.0