Commit e1e044da authored by Robert Edmonds's avatar Robert Edmonds

configure.ac: search the pkg-config exec_prefix for the protobuf compiler

protoc may not be on the default PATH, so augment $PATH with the
executable path registered by pkg-config for the protobuf package.

additionally declare PROTOC as a precious variable, thus allowing it to
be explicitly set by the user at ./configure time.

based on a patch from Andrei Nigmatulin.
parent e633dda6
......@@ -47,7 +47,9 @@ if test "x$enable_protoc" != "xno"; then
[AC_MSG_ERROR([required protobuf header file not found])])
CPPFLAGS="$save_CPPFLAGS"
AC_PATH_PROG(PROTOC, protoc)
AC_ARG_VAR([PROTOC], [protobuf compiler command])
AC_PATH_PROG([PROTOC], [protoc], [],
[`$PKG_CONFIG --variable=exec_prefix protobuf`/bin:$PATH])
if test -z "$PROTOC"; then
AC_MSG_ERROR([Please install the protobuf compiler from https://code.google.com/p/protobuf/.])
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment