Commit 16e3465d authored by Robert Edmonds's avatar Robert Edmonds

configure.ac: check for a libprotoc header file

it's possible for the <google/protobuf/compiler/> header files to be
shipped in a separate package (e.g., debian's libprotoc-dev). check for
this at configure time rather than allowing the build process to fail.
parent 9c7f8ce7
...@@ -39,8 +39,11 @@ AM_CONDITIONAL([DOXYGEN_TARGET], [test "x$has_doxygen" = "xyes"]) ...@@ -39,8 +39,11 @@ AM_CONDITIONAL([DOXYGEN_TARGET], [test "x$has_doxygen" = "xyes"])
AC_ARG_ENABLE([protoc], AC_ARG_ENABLE([protoc],
AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)])) AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)]))
if test "x$enable_protoc" != "xno"; then if test "x$enable_protoc" != "xno"; then
PKG_CHECK_MODULES([protobuf], [protobuf])
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])
PKG_CHECK_MODULES([protobuf], [protobuf])
AC_CHECK_HEADERS([google/protobuf/compiler/command_line_interface.h],
[],
[AC_MSG_ERROR([required protobuf header file not found])])
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