|
|
6bcb30 |
From 3be62dd57ef875f9cf4674f8665c5da48c4e2274 Mon Sep 17 00:00:00 2001
|
|
|
6bcb30 |
Message-Id: <3be62dd57ef875f9cf4674f8665c5da48c4e2274.1637678195.git.aclaudi@redhat.com>
|
|
|
6bcb30 |
In-Reply-To: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1637678195.git.aclaudi@redhat.com>
|
|
|
6bcb30 |
References: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1637678195.git.aclaudi@redhat.com>
|
|
|
6bcb30 |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
6bcb30 |
Date: Tue, 23 Nov 2021 15:28:18 +0100
|
|
|
6bcb30 |
Subject: [PATCH] configure: add the --prefix option
|
|
|
6bcb30 |
|
|
|
6bcb30 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2016061
|
|
|
6bcb30 |
Upstream Status: iproute2.git commit 0ee1950b
|
|
|
6bcb30 |
|
|
|
6bcb30 |
commit 0ee1950b5c38986ea896606810231f5f9d761a00
|
|
|
6bcb30 |
Author: Andrea Claudi <aclaudi@redhat.com>
|
|
|
6bcb30 |
Date: Thu Oct 14 10:50:54 2021 +0200
|
|
|
6bcb30 |
|
|
|
6bcb30 |
configure: add the --prefix option
|
|
|
6bcb30 |
|
|
|
6bcb30 |
This commit add the '--prefix' option to the iproute2 configure script.
|
|
|
6bcb30 |
|
|
|
6bcb30 |
This mimics the '--prefix' option that autotools configure provides, and
|
|
|
6bcb30 |
will be used later to allow users or packagers to set the lib directory.
|
|
|
6bcb30 |
|
|
|
6bcb30 |
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
|
|
|
6bcb30 |
Acked-by: Phil Sutter <phil@nwl.cc>
|
|
|
6bcb30 |
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
6bcb30 |
---
|
|
|
6bcb30 |
configure | 8 ++++++++
|
|
|
6bcb30 |
1 file changed, 8 insertions(+)
|
|
|
6bcb30 |
|
|
|
6bcb30 |
diff --git a/configure b/configure
|
|
|
6bcb30 |
index 9a2645d9..05e23eff 100755
|
|
|
6bcb30 |
--- a/configure
|
|
|
6bcb30 |
+++ b/configure
|
|
|
6bcb30 |
@@ -3,6 +3,7 @@
|
|
|
6bcb30 |
# This is not an autoconf generated configure
|
|
|
6bcb30 |
|
|
|
6bcb30 |
INCLUDE="$PWD/include"
|
|
|
6bcb30 |
+PREFIX="/usr"
|
|
|
6bcb30 |
|
|
|
6bcb30 |
# Output file which is input to Makefile
|
|
|
6bcb30 |
CONFIG=config.mk
|
|
|
6bcb30 |
@@ -490,6 +491,7 @@ Usage: $0 [OPTIONS]
|
|
|
6bcb30 |
--libbpf_force <on|off> Enable/disable libbpf by force. Available options:
|
|
|
6bcb30 |
on: require link against libbpf, quit config if no libbpf support
|
|
|
6bcb30 |
off: disable libbpf probing
|
|
|
6bcb30 |
+ --prefix <dir> Path prefix of the lib files to install
|
|
|
6bcb30 |
-h | --help Show this usage info
|
|
|
6bcb30 |
EOF
|
|
|
6bcb30 |
exit $1
|
|
|
6bcb30 |
@@ -516,6 +518,11 @@ else
|
|
|
6bcb30 |
LIBBPF_FORCE="$1" ;;
|
|
|
6bcb30 |
--libbpf_force=*)
|
|
|
6bcb30 |
LIBBPF_FORCE="${1#*=}" ;;
|
|
|
6bcb30 |
+ --prefix)
|
|
|
6bcb30 |
+ shift
|
|
|
6bcb30 |
+ PREFIX="$1" ;;
|
|
|
6bcb30 |
+ --prefix=*)
|
|
|
6bcb30 |
+ PREFIX="${1#*=}" ;;
|
|
|
6bcb30 |
-h | --help)
|
|
|
6bcb30 |
usage 0 ;;
|
|
|
6bcb30 |
--*)
|
|
|
6bcb30 |
@@ -536,6 +543,7 @@ if [ "${LIBBPF_FORCE-unused}" != "unused" ]; then
|
|
|
6bcb30 |
usage 1
|
|
|
6bcb30 |
fi
|
|
|
6bcb30 |
fi
|
|
|
6bcb30 |
+[ -z "$PREFIX" ] && usage 1
|
|
|
6bcb30 |
|
|
|
6bcb30 |
echo "# Generated config based on" $INCLUDE >$CONFIG
|
|
|
6bcb30 |
quiet_config >> $CONFIG
|
|
|
6bcb30 |
--
|
|
|
6bcb30 |
2.31.1
|
|
|
6bcb30 |
|