Rollup merge of #36190 - 0xmohit:pr/issue-31216, r=alexcrichton

configure: check if any of the arguments contain --help

Currently it checks only the first argument.

Fixes #31216
This commit is contained in:
Jonathan Turner
2016-09-02 15:28:52 -07:00
committed by GitHub
Vendored
+8 -4
View File
@@ -360,6 +360,13 @@ abs_path() {
(unset CDPATH && cd "$_path" > /dev/null && pwd)
}
HELP=0
for arg; do
case "$arg" in
--help) HELP=1;;
esac
done
msg "looking for configure programs"
need_cmd cmp
need_cmd mkdir
@@ -566,11 +573,8 @@ esac
OPTIONS=""
HELP=0
if [ "$1" = "--help" ]
if [ "$HELP" -eq 1 ]
then
HELP=1
shift
echo
echo "Usage: $CFG_SELF [options]"
echo