]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Autoconf: Fix --static-pcap-only test on Solaris 10. [skip appveyor]
authorDenis Ovsienko <[email protected]>
Sun, 26 Mar 2023 20:37:25 +0000 (21:37 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 26 Mar 2023 20:50:22 +0000 (21:50 +0100)
On Solaris 10 /usr/bin/grep does not implement the -q flag:

checking for pcap-config... ../libpcap/pcap-config
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
checking for pcap_loop... yes

Follow recommendation of the "Limitations of Usual Tools" section of GNU
Autoconf manual and use output redirection to fix it:

checking for pcap-config... ../libpcap/pcap-config
checking for pcap_loop... yes

CHANGES
aclocal.m4

diff --git a/CHANGES b/CHANGES
index 8af3559d05a6a56ce59568bd3eba321a733b7233..9b21748ab6acf6233c2bba96d92e454ce5a09b12 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -49,6 +49,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
         libc (and document Solaris 9 as unsupported because of that).
       Autoconf: Remove detection of early IPv6 stacks.
       Detect OS IPv6 support using AF_INET6 only.
+      Fix --static-pcap-only test on Solaris 10.
 
 DayOfTheWeek, Month DD, YYYY / The Tcpdump Group
   Summary for 4.99.4 tcpdump release (so far!)
index 469ba62997ee6a2c059182c5a6b8faf6d918b48a..4ae8fddb682ee869f658200a9d2f16341b94e289 100644 (file)
@@ -674,7 +674,7 @@ AC_DEFUN(AC_LBL_LIBPCAP,
             # statically linked, and provide only the direct
             # dependencies with --static-pcap-only.
             #
-            if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
+            if grep "static-pcap-only" "$PCAP_CONFIG" >/dev/null 2>&1
             then
                 static_opt="--static-pcap-only"
             else