[ if test -f ${prefix}/include/pcap.h; then
PCAP_CFLAGS="-I${prefix}/include"
PCAPLIB="-L${exec_prefix}/lib -lpcap"
elif test -f /usr/include/pcap/pcap.h; then
PCAP_CFLAGS="-I/usr/include/pcap"
PCAPLIB="-lpcap"
this leads to -I/usr/include being added to the CFLAGS, breaking crosscompilation, as the host headers get pulled in instead of the target headers.
note that checking existence of a file is completely bogus.
test should just check header availability using http://www.gnu.org/software/autoconf/manual/autoconf.html#Generic-Headers