[postgis-tickets] r17769 - Move geobuf version test strictly into configure
Paul Ramsey
pramsey at cleverelephant.ca
Thu Aug 22 11:37:46 PDT 2019
Author: pramsey
Date: 2019-08-22 11:37:46 -0700 (Thu, 22 Aug 2019)
New Revision: 17769
Modified:
branches/2.4/configure.ac
branches/2.4/postgis/Makefile.in
branches/2.4/regress/Makefile.in
Log:
Move geobuf version test strictly into configure
Modified: branches/2.4/configure.ac
===================================================================
--- branches/2.4/configure.ac 2019-08-22 18:27:44 UTC (rev 17768)
+++ branches/2.4/configure.ac 2019-08-22 18:37:46 UTC (rev 17769)
@@ -925,6 +925,7 @@
CHECK_PROTOBUF=yes
HAVE_PROTOBUF=yes
+HAVE_GEOBUF=no
AC_ARG_WITH([protobuf],
[AS_HELP_STRING([--without-protobuf], [build without protobuf-c support])],
@@ -1003,10 +1004,12 @@
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])
Modified: branches/2.4/postgis/Makefile.in
===================================================================
--- branches/2.4/postgis/Makefile.in 2019-08-22 18:27:44 UTC (rev 17768)
+++ branches/2.4/postgis/Makefile.in 2019-08-22 18:37:46 UTC (rev 17769)
@@ -52,7 +52,7 @@
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
endif
@@ -200,7 +200,7 @@
ifeq (@HAVE_PROTOBUF@,yes)
lwgeom_out_mvt.o: vector_tile.pb-c.h
mvt.o: vector_tile.pb-c.h
-ifeq ($(shell expr $(PROTOC_VERSION) ">=" 1001000),1)
+ifeq (@HAVE_GEOBUF@,yes)
lwgeom_out_geobuf.o: geobuf.pb-c.h
geobuf.o: geobuf.pb-c.h
endif
Modified: branches/2.4/regress/Makefile.in
===================================================================
--- branches/2.4/regress/Makefile.in 2019-08-22 18:27:44 UTC (rev 17768)
+++ branches/2.4/regress/Makefile.in 2019-08-22 18:37:46 UTC (rev 17769)
@@ -22,8 +22,6 @@
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_SFCGAL=@HAVE_SFCGAL@
HAVE_BRIN=@HAVE_BRIN@
MINGWBUILD=@MINGWBUILD@
@@ -248,12 +246,12 @@
regress_brin_index_geography
endif
-ifeq ($(HAVE_PROTOBUF),yes)
+ifeq (@HAVE_PROTOBUF@,yes)
# protobuf-c adds:
# ST_AsMVT, ST_AsGeobuf
TESTS += \
mvt
-ifeq ($(shell expr $(PROTOC_VERSION) ">=" 1001000),1)
+ifeq (@HAVE_GEOBUF@,yes)
TESTS += \
geobuf
endif
More information about the postgis-tickets
mailing list