Commit a2fb294a authored by Robert Edmonds's avatar Robert Edmonds

build system: add back the --disable-protoc option to configure

parent 4c7904fc
...@@ -52,6 +52,8 @@ EXTRA_DIST += protobuf-c/libprotobuf-c.pc.in ...@@ -52,6 +52,8 @@ EXTRA_DIST += protobuf-c/libprotobuf-c.pc.in
# protoc-c # protoc-c
# #
if BUILD_COMPILER
bin_PROGRAMS += protoc-c/protoc-c bin_PROGRAMS += protoc-c/protoc-c
protoc_c_protoc_c_SOURCES = \ protoc_c_protoc_c_SOURCES = \
protoc-c/c_bytes_field.cc \ protoc-c/c_bytes_field.cc \
...@@ -143,6 +145,8 @@ BUILT_SOURCES += \ ...@@ -143,6 +145,8 @@ BUILT_SOURCES += \
t/test-full.pb.cc t/test-full.pb.h \ t/test-full.pb.cc t/test-full.pb.h \
t/generated-code2/test-full-cxx-output.inc t/generated-code2/test-full-cxx-output.inc
endif # BUILD_COMPILER
EXTRA_DIST += \ EXTRA_DIST += \
t/test.proto \ t/test.proto \
t/test-full.proto \ t/test-full.proto \
......
...@@ -26,12 +26,20 @@ else ...@@ -26,12 +26,20 @@ else
AC_MSG_ERROR([pkg-config is required!]) AC_MSG_ERROR([pkg-config is required!])
fi fi
PKG_CHECK_MODULES([protobuf], [protobuf]) AC_ARG_ENABLE([protoc],
AC_LANG_PUSH([C++]) AS_HELP_STRING([--disable-protoc], [Disable building protoc_c (also disables tests)]))
AC_PATH_PROG(PROTOC, protoc) if test "x$enable_protoc" != "xno"; then
if test -z "$PROTOC"; then PKG_CHECK_MODULES([protobuf], [protobuf])
AC_LANG_PUSH([C++])
AC_PATH_PROG(PROTOC, protoc)
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/.])
fi
PROTOBUF_VERSION="$($PROTOC --version)"
else
PROTOBUF_VERSION="not required, not building compiler"
fi fi
AM_CONDITIONAL([BUILD_COMPILER], [test "x$enable_protoc" != "xno"])
AC_C_BIGENDIAN AC_C_BIGENDIAN
...@@ -53,5 +61,5 @@ AC_MSG_RESULT([ ...@@ -53,5 +61,5 @@ AC_MSG_RESULT([
pkgconfigdir: ${pkgconfigdir} pkgconfigdir: ${pkgconfigdir}
bigendian: ${ac_cv_c_bigendian} bigendian: ${ac_cv_c_bigendian}
protobuf version: $($PROTOC --version) protobuf version: ${PROTOBUF_VERSION}
]) ])
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