Add some extra autoconf/automake magic for iptables library
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 14 Jul 2010 02:03:24 +0000 (23:03 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 14 Jul 2010 02:03:24 +0000 (23:03 -0300)
Makefile.am
configure.ac

index 96d7a3ed7e8c6f32dbc879ff118f2b2c59322946..aa30177bb56c07c25c5b805a7d37fbd4ff667ce7 100644 (file)
@@ -88,7 +88,7 @@ build_plugindir = $(plugindir)
 build_scriptdir = $(scriptdir)
 endif
 
-AM_CFLAGS = @UDEV_CFLAGS@ @NETLINK_CFLAGS@ @CAPNG_CFLAGS@ \
+AM_CFLAGS = @UDEV_CFLAGS@ @IPTC_CFLAGS@ @NETLINK_CFLAGS@ @CAPNG_CFLAGS@ \
                        @DBUS_CFLAGS@ @GLIB_CFLAGS@ $(builtin_cflags) \
                                -DCONNMAN_PLUGIN_BUILTIN \
                                -DSTATEDIR=\""$(statedir)"\" \
@@ -136,7 +136,7 @@ tools_polkit_test_LDADD = @DBUS_LIBS@
 
 tools_portal_test_LDADD = @GLIB_LIBS@
 
-tools_iptables_test_LDADD = @GLIB_LIBS@ @NETLINK_LIBS@ -liptc -lxtables
+tools_iptables_test_LDADD = @IPTC_LIBS@ -lip4tc -lxtables
 endif
 
 test_scripts = test/get-state test/list-profiles test/list-services \
index 651448346a05a153f2424c03ee3d48f850dd1545..f13774912460c22264cf1d5e520e630a37b572c1 100644 (file)
@@ -347,6 +347,11 @@ AM_CONDITIONAL(CLIENT, test "${enable_client}" = "yes")
 AC_ARG_ENABLE(tools, AC_HELP_STRING([--enable-tools],
                [enable testing tools]), [enable_tools=${enableval}])
 if (test "${enable_tools}" = "yes"); then
+       PKG_CHECK_MODULES(IPTC, libiptc, dummy=yes,
+                               AC_MSG_ERROR(iptables library is required))
+       AC_SUBST(IPTC_CFLAGS)
+       AC_SUBST(IPTC_LIBS)
+
        PKG_CHECK_MODULES(NETLINK, libnl-1, dummy=yes,
                                AC_MSG_ERROR(Netlink library is required))
        AC_SUBST(NETLINK_CFLAGS)