grep -q is not portable
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 3 Aug 2016 15:31:08 +0000 (17:31 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 3 Aug 2016 15:31:08 +0000 (17:31 +0200)
Solaris grep doesn't have -q

Use the grep we detected with AC_PROG_EGREP and just redirect stdout.

configure.ac

index b1c8301..45f5faf 100644 (file)
@@ -83,7 +83,7 @@ AC_PATH_PROG([PROTOC], [protoc])
 have_protoc3="no"
 if test "x$PROTOC" != "x"; then
        AC_MSG_CHECKING([for protoc 3.0.0+])
-       if $PROTOC --version | grep -q libprotoc.3; then
+       if $PROTOC --version | $EGREP libprotoc.3 >/dev/null; then
                protoc3="yes (`$PROTOC --version`)"
                have_protoc3="yes"
        else