if BUILD_MODULE_DNS
pkglib_LTLIBRARIES += dns.la
-dns_la_SOURCES = dns.c utils_dns.c utils_dns.h
+dns_la_SOURCES = dns.c
+if BUILD_WITH_LIBPCAP
+if BUILD_WITH_LIBPTHREAD
+dns_la_SOURCES += utils_dns.c utils_dns.h
+endif
+endif
dns_la_LDFLAGS = -module -avoid-version
if BUILD_WITH_LIBPCAP
dns_la_LDFLAGS += -lpcap
#include "plugin.h"
#include "configfile.h"
#include "utils_debug.h"
-#include "utils_dns.h"
#define MODULE_NAME "dns"
#if HAVE_LIBPCAP && HAVE_LIBPTHREAD
+# include "utils_dns.h"
# include <pthread.h>
# include <pcap.h>
# include <sys/poll.h>
#include "collectd.h"
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
#if HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
# include <netdb.h>
#endif
-#if HAVE_NETINET_IN_SYSTM_H
-# include <netinet/in_systm.h>
-#endif
-#if HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
#if HAVE_NETINET_IP_H
# include <netinet/ip.h>
#endif