mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2025-01-15 01:58:17 +08:00
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
This commit is contained in:
parent
af30e97e8e
commit
c1a1a36e61
13
configure.ac
13
configure.ac
@ -43,14 +43,11 @@ if test $BUILD_PROTOC_C = 1; then
|
|||||||
LIBS="$pbc_savelibs"
|
LIBS="$pbc_savelibs"
|
||||||
AC_LANG_POP()
|
AC_LANG_POP()
|
||||||
|
|
||||||
dnl Determine the version of the protoc compiler.
|
dnl We need $PROTOC around for the test code generation.
|
||||||
dnl (only needed for c++ packed-data comparison)
|
dnl This is merely needed for c++ packed-data comparison.
|
||||||
if test -n $PROTOC; then
|
if test "x$PROTOC" = x; then
|
||||||
AC_MSG_CHECKING([which version of protoc is installed])
|
echo "ERROR: missing google's protoc program; adjust \$PATH (or use --disable-protoc)" 1>&2
|
||||||
raw_vers=`protoc --version 2>/dev/null | sed -e 's/libprotoc //'`
|
exit 1
|
||||||
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])
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user