Commit e633dda6 authored by Robert Edmonds's avatar Robert Edmonds

configure.ac: use $protobuf_CFLAGS to find protobuf header files

the protobuf header files may be installed in a non-standard location
and thus we need to use the CFLAGS registered for protobuf in pkg-config
in order to find them.

based on a patch from Andrei Nigmatulin.
parent 66005093
...@@ -39,9 +39,14 @@ AC_ARG_ENABLE([protoc], ...@@ -39,9 +39,14 @@ AC_ARG_ENABLE([protoc],
if test "x$enable_protoc" != "xno"; then if test "x$enable_protoc" != "xno"; then
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
PKG_CHECK_MODULES([protobuf], [protobuf]) PKG_CHECK_MODULES([protobuf], [protobuf])
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$save_CPPFLAGS $protobuf_CFLAGS"
AC_CHECK_HEADERS([google/protobuf/compiler/command_line_interface.h], AC_CHECK_HEADERS([google/protobuf/compiler/command_line_interface.h],
[], [],
[AC_MSG_ERROR([required protobuf header file not found])]) [AC_MSG_ERROR([required protobuf header file not found])])
CPPFLAGS="$save_CPPFLAGS"
AC_PATH_PROG(PROTOC, protoc) AC_PATH_PROG(PROTOC, protoc)
if test -z "$PROTOC"; then if test -z "$PROTOC"; then
AC_MSG_ERROR([Please install the protobuf compiler from https://code.google.com/p/protobuf/.]) AC_MSG_ERROR([Please install the protobuf compiler from https://code.google.com/p/protobuf/.])
......
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