]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Propagate from the git tree:
authorguy <guy>
Tue, 18 Nov 2008 07:39:20 +0000 (07:39 +0000)
committerguy <guy>
Tue, 18 Nov 2008 07:39:20 +0000 (07:39 +0000)
Author: Peter Volkov <[email protected]>
Date:   Sun Nov 9 20:33:27 2008 -0500

    Currently it's impossible to build tcpdump without libsmi on system with
    libsmi installed. The patch in attachment adds --with{,out}-smi
    configure switch which allows to disable it.

configure
configure.in

index 7da8e4c079728cb29ef8d31e153edf351304c078..8bea34ed734966f456e5cc4b5607d0b02dd5c79a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.202 .
+# From configure.in Revision: 1.204 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -1275,6 +1275,8 @@ Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --without-gcc           don't use gcc
+  --with-smi              link with libsmi (allows to load MIBs on the fly to decode SNMP packets. default=yes
+  --without-smi           don't link with libsmi
   --with-user=USERNAME    drop privileges by default to USERNAME
   --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
   --with-crypto[=PATH]    use SSLeay libcrypto (located in directory PATH, if
@@ -4280,6 +4282,16 @@ esac
 
 
 
+# Check whether --with-smi was given.
+if test "${with_smi+set}" = set; then
+  withval=$with_smi;
+else
+  with_smi=yes
+fi
+
+
+if test "x$with_smi" != "xno" ; then
+
 for ac_header in smi.h
 do
 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -4576,6 +4588,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$a
 fi
 
 
+fi
 fi
 
 { echo "$as_me:$LINENO: checking whether to enable the possibly-buggy SMB printer" >&5
index 81ef6121e3718af92b267eddb589f82086ea45d3..6b617e373f5c4368a70ba68d0ed37229929ec53c 100644 (file)
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.203 2008-10-27 21:12:49 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.204 2008-11-18 07:39:20 guy Exp $ (LBL)
 dnl
 dnl Copyright (c) 1994, 1995, 1996, 1997
 dnl    The Regents of the University of California.  All rights reserved.
@@ -6,7 +6,7 @@ dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
 
-AC_REVISION($Revision: 1.203 $)
+AC_REVISION($Revision: 1.204 $)
 AC_PREREQ(2.50)
 AC_INIT(tcpdump.c)
 
@@ -70,6 +70,12 @@ linux*)
 esac
 
 
+AC_ARG_WITH(smi,
+[  --with-smi              link with libsmi (allows to load MIBs on the fly to decode SNMP packets. [default=yes]
+  --without-smi           don't link with libsmi],,
+   with_smi=yes)
+
+if test "x$with_smi" != "xno" ; then
 AC_CHECK_HEADERS(smi.h)
 AC_CHECK_LIB(smi, smiInit)
 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
@@ -111,6 +117,7 @@ dnl autoconf ever comes back to match the documentation.
   libsmi=no]
 )
 fi
+fi
 
 AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer])
 AC_ARG_ENABLE(smb,