netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <haliu@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	netdev@vger.kernel.org, Hangbin Liu <haliu@redhat.com>
Subject: [PATCH iproute2-next 2/2] configure: convert LIBBPF environment variables to command-line options
Date: Mon, 31 May 2021 17:47:40 +0800	[thread overview]
Message-ID: <20210531094740.2483122-3-haliu@redhat.com> (raw)
In-Reply-To: <20210531094740.2483122-1-haliu@redhat.com>

Signed-off-by: Hangbin Liu <haliu@redhat.com>
---
 configure | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index c58419c2..0a4a0fc9 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,6 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-2.0
 # This is not an autoconf generated configure
-#
-# Influential LIBBPF environment variables:
-#   LIBBPF_FORCE={on,off}   on: require link against libbpf;
-#                           off: disable libbpf probing
-#   LIBBPF_DIR              Path to libbpf DESTDIR to use
 
 INCLUDE="$PWD/include"
 
@@ -491,6 +486,10 @@ usage()
 	cat <<EOF
 Usage: $0 [OPTIONS]
 	--include_dir		Path to iproute2 include dir
+	--libbpf_dir		Path to libbpf DESTDIR
+	--libbpf_force		Enable/disable libbpf by force. Available options:
+				  on: require link against libbpf, quit config if no libbpf support
+				  off: disable libbpf probing
 	-h | --help		Show this usage info
 EOF
 	exit $1
@@ -505,6 +504,15 @@ else
 			--include_dir)
 				INCLUDE=$2
 				shift 2 ;;
+			--libbpf_dir)
+				LIBBPF_DIR="$2"
+				shift 2 ;;
+			--libbpf_force)
+				if [ "$2" != 'on' ] && [ "$2" != 'off' ]; then
+					usage 1
+				fi
+				LIBBPF_FORCE=$2
+				shift 2 ;;
 			-h | --help)
 				usage 0 ;;
 			"")
-- 
2.26.3


  parent reply	other threads:[~2021-05-31  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31  9:47 [PATCH iproute2-next 0/2] configure: convert global env to command-line options Hangbin Liu
2021-05-31  9:47 ` [PATCH iproute2-next 1/2] configure: add options ability Hangbin Liu
2021-05-31  9:47 ` Hangbin Liu [this message]
2021-06-03  3:28 ` [PATCH iproute2-next 0/2] configure: convert global env to command-line options David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210531094740.2483122-3-haliu@redhat.com \
    --to=haliu@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).