iptables plugin: Use a global `libiptc' if it exists.
[collectd.git] / src / Makefile.am
index f1bcd77..88ce2c4 100644 (file)
@@ -2,7 +2,6 @@ SUBDIRS = libconfig
 if BUILD_WITH_OWN_LIBOPING
 SUBDIRS += liboping
 endif
-SUBDIRS += libiptc
 
 if COMPILER_IS_GCC
 AM_CFLAGS = -Wall -Werror
@@ -213,8 +212,9 @@ if BUILD_MODULE_IPTABLES
 pkglib_LTLIBRARIES += iptables.la
 iptables_la_SOURCES = iptables.c
 iptables_la_LDFLAGS = -module -avoid-version
-iptables_la_LIBADD  = libiptc/libiptc.la
-iptables_la_DEPENDENCIES = libiptc/libiptc.la
+if BUILD_WITH_LIBIPTC
+iptables_la_LDFLAGS += -liptc
+endif
 collectd_LDADD += "-dlopen" iptables.la
 collectd_DEPENDENCIES += iptables.la
 endif