Commit 9647fa5d authored by Darafei Praliaskouski's avatar Darafei Praliaskouski

Support Proj 6. Support is via legacy API, we need to redesign for non-legacy and Proj 7.

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


git-svn-id: http://svn.osgeo.org/postgis/trunk@17108 b70326c6-7e19-0410-871a-916f4a2858ee
parent 9fe22540
Pipeline #40392070 failed with stage
in 5 minutes and 2 seconds
......@@ -17,6 +17,8 @@ PostGIS 3.0.0
- #4258, Remove SFCGAL support for ST_Area, ST_Distance, ST_Intersection,
ST_Difference, ST_Union (Darafei Praliaskouski)
- #4267, Enable Proj 6 deprecated APIs (Darafei Praliaskouski)
* New Features *
- #2902, postgis_geos_noop (Sandro Santilli)
- #4128, ST_AsMVT support for Feature ID (Stepan Kuzmin)
......
......@@ -825,7 +825,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])
......@@ -833,11 +833,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])
......
......@@ -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
......
......@@ -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)])
],
[
......
......@@ -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)])
],
[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment