configure.in: Improved the detection of libxml2 and libvirt.
[collectd.git] / src / Makefile.am
index 0b3ba0d..bc78912 100644 (file)
@@ -14,13 +14,15 @@ sbin_PROGRAMS = collectd
 bin_PROGRAMS = collectd-nagios
 
 collectd_SOURCES = collectd.c collectd.h \
-                  utils_avltree.c utils_avltree.h \
-                  utils_mount.c utils_mount.h \
-                  utils_llist.c utils_llist.h \
-                  utils_ignorelist.c utils_ignorelist.h \
                   common.c common.h \
-                  plugin.c plugin.h \
                   configfile.c configfile.h \
+                  plugin.c plugin.h \
+                  utils_avltree.c utils_avltree.h \
+                  utils_cache.c utils_cache.h \
+                  utils_ignorelist.c utils_ignorelist.h \
+                  utils_llist.c utils_llist.h \
+                  utils_mount.c utils_mount.h \
+                  utils_threshold.c utils_threshold.h \
                   types_list.c types_list.h
 collectd_CPPFLAGS = $(LTDLINCL)
 collectd_CPPFLAGS += -DPREFIX='"${prefix}"'
@@ -276,6 +278,16 @@ collectd_LDADD += "-dlopen" irq.la
 collectd_DEPENDENCIES += irq.la
 endif
 
+if BUILD_PLUGIN_LIBVIRTSTATS
+pkglib_LTLIBRARIES += libvirtstats.la
+libvirtstats_la_SOURCES = libvirtstats.c
+libvirtstats_la_CFLAGS = $(BUILD_WITH_LIBVIRT_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
+libvirtstats_la_LIBADD = $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
+libvirtstats_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" libvirtstats.la
+collectd_DEPENDENCIES += libvirtstats.la
+endif
+
 if BUILD_PLUGIN_LOAD
 pkglib_LTLIBRARIES += load.la
 load_la_SOURCES = load.c
@@ -480,10 +492,9 @@ endif
 if BUILD_PLUGIN_SENSORS
 pkglib_LTLIBRARIES += sensors.la
 sensors_la_SOURCES = sensors.c
-sensors_la_LDFLAGS = -module -avoid-version
-if BUILD_WITH_LM_SENSORS
-sensors_la_LDFLAGS += -lsensors
-endif
+sensors_la_CFLAGS = $(BUILD_WITH_LIBSENSORS_CFLAGS)
+sensors_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBSENSORS_LDFLAGS)
+sensors_la_LIBADD = -lsensors
 collectd_LDADD += "-dlopen" sensors.la
 collectd_DEPENDENCIES += sensors.la
 endif
@@ -577,6 +588,16 @@ collectd_LDADD += "-dlopen" users.la
 collectd_DEPENDENCIES += users.la
 endif
 
+if BUILD_PLUGIN_UUID
+pkglib_LTLIBRARIES += uuid.la
+uuid_la_SOURCES = uuid.c
+uuid_la_CFLAGS  = $(BUILD_WITH_LIBHAL_CFLAGS)
+uuid_la_LIBADD  = $(BUILD_WITH_LIBHAL_LIBS)
+uuid_la_LDFLAGS = -module -avoid-version
+collectd_LDADD += "-dlopen" uuid.la
+collectd_DEPENDENCIES += uuid.la
+endif
+
 if BUILD_PLUGIN_VSERVER
 pkglib_LTLIBRARIES += vserver.la
 vserver_la_SOURCES = vserver.c