[postgis-tickets] r17111 - Support Proj 6. Support is via legacy API.

Darafei komzpa at gmail.com
Mon Dec 17 02:39:54 PST 2018


Author: komzpa
Date: 2018-12-17 02:39:54 -0800 (Mon, 17 Dec 2018)
New Revision: 17111

Modified:
   branches/2.3/NEWS
   branches/2.3/configure.ac
   branches/2.3/liblwgeom/liblwgeom.h.in
   branches/2.3/macros/ac_proj4_version.m4
   branches/2.3/raster/macros/ac_proj4_version.m4
Log:
Support Proj 6. Support is via legacy API.

Closes #4254
Closes https://github.com/postgis/postgis/pull/354



Modified: branches/2.3/NEWS
===================================================================
--- branches/2.3/NEWS	2018-12-17 10:38:07 UTC (rev 17110)
+++ branches/2.3/NEWS	2018-12-17 10:39:54 UTC (rev 17111)
@@ -8,7 +8,9 @@
            dimensions for &&& operator to work predictably.
            (Darafei Praliaskouski, Arthur Lesuisse, Andrew Gierth, Raúl Marín)
 
+  - #4267, Enable Proj 6 deprecated APIs (Darafei Praliaskouski, Raúl Marín)
 
+
 PostGIS 2.3.8
 2018/11/24
 

Modified: branches/2.3/configure.ac
===================================================================
--- branches/2.3/configure.ac	2018-12-17 10:38:07 UTC (rev 17110)
+++ branches/2.3/configure.ac	2018-12-17 10:39:54 UTC (rev 17111)
@@ -803,7 +803,7 @@
 			AC_MSG_RESULT([Using user-specified proj directory: $PROJDIR])
 
 			dnl Add the include directory to PROJ_CPPFLAGS
-			PROJ_CPPFLAGS="-I$PROJDIR/include"
+			PROJ_CPPFLAGS="-I$PROJDIR/include -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"
 			PROJ_LDFLAGS="-L$PROJDIR/lib"
 		else
 			AC_MSG_ERROR([the --with-projdir directory "$PROJDIR" cannot be found])
@@ -811,11 +811,11 @@
 	fi
 fi
 
-
 dnl Check that we can find the proj_api.h header file
-CPPFLAGS_SAVE="$CPPFLAGS"
-CPPFLAGS="$PROJ_CPPFLAGS"
-AC_CHECK_HEADER([proj_api.h], [], [AC_MSG_ERROR([could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir])])
+AC_CHECK_HEADER([proj_api.h], [], [AC_MSG_ERROR([could not find proj_api.h - you may need to specify the directory of a PROJ.4 installation using --with-projdir])],
+[
+#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
+])
 
 dnl Return the PROJ.4 version number
 AC_PROJ_VERSION([POSTGIS_PROJ_VERSION])

Modified: branches/2.3/liblwgeom/liblwgeom.h.in
===================================================================
--- branches/2.3/liblwgeom/liblwgeom.h.in	2018-12-17 10:38:07 UTC (rev 17110)
+++ branches/2.3/liblwgeom/liblwgeom.h.in	2018-12-17 10:39:54 UTC (rev 17111)
@@ -32,6 +32,7 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdint.h>
+#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
 #include "proj_api.h"
 
 #if defined(PJ_VERSION) && PJ_VERSION >= 490

Modified: branches/2.3/macros/ac_proj4_version.m4
===================================================================
--- branches/2.3/macros/ac_proj4_version.m4	2018-12-17 10:38:07 UTC (rev 17110)
+++ branches/2.3/macros/ac_proj4_version.m4	2018-12-17 10:39:54 UTC (rev 17111)
@@ -19,13 +19,14 @@
 		#ifdef HAVE_STDINT_H
         		#include <stdio.h>
 		#endif
+		#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
 		#include "proj_api.h"
-	], 
+	],
 	[
-		FILE *fp; 
+		FILE *fp;
 
-		fp = fopen("conftest.out", "w"); 
-		fprintf(fp, "%d\n", PJ_VERSION); 
+		fp = fopen("conftest.out", "w");
+		fprintf(fp, "%d\n", PJ_VERSION);
 		fclose(fp)])
 	],
         [

Modified: branches/2.3/raster/macros/ac_proj4_version.m4
===================================================================
--- branches/2.3/raster/macros/ac_proj4_version.m4	2018-12-17 10:38:07 UTC (rev 17110)
+++ branches/2.3/raster/macros/ac_proj4_version.m4	2018-12-17 10:39:54 UTC (rev 17111)
@@ -30,13 +30,14 @@
 		#ifdef HAVE_STDINT_H
         		#include <stdio.h>
 		#endif
+		#define ACCEPT_USE_OF_DEPRECATED_PROJ_API_H 1
 		#include "proj_api.h"
-	], 
+	],
 	[
-		FILE *fp; 
+		FILE *fp;
 
-		fp = fopen("conftest.out", "w"); 
-		fprintf(fp, "%d\n", PJ_VERSION); 
+		fp = fopen("conftest.out", "w");
+		fprintf(fp, "%d\n", PJ_VERSION);
 		fclose(fp)])
 	],
         [



More information about the postgis-tickets mailing list