From: Paul Ramsey Date: Thu, 22 Aug 2019 16:33:42 +0000 (+0000) Subject: Move geobuf version test into one place and strip expr calls from makefiles X-Git-Tag: 3.0.0beta1~47 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c03061734accdfa414e0c82506210190eb4f795;p=postgis Move geobuf version test into one place and strip expr calls from makefiles git-svn-id: http://svn.osgeo.org/postgis/trunk@17761 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/configure.ac b/configure.ac index 6baa03b35..e8d582e21 100644 --- a/configure.ac +++ b/configure.ac @@ -974,6 +974,7 @@ dnl =========================================================================== CHECK_PROTOBUF=yes HAVE_PROTOBUF=yes +HAVE_GEOBUF=no AC_ARG_WITH([protobuf], [AS_HELP_STRING([--without-protobuf], [build without protobuf-c support])], @@ -1062,10 +1063,12 @@ if test "$CHECK_PROTOBUF" != "no"; then AC_DEFINE_UNQUOTED([LIBPROTOBUF_VERSION], [$PROTOC_VERSION], [Numeric version number for libprotobuf-c]) if test $PROTOC_VERSION -ge 1001000; then AC_DEFINE([HAVE_GEOBUF], [1], [Define to 1 if libprotobuf is >= 1.1]) + HAVE_GEOBUF=yes fi fi AC_SUBST([HAVE_PROTOBUF]) + AC_SUBST([HAVE_GEOBUF]) AC_SUBST([PROTOC_VERSION]) AC_SUBST([PROTOBUF_CPPFLAGS]) AC_SUBST([PROTOBUF_LDFLAGS]) diff --git a/postgis/Makefile.in b/postgis/Makefile.in index 1c58e686d..99f23b982 100644 --- a/postgis/Makefile.in +++ b/postgis/Makefile.in @@ -59,7 +59,7 @@ endif ifeq (@HAVE_PROTOBUF@,yes) PROTOBUF_OBJ = vector_tile.pb-c.o -ifeq ($(shell expr "$(PROTOC_VERSION)" ">=" 1001000),1) +ifeq (@HAVE_GEOBUF@,yes) PROTOBUF_OBJ += geobuf.pb-c.o endif UTHASH_INCLUDE = -I../deps/uthash/include diff --git a/regress/core/Makefile.in b/regress/core/Makefile.in index fb347e5a5..d663ee8a5 100644 --- a/regress/core/Makefile.in +++ b/regress/core/Makefile.in @@ -22,7 +22,6 @@ POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@ POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@ POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@ HAVE_JSON=@HAVE_JSON@ -HAVE_PROTOBUF=@HAVE_PROTOBUF@ PROTOC_VERSION=@PROTOC_VERSION@ HAVE_SPGIST=@HAVE_SPGIST@ INTERRUPTTESTS=@INTERRUPTTESTS@ @@ -210,13 +209,13 @@ ifeq ($(HAVE_SPGIST),yes) regress_spgist_index_nd endif -ifeq ($(HAVE_PROTOBUF),yes) +ifeq (@HAVE_PROTOBUF@,yes) # protobuf-c adds: # ST_AsMVT, ST_AsGeobuf TESTS += \ mvt \ mvt_jsonb -ifeq ($(shell expr "$(PROTOC_VERSION)" ">=" 1001000),1) +ifeq (@HAVE_GEOBUF@,yes) TESTS += \ geobuf endif