From c1a1a36e610417a7a6c1fb441ffd8d25effeed3f Mon Sep 17 00:00:00 2001 From: lahiker42 Date: Wed, 17 Mar 2010 18:29:36 +0000 Subject: [PATCH] Use GOOGLE_PROTOBUF_VERSION instead of computing PROTOC_VERSION ourselves from its --version option. git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@209 00440858-1255-0410-a3e6-75ea37f81c3a --- configure.ac | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index b4ba798..476bd32 100644 --- a/configure.ac +++ b/configure.ac @@ -43,14 +43,11 @@ if test $BUILD_PROTOC_C = 1; then LIBS="$pbc_savelibs" AC_LANG_POP() - dnl Determine the version of the protoc compiler. - dnl (only needed for c++ packed-data comparison) - if test -n $PROTOC; then - AC_MSG_CHECKING([which version of protoc is installed]) - raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'` - vers=`echo $raw_vers | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` - AC_DEFINE_UNQUOTED([PROTOC_VERSION], [$vers]) - AC_MSG_RESULT([$raw_vers]) + dnl We need $PROTOC around for the test code generation. + dnl This is merely needed for c++ packed-data comparison. + if test "x$PROTOC" = x; then + echo "ERROR: missing google's protoc program; adjust \$PATH (or use --disable-protoc)" 1>&2 + exit 1 fi fi