collectd: fix handling of plugins with '_' in their name, add explicit mysql detection
authorNicolas Thill <nico@openwrt.org>
Sun, 11 Jul 2010 20:13:45 +0000 (20:13 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 11 Jul 2010 20:13:45 +0000 (20:13 +0000)
SVN-Revision: 22140

utils/collectd/Makefile

index 0a2200e39206c90c0ac87728208d096f41158f68..a7047e22beba1bb1c17790d1e4570516ece63f2e 100644 (file)
@@ -112,7 +112,7 @@ COLLECTD_PLUGINS_SELECTED:= \
        write_http \
 
 PKG_CONFIG_DEPENDS:= \
-       $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(COLLECTD_PLUGINS_SELECTED)) \
+       $(patsubst %,CONFIG_PACKAGE_collectd-mod-%,$(subst _,-,$(COLLECTD_PLUGINS_SELECTED))) \
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/kernel.mk
@@ -150,7 +150,7 @@ CONFIGURE_VARS+= \
 
 CONFIGURE_PLUGIN= \
        $(foreach m, $(1), \
-               $(if $(CONFIG_PACKAGE_collectd-mod-$(m)),--enable-$(m),--disable-$(m)) \
+               $(if $(CONFIG_PACKAGE_collectd-mod-$(subst _,-,$(m))),--enable-$(m),--disable-$(m)) \
        )
 
 CONFIGURE_ARGS+= \
@@ -163,6 +163,10 @@ ifneq ($(CONFIG_PACKAGE_collectd-mod-ascent),)
        CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/libxml2"
 endif
 
+ifneq ($(CONFIG_PACKAGE_collectd-mod-mysql),)
+  CONFIGURE_ARGS+= --with-libmysql="$(STAGING_DIR)/usr/"
+endif
+
 # exception: mod-netlink needs libnetlink from iproute
 ifneq ($(CONFIG_PACKAGE_collectd-mod-netlink),)
   CONFIGURE_ARGS+= --with-libnetlink="$(STAGING_DIR)/usr"