]> granicus.if.org Git - postgis/commitdiff
Support Proj 6. Support is via legacy API.
authorDarafei Praliaskouski <me@komzpa.net>
Mon, 17 Dec 2018 10:39:54 +0000 (10:39 +0000)
committerDarafei Praliaskouski <me@komzpa.net>
Mon, 17 Dec 2018 10:39:54 +0000 (10:39 +0000)
Closes #4254
Closes https://github.com/postgis/postgis/pull/354

git-svn-id: http://svn.osgeo.org/postgis/branches/2.3@17111 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
configure.ac
liblwgeom/liblwgeom.h.in
macros/ac_proj4_version.m4
raster/macros/ac_proj4_version.m4

diff --git a/NEWS b/NEWS
index ed5654148d91400debe11f09565e432290695ec7..d3fcf8f84f43c29f22b9575d1aea727102fb0e87 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,8 @@ PostGIS 2.3.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
index 40ea590a1645bc266a270f72af68d4c94349eb26..dfb1a05e60eeb01749427b474ccca164302674f7 100644 (file)
@@ -803,7 +803,7 @@ if test ! "x$PROJDIR" = "x"; then
                        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 @@ if test ! "x$PROJDIR" = "x"; then
        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])
index 665edcc1f3189d76caee96315bca852f6a77cc45..aaaccb46b29f81b14ad194b797e4d9fd61032333 100644 (file)
@@ -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
index 3d9deca1d392ffa5b91adbf24c75a94ec8c184ad..f8671ec7ef16f7e2ae64999692b97deba58e0849 100644 (file)
@@ -19,13 +19,14 @@ AC_DEFUN([AC_PROJ_VERSION], [
                #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)])
        ],
         [
index d87ee1174c050f559c7c82be5a39029ad2d98942..481393563a8cd2e835fdb4d8339d1f346e634309 100644 (file)
@@ -30,13 +30,14 @@ AC_DEFUN([AC_PROJ_VERSION], [
                #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)])
        ],
         [