The file configure.ac includes three test programs for libpcap, each of which includes at least one test of the following form:
#define PCAP_TEST "0.7.2"
if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0)
Please note that in modern versions of libpcap the value returned from pcap_lib_version() is not just the version, but a loosely formatted string that depends on the underlying module, such as libpcap version 1.11.0-PRE-GIT (with TPACKET_V3), so the test needs to be different to work correctly for all cases (I do not have an immediate idea what in particular would work best).