mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 22:01:02 +08:00
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.
This commit is contained in:
parent
e633dda6e4
commit
e1e044da01
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user