summaryrefslogtreecommitdiff
path: root/Makefile-devel-adds
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-11-29 18:18:01 -0800
committerGuy Harris <guy@alum.mit.edu>2017-11-29 18:18:18 -0800
commitcfc4c750a225e893eeeca78eddb95fdc7125aabf (patch)
tree14ad37d2788614dc85b5d5a26effc47e8d242d81 /Makefile-devel-adds
parent415160c0c2d210358a0225be53922728f7cd9651 (diff)
downloadtcpdump-cfc4c750a225e893eeeca78eddb95fdc7125aabf.tar.gz
Fix the handling of libpcap.
We have four possibilities: 1) local library, with a pcap-config; 2) local library, without a pcap-config; 3) installed library, with a pcap-config; 4) installed library, without a pcap-config. If we have a local library, i.e. one in ../libpcap{whatever}, we: add -I flags to the C compiler flags to point it at whatever directories in ../libpcap{whatever}; add ../libpcap{whatever}/libpcap.a to $LIBS and: if it has a pcap-config, we use it, with --additional-libraries, to find the additional libraries with which we need to link; otherwise, we do the usual OS-dependent hacks to try to figure out with what additional flags we need to link; and add them to $LIBS after libpcap.a. If we have an installed library: if it has a pcap-config we use it, with --cflags, to find what flags to add to the C compiler flags, and use it, with --libs, to see what flags to add to $LIBS; if it doesn't have a pcap-config, we search for -lpcap and, if that succeeds, we assume the headers are under /usr/local/include or /usr/include, search for them there, and, if we don't find pcap.h there, we look for it in a pcap subdirectory under there, and add the appropriate -I flag to the C compiler flags, and then do the usual OS-dependent hacks to try to figure out with what additional flags we need to link. While we're at it, we do the libdlpi check only on Solaris, as part of "the usual OS-dependent hacks".
Diffstat (limited to 'Makefile-devel-adds')
0 files changed, 0 insertions, 0 deletions