xtables-addons suggestions
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!
Signature · 1 line
- xkr47
configure.ac +1 -1
@@ -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
Makefile.iptrules.in +2 -1
@@ -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