[packages] collectd: fix another build failure on avr32
[openwrt/svn-archive/archive.git] / utils / collectd / Makefile
index ad7c92e779d5446951855d85ac7972792e167723..6119572b7776f64380f6685b75f006b9139381f3 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
@@ -135,6 +135,10 @@ define Package/collectd/description
  and provides mechanismns to store the values in a variety of ways.
 endef
 
+ifneq ($(CONFIG_avr32),)
+  TARGET_CFLAGS += -fsigned-char
+endif
+
 # common configure args
 CONFIGURE_ARGS+= \
        --disable-debug \
@@ -150,7 +154,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 +167,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"
@@ -268,7 +276,7 @@ $(eval $(call BuildPlugin,syslog,syslog output,syslog,))
 $(eval $(call BuildPlugin,tail,tail input,tail,))
 $(eval $(call BuildPlugin,table,table-like structured file input,table,))
 $(eval $(call BuildPlugin,teamspeak2,TeamSpeak2 input,teamspeak2,))
-$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,))
+$(eval $(call BuildPlugin,ted,The Energy Detective input,ted,@((!TARGET_avr32)||BROKEN))) # fails on avr32 because of warnings treated as errors
 $(eval $(call BuildPlugin,tcpconns,TCP connection tracking input,tcpconns,))
 $(eval $(call BuildPlugin,thermal,system temperatures input,thermal,))
 $(eval $(call BuildPlugin,unixsock,unix socket output,unixsock,))
@@ -276,4 +284,4 @@ $(eval $(call BuildPlugin,uptime,uptime status input,uptime,))
 $(eval $(call BuildPlugin,users,user logged in status input,users,))
 $(eval $(call BuildPlugin,vmem,virtual memory usage input,vmem,))
 $(eval $(call BuildPlugin,wireless,wireless status input,wireless,))
-$(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write_http:libcurl))
+$(eval $(call BuildPlugin,write-http,HTTP POST output,write_http,+PACKAGE_collectd-mod-write-http:libcurl))