Wireshark-dev: Re: [Wireshark-dev] pcap_breakloop and MacOSX
From: Sebastien Tandel <[email protected]>
Date: Fri, 20 Apr 2007 15:13:18 +0200
Hi Guy,

   Thanks for the answer. really instructive :)

> AC_WIRESHARK_PCAP_CHECK in acinclude.m4 already works around this for 
> pcap_findalldevs(); we could do the same for pcap_breakloop().
I've written a little configure script which is able to determine
whether the pcap library is more recent than the pcap header.
By compiling twice the same piece of code, we can determine it :
#include <pcap.h>
int main(void)
return 0;

The first time, we're just checking if it's compiling correctly without
any particular CFLAGS. The second time it adds the following CFLAGS,
-Wimplicit -Werror. If it fails we know that the library is more recent
than the header.

The configure script outputs the following warning in the case the
library is more recent than the header :

checking whether pcap library is more recent than pcap header... yes
configure: WARNING:
Your pcap library is more recent than your pcap header. Wireshark won't
be compiled with functions not defined in this header. It would be therefore
better to install the newer pcap header.

Is there any objections to the integration of this in the macro
Would anyone have a better warning text?

Sebastien Tandel