configure: fix parsing issue with more than one value per option

With commit a9c3d70d90 ("configure: add options ability") users are no
more able to provide wrong command lines like:

$ ./configure --include_dir foo bar

The script simply bails out when user provides more than one value for a
single option. However, in doing so, it breaks backward compatibility with
some packaging system, which expects unknown options to be ignored.

Commit a3272b9372 ("configure: restore backward compatibility") fix this
issue, but makes it possible again for users to provide wrong command lines
such as the one above.

This fixes the issue simply ignoring autoconf-like options such as
'--opt=value'.

Fixes: a3272b9372 ("configure: restore backward compatibility")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
Andrea Claudi 2021-10-14 10:50:51 +02:00 committed by David Ahern
parent 48c379bc2a
commit c330d09794
1 changed files with 3 additions and 1 deletions

4
configure vendored
View File

@ -517,10 +517,12 @@ else
shift 2 ;;
-h | --help)
usage 0 ;;
--*)
shift ;;
"")
break ;;
*)
shift 1 ;;
usage 1 ;;
esac
done
fi