netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xtables-addons suggestions
@ 2010-02-16 19:51 Jonas Berlin
  2010-02-16 20:23 ` Jan Engelhardt
  0 siblings, 1 reply; 6+ messages in thread
From: Jonas Berlin @ 2010-02-16 19:51 UTC (permalink / raw)
  To: netfilter-devel

[-- 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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* xtables-addons suggestions
@ 2010-02-16 19:32 Jonas Berlin
  0 siblings, 0 replies; 6+ messages in thread
From: Jonas Berlin @ 2010-02-16 19:32 UTC (permalink / raw)
  To: netfilter-devel


[-- Attachment #1.1: Type: text/plain, Size: 1341 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.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 #1.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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-18  7:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-16 19:51 xtables-addons suggestions Jonas Berlin
2010-02-16 20:23 ` 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

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).