Message ID | 189942255eec5688c214c6ff48815836b7d7e1c6.1633369677.git.aclaudi@redhat.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | David Ahern |
Headers | show |
Series | configure: add support for libdir and | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
On 10/4/21 1:50 PM, Andrea Claudi wrote: > diff --git a/configure b/configure > index 7f4f3bd9..cebfda6e 100755 > --- a/configure > +++ b/configure > @@ -501,18 +501,30 @@ if [ $# -eq 1 ] && [ "$(echo $1 | cut -c 1)" != '-' ]; then > else > while true; do > case "$1" in > - --include_dir) > - INCLUDE=$2 > - shift 2 ;; > - --libbpf_dir) > - LIBBPF_DIR="$2" > - shift 2 ;; > - --libbpf_force) > - if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then > + --include_dir*) this is going to match a lot more than just --include_dir and --include_dir=
diff --git a/configure b/configure index 7f4f3bd9..cebfda6e 100755 --- a/configure +++ b/configure @@ -501,18 +501,30 @@ if [ $# -eq 1 ] && [ "$(echo $1 | cut -c 1)" != '-' ]; then else while true; do case "$1" in - --include_dir) - INCLUDE=$2 - shift 2 ;; - --libbpf_dir) - LIBBPF_DIR="$2" - shift 2 ;; - --libbpf_force) - if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then + --include_dir*) + INCLUDE="${1#*=}" + if [ "$INCLUDE" == "--include_dir" ]; then + INCLUDE=$2 + shift + fi + shift ;; + --libbpf_dir*) + LIBBPF_DIR="${1#*=}" + if [ "$LIBBPF_DIR" == "--libbpf_dir" ]; then + LIBBPF_DIR="$2" + shift + fi + shift ;; + --libbpf_force*) + LIBBPF_FORCE="${1#*=}" + if [ "$LIBBPF_FORCE" == "--libbpf_force" ]; then + LIBBPF_FORCE="$2" + shift + fi + if [ "$LIBBPF_FORCE" != 'on' ] && [ "$LIBBPF_FORCE" != 'off' ]; then usage 1 fi - LIBBPF_FORCE=$2 - shift 2 ;; + shift ;; -h | --help) usage 0 ;; "")
This commit makes it possible to specify values for configure params using the common autotools configure syntax '--param=value'. Signed-off-by: Andrea Claudi <aclaudi@redhat.com> --- configure | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)