Stop `configure` and throw an error when `--with-isl-lib` or
`--with-isl-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.

config/ChangeLog:

        * isl.m4: Validate the value passed for `--with-isl-lib` and
        `--with-isl-include` to detect 'yes' (no argument).

ChangeLog:

        * configure: Regenerate `configure` with `autoreconf-2.69`.

Signed-off-by: Agatha Isabelle Moreira <[email protected]>
---
 config/isl.m4 | 8 ++++++++
 configure     | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/config/isl.m4 b/config/isl.m4
index bbb973e023b..07c7ed875cd 100644
--- a/config/isl.m4
+++ b/config/isl.m4
@@ -52,6 +52,14 @@ AC_DEFUN([ISL_INIT_FLAGS],
       islinc="-I$with_isl/include"
       ;;
   esac
+
+  # Check for --with-isl-lib and --with-isl-include without arguments
+  case "|x$with_isl_include|x$with_isl_lib|" in
+    *"|xyes|"*)
+      AC_MSG_ERROR([--with-isl-{include,lib} requires a PATH argument])
+      ;;
+  esac
+
   if test "x${with_isl_include}" != x ; then
     islinc="-I$with_isl_include"
   fi
diff --git a/configure b/configure
index 69f1b54f954..30f4c0f09a3 100755
--- a/configure
+++ b/configure
@@ -9630,6 +9630,14 @@ fi
       islinc="-I$with_isl/include"
       ;;
   esac
+
+  # Check for --with-isl-lib and --with-isl-include without arguments
+  case "|x$with_isl_include|x$with_isl_lib|" in
+    *"|xyes|"*)
+      as_fn_error $? "--with-isl-{include,lib} requires a PATH argument" 
"$LINENO" 5
+      ;;
+  esac
+
   if test "x${with_isl_include}" != x ; then
     islinc="-I$with_isl_include"
   fi
-- 
2.54.0

Reply via email to