CHECK_PROTOBUF=yes
HAVE_PROTOBUF=yes
+HAVE_GEOBUF=no
AC_ARG_WITH([protobuf],
[AS_HELP_STRING([--without-protobuf], [build without protobuf-c support])],
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])
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
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@
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