[postgis-tickets] r17761 - Move geobuf version test into one place and strip expr calls from makefiles

Paul Ramsey pramsey at cleverelephant.ca
Thu Aug 22 09:33:42 PDT 2019


Author: pramsey
Date: 2019-08-22 09:33:42 -0700 (Thu, 22 Aug 2019)
New Revision: 17761

Modified:
   trunk/configure.ac
   trunk/postgis/Makefile.in
   trunk/regress/core/Makefile.in
Log:
Move geobuf version test into one place and strip expr calls from makefiles


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2019-08-22 15:59:39 UTC (rev 17760)
+++ trunk/configure.ac	2019-08-22 16:33:42 UTC (rev 17761)
@@ -974,6 +974,7 @@
 
 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 @@
 		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: trunk/postgis/Makefile.in
===================================================================
--- trunk/postgis/Makefile.in	2019-08-22 15:59:39 UTC (rev 17760)
+++ trunk/postgis/Makefile.in	2019-08-22 16:33:42 UTC (rev 17761)
@@ -59,7 +59,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
 UTHASH_INCLUDE = -I../deps/uthash/include

Modified: trunk/regress/core/Makefile.in
===================================================================
--- trunk/regress/core/Makefile.in	2019-08-22 15:59:39 UTC (rev 17760)
+++ trunk/regress/core/Makefile.in	2019-08-22 16:33:42 UTC (rev 17761)
@@ -22,7 +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_SPGIST=@HAVE_SPGIST@
 INTERRUPTTESTS=@INTERRUPTTESTS@
@@ -210,13 +209,13 @@
 	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



More information about the postgis-tickets mailing list