configure: convert LIBBPF environment variables to command-line options
Signed-off-by: Hangbin Liu <haliu@redhat.com> Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
parent
a9c3d70d90
commit
7ae2585b86
|
|
@ -1,11 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# This is not an autoconf generated configure
|
# 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"
|
INCLUDE="$PWD/include"
|
||||||
|
|
||||||
|
|
@ -491,6 +486,10 @@ usage()
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $0 [OPTIONS]
|
Usage: $0 [OPTIONS]
|
||||||
--include_dir Path to iproute2 include dir
|
--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
|
-h | --help Show this usage info
|
||||||
EOF
|
EOF
|
||||||
exit $1
|
exit $1
|
||||||
|
|
@ -505,6 +504,15 @@ else
|
||||||
--include_dir)
|
--include_dir)
|
||||||
INCLUDE=$2
|
INCLUDE=$2
|
||||||
shift 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)
|
-h | --help)
|
||||||
usage 0 ;;
|
usage 0 ;;
|
||||||
"")
|
"")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue