netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan McGee <dan@archlinux.org>
To: netdev@vger.kernel.org
Cc: Dan McGee <dan@archlinux.org>
Subject: [PATCH] Make iproute2 configure script more flexible
Date: Fri, 15 Jul 2011 13:52:24 -0500	[thread overview]
Message-ID: <1310755944-2420-1-git-send-email-dan@archlinux.org> (raw)

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: Dan McGee <dan@archlinux.org>
---
 configure |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index 69797ab..0795df8 100755
--- a/configure
+++ b/configure
@@ -3,8 +3,6 @@
 #
 INCLUDE=${1:-"$PWD/include"}
 
-TABLES=
-
 check_atm()
 {
 cat >/tmp/atmtest.c <<EOF
@@ -141,9 +139,6 @@ check_ipt()
 	if ! grep TC_CONFIG_XT Config > /dev/null
 	then
 		echo "using iptables"
-		TABLES="iptables"
-	else
-		TABLES="xtables"
 	fi
 }
 
@@ -152,10 +147,10 @@ check_ipt_lib_dir()
 	IPT_LIB_DIR=""
 	for dir in /lib /usr/lib /usr/local/lib
 	do
-		for file in $dir/$TABLES/lib*t_*so ; do
+		for file in $dir/{xtables,iptables}/lib*t_*so ; do
 			if [ -f $file ]; then
-				echo $dir/$TABLES
-				echo "IPT_LIB_DIR:=$dir/$TABLES" >> Config
+				echo ${file%/*}
+				echo "IPT_LIB_DIR:=${file%/*}" >> Config
 				return
 			fi
 		done
-- 
1.7.6


                 reply	other threads:[~2011-07-15 18:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1310755944-2420-1-git-send-email-dan@archlinux.org \
    --to=dan@archlinux.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).