[svn-r29501] - POSIX compliance changes to autogen.sh

- autogen.sh now exits on unknown arguments

Tested on: 64-bit Ubuntu 15.10 w/ gcc 5.2.1
           autotools serial
This commit is contained in:
Dana Robinson 2016-03-22 02:37:07 -05:00
parent 2280524115
commit 9c3568819f

View File

@ -1,4 +1,4 @@
#! /bin/bash
#!/bin/sh
#
# Copyright by The HDF Group.
# All rights reserved.
@ -110,8 +110,10 @@ while getopts "$optspec" optchar; do
verbose=true
;;
*)
if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
echo "Non-option argument: '-${OPTARG}'" >&2
if [ "$OPTERR" != 1 ] || case $optspec in :*) ;; *) false; esac; then
echo "ERROR: non-option argument: '-${OPTARG}'" >&2
echo "Quitting"
exit 1
fi
;;
esac