I recently tried to build just the library (--disable-agent
--disable-applications --disable-scripts) and got surprised since
mibII/vacm_vars mibII/vacm_conf and utilities/execute got added
automatically. It turns out the reason was that snmpd might need them.
Thus I would like to add the attached patch (and, obviously, the
regenerated configure script), what do you think.

/MF
Index: clean/configure.d/config_modules_agent
===================================================================
--- clean.orig/configure.d/config_modules_agent	2010-08-29 17:29:01.000000000 +0200
+++ clean/configure.d/config_modules_agent	2010-08-31 07:09:46.000000000 +0200
@@ -40,17 +40,22 @@
 new_with_out_mib_modules=`echo $with_out_mib_modules | $SED 's/,/ /g;'`
 
 # set up initial module list
-new_module_list="$new_with_mib_modules default_modules"
+new_module_list="$new_with_mib_modules"
 
-# minor modifications
-if test "x$enable_agent" = "xno"; then
-   # minimum mib module list for snmptrapd
-   new_module_list="mibII/vacm_vars mibII/vacm_conf utilities/execute $new_with_mib_modules"
-   default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB
-   default_mibs_install=" "
-elif test "x$mini_agent" = "xyes"; then
-   # define the mini agent flag to reduce our load list from default_mibs.h
-   MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT"
+if test "x$enable_agent" != "xno" ; then
+  # If the agent should be built then use default_modules
+  new_module_list="$new_module_list default_modules"
+
+  if test "x$mini_agent" = "xyes"; then
+    # define the mini agent flag to reduce our load list from default_mibs.h
+    MODULECPP="$MODULECPP -DNETSNMP_MINI_AGENT"
+  fi
+elif test "x$enable_applications" != "xno" ; then
+    # otherwise, if snmptrapd should be built then add SNMPv3 and
+    # snmptrapd-specific parts
+    new_module_list="$new_module_list mibII/vacm_conf utilities/execute"
+    default_mibs=SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB
+    default_mibs_install=" "
 fi
 
 test_modules="$new_module_list"
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to