netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonas Berlin <xkr47@outerspace.dyndns.org>
To: netfilter-devel@vger.kernel.org
Subject: xtables-addons suggestions
Date: Tue, 16 Feb 2010 21:51:28 +0200	[thread overview]
Message-ID: <20100216215128.1c154cdb@outerspace> (raw)

[-- Attachment #1: Type: text/plain, Size: 1616 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I am using xtables-addons-1.22 and needed to do some changes to get
it to compile in my setup. I thus present a few suggestions below:

1. When using --with-xtables, I got problems at linking time, failing
to find libxtables.. By changing configure.ac like below I was able to
solve the issue.

  libxtables_LIBS="-lxtables";
   to
  libxtables_LIBS="-lxtables -L $xtables_location/lib";

Currently only the include search paths are affected by the
- --with-xtables argument. It seems there could have been an option to
instruct pkg-config to look for the xtables.pc file in the non-standard
location, but I noticed that too late.

2. When using --with-kbuild, I got some strange compile errors which
ended up being because it used header files from /usr/include/linux
instead of from the path given to --with-kbuild. In fact, I was unable
to find anything that would use the --with-kbuild argument. It ended up
in the Makefiles as variables, but nobody used them. By changing
Makefile.iptrules.in like below I was able to solve the issue.

  AM_CFLAGS         = ${regular_CFLAGS} ${libxtables_CFLAGS}
   to
  kinclude_CFLAGS   = @kinclude_CFLAGS@
  AM_CFLAGS         = ${regular_CFLAGS} ${libxtables_CFLAGS}
  ${kinclude_CFLAGS}

My suggestions as separate patches attached.

Thanks for a great product!

- -- 
- - xkr47
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)

iEYEARECAAYFAkt690gACgkQxyF48ZTvn+4ISQCfX48ElW58ew6IXlzTrJGpy3r7
TQUAoIb3fcfd3qNU1mWAEPorY8h/gxlx
=mcB9
-----END PGP SIGNATURE-----

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: kbuild-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 452 bytes --]

diff -u xtables-addons-1.22-orig/configure.ac xtables-addons-1.22/configure.ac
--- xtables-addons-1.22-orig/configure.ac	2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/configure.ac	2010-02-16 20:37:54.000000000 +0200
@@ -51,7 +51,7 @@
 			AC_MSG_RESULT([no])
 		fi;
 	fi;
-	libxtables_LIBS="-lxtables";
+	libxtables_LIBS="-lxtables -L $xtables_location/lib";
 	AC_SUBST([libxtables_CFLAGS])
 	AC_SUBST([libxtables_LIBS])
 else

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: libxtables-to-searchpath.patch --]
[-- Type: text/x-patch, Size: 665 bytes --]

diff -u xtables-addons-1.22-orig/Makefile.iptrules.in xtables-addons-1.22/Makefile.iptrules.in
--- xtables-addons-1.22-orig/Makefile.iptrules.in	2010-01-22 21:14:37.000000000 +0200
+++ xtables-addons-1.22/Makefile.iptrules.in	2010-02-16 20:38:57.000000000 +0200
@@ -12,7 +12,8 @@
 regular_CFLAGS  = @regular_CFLAGS@
 libxtables_CFLAGS = @libxtables_CFLAGS@
 libxtables_LIBS   = @libxtables_LIBS@
-AM_CFLAGS         = ${regular_CFLAGS} ${libxtables_CFLAGS}
+kinclude_CFLAGS   = @kinclude_CFLAGS@
+AM_CFLAGS         = ${regular_CFLAGS} ${libxtables_CFLAGS} ${kinclude_CFLAGS}
 AM_DEPFLAGS     = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
 
 AM_DEFAULT_VERBOSITY = 0

             reply	other threads:[~2010-02-16 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 19:51 Jonas Berlin [this message]
2010-02-16 20:23 ` xtables-addons suggestions Jan Engelhardt
2010-02-16 21:32   ` Jan Engelhardt
2010-02-18  7:01     ` Jonas Berlin
2010-02-18  7:55       ` Jan Engelhardt
  -- strict thread matches above, loose matches on Subject: below --
2010-02-16 19:32 Jonas Berlin

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=20100216215128.1c154cdb@outerspace \
    --to=xkr47@outerspace.dyndns.org \
    --cc=netfilter-devel@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).