net-snmp is built with PCI support if PCIUTILS_LIBPCI is already built
or without PCI support otherwise. Add a switch to explicitly enable
PCI support and make sure it is built without PCI support when this
switch is not enabled.

Signed-off-by: Sascha Hauer <[email protected]>
---
 rules/net-snmp.in   | 6 ++++++
 rules/net-snmp.make | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/rules/net-snmp.in b/rules/net-snmp.in
index 413c862ee..0fd249aa3 100644
--- a/rules/net-snmp.in
+++ b/rules/net-snmp.in
@@ -9,6 +9,8 @@ menuconfig NET_SNMP
        select LM_SENSORS       if NET_SNMP_MIB_MODULES_LM_SENSORS
        select OPENSSL          if NET_SNMP_SHA_AES
        select NET_SNMP_PRIVACY if NET_SNMP_SHA_AES || NET_SNMP_DES
+       select PCIUTILS         if NET_SNMP_PCI
+       select PCIUTILS_LIBPCI  if NET_SNMP_PCI
 
 if NET_SNMP
 
@@ -195,6 +197,10 @@ config NET_SNMP_MIB_LOADING
        bool
        prompt "include code that parses and manipulates mib files"
 
+config NET_SNMP_PCI
+       bool
+       prompt "Compile with PCI support"
+
 config NET_SNMP_SNMPV1
        bool
        prompt "support for SNMPv1"
diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index 243b84fe5..f90e0004e 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -38,6 +38,10 @@ NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_AGENTX) 
+= agentx
 NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_UCD_SNMP) += ucd_snmp
 NET_SNMP_MIB_MODULES-$(PTXCONF_NET_SNMP_MIB_MODULES_LM_SENSORS) += 
ucd-snmp/lmsensorsMib
 
+ifndef PTXCONF_NET_SNMP_PCI
+NET_SNMP_ENV := $(CROSS_ENV) netsnmp_cv_func_pci_lookup_name_LMIBLIBS=no
+endif
+
 #
 # autoconf
 #
-- 
2.24.0


_______________________________________________
ptxdist mailing list
[email protected]

Reply via email to