Check for libpcap 1.0's broken pcap-config, which put a space between -L
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 8 Jun 2009 17:23:00 +0000 (17:23 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 8 Jun 2009 17:23:00 +0000 (17:23 +0000)
and its argument - that doesn't work on some platforms (e.g., OS X).

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28664 f5534014-38df-0310-8fa8-9805f1628bb7

acinclude.m4

index 36f125c6f80c37e7b15223f074c838e640010ba8..9709c8bc398e333a5a5e6a8a346b88a7fc30d145 100644 (file)
@@ -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