Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] autoconf patches to 0.8.16

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Wed, 7 Mar 2001 23:39:28 -0800
On Thu, Mar 08, 2001 at 12:47:42AM -0600, ethereal-dev@xxxxxxxxxxxxxxxxxx wrote:
> Ok, let's try again. New patch attached with Guy's suggestions
> applied.

The new version doesn't default to enabling libpcap or libz if no
"--with-pcap" or "--with-zlib" - you need to do something such as

	AC_ARG_WITH(pcap,
	[  --with-pcap[=DIR]       use libpcap for packet capturing (and
                          search DIR for includes/libraries) [default=yes]],
	[
		case "${with_pcap}" in
		no)
			use_pcap=no
			;;
		yes)
			use_pcap=yes
			;;
		*)
			use_pcap=yes
			if test -d "${with_pcap}"; then
				CPPFLAGS="${CPPFLAGS} -I${with_pcap}/include"
				LDFLAGS="${LDFLAGS} -L${with_pcap}/lib"
			fi
			;;
		esac
	],
	[
		use_pcap=yes
	])

setting the "use_XXX" variable to "yes" in the ACTION-IF-NOT-GIVEN part
of the AC_ARG_WITH macro.  (Do that both in the main and Wiretap
configure scripts, and also include the "[default=yes]" part in the
Wiretap scripts.  Both the libpcap and libz checks need to do it.)

Also, when, on my FreeBSD 3.4 machine, I temporarily removed "pcap.h"
from "/usr/include", and removed the "libpcap.*" files from "/usr/lib",
and built and installed libpcap from CVS under "/usr/local", "configure"
didn't find it - it didn't check "/usr/local/{include,lib}" for the
headers or libraries.