From 5d2a1ad8d3e1749243829a51323b52f115031995 Mon Sep 17 00:00:00 2001 From: Edmond Date: Tue, 16 May 2017 10:35:51 +0800 Subject: [PATCH] support using user-defined protoc via env var PROTOC --- configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f64a532..65558b8 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,9 @@ LIBS="$LIBS $PROTOBUF_LIBS" m4_include([third_party/m4/ax_check_icu.m4]) -AC_CHECK_PROG([PROTOC], [protoc], [protoc]) +if test ! -n "$PROTOC"; then + AC_CHECK_PROG([PROTOC], [protoc], [protoc]) +fi AS_IF([test "x${PROTOC}" == "x"], [AC_MSG_ERROR([ProtoBuf compiler "protoc" not found. You can install them with "sudo apt-get install libprotobuf-c++ protobuf-compiler" ])])