summaryrefslogtreecommitdiff
path: root/net-analyzer/net-snmp/files/net-snmp-5.8-pcap.patch
blob: 43692240acb654a5ec93562b9053d001a0fef6a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- a/configure.d/config_project_with_enable
+++ b/configure.d/config_project_with_enable
@@ -1187,6 +1187,11 @@
   [],
   [with_bzip2="no"])
 
+AC_ARG_WITH([pcap],
+  [ --with-pcap[=DIR]          use libpcap in DIR],
+  [],
+  [with_pcap="no"])
+
 NETSNMP_ARG_WITH(
  [mnttab],
  AS_HELP_STRING(
--- a/configure.d/config_os_libs2
+++ b/configure.d/config_os_libs2
@@ -583,14 +590,16 @@
 ##
 #   libpcap
 ##
-NETSNMP_BUILD_PCAP_PROG_TRUE='#'
-NETSNMP_BUILD_PCAP_PROG_FALSE=''
-AC_CHECK_LIB([pcap], [pcap_create], [
-   AC_CHECK_HEADERS([pcap/pcap.h], [
-      NETSNMP_BUILD_PCAP_PROG_TRUE=''
-      NETSNMP_BUILD_PCAP_PROG_FALSE='#'
-       ])
-])
+if test "x$with_pcap" = "xyes" ; then
+  NETSNMP_BUILD_PCAP_PROG_TRUE='#'
+  NETSNMP_BUILD_PCAP_PROG_FALSE=''
+  AC_CHECK_LIB([pcap], [pcap_create], [
+     AC_CHECK_HEADERS([pcap/pcap.h], [
+        NETSNMP_BUILD_PCAP_PROG_TRUE=''
+        NETSNMP_BUILD_PCAP_PROG_FALSE='#'
+         ])
+  ])
+fi
 AC_SUBST(NETSNMP_BUILD_PCAP_PROG_TRUE)
 AC_SUBST(NETSNMP_BUILD_PCAP_PROG_FALSE)