netsnmp: add option to enable debugging code
authorLuca Ceresoli <luca@lucaceresoli.net>
Thu, 15 Mar 2012 21:04:27 +0000 (22:04 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sun, 18 Mar 2012 20:41:23 +0000 (21:41 +0100)
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/netsnmp/Config.in
package/netsnmp/netsnmp.mk

index 431be2d38346fb5d7cf6dbb7bd91fca2460a98c7..108ab839360cab92540253550252da102e380c6b 100644 (file)
@@ -14,3 +14,12 @@ config BR2_PACKAGE_NETSNMP_ENABLE_MIBS
          The net-snmp package contains a selection of MIB files.
          Say yes if you want those MIB files installed on the target
          and enable the code that parses the MIB files.
+
+config BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING
+       bool "Enable debugging code"
+       depends on BR2_PACKAGE_NETSNMP
+       help
+         By default net-snmp is compiled without debugging support
+         (--disable-debugging). Enable this options if you need debugging
+         support, including the ability to log with DEBUGMSG(),
+         DEBUGMSGTL() and companion macros.
index 959e39f154d752d04d68885e723cf99d72f85500..448e3fdb076ee7f581db487f1c2f874e943fcbfc 100644 (file)
@@ -12,7 +12,7 @@ NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=yes
 NETSNMP_CONF_OPT = --with-persistent-directory=/var/lib/snmp --disable-static \
                --with-defaults --enable-mini-agent --without-rpm \
                --with-logfile=none --without-kmem-usage $(DISABLE_IPV6) \
-               --enable-as-needed --disable-debugging --without-perl-modules \
+               --enable-as-needed --without-perl-modules \
                --disable-embedded-perl --disable-perl-cc-checks \
                --disable-scripts --with-default-snmp-version="1" \
                --enable-silent-libtool --enable-mfd-rewrites \
@@ -55,6 +55,10 @@ define NETSNMP_REMOVE_MIBS_IPV6
 endef
 endif
 
+ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y)
+       NETSNMP_CONF_OPT += --disable-debugging
+endif
+
 define NETSNMP_INSTALL_TARGET_CMDS
        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
                DESTDIR=$(TARGET_DIR) install