diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-03-21 15:27:37 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-03-22 12:10:35 +0000 |
commit | 6fb32b8f8ad6c115e1f244754cbd8612ec774ba3 (patch) | |
tree | a8531558591c8e898ccca18d5e926c38730f3146 | |
parent | d9e8ea9642ff76c740f40f03f94d8a6de961475e (diff) | |
download | ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar.gz ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar.bz2 ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar.lz ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar.xz ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.tar.zst ucspi-vsock-6fb32b8f8ad6c115e1f244754cbd8612ec774ba3.zip |
configure: reject invalid arguments
But we preserve the autoconf behaviour of only warning on invalid options. $ ./configure --test Warning: unrecognized options: --test $ ./configure test Error: unexpected argument: test Message-Id: <20210321193951.21671-1-hi@alyssa.is> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
-rwxr-xr-x | configure | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configure b/configure index 38c926c..938db10 100755 --- a/configure +++ b/configure @@ -29,8 +29,11 @@ for arg; do prefix="$(printf "%s" "$arg" | cut -d= -f2-)" elif printf "%s" "$arg" | grep -q "^--bindir="; then bindir="$(printf "%s" "$arg" | cut -d= -f2-)" - else + elif printf "%s" "$arg" | grep -q "^--"; then unrecognized="$unrecognized $arg" + else + echo "Error: unexpected argument: $arg" >&2 + exit 64 # EX_USAGE fi done |