]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: remove unnecessasry --with-xtables option
authorJan Engelhardt <jengelh@medozas.de>
Tue, 16 Feb 2010 21:16:28 +0000 (22:16 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 16 Feb 2010 21:26:07 +0000 (22:26 +0100)
Jonas Berlin notes that --with-xtables only emitted a -I parameter
and -L was absent.

On second look, we would also be missing -Wl,-rpath, and that would
all be system-dependent. The --with-xtables option is actually not
needed; one can easily specify extra include directories and linker
flags by means of overriding libxtables_CFLAGS and libxtables_LIBS
(even when there are no installed pkgconfig files for libxtables).

INSTALL
configure.ac

diff --git a/INSTALL b/INSTALL
index 7a8449a83c96df7eb3bdcd60a24afb132c25dff1..b21ba90bdb1ee050b1362274c09bf01b7697faf0 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -51,7 +51,6 @@ Configuring and compiling
        For RPM building, it should be /usr/src/linux-obj/...
        or whatever location the distro makes use of.
 
---with-xtables=
 
        Specifies the path to the directory where we may find
        xtables.h, should it not be within the standard C compiler
@@ -73,6 +72,13 @@ If you want to enable debugging, use
 (-O0 is used to turn off instruction reordering, which makes debugging
 much easier.)
 
+To make use of a libxtables that is not in the default path, override
+the pkgconfig variables, for example:
+
+       ./configure libxtables_CFLAGS="-I../iptables/include" \
+               libxtables_LIBS="-L../iptables/.libs \
+                       -Wl,-rpath,../iptables/.libs -lxtables"
+
 
 Build-time options
 ==================
index d26d656e6888d79215c170accbfcbd2e90018ca4..7edd4b5fe1e134b7cdfc207136d55c112bea0e85 100644 (file)
@@ -21,41 +21,13 @@ if [[ "$kbuilddir" == no ]]; then
        kbuilddir="";
 fi
 
-AC_ARG_WITH([xtables],
-       AS_HELP_STRING([--with-xtables=PATH],
-       [Path to the Xtables includes [[none]]]),
-       [xtables_location="$withval"])
 AC_ARG_WITH([xtlibdir],
        AS_HELP_STRING([--with-xtlibdir=PATH],
        [Path where to install Xtables extensions [[LIBEXECDIR/xtables]]]),
        [xtlibdir="$withval"],
        [xtlibdir='${libexecdir}/xtables'])
 
-#
-# --with-xtables= overrides a possibly installed pkgconfig file.
-#
-if [[ -n "$xtables_location" ]]; then
-       AC_MSG_CHECKING([xtables.h presence])
-       if [[ -f "$xtables_location/xtables.h" ]]; then
-               AC_MSG_RESULT([$xtables_location/xtables.h])
-               libxtables_CFLAGS="-I $xtables_location";
-       elif [[ -f "$xtables_location/include/xtables.h" ]]; then
-               AC_MSG_RESULT([$xtables_location/include/xtables.h])
-               libxtables_CFLAGS="-I $xtables_location/include";
-       fi;
-       if [[ -z "$xtables_CFLAGS" ]]; then
-               if [[ -f "$includedir/xtables.h" ]]; then
-                       AC_MSG_RESULT([$includedir/xtables.h])
-               else
-                       AC_MSG_RESULT([no])
-               fi;
-       fi;
-       libxtables_LIBS="-lxtables";
-       AC_SUBST([libxtables_CFLAGS])
-       AC_SUBST([libxtables_LIBS])
-else
-       PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.3])
-fi;
+PKG_CHECK_MODULES([libxtables], [xtables >= 1.4.3])
 AC_CHECK_HEADERS([linux/netfilter/x_tables.h], [],
        [AC_MSG_ERROR([You need to have linux/netfilter/x_tables.h, either through /usr/include or the iptables directory (--with-xtables=)])])