]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: fix compilation when lib[mnl|nftables] are not in standard path
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Wed, 6 Mar 2013 05:00:31 +0000 (05:00 +0000)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:28 +0000 (23:50 +0100)
There was several problems:
 a typo in the configure option
 a typo in CFLAGS addon for libmnl and libnftables
 paths to lib were missing on link

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac
iptables/Makefile.am

index eb2c367b32c3a13b29fcfce4b0dc9c6ff2164376..cbbf66dfe43a7905d2b2674f404b30cf9125a82a 100644 (file)
@@ -123,7 +123,7 @@ PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0],
        [mnl=1], [mnl=0])
 AM_CONDITIONAL([HAVE_LIBMNL], [test "$mnl" = 1])
 
-PKG_CHECK_MODULES([libnfables], [libnftables >= 1.0],
+PKG_CHECK_MODULES([libnftables], [libnftables >= 1.0],
        [nftables=1], [nftables=0])
 AM_CONDITIONAL([HAVE_LIBNFTABLES], [test "$nftables" = 1])
 
index 11c501b95281c48cdd70a5464f40de3877480218..5d6535455e4578227dab730f713d01652a573991 100644 (file)
@@ -1,7 +1,7 @@
 # -*- Makefile -*-
 
 AM_CFLAGS        = ${regular_CFLAGS}
-AM_CPPFLAGS      = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CPPFLAGS} ${libnftables_CPPFLAGS}
+AM_CPPFLAGS      = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftables_CFLAGS}
 AM_YFLAGS = -d
 
 xtables_multi_SOURCES  = xtables-multi.c iptables-xml.c
@@ -33,7 +33,7 @@ xtables_multi_SOURCES += xtables-save.c xtables-restore.c \
                         nft-shared.c nft-ipv4.c nft-ipv6.c \
                         xtables-config-parser.y xtables-config-syntax.l \
                         xtables-config.c xtables-events.c
-xtables_multi_LDADD   += -lmnl -lnftables
+xtables_multi_LDADD   += -lmnl -lnftables ${libmnl_LIBS} ${libnftables_LIBS}
 xtables_multi_CFLAGS  += -DENABLE_NFTABLES
 # yacc and lex generate dirty code
 xtables_multi-xtables-config-parser.o xtables_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls