Commit 44e743e5 authored by Dan McGee's avatar Dan McGee Committed by Stephen Hemminger

Make iproute2 configure script more flexible

On Arch Linux, we still install the iptables shared libraries in
/usr/lib/iptables/, even though the main library is installed to
/usr/lib/libxtables.so. This change checks all available locations to
correctly find the iptables library directory.
Signed-off-by: default avatarDan McGee <dan@archlinux.org>
parent 05fb9184
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
# #
INCLUDE=${1:-"$PWD/include"} INCLUDE=${1:-"$PWD/include"}
TABLES=
check_atm() check_atm()
{ {
cat >/tmp/atmtest.c <<EOF cat >/tmp/atmtest.c <<EOF
...@@ -141,9 +139,6 @@ check_ipt() ...@@ -141,9 +139,6 @@ check_ipt()
if ! grep TC_CONFIG_XT Config > /dev/null if ! grep TC_CONFIG_XT Config > /dev/null
then then
echo "using iptables" echo "using iptables"
TABLES="iptables"
else
TABLES="xtables"
fi fi
} }
...@@ -152,10 +147,10 @@ check_ipt_lib_dir() ...@@ -152,10 +147,10 @@ check_ipt_lib_dir()
IPT_LIB_DIR="" IPT_LIB_DIR=""
for dir in /lib /usr/lib /usr/local/lib for dir in /lib /usr/lib /usr/local/lib
do do
for file in $dir/$TABLES/lib*t_*so ; do for file in $dir/{xtables,iptables}/lib*t_*so ; do
if [ -f $file ]; then if [ -f $file ]; then
echo $dir/$TABLES echo ${file%/*}
echo "IPT_LIB_DIR:=$dir/$TABLES" >> Config echo "IPT_LIB_DIR:=${file%/*}" >> Config
return return
fi fi
done done
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment