Skip to content

Commit

Permalink
install: raise error on unknown configure argument
Browse files Browse the repository at this point in the history
Fixes #348
  • Loading branch information
xdelaruelle committed Jul 7, 2020
1 parent 0f79bed commit e594753
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ compatbranch='c-3.2'

# print message on stderr then exit
echo_error() {
echo -e "ERROR: $1" >&2
if [ $# -eq 2 ] && [ $2 -eq 1 ]; then
local tryhelp="\n Try \`$progpath --help' for more information"
else
local tryhelp=''
fi
echo -e "ERROR: $1$tryhelp" >&2
exit 1
}

Expand Down Expand Up @@ -564,6 +569,8 @@ for arg in "$@"; do
--with-x|--without-x)
# pass argument supported by compat version to its ./configure script
compatarglist+="$arg " ;;
*)
echo_error "Unrecognized option \`$arg'" 1;;
esac
done

Expand Down

0 comments on commit e594753

Please sign in to comment.