[33/49,v2] package/corosync: add optional snmp support

Message ID 67a602b6025c3d942bc40c9d0ac2332ef7753305.1504993178.git.yann.morin.1998@free.fr
State New
Headers show
Series
  • [01/49,v2] package/asterisk: new package
Related show

Commit Message

Yann E. MORIN Sept. 9, 2017, 9:39 p.m.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/corosync/corosync.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/package/corosync/corosync.mk b/package/corosync/corosync.mk
index a20edd4535..ca73043319 100644
--- a/package/corosync/corosync.mk
+++ b/package/corosync/corosync.mk
@@ -38,7 +38,6 @@  COROSYNC_CONF_OPTS = \
 	--disable-upstart \
 	$(if $(BR2_INIT_SYSTEMD),--enable-systemd,--disable-systemd) \
 	--disable-upstart \
-	--disable-snmp \
 	--disable-xmlconf \
 	--disable-qdevices \
 	--disable-qnet
@@ -50,4 +49,12 @@  else
 COROSYNC_CONF_OPTS += --disable-dbus
 endif
 
+ifeq ($(BR2_PACKAGE_NETSNMP),y)
+COROSYNC_DEPENDENCIES += netsnmp
+COROSYNC_CONF_OPTS += --enable-snmp
+COROSYNC_CONF_ENV += SNMPCONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
+else
+COROSYNC_CONF_OPTS += --disable-snmp
+endif
+
 $(eval $(autotools-package))