Skip to content

Commit 786eaca

Browse files
committed
autoconf: don't use -s and -q with grep.
1 parent 4a3d448 commit 786eaca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

aclocal.m4

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,14 @@ AC_DEFUN(AC_LBL_LIBPCAP,
658658
# dependencies with --static-pcap-only.
659659
#
660660
AC_MSG_CHECKING([whether $PCAP_CONFIG supports --static-pcap-only])
661-
if grep -s -q "static-pcap-only" "$PCAP_CONFIG"
661+
#
662+
# On Solaris 10, only /usr/xpg4/bin/grep supports the -s and
663+
# -q flags, so we silence it by sending the standard output
664+
# and error to /dev/null. The autoconf documentation
665+
# recmmends avoiding those options in favor of redirecting
666+
# to /dev/null.
667+
#
668+
if grep "static-pcap-only" "$PCAP_CONFIG" >/dev/null 2>&1
662669
then
663670
AC_MSG_RESULT([yes])
664671
static_opt="--static-pcap-only"

0 commit comments

Comments
 (0)