diff options
author | Guy Harris <guy@alum.mit.edu> | 2009-06-08 17:23:00 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2009-06-08 17:23:00 +0000 |
commit | e411397ef85bfe3a229994204bd46672e5e7621d (patch) | |
tree | 9ea4ee75ee152d90158bf7e97cdd7d8c305ba3c2 /acinclude.m4 | |
parent | 6a31d1a73e1c880e34253cf23828eb0c1bddbf9b (diff) | |
download | wireshark-e411397ef85bfe3a229994204bd46672e5e7621d.tar.gz wireshark-e411397ef85bfe3a229994204bd46672e5e7621d.tar.bz2 wireshark-e411397ef85bfe3a229994204bd46672e5e7621d.zip |
Check for libpcap 1.0's broken pcap-config, which put a space between -L
and its argument - that doesn't work on some platforms (e.g., OS X).
svn path=/trunk/; revision=28664
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 36f125c6f8..9709c8bc39 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -294,6 +294,32 @@ AC_DEFUN([AC_WIRESHARK_PCAP_CHECK], # First, look for a pcap-config script. # AC_PATH_PROG(PCAP_CONFIG, pcap-config) + + # + # Now check whether it's the libpcap 1.0 version, which + # put a space after "-L" - on some platforms, that doesn't + # work. + # + AC_MSG_CHECKING(for broken pcap-config) + if test -n "$PCAP_CONFIG" ; then + case "`\"$PCAP_CONFIG\" --libs`" in + + "-L "*) + # + # Space after -L. Pretend pcap-config doesn't exist. + # + AC_MSG_RESULT(yes) + PCAP_CONFIG="" + ;; + + *) + # + # No space after -L. + # + AC_MSG_RESULT(no) + ;; + esac + fi if test -n "$PCAP_CONFIG" ; then # # Found - use it to get the include flags for |