Skip to content
Commits on Source (22)
To cite PROJ in publications use:
PROJ contributors (2019). PROJ coordinate transformation software
PROJ contributors (2020). PROJ coordinate transformation software
library. Open Source Geospatial Foundation. URL https://proj.org/.
A BibTeX entry for LaTeX users is
......
......@@ -9,15 +9,12 @@
################################################################################
# General settings
################################################################################
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
# For historic reasons, the CMake PROJECT-NAME is PROJ4
project(PROJ4 LANGUAGES C CXX)
set(PROJECT_INTERN_NAME PROJ)
project(PROJ LANGUAGES C CXX)
if(NOT CMAKE_VERSION VERSION_LESS 3.1)
# Only interpret if() arguments as variables or keywords when unquoted
cmake_policy(SET CMP0054 NEW)
endif()
# Set C++ version
# Make CMAKE_CXX_STANDARD available as cache option overridable by user
......@@ -83,6 +80,7 @@ elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "Intel")
set(PROJ_CXX_WARN_FLAGS -Wall)
endif()
endif()
set(PROJ_C_WARN_FLAGS "${PROJ_C_WARN_FLAGS}"
CACHE STRING "C flags used to compile PROJ targets")
set(PROJ_CXX_WARN_FLAGS "${PROJ_CXX_WARN_FLAGS}"
......@@ -92,20 +90,19 @@ set(PROJ_CXX_WARN_FLAGS "${PROJ_CXX_WARN_FLAGS}"
# PROJ CMake modules
################################################################################
# Path to additional CMake modules
set(CMAKE_MODULE_PATH ${PROJ4_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH ${PROJ_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
include(ProjUtilities)
message(STATUS "")
colormsg(_HIBLUE_ "Configuring PROJ:")
message(STATUS "Configuring PROJ:")
################################################################################
#PROJ version information
################################################################################
include(ProjVersion)
proj_version(MAJOR 6 MINOR 3 PATCH 1)
set(PROJ_API_VERSION "18")
set(PROJ_BUILD_VERSION "18.1.3")
proj_version(MAJOR 7 MINOR 0 PATCH 0)
set(PROJ_API_VERSION "19")
set(PROJ_BUILD_VERSION "19.0.0")
################################################################################
# Build features and variants
......@@ -133,6 +130,35 @@ IF("${SQLITE3_VERSION}" VERSION_LESS "3.11")
message(SEND_ERROR "sqlite3 >= 3.11 required!")
ENDIF()
################################################################################
# Check for libtiff
################################################################################
option(DISABLE_TIFF "Disable TIFF support" OFF)
mark_as_advanced(DISABLE_TIFF)
if(DISABLE_TIFF)
message(WARNING "TIFF support has been disabled and will result in the inability to read some grids")
else()
find_package(TIFF REQUIRED)
if(NOT TIFF_FOUND)
message(SEND_ERROR "libtiff dependency not found!")
endif()
add_definitions(-DTIFF_ENABLED)
endif()
################################################################################
# Check for curl
################################################################################
option(ENABLE_CURL "Enable Curl support" ON)
if(ENABLE_CURL)
find_package(CURL REQUIRED)
if(NOT CURL_FOUND)
message(SEND_ERROR "curl dependency not found!")
endif()
add_definitions(-DCURL_ENABLED)
endif()
################################################################################
# threading configuration
################################################################################
......@@ -178,17 +204,10 @@ if(MSVC OR CMAKE_CONFIGURATION_TYPES)
set(CMAKE_DEBUG_POSTFIX _d)
endif()
option(PROJ_TESTS "Enable build of collection of PROJ tests" ON)
boost_report_value(PROJ_TESTS)
if(PROJ_TESTS)
enable_testing()
endif()
include(ProjTest)
# Put the libraries and binaries that get built into directories at the
# top of the build tree rather than in hard-to-find leaf
# directories. This simplifies manual testing and the use of the build
# tree rather than installed Boost libraries.
# tree rather than installed PROJ libraries.
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
......@@ -209,19 +228,35 @@ set(DOCDIR "${DEFAULT_DOCDIR}"
set(INCLUDEDIR "${DEFAULT_INCLUDEDIR}"
CACHE PATH "The directory to install includes into.")
set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}"
CACHE PATH "The directory to install cmake config files into.")
CACHE PATH "Parent of the directory to install cmake config files into.")
################################################################################
# Tests
################################################################################
include(CTest)
# Support older option, to be removed by PROJ 8.0
if(DEFINED PROJ_TESTS)
message(DEPRECATION "PROJ_TESTS has been replaced with BUILD_TESTING")
set(BUILD_TESTING ${PROJ_TESTS})
endif()
if(BUILD_TESTING)
include(ProjTest)
else()
message(STATUS "Testing disabled")
endif()
################################################################################
# Build configured components
################################################################################
include_directories(${PROJ4_SOURCE_DIR}/src)
include_directories(${PROJ_SOURCE_DIR}/src)
message(STATUS "")
add_subdirectory(data)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(man)
add_subdirectory(cmake)
if(PROJ_TESTS)
if(BUILD_TESTING)
add_subdirectory(test)
endif()
SUBDIRS = include src man data jniwrap cmake
DIST_SUBDIRS = include src man data jniwrap cmake test
SUBDIRS = include src man data cmake
DIST_SUBDIRS = include src man data cmake test
EXTRA_DIST = CMakeLists.txt CITATION README.md
......@@ -12,6 +12,7 @@ ACLOCAL_AMFLAGS = -I m4
check-local:
cd test; $(MAKE) check
all-local: README
README: README.md
fgrep -v "[![" $< > $@
......
......@@ -250,6 +250,9 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURL_CFLAGS = @CURL_CFLAGS@
CURL_ENABLED_FLAGS = @CURL_ENABLED_FLAGS@
CURL_LIBS = @CURL_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
......@@ -278,9 +281,9 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JNI_INCLUDE = @JNI_INCLUDE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_CONFIG = @LIBCURL_CONFIG@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -317,6 +320,9 @@ SQLITE3_CHECK = @SQLITE3_CHECK@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
TIFF_CFLAGS = @TIFF_CFLAGS@
TIFF_ENABLED_FLAGS = @TIFF_ENABLED_FLAGS@
TIFF_LIBS = @TIFF_LIBS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
......@@ -371,8 +377,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = include src man data jniwrap cmake
DIST_SUBDIRS = include src man data jniwrap cmake test
SUBDIRS = include src man data cmake
DIST_SUBDIRS = include src man data cmake test
EXTRA_DIST = CMakeLists.txt CITATION README.md
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = proj.pc
......@@ -746,7 +752,7 @@ distcleancheck: distclean
check-am: all-am
$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile $(DATA)
all-am: Makefile $(DATA) all-local
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
......@@ -854,7 +860,7 @@ uninstall-am: uninstall-pkgconfigDATA
.MAKE: $(am__recursive_targets) check-am install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
am--refresh check check-am check-local clean clean-cscope \
clean-generic clean-libtool clean-local cscope cscopelist-am \
ctags ctags-am dist dist-all dist-bzip2 dist-gzip dist-lzip \
......@@ -877,6 +883,8 @@ uninstall-am: uninstall-pkgconfigDATA
check-local:
cd test; $(MAKE) check
all-local: README
README: README.md
fgrep -v "[![" $< > $@
......
7.0.0 Release Notes
-------------------
The major feature in PROJ 7 is significantly improved handling of gridded
models. This was implemented in RFC4 (https://proj.org/community/rfc/rfc-4.html).
The main features of the RFC4 work is that PROJ now implements a new grid format,
Geodetic TIFF grids, for exchaning gridded transformation models. In addition
to the new grid format, PROJ can now also access grids online using a data
store in the cloud.
The grids that was previously available via the proj-datumgrid packages are now
available in two places:
1. As a single combined data archive including all available resource files
2. From the cloud via https://cdn.proj.org
In Addition, provided with PROJ is a utility called projsync that can be used
download grids from the data store in the cloud.
The use of the new grid format and the data from the cloud requires that
PROJ is build against libtiff and libcurl. Both are optional dependencies
to PROJ but it is highly encouraged that the software is build against both.
ATTENTION: PROJ 7 will be last major release version that includes the proj_api.h
header. The functionality in proj_api.h is deprecated and only supported in
maintenance mode. It is inferior to the functionality provided by functions
in the proj.h header and all projects still relying on proj_api.h are encouraged
to migrate to the new API in proj.h. See https://proj.org/development/migration.html
for more info on how to migrate from the old to the new API.
Updates
-------
o Added new file access API to proj.h #866
o Updated the name of the most recent version of the WKT2 standard from
WKT2_2018 to WKT2_2019 to reflect the proper name of the standard (#1585)
o Improvements in transformations from/to WGS 84 (Gxxxx) realizations and
vertical <--> geog transormations #1608
o Update to version 1.50 of the geodesic library (#1629)
o Promote proj_assign_context to proj.h from proj_experimental.h (#1630)
o Add rotation support to the HEALPix projection (#1638)
o Add c function proj_crs_create_bound_vertical_crs() (#1689)
o Use Win32 Unicode APIs and expect all strings to be UTF-8 (#1765)
o Improved name aliases lookup (#1827)
o CMake: Employ better use of CTest with the BUILD_TESTING option (#1870)
o Grid correction: fix handling grids spanning antimeridian (#1882)
o Remove legacy CMake target name "proj" #1883
o projinfo: add --searchpaths switch (#1892)
o Add +proj=set operation to set component(s) of a coordinate to a fixed
value (#1896)
o Add EPSG records for 'Geocentric translation by Grid Interpolation (IGN)'
(gr3df97a.txt) and map them to new +proj=xyzgridshift (#1897)
o Remove 'null' grid file as it is now a special hardcoded case in grid
code (#1898)
o Add projsync utility (#1903)
o Make PROJ the CMake project name #1910
o Use relative directory to locate PROJ resource files (#1921)
Bug fixes
---------
o Horizontal grid shift: fix failures on points slightly outside a
subgrid (#209)
o Fix ASAN issue with SQLite3VFS class (#1902)
o tests: force use of bash for proj_add_test_script_sh (#1905)
Breaking changes
----------------
o Reject NTV2 files where GS_TYPE != SECONDS #1294
o On Windows the name of the library is now fixed to ``proj.lib`` instead
of encoding the version number in the library name (#1581)
o Require C99 compiler (#1624)
o Remove deprecated JNI bindings (#1825)
o Remove -ld option from proj and cs2cs (#1844)
o Increase CMake minimum version from 3.5 to 3.9 (#1907)
THANKS TO
---------
Jeff McKenna
Calum Robinson
Anshul Singhvi
Bas Couwenberg
Mike Taves
Alan D. Snow
Charles Karney
Kristian Evers
Even Rouault
6.3.1 Release Notes
-------------------
......
......@@ -17,89 +17,24 @@ See the NEWS file for changes between versions.
The following command line utilities are included in the PROJ package:
- `proj`: for cartographic projection of geodetic coordinates
- `proj`: for cartographic projection of geodetic coordinates.
- `cs2cs`: for transformation from one CRS to another CRS.
- `geod`: for geodesic (great circle) computations.
- `cct`: for generic Coordinate Conversions and Transformations.
- `gie`: the Geospatial Integrity Investigation Environment.
- `projinfo`: for geodetic object and coordinate operation queries
- `projinfo`: for geodetic object and coordinate operation queries.
- `projsync`: for synchronizing PROJ datum and transformation support data.
> More information on the utilities can be found on the [PROJ website](https://proj.org/apps).
## Installation
### Build dependencies
PROJ requires C and C++11 compilers.
It also requires SQLite3 (headers, library and executable). The minimum
version of SQLite3 required is 3.11
Consult the [Installation](https://proj.org/install.html) page of the official
documentation.
For builds on the master branch, [install.rst](https://github.com/OSGeo/PROJ/blob/master/docs/source/install.rst)
might be more up-to-date.
### Building with CMake
cd proj
mkdir build
cd build
cmake ..
cmake --build .
On Windows, one may need to specify generator:
cmake -G "Visual Studio 15 2017" ..
If the SQLite3 dependency is installed in a custom location, specify the
paths to the include directory and the library:
cmake -DSQLITE3_INCLUDE_DIR=/opt/SQLite/include -DSQLITE3_LIBRARY=/opt/SQLite/lib/libsqlite3.so ..
Tests are run with
ctest
The test suite requires that the proj-datumgrid package is installed
in `PROJ_LIB`.
### Building on Unix/Linux
FSF's configuration procedure is used to ease installation of the
PROJ system.
The default destination path prefix for installed files is `/usr/local`.
Results from the installation script will be placed into subdirectories
`bin`, `include`, `lib`, `man/man1` and `man/man3`.
If this default path prefix is proper, then execute:
./configure
See the note below if you are building PROJ directly from the git repository.
If another path prefix is required, then execute:
./configure --prefix=/my/path
In either case, the directory of the prefix path must exist and be
writable by the installer.
After executing configure, execute:
make
make install
The install target will create, if necessary, all required sub-directories.
Tests are run with
make check
The test suite requires that the proj-datumgrid package is installed
in `PROJ_LIB`.
#### Building from the git repository
If you are building from the git repository you have to first run
./autogen.sh
which will generate a configure script that can be used as described above.
### Distribution files and format
## Distribution files and format
Sources are distributed in one or more files. The principle elements
of the system are stored in a compressed tar file named `proj-x.y.z.tar.gz` where
......@@ -129,6 +64,6 @@ where PROJ will find them after installation. The default location of
be changed to a different directory. On Windows you have to define
`PROJ_LIB` yourself.
### Citing PROJ in publications
## Citing PROJ in publications
See [CITATION](CITATION)
......@@ -2,10 +2,12 @@
[![Travis Status](https://travis-ci.com/OSGeo/PROJ.svg?branch=master)](https://travis-ci.com/OSGeo/PROJ)
[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/OSGeo/PROJ?branch=master&svg=true)](https://ci.appveyor.com/project/OSGeo/PROJ?branch=master)
[![Cirrus Status](https://img.shields.io/cirrus/github/OSGeo/PROJ)](https://cirrus-ci.com/github/OSGeo/PROJ/master)
[![Docker build Status](https://img.shields.io/docker/cloud/build/osgeo/proj)](https://hub.docker.com/r/osgeo/proj/builds)
[![Coveralls Status](https://coveralls.io/repos/github/OSGeo/PROJ/badge.svg?branch=master)](https://coveralls.io/github/OSGeo/PROJ?branch=master)
[![Gitter](https://badges.gitter.im/OSGeo/proj.4.svg)](https://gitter.im/OSGeo/proj.4)
[![Mailing List](https://img.shields.io/badge/PROJ-mailing%20list-4eb899.svg)](http://lists.osgeo.org/mailman/listinfo/proj)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)
PROJ is a generic coordinate transformation software, that transforms
coordinates from one coordinate reference system (CRS) to another.
......@@ -23,89 +25,24 @@ See the NEWS file for changes between versions.
The following command line utilities are included in the PROJ package:
- `proj`: for cartographic projection of geodetic coordinates
- `proj`: for cartographic projection of geodetic coordinates.
- `cs2cs`: for transformation from one CRS to another CRS.
- `geod`: for geodesic (great circle) computations.
- `cct`: for generic Coordinate Conversions and Transformations.
- `gie`: the Geospatial Integrity Investigation Environment.
- `projinfo`: for geodetic object and coordinate operation queries
- `projinfo`: for geodetic object and coordinate operation queries.
- `projsync`: for synchronizing PROJ datum and transformation support data.
> More information on the utilities can be found on the [PROJ website](https://proj.org/apps).
## Installation
### Build dependencies
PROJ requires C and C++11 compilers.
It also requires SQLite3 (headers, library and executable). The minimum
version of SQLite3 required is 3.11
Consult the [Installation](https://proj.org/install.html) page of the official
documentation.
For builds on the master branch, [install.rst](https://github.com/OSGeo/PROJ/blob/master/docs/source/install.rst)
might be more up-to-date.
### Building with CMake
cd proj
mkdir build
cd build
cmake ..
cmake --build .
On Windows, one may need to specify generator:
cmake -G "Visual Studio 15 2017" ..
If the SQLite3 dependency is installed in a custom location, specify the
paths to the include directory and the library:
cmake -DSQLITE3_INCLUDE_DIR=/opt/SQLite/include -DSQLITE3_LIBRARY=/opt/SQLite/lib/libsqlite3.so ..
Tests are run with
ctest
The test suite requires that the proj-datumgrid package is installed
in `PROJ_LIB`.
### Building on Unix/Linux
FSF's configuration procedure is used to ease installation of the
PROJ system.
The default destination path prefix for installed files is `/usr/local`.
Results from the installation script will be placed into subdirectories
`bin`, `include`, `lib`, `man/man1` and `man/man3`.
If this default path prefix is proper, then execute:
./configure
See the note below if you are building PROJ directly from the git repository.
If another path prefix is required, then execute:
./configure --prefix=/my/path
In either case, the directory of the prefix path must exist and be
writable by the installer.
After executing configure, execute:
make
make install
The install target will create, if necessary, all required sub-directories.
Tests are run with
make check
The test suite requires that the proj-datumgrid package is installed
in `PROJ_LIB`.
#### Building from the git repository
If you are building from the git repository you have to first run
./autogen.sh
which will generate a configure script that can be used as described above.
### Distribution files and format
## Distribution files and format
Sources are distributed in one or more files. The principle elements
of the system are stored in a compressed tar file named `proj-x.y.z.tar.gz` where
......@@ -135,6 +72,6 @@ where PROJ will find them after installation. The default location of
be changed to a different directory. On Windows you have to define
`PROJ_LIB` yourself.
### Citing PROJ in publications
## Citing PROJ in publications
See [CITATION](CITATION)
# proj-config.cmake for the install tree. It's installed in
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
# path to the root from there. (Note that the whole install tree can
# be relocated.)
file(RELATIVE_PATH PROJECT_ROOT_DIR
${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGDIR} ${CMAKE_INSTALL_PREFIX})
# The old CMake PROJECT-NAME was PROJ4.
set (PROJECT_LEGACY_NAME PROJ4)
string (TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
string (TOLOWER "${PROJECT_LEGACY_NAME}" PROJECT_LEGACY_LOWER)
# Starting with version 7.0, we install config-style find package
# files so that PROJ can be found with both
#
# find_package(PROJ)
# find_package(PROJ4)
#
# Here are the details... The command
#
# find_package(PROJ)
#
# if successful, will define variables
#
# PROJ_FOUND
# PROJ_VERSION
# PROJ_LIBRARIES = PROJ::proj
# PROJ_INCLUDE_DIRS
# etc
#
# and will define targets
#
# PROJ::proj
# PROJ4::proj
#
# Similarly
#
# find_package(PROJ4)
#
# if successful, will define variables
#
# PROJ4_FOUND
# PROJ4_VERSION
# PROJ4_LIBRARIES = PROJ4::proj
# PROJ4_INCLUDE_DIRS
# etc
#
# and will define targets
#
# PROJ::proj
# PROJ4::proj
#
# Note that targets PROJ::proj and PROJ4::proj are provided in both
# cases. However, no attempt is made to define both sets of variables
# with the two find_package options. Doing so would just lead to user
# confusion.
#
# Because pre-7.0 versions of PROJ do not support find_package (PROJ)
# and do not define a target PROJ::proj
#
# find_package(PROJ4)
#
# (instead of PROJ) should be used in any development scenarios which
# might involve (even indirectly) pre-7.0 versions of PROJ.
#
# At some future dates, find_package (PROJ4) will
#
# define PROJ4_LIBRARIES = PROJ::proj
# give WARNING message suggesting migration to find_package(PROJ)
# be disallowed via the version checking code
#
# At some more distant date, the PROJ4::proj target will be retired.
#
# To support this change, the CACHE variables PROJ_CMAKE_SUBDIR (and
# CMAKECONFIGDIR) is now the "Parent of directory to install cmake
# config files into".
#
# All this messiness is confined to
#
# cmake/CMakeLists.txt (this file)
# cmake/project-config.cmake.in
# cmake/project-config-version.cmake.in
# Variables needed by ${PROJECT_NAME_LOWER}-config-version.cmake
if (MSVC)
......@@ -24,24 +93,36 @@ else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
configure_file(project-config.cmake.in project-config.cmake @ONLY)
foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME})
string (TOLOWER "${PROJECT_VARIANT_NAME}" PROJECT_VARIANT_LOWER)
set (CMAKECONFIGSUBDIR "${CMAKECONFIGDIR}/${PROJECT_VARIANT_LOWER}")
# proj-config.cmake for the install tree. It's installed in
# ${CMAKECONFIGSUBDIR} and @PROJECT_ROOT_DIR@ is the relative
# path to the root from there. (Note that the whole install tree can
# be relocated.)
file (RELATIVE_PATH PROJECT_ROOT_DIR
${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGSUBDIR} ${CMAKE_INSTALL_PREFIX})
configure_file (project-config.cmake.in
project-${PROJECT_VARIANT_LOWER}-config.cmake @ONLY)
configure_file (project-config-version.cmake.in
project-config-version.cmake @ONLY)
project-${PROJECT_VARIANT_LOWER}-version.cmake @ONLY)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
DESTINATION "${CMAKECONFIGDIR}"
RENAME "${PROJECT_NAME_LOWER}-config.cmake")
"${CMAKE_CURRENT_BINARY_DIR}/project-${PROJECT_VARIANT_LOWER}-config.cmake"
DESTINATION "${CMAKECONFIGSUBDIR}"
RENAME "${PROJECT_VARIANT_LOWER}-config.cmake")
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
DESTINATION "${CMAKECONFIGDIR}"
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
"${CMAKE_CURRENT_BINARY_DIR}/project-${PROJECT_VARIANT_LOWER}-version.cmake"
DESTINATION "${CMAKECONFIGSUBDIR}"
RENAME "${PROJECT_VARIANT_LOWER}-config-version.cmake")
# Make information about the cmake targets (the library and the tools)
# available.
install(EXPORT targets
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION "${CMAKECONFIGDIR}")
DESTINATION "${CMAKECONFIGSUBDIR}")
install(EXPORT targets
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake
DESTINATION "${CMAKECONFIGDIR}")
NAMESPACE ${PROJECT_LEGACY_NAME}::
FILE ${PROJECT_LEGACY_LOWER}-targets.cmake
DESTINATION "${CMAKECONFIGSUBDIR}")
endforeach ()
......@@ -139,6 +139,9 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CURL_CFLAGS = @CURL_CFLAGS@
CURL_ENABLED_FLAGS = @CURL_ENABLED_FLAGS@
CURL_LIBS = @CURL_LIBS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
......@@ -167,9 +170,9 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
JNI_INCLUDE = @JNI_INCLUDE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCURL_CONFIG = @LIBCURL_CONFIG@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -206,6 +209,9 @@ SQLITE3_CHECK = @SQLITE3_CHECK@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
TIFF_CFLAGS = @TIFF_CFLAGS@
TIFF_ENABLED_FLAGS = @TIFF_ENABLED_FLAGS@
TIFF_LIBS = @TIFF_LIBS@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
......
......@@ -14,7 +14,6 @@ include(CheckFunctionExists)
# check needed include file
check_include_files(dlfcn.h HAVE_DLFCN_H)
check_include_files(inttypes.h HAVE_INTTYPES_H)
check_include_files(jni.h HAVE_JNI_H)
check_include_files(memory.h HAVE_MEMORY_H)
check_include_files(stdint.h HAVE_STDINT_H)
check_include_files(stdlib.h HAVE_STDLIB_H)
......@@ -26,17 +25,19 @@ check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
check_function_exists(localeconv HAVE_LOCALECONV)
check_function_exists(strerror HAVE_STRERROR)
if(NOT WIN32)
check_library_exists(dl dladdr "" HAVE_LIBDL)
# check libm need on unix
check_library_exists(m ceil "" HAVE_LIBM)
endif()
set(PACKAGE "proj")
set(PACKAGE_BUGREPORT "https://github.com/OSGeo/PROJ/issues")
set(PACKAGE_NAME "PROJ")
set(PACKAGE_STRING "PROJ ${${PROJECT_INTERN_NAME}_VERSION}")
set(PACKAGE_STRING "PROJ ${${PROJECT_NAME}_VERSION}")
set(PACKAGE_TARNAME "proj")
set(PACKAGE_URL "https://proj.org")
set(PACKAGE_VERSION "${${PROJECT_INTERN_NAME}_VERSION}")
set(PACKAGE_VERSION "${${PROJECT_NAME}_VERSION}")
# check if a second proj_config.h exists (created by ./configure)
# as this is within CMake's C_INCLUDES / CXX_INCLUDES
......
......@@ -30,7 +30,7 @@ if(UNIX)
set(DEFAULT_DATA_SUBDIR ${CMAKE_INSTALL_DATAROOTDIR}/proj)
set(DEFAULT_INCLUDE_SUBDIR ${CMAKE_INSTALL_INCLUDEDIR})
set(DEFAULT_DOC_SUBDIR ${CMAKE_INSTALL_DOCDIR})
set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME_LOWER})
set(DEFAULT_CMAKE_SUBDIR ${CMAKE_INSTALL_LIBDIR}/cmake)
else()
# Common locations for Unix and Mac OS X
set(DEFAULT_BIN_SUBDIR bin)
......@@ -39,7 +39,7 @@ else()
set(DEFAULT_DOC_SUBDIR doc/proj)
set(DEFAULT_INCLUDE_SUBDIR include)
set(DEFAULT_DOC_SUBDIR share/doc/proj)
set(DEFAULT_CMAKE_SUBDIR lib/cmake/${PROJECT_NAME_LOWER})
set(DEFAULT_CMAKE_SUBDIR lib/cmake)
endif()
# Locations are changeable by user to customize layout of PROJ installation
......@@ -55,7 +55,7 @@ set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
"Subdirectory where doc will be installed")
set(PROJ_CMAKE_SUBDIR ${DEFAULT_CMAKE_SUBDIR} CACHE STRING
"Subdirectory where cmake proj-config file will be installed")
"Parent of subdirectory where cmake proj-config file will be installed")
# Mark *DIR variables as advanced and dedicated to use by power-users only.
mark_as_advanced(
......
......@@ -23,7 +23,7 @@ if(APPLE)
"if set to ON, build a library framework and application bundle, \
otherwise install classical UNIX bin/lib" OFF)
set(DEFAULT_BINDIR ${BUNDLEDIR})
boost_report_value(BUNDLEDIR)
boost_report_value(PROJ_INSTALL_NAME_DIR)
boost_report_value(FRAMEWORKDIR)
print_variable(BUNDLEDIR)
print_variable(PROJ_INSTALL_NAME_DIR)
print_variable(FRAMEWORKDIR)
endif()
......@@ -2,6 +2,11 @@
# add test with sh script
#
function(proj_test_set_properties TESTNAME)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_IGNORE_USER_WRITABLE_DIRECTORY=YES;PROJ_LIB=${PROJECT_BINARY_DIR}/data/for_tests")
endfunction()
function(proj_add_test_script_sh SH_NAME BIN_USE)
if(UNIX)
get_filename_component(testname ${SH_NAME} NAME_WE)
......@@ -15,19 +20,14 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
endif()
endif()
if(CMAKE_VERSION VERSION_LESS 2.8.4)
set(TEST_OK 0)
message(STATUS "test with bash script need a cmake version >= 2.8.4")
endif()
if(${TEST_OK})
add_test(NAME "${testname}"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/data
COMMAND bash ${PROJECT_SOURCE_DIR}/test/cli/${SH_NAME}
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${${BIN_USE}}
)
set_tests_properties( ${testname}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data")
proj_test_set_properties(${testname})
endif()
endif()
......@@ -43,8 +43,6 @@ function(proj_add_gie_test TESTNAME TESTCASE)
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN}
${TESTFILE}
)
set_tests_properties( ${TESTNAME}
PROPERTIES ENVIRONMENT "PROJ_LIB=${PROJECT_BINARY_DIR}/data")
proj_test_set_properties(${TESTNAME})
endfunction()
......@@ -13,78 +13,24 @@
################################################################################
# Macros in this module:
#
# print_variable
# proj_target_output_name:
#
################################################################################
#
# A big shout out to the cmake gurus @ compiz
#
function(colormsg)
string(ASCII 27 _escape)
set(WHITE "29")
set(GRAY "30")
set(RED "31")
set(GREEN "32")
set(YELLOW "33")
set(BLUE "34")
set(MAG "35")
set(CYAN "36")
foreach(color WHITE GRAY RED GREEN YELLOW BLUE MAG CYAN)
set(HI${color} "1\;${${color}}")
set(LO${color} "2\;${${color}}")
set(_${color}_ "4\;${${color}}")
set(_HI${color}_ "1\;4\;${${color}}")
set(_LO${color}_ "2\;4\;${${color}}")
endforeach()
set(str "")
set(coloron FALSE)
foreach(arg ${ARGV})
if(NOT ${${arg}} STREQUAL "")
if(CMAKE_COLOR_MAKEFILE)
set(str "${str}${_escape}[${${arg}}m")
set(coloron TRUE)
endif()
else()
set(str "${str}${arg}")
if(coloron)
set(str "${str}${_escape}[0m")
set(coloron FALSE)
endif()
set(str "${str} ")
endif()
endforeach()
message(STATUS ${str})
endfunction()
# colormsg("Colors:"
# WHITE "white" GRAY "gray" GREEN "green"
# RED "red" YELLOW "yellow" BLUE "blue" MAG "mag" CYAN "cyan"
# _WHITE_ "white" _GRAY_ "gray" _GREEN_ "green"
# _RED_ "red" _YELLOW_ "yellow" _BLUE_ "blue" _MAG_ "mag" _CYAN_ "cyan"
# _HIWHITE_ "white" _HIGRAY_ "gray" _HIGREEN_ "green"
# _HIRED_ "red" _HIYELLOW_ "yellow" _HIBLUE_ "blue" _HIMAG_ "mag"
# _HICYAN_ "cyan" HIWHITE "white" HIGRAY "gray" HIGREEN "green"
# HIRED "red" HIYELLOW "yellow" HIBLUE "blue" HIMAG "mag" HICYAN "cyan"
# "right?")
#
# pretty-prints the value of a variable so that the
# equals signs align
#
function(boost_report_value NAME)
function(print_variable NAME)
string(LENGTH "${NAME}" varlen)
# LOG
#message(STATUS "boost_report_value: NAME=${NAME} (${varlen})")
#message(STATUS "boost_report_value: \${NAME}=${${NAME}}")
math(EXPR padding_len 40-${varlen})
math(EXPR padding_len 30-${varlen})
if(${padding_len} GREATER 0)
string(SUBSTRING " "
0 ${padding_len} varpadding)
colormsg("${NAME}${varpadding} = ${${NAME}}")
endif()
message(STATUS "${NAME}${varpadding} = ${${NAME}}")
endfunction()
#
......@@ -98,17 +44,17 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME)
message(SEND_ERROR "Error, the variable TARGET_NAME is not defined!")
endif()
if(NOT DEFINED ${PROJECT_INTERN_NAME}_VERSION)
if(NOT DEFINED ${PROJECT_NAME}_VERSION)
message(SEND_ERROR
"Error, the variable ${${PROJECT_INTERN_NAME}_VERSION} is not defined!")
"Error, the variable ${${PROJECT_NAME}_VERSION} is not defined!")
endif()
# On Windows, ABI version is specified using binary file name suffix.
# On Unix, suffix is empty and SOVERSION is used instead.
if(WIN32)
string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen)
string(LENGTH "${${PROJECT_NAME}_ABI_VERSION}" abilen)
if(abilen GREATER 0)
set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}")
set(SUFFIX "_${${PROJECT_NAME}_ABI_VERSION}")
endif()
endif()
......
......@@ -27,27 +27,26 @@ macro(proj_version)
${ARGN})
# Set version components
set(${PROJECT_INTERN_NAME}_VERSION_MAJOR ${THIS_VERSION_MAJOR})
set(${PROJECT_INTERN_NAME}_VERSION_MINOR ${THIS_VERSION_MINOR})
set(${PROJECT_INTERN_NAME}_VERSION_PATCH ${THIS_VERSION_PATCH})
set(${PROJECT_NAME}_VERSION_MAJOR ${THIS_VERSION_MAJOR})
set(${PROJECT_NAME}_VERSION_MINOR ${THIS_VERSION_MINOR})
set(${PROJECT_NAME}_VERSION_PATCH ${THIS_VERSION_PATCH})
# Set VERSION string
set(${PROJECT_INTERN_NAME}_VERSION
"${${PROJECT_INTERN_NAME}_VERSION_MAJOR}.\
${${PROJECT_INTERN_NAME}_VERSION_MINOR}.\
${${PROJECT_INTERN_NAME}_VERSION_PATCH}")
set(${PROJECT_NAME}_VERSION
"${${PROJECT_NAME}_VERSION_MAJOR}.\
${${PROJECT_NAME}_VERSION_MINOR}.\
${${PROJECT_NAME}_VERSION_PATCH}")
# Set ABI version string used to name binary output
# On Windows, ABI version is specified using binary file name suffix.
if(WIN32)
set(${PROJECT_INTERN_NAME}_ABI_VERSION
"${${PROJECT_INTERN_NAME}_VERSION_MAJOR}_\
${${PROJECT_INTERN_NAME}_VERSION_MINOR}")
set(${PROJECT_NAME}_ABI_VERSION
"${${PROJECT_NAME}_VERSION_MAJOR}_\
${${PROJECT_NAME}_VERSION_MINOR}")
endif()
message(STATUS "")
boost_report_value(${PROJECT_INTERN_NAME}_VERSION)
print_variable(${PROJECT_NAME}_VERSION)
if(WIN32)
boost_report_value(${PROJECT_INTERN_NAME}_ABI_VERSION)
print_variable(${PROJECT_NAME}_ABI_VERSION)
endif()
endmacro()
......@@ -4,8 +4,8 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
/* Define to 1 if you have the <jni.h> header file. */
#cmakedefine HAVE_JNI_H 1
/* Define to 1 if you have the `dl' library (-ldl). */
#cmakedefine HAVE_LIBDL 1
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
......@@ -40,9 +40,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Enabled for Java/JNI Support */
#cmakedefine JNI_ENABLED 1
/* Name of package */
#cmakedefine PACKAGE "${PACKAGE}"
......
# Version checking for @PROJECT_NAME@
# Version checking for @PROJECT_VARIANT_NAME@
set (PACKAGE_VERSION "@PROJ_VERSION@")
set (PACKAGE_VERSION_MAJOR "@PROJ_VERSION_MAJOR@")
......@@ -22,12 +22,12 @@ else ()
set (CMAKE_CROSSCOMPILING_STR "OFF")
endif ()
if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_NAME@")
if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_VARIANT_NAME@")
# Check package name (in particular, because of the way cmake finds
# package config files, the capitalization could easily be "wrong").
# This is necessary to ensure that the automatically generated
# variables, e.g., <package>_FOUND, are consistently spelled.
set (REASON "package = @PROJECT_NAME@, NOT ${PACKAGE_FIND_NAME}")
set (REASON "package = @PROJECT_VARIANT_NAME@, NOT ${PACKAGE_FIND_NAME}")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
......
# Configure @PROJECT_NAME@
#
# Set
# @PROJECT_NAME@_FOUND = 1
# @PROJECT_NAME@_INCLUDE_DIRS = /usr/local/include
# @PROJECT_NAME@_LIBRARIES = proj
# @PROJECT_NAME@_LIBRARY_DIRS = /usr/local/lib
# @PROJECT_NAME@_BINARY_DIRS = /usr/local/bin
# @PROJECT_NAME@_VERSION = 4.9.1 (for example)
message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
# @PROJECT_NAME@_VERSION is set by version file
message (STATUS
"@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}")
# @PROJECT_VARIANT_NAME@_FOUND = 1
# @PROJECT_VARIANT_NAME@_INCLUDE_DIRS = /usr/local/include
# @PROJECT_VARIANT_NAME@_LIBRARIES = @PROJECT_VARIANT_NAME@::proj
# @PROJECT_VARIANT_NAME@_LIBRARY_DIRS = /usr/local/lib
# @PROJECT_VARIANT_NAME@_BINARY_DIRS = /usr/local/bin
# @PROJECT_VARIANT_NAME@_VERSION = 4.9.1 (for example)
# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
set (@PROJECT_VARIANT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
set (@PROJECT_VARIANT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
set (@PROJECT_VARIANT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj)
set (@PROJECT_VARIANT_NAME@_LIBRARIES @PROJECT_VARIANT_NAME@::proj)
# Read in the exported definition of the library
include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake")
include ("${_DIR}/@PROJECT_LEGACY_LOWER@-targets.cmake")
unset (_ROOT)
unset (_DIR)
if ("@PROJECT_VARIANT_NAME@" STREQUAL "PROJ4")
# For backward compatibility with old releases of libgeotiff
set (@PROJECT_NAME@_INCLUDE_DIR ${@PROJECT_NAME@_INCLUDE_DIRS})
set (@PROJECT_VARIANT_NAME@_INCLUDE_DIR
${@PROJECT_VARIANT_NAME@_INCLUDE_DIRS})
endif ()
This diff is collapsed.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([PROJ], [6.3.1],
AC_INIT([PROJ], [7.0.0],
[https://github.com/OSGeo/PROJ/issues], proj, [https://proj.org])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG(C)
......@@ -20,6 +20,8 @@ AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
dnl Enable as much warnings as possible
AX_CFLAGS_WARN_ALL(C_WFLAGS)
AX_CXXFLAGS_WARN_ALL(CXX_WFLAGS)
......@@ -87,7 +89,6 @@ dnl C++ specific stuff
AC_LANG_PUSH([C++])
AX_CHECK_COMPILE_FLAG([-Wunused-private-field], [CXX_WFLAGS="$CXX_WFLAGS -Wunused-private-field"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CXX_WFLAGS="$CXX_WFLAGS -Wmissing-prototypes"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wmissing-declarations], [CXX_WFLAGS="$CXX_WFLAGS -Wmissing-declarations"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wnon-virtual-dtor], [CXX_WFLAGS="$CXX_WFLAGS -Wnon-virtual-dtor" NO_NON_VIRTUAL_DTOR_FLAG="-Wno-non-virtual-dtor"],,[$ERROR_ON_UNKNOWN_OPTIONS])
AX_CHECK_COMPILE_FLAG([-Wold-style-cast], [WARN_OLD_STYLE_CAST="-Wold-style-cast"],,[$ERROR_ON_UNKNOWN_OPTIONS])
......@@ -169,6 +170,15 @@ AC_SUBST(NO_ZERO_AS_NULL_POINTER_CONSTANT_FLAG,$NO_ZERO_AS_NULL_POINTER_CONSTANT
CFLAGS="${CFLAGS} -fvisibility=hidden"
CXXFLAGS="${CXXFLAGS} -fvisibility=hidden"
case "${host_os}" in
cygwin* | mingw32* | pw32* | beos* | darwin*)
CFLAGS="${CFLAGS} -DNOMINMAX"
CXXFLAGS="${CXXFLAGS} -DNOMINMAX"
;;
*)
;;
esac
dnl Checks for libraries.
save_CFLAGS="$CFLAGS"
CFLAGS=`echo "$CFLAGS" | sed "s/-Werror/ /"`
......@@ -189,60 +199,7 @@ AC_SEARCH_LIBS([sqrt], [m])
AC_CHECK_FUNC(localeconv, [AC_DEFINE(HAVE_LOCALECONV,1,[Define to 1 if you have localeconv])])
AC_CHECK_FUNCS([strerror])
dnl ---------------------------------------------------------------------------
dnl Check for JNI support.
dnl ---------------------------------------------------------------------------
JNI_INCLUDE=
export JNI_INCLUDE
AC_ARG_WITH(jni,
[AS_HELP_STRING([--with-jni=dir],
[Include Java/JNI support, add optional include dir])
],,)
if test "$with_jni" = "yes" ; then
AC_DEFINE(JNI_ENABLED,1,[Enabled for Java/JNI Support])
AC_MSG_CHECKING(whether to enable Java/JNI support)
AC_MSG_RESULT([enabled])
elif test "$with_jni" != "no" -a "$with_jni" != "" ; then
AC_MSG_CHECKING(whether to enable Java/JNI support)
if test \! -r "$with_jni/jni.h" ; then
AC_MSG_ERROR(Did not find $with_jni/jni.h)
fi
AC_DEFINE(JNI_ENABLED,1,[Enabled for Java/JNI Support])
AC_MSG_RESULT([enabled])
JNI_INCLUDE="-I$with_jni"
elif test "$with_jni" = "" ; then
AC_CHECK_HEADERS(jni.h)
AC_MSG_CHECKING(whether to enable Java/JNI support)
if test "$ac_cv_header_jni_h" = "no" ; then
AC_MSG_RESULT([disabled])
else
AC_MSG_RESULT([enabled])
AC_DEFINE(JNI_ENABLED,1,[Enabled for Java/JNI Support])
fi
else
AC_MSG_CHECKING(whether to enable Java/JNI support)
AC_MSG_RESULT([disabled])
fi
AC_SUBST(JNI_INCLUDE,$JNI_INCLUDE)
AC_CHECK_LIB(dl,dladdr,,,)
dnl ---------------------------------------------------------------------------
dnl Provide a mechanism to disable real mutex support (if lacking win32 or
......@@ -294,6 +251,79 @@ if test x"$SQLITE3_CHECK" != x"yes" ; then
AC_MSG_ERROR([Please install sqlite3 binary.])
fi
dnl ---------------------------------------------------------------------------
dnl Check for libtiff
dnl ---------------------------------------------------------------------------
AC_ARG_ENABLE([tiff],
AS_HELP_STRING([--disable-tiff],
[Disable TIFF support. Strongly discouraged !]),
[enable_tiff=no],
[enable_tiff=yes])
if test "x$enable_tiff" = "xyes" -o "x$enable_tiff" = ""; then
if test "x$TIFF_CFLAGS$TIFF_LIBS" = "x" ; then
if $PKG_CONFIG libtiff; then
PKG_CHECK_MODULES([TIFF], [libtiff])
else
PKG_CHECK_MODULES([TIFF], [libtiff-4])
fi
fi
TIFF_ENABLED_FLAGS=-DTIFF_ENABLED
fi
AC_SUBST(TIFF_CFLAGS,$TIFF_CFLAGS)
AC_SUBST(TIFF_LIBS,$TIFF_LIBS)
AC_SUBST(TIFF_ENABLED_FLAGS,$TIFF_ENABLED_FLAGS)
dnl ---------------------------------------------------------------------------
dnl Check for curl
dnl ---------------------------------------------------------------------------
FOUND_CURL=no
CURL_CFLAGS=
CURL_LIB=
AC_ARG_WITH(curl,
[ --with-curl[=ARG] Enable curl support (ARG=path to curl-config.)],,,)
dnl Clear some cache variables
unset ac_cv_path_LIBCURL
if test "`basename xx/$with_curl`" = "curl-config" ; then
LIBCURL_CONFIG="$with_curl"
elif test "$with_curl" = "no" ; then
LIBCURL_CONFIG=no
else
AC_PATH_PROG(LIBCURL_CONFIG, curl-config, not-found)
fi
if test "$LIBCURL_CONFIG" = "not-found" ; then
AC_MSG_ERROR([curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl])
elif test "$LIBCURL_CONFIG" != "no" ; then
CURL_VERNUM=`$LIBCURL_CONFIG --vernum`
CURL_VER=`$LIBCURL_CONFIG --version | awk '{print $2}'`
AC_MSG_RESULT([ found libcurl version $CURL_VER])
AC_CHECK_LIB(curl,curl_global_init,FOUND_CURL=yes,FOUND_CURL=no,`$LIBCURL_CONFIG --libs`)
if test "$FOUND_CURL" = "no" ; then
AC_MSG_ERROR([curl not found. If wanting to do a build without curl support (and thus without built-in networking capability), explictly disable it with --without-curl])
fi
CURL_ENABLED_FLAGS=-DCURL_ENABLED
fi
if test "$FOUND_CURL" = "yes" ; then
CURL_CFLAGS=`$LIBCURL_CONFIG --cflags`
CURL_LIBS=`$LIBCURL_CONFIG --libs`
fi
AC_SUBST(CURL_CFLAGS,$CURL_CFLAGS)
AC_SUBST(CURL_LIBS,$CURL_LIBS)
AC_SUBST(CURL_ENABLED_FLAGS,$CURL_ENABLED_FLAGS)
AM_CONDITIONAL(HAVE_CURL, [test "x$FOUND_CURL" = "xyes"])
dnl ---------------------------------------------------------------------------
dnl Check for external Google Test
dnl ---------------------------------------------------------------------------
......@@ -321,8 +351,7 @@ dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile cmake/Makefile src/Makefile include/Makefile include/proj/Makefile include/proj/internal/Makefile
include/proj/internal/nlohmann/Makefile
test/Makefile test/cli/Makefile test/gie/Makefile test/gigs/Makefile test/unit/Makefile
man/Makefile man/man1/Makefile man/man3/Makefile data/Makefile
jniwrap/Makefile jniwrap/org.osgeo.proj/Makefile jniwrap/org.osgeo.proj/org/Makefile jniwrap/org.osgeo.proj/org/proj4/Makefile])
man/Makefile man/man1/Makefile data/Makefile])
if ! test "x$with_external_gtest" = "xyes" ; then
AC_CONFIG_FILES([test/googletest/Makefile test/googletest/include/Makefile
test/googletest/include/gtest/Makefile
......