summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2014-10-29 16:29:18 +0000
committerDamien Doligez <damien.doligez-inria.fr>2014-10-29 16:29:18 +0000
commitabcd4e8f90174f68554445cea7d3a1258df3161f (patch)
treebdac52121108d9cbd39b67c9c361420e5faef7c9 /configure
parent98e0051f5ce31a408a328ba6b6bf4c391f84fba6 (diff)
PR#6628: Configure script rejects legitimate arguments
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15562 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure13
1 files changed, 7 insertions, 6 deletions
diff --git a/configure b/configure
index a3909b639..d1e46bc6d 100755
--- a/configure
+++ b/configure
@@ -77,7 +77,7 @@ wrn() {
}
err() {
- printf "[ERROR!]%b\n" "$*" 1>&3
+ printf "[ERROR!] %b\n" "$*" 1>&3
exit 2
}
@@ -85,10 +85,6 @@ exec 3>&1
# Parse command-line arguments
-if echo "$configure_options" | grep -q -e '--\?[a-zA-Z0-9-]\+='; then
- err "Arguments to this script look like '-prefix /foo/bar', not '-prefix=/foo/bar' (note the '=')."
-fi
-
while : ; do
case "$1" in
"") break;;
@@ -155,7 +151,12 @@ while : ; do
no_naked_pointers=true;;
-no-cfi|--no-cfi)
with_cfi=false;;
- *) err "Unknown option \"$1\".";;
+ *) if echo "$1" | grep -q -e '^--\?[a-zA-Z0-9-]\+='; then
+ err "configure expects arguments of the form '-prefix /foo/bar'," \
+ "not '-prefix=/foo/bar' (note the '=')."
+ else
+ err "Unknown option \"$1\"."
+ fi;;
esac
shift
done