naccyde / rpms / systemd

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