This commit add the '--prefix' option to the iproute2 configure script.
This mimics the '--prefix' option that autotools configure provides, and
will be used later to allow users or packagers to set the lib directory.
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: David Ahern <dsahern@kernel.org>
# This is not an autoconf generated configure
INCLUDE="$PWD/include"
+PREFIX="/usr"
# Output file which is input to Makefile
CONFIG=config.mk
--libbpf_force <on|off> Enable/disable libbpf by force. Available options:
on: require link against libbpf, quit config if no libbpf support
off: disable libbpf probing
+ --prefix <dir> Path prefix of the lib files to install
-h | --help Show this usage info
EOF
exit $1
LIBBPF_FORCE="$1" ;;
--libbpf_force=*)
LIBBPF_FORCE="${1#*=}" ;;
+ --prefix)
+ shift
+ PREFIX="$1" ;;
+ --prefix=*)
+ PREFIX="${1#*=}" ;;
-h | --help)
usage 0 ;;
--*)
usage 1
fi
fi
+[ -z "$PREFIX" ] && usage 1
echo "# Generated config based on" $INCLUDE >$CONFIG
quiet_config >> $CONFIG