Adapt the current code to use the new library name libnftnl.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
[mnl=1], [mnl=0])
AM_CONDITIONAL([HAVE_LIBMNL], [test "$mnl" = 1])
-PKG_CHECK_MODULES([libnftables], [libnftables >= 1.0],
+PKG_CHECK_MODULES([libnftnl], [libnftnl >= 1.0],
[nftables=1], [nftables=0])
-AM_CONDITIONAL([HAVE_LIBNFTABLES], [test "$nftables" = 1])
+AM_CONDITIONAL([HAVE_LIBNFTNL], [test "$nftables" = 1])
AM_PROG_LEX
AC_PROG_YACC
# -*- Makefile -*-
AM_CFLAGS = ${regular_CFLAGS}
-AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftables_CFLAGS}
+AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftnl_CFLAGS}
AM_YFLAGS = -d
xtables_multi_SOURCES = xtables-multi.c iptables-xml.c
if ENABLE_NFTABLES
if HAVE_LIBMNL
-if HAVE_LIBNFTABLES
+if HAVE_LIBNFTNL
xtables_multi_SOURCES += xtables-config-parser.y xtables-config-syntax.l
xtables_multi_SOURCES += xtables-save.c xtables-restore.c \
xtables-standalone.c xtables.c nft.c \
nft-shared.c nft-ipv4.c nft-ipv6.c nft-arp.c \
xtables-config.c xtables-events.c \
xtables-arp-standalone.c xtables-arp.c
-xtables_multi_LDADD += -lmnl -lnftables ${libmnl_LIBS} ${libnftables_LIBS}
+xtables_multi_LDADD += ${libmnl_LIBS} ${libnftnl_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
#include <linux/netfilter/nf_tables.h>
#include <libmnl/libmnl.h>
-#include <libnftables/rule.h>
-#include <libnftables/expr.h>
+#include <libnftnl/rule.h>
+#include <libnftnl/expr.h>
#include "nft-shared.h"
#include "xshared.h"
#include <stdbool.h>
-#include <libnftables/rule.h>
-#include <libnftables/expr.h>
+#include <libnftnl/rule.h>
+#include <libnftnl/expr.h>
#include "xshared.h"
#include <linux/netfilter/nf_tables_compat.h>
#include <libmnl/libmnl.h>
-#include <libnftables/table.h>
-#include <libnftables/chain.h>
-#include <libnftables/rule.h>
-#include <libnftables/expr.h>
+#include <libnftnl/table.h>
+#include <libnftnl/chain.h>
+#include <libnftnl/rule.h>
+#include <libnftnl/expr.h>
#include <netinet/in.h> /* inet_ntoa */
#include <arpa/inet.h>
#include <errno.h>
#include <stdarg.h>
#include <libiptc/linux_list.h>
-#include <libnftables/table.h>
-#include <libnftables/chain.h>
+#include <libnftnl/table.h>
+#include <libnftnl/chain.h>
#include <netinet/in.h>
#include <linux/netfilter.h>
#include <linux/netfilter/nf_tables.h>
#include <libmnl/libmnl.h>
-#include <libnftables/table.h>
-#include <libnftables/chain.h>
-#include <libnftables/rule.h>
+#include <libnftnl/table.h>
+#include <libnftnl/chain.h>
+#include <libnftnl/rule.h>
#include <include/xtables.h>
#include "iptables.h" /* for xtables_globals */
#include "libiptc/libiptc.h"
#include "xtables-multi.h"
#include "nft.h"
-#include <libnftables/chain.h>
+#include <libnftnl/chain.h>
#ifdef DEBUG
#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
#include "xtables-multi.h"
#include "nft.h"
-#include <libnftables/chain.h>
+#include <libnftnl/chain.h>
#ifndef NO_SHARED_LIBS
#include <dlfcn.h>