Skip to content
Commits on Source (120)
......@@ -14,4 +14,6 @@ Andrea Antonello <andrea.antonello@hydrologis.com>
Charles Karney <charles.karney@sri.com>
Karsten Engsager
Knud Poder
Kristian Evers <kreve@sdfe.dk>
Thomas Knudsen <thokn@sdfe.dk>
Even Rouault <even.rouault@spatialys.com>
......@@ -15,6 +15,24 @@ cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR)
project(PROJ4 C)
set(PROJECT_INTERN_NAME PROJ)
if (NOT CMAKE_VERSION VERSION_LESS 3.1)
cmake_policy(SET CMP0054 NEW)
endif ()
# Set warnings
if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
# Suppress warning 4996 about sprintf, etc., being unsafe
set(CMAKE_C_FLAGS "/wd4996 /WX ${CMAKE_C_FLAGS}")
elseif("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wswitch -Werror \
-Wunused-parameter -Wmissing-prototypes -Wmissing-declarations -Wformat \
-Werror=format-security -Wshadow ${CMAKE_C_FLAGS}")
elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(CMAKE_C_FLAGS "-std=c89 -Wall -Wextra -Wswitch -Werror \
-Wc99-extensions -Wc11-extensions -Wunused-parameter -Wmissing-prototypes \
-Wmissing-declarations -Wformat -Werror=format-security -Wshadow \
-Wfloat-conversion ${CMAKE_C_FLAGS}")
endif()
#################################################################################
# PROJ4 CMake modules
#################################################################################
......@@ -31,9 +49,9 @@ colormsg(_HIBLUE_ "Configuring PROJ:")
#PROJ version information
#################################################################################
include(Proj4Version)
proj_version(MAJOR 4 MINOR 9 PATCH 1)
set(PROJ_API_VERSION "9")
set(PROJ_BUILD_VERSION "9.0.0")
proj_version(MAJOR 5 MINOR 0 PATCH 0)
set(PROJ_API_VERSION "13")
set(PROJ_BUILD_VERSION "13.0.1")
#################################################################################
# Build features and variants
......@@ -43,6 +61,41 @@ include(Proj4Config)
include(Proj4Mac)
include(policies)
#################################################################################
# threading configuration
#################################################################################
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package (Threads)
include(CheckIncludeFiles)
include(CheckSymbolExists)
CHECK_SYMBOL_EXISTS(PTHREAD_MUTEX_RECURSIVE pthread.h HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
if (HAVE_PTHREAD_MUTEX_RECURSIVE_DEFN)
add_definitions(-DHAVE_PTHREAD_MUTEX_RECURSIVE=1)
endif()
include (CheckCSourceCompiles)
if (MSVC)
set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} /WX")
else ()
set (CMAKE_REQUIRED_LIBRARIES m)
set (CMAKE_REQUIRED_FLAGS "${CMAKE_C_FLAGS} -Werror")
endif ()
# Check whether the C99 math function: hypot, atanh, etc. are available.
check_c_source_compiles (
"#include <math.h>
int main() {
int q;
return (int)(hypot(3.0, 4.0) + atanh(0.8) + cbrt(8.0) +
remquo(100.0, 90.0, &q) +
remainder(100.0, 90.0) + copysign(1.0, -0.0));
}\n" C99_MATH)
if (C99_MATH)
add_definitions (-DHAVE_C99_MATH=1)
else ()
add_definitions (-DHAVE_C99_MATH=0)
endif ()
boost_report_value(PROJ_PLATFORM_NAME)
boost_report_value(PROJ_COMPILER_NAME)
......@@ -66,7 +119,7 @@ if(PROJ4_TESTS)
endif(PROJ4_TESTS)
include(Proj4Test)
# Put the libaries and binaries that get built into directories at the
# 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.
......@@ -84,6 +137,7 @@ set(LIBDIR "${DEFAULT_LIBDIR}" CACHE PATH "The directory to install libraries in
set(DATADIR "${DEFAULT_DATADIR}" CACHE PATH "The directory to install data files into.")
set(DOCDIR "${DEFAULT_DOCDIR}" CACHE PATH "The directory to install doc files into.")
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.")
#################################################################################
# Build configured components
......@@ -95,4 +149,5 @@ add_subdirectory(nad)
add_subdirectory(src)
add_subdirectory(man)
add_subdirectory(cmake)
add_subdirectory(test)
2015-12-13: jswhit <https://github.com/jswhit>
* : Add inverse hammer transform (pull request #329).
2015-09-10 sisyphus <https://github.com/sisyphus>
* : Rename PVALUE in pj_param.cto prevent Windows variable name clash
2015-09-10 Bas Couwenberg <https://github.com/sebastic>
* : Don't include files in proj dist, also included in proj-datumgrids
dist #301
2015-09-10 Ture Pålsson <https://github.com/turepalsson>
* : PTHREAD_MUTEX_RECURSIVE detection issue on FreeBSD #303
2015-09-10 Martin Raspaud <https://github.com/mraspaud>
* : Don't return values when doing inverse projections outside of the
mollweide map #304
2015-09-08 Charles Karney <https://github.com/cffk>
* : Update Geodesic library from GeographicLib
* Improve accuracy of calculations by evaluating trigonometric
functions more carefully and replacing the series for the reduced
length with one with a smaller truncation error.
* The allowed ranges for longitudes and azimuths is now unlimited; it
used to be [-540d, 540d).
* Enforce the restriction of latitude to [-90d, 90d] by returning NaNs
if the latitude is outside this range.
* The inverse calculation sets s12 to zero for coincident points at
pole (instead of returning a tiny quantity).
* This commit also includes a work-around for an inaccurate value for
pi/180 in dmstor.c (see the definitions of DEG_IN and DEG_OUT in
geod_interface.c).
2015-09-06 Even Rouault <even.rouault@spatialys.com>
* re-add proj_def.dat which was missing from source distribution
https://github.com/OSGeo/proj.4/issues/274
https://github.com/OSGeo/proj.4/issues/296 and
https://github.com/OSGeo/proj.4/issues/297
2015-07-27 Even Rouault <even.rouault@spatialys.com>
* : Remove setlocale() use in pj_init_ctx(), and replace uses of atof() &
strtod() by their locale safe variants pj_atof() and pj_strtod().
Proj versions from now advertize #define PJ_LOCALE_SAFE 1 in proj_api.h
and export pj_atof() & pj_strtod() (#226)
2015-06-01 Charles Karney <https://github.com/cffk>
Make PJ_aeqd.c use geodesics for inverse and forward projection
modification so that the geodesic structure is not global
https://github.com/OSGeo/proj.4/pull/281
2015-05-25 Elliott Sales de Andrade <https://github.com/QuLogic>
* : Fix inverse stereo projection on an ellipsoid
https://github.com/OSGeo/proj.4/pull/277
2015-02-21 Even Rouault <even.rouault@spatialys.com>
* nad/epsg: regenerate nad/epsg with GDAL r28536 to avoid
precision loss in TOWGS84 parameters, e.g. on Amersfoort / RD
......@@ -161,7 +215,7 @@
* src/cs2cs.c: Support -I when there is no +to projection.
* src/PJ_ob_tran.c: Propogate ctx into sub-projection (#225).
* src/PJ_ob_tran.c: Propagate ctx into sub-projection (#225).
2013-10-03 Frank Warmerdam <warmerdam@pobox.com>
......@@ -239,7 +293,7 @@
* src/geodesic.{c,h}: sync relative to GeographicLib 1.31. (#216)
* src/pj_fileapi.c, etc: Implement a virtual file api accessable
* src/pj_fileapi.c, etc: Implement a virtual file api accessible
through the context for init file and grid shift file access.
* src/mk_cheby.c: reformat, add braces to avoid warnings.
......@@ -361,7 +415,7 @@
2012-02-08 Frank Warmerdam <warmerdam@pobox.com>
* src/pj_apply_gridshift.c: Ensure that one amoung many points
* src/pj_apply_gridshift.c: Ensure that one among many points
falling outside the grid areas will not cause the remainder to not
be datum shifted in a way that is hard to diagnose. (#45)
......@@ -510,7 +564,7 @@
2011-01-11 Frank Warmerdam <warmerdam@pobox.com>
* src/PJ_goode.c: fix propogation of es and ctx to sub-projections.
* src/PJ_goode.c: fix propagation of es and ctx to sub-projections.
2010-10-19 Frank Warmerdam <warmerdam@pobox.com>
......@@ -685,7 +739,7 @@
* src/PJ_gstmerc.c: Correction of a bug in inv() function :
the projected origin coordinates where descaled.
* nad/testIGNF: Add a comment on the mandatory existance of the world grid
* nad/testIGNF: Add a comment on the mandatory existence of the world grid
in order to make the test.
* ChangeLog: this comments
......@@ -880,7 +934,7 @@
* src/projects.h: Ensure that WIN32 is defined on win32 systems.
* src/pj_open_lib.c: support drive letter prefixes on absolute
paths. Support either \ or / as a dir delimeter on windows (bug 1499)
paths. Support either \ or / as a dir delimiter on windows (bug 1499)
2007-03-07 Frank Warmerdam <warmerdam@pobox.com>
......@@ -1013,7 +1067,7 @@ Rel. 4.5.0 2006-04-21
2006-01-12 Frank Warmerdam <warmerdam@pobox.com>
* geocent.c: Make global variables static. Amoung other things
* geocent.c: Make global variables static. Among other things
this avoids conflicts for apps that link in geotrans.
2005-12-04 Frank Warmerdam <warmerdam@pobox.com>
......@@ -1412,7 +1466,7 @@ Rel. 4.4.4 2001/09/15
See http://bugzilla.remotesensing.org/show_bug.cgi?id=17
* nad/epsg: commited new updates with fixed units for us state plane
* nad/epsg: committed new updates with fixed units for us state plane
zones in feet, as reported by Marc-Andre.
2001-08-23 Frank Warmerdam <warmerdam@pobox.com>
......@@ -1653,7 +1707,7 @@ Rel. 4.3.2 94/10/30 Base-line
Thanks to: Alejo Hausner (ah@cs.princeton.edu)
95/9/10
Some minor file/internal name changes to facilitate xport to primative
Some minor file/internal name changes to facilitate xport to primitive
systems. Documented entries unchanged.
Rel. 4.3.1 94/2/16 Base-line
......@@ -1740,7 +1794,7 @@ Rel. 4.2.2 93/9/30 Base-line
DOS distribution.
93/11/28
Added "Final" figure line to begining of -V option ouput. Allows
Added "Final" figure line to beginning of -V option output. Allows
user to see results of +ellps and +R_V, etc. arguments. "Feature,"
not an error. Mod to proj.c.
......@@ -1839,7 +1893,7 @@ Rel. 4.1.3 93/4/15 Base-line
93/8/19
Minor general corrections.
Added nadcon conversion procedures and nad2nad program.
Projects.h modified to reflect nadcon prototypes and stuctures.
Projects.h modified to reflect nadcon prototypes and structures.
pj_open_lib extracted from pj_init and made global for use in nad_init.
93/8/25
......
SUBDIRS = src man nad jniwrap cmake
SUBDIRS = src man nad jniwrap cmake test
EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt
......
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
......@@ -81,19 +81,19 @@ host_triplet = @host@
subdir = .
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) mkinstalldirs \
$(srcdir)/proj.pc.in COPYING compile config.guess config.sub \
depcomp install-sh missing ltmain.sh ltconfig
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/proj.pc.in COPYING config.guess config.sub depcomp \
install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/proj_config.h
CONFIG_CLEAN_FILES = proj.pc
CONFIG_CLEAN_VPATH_FILES =
......@@ -265,7 +265,6 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -289,6 +288,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
......@@ -342,7 +342,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src man nad jniwrap cmake
SUBDIRS = src man nad jniwrap cmake test
EXTRA_DIST = makefile.vc nmake.opt CMakeLists.txt
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = proj.pc
......@@ -353,7 +353,7 @@ all: all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
......@@ -380,9 +380,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
proj.pc: $(top_builddir)/config.status $(srcdir)/proj.pc.in
......@@ -605,16 +605,10 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
......@@ -655,10 +649,9 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
......
5.0.0 Release Notes
-------------------
This version of PROJ introduces some significant extensions and
improvements to (primarily) the geodetic functionality of the system.
The main driver for introducing the new features is the emergence of
dynamic reference frames, the increasing use of high accuracy GNNS,
and the related growing demand for accurate coordinate
transformations. While older versions of PROJ included some geodetic
functionality, the new framework lays the foundation for turning PROJ
into a generic geospatial coordinate transformation engine.
The core of the library is still the well established projection code.
The new functionality is primarily exposed in a new programming
interface and a new command line utility, "cct" (for "Coordinate
Conversion and Transformation"). The old programming interface is
still available and can - to some extent - use the new geodetic
transformation features.
The internal architecture has also seen many changes and much
improvement. So far, these improvements respect the existing
programming interface. But the process has revealed a need to simplify
and reduce the code base, in order to support sustained active
development.
!!!
!!! Therefore we have scheduled regular releases over the coming years
!!! which will gradually remove the old programming interface.
!!!
!!! This will cause breaking changes with the next two major version
!!! releases, which will affect all projects that depend on PROJ
!!! (cf. section "deprecations" below).
!!!
The decision to break the existing API has not been easy, but has
ultimately been deemed necessary to ensure the long term survival of
the project. Not only by improving the maintainability immensely, but
also by extending the potential user (and hence developer) community.
The end goal is to deliver a generic coordinate transformation
software package with a clean and concise code base appealing to
both users and developers.
VERSIONING AND NAMING
---------------------
For the first time in more than 25 years the major version number of
the software is changed. The decision to do this is based on the many
new features and new API. While backwards compatibility remains -
except in a few rare corner cases - the addition of a new and improved
programming interface warrants a new major release.
The new major version number unfortunately leaves the project in a bit
of a conundrum regarding the name. For the majority of the life-time
of the product it has been known as PROJ.4, but since we have now
reached version 5 the name is no longer aligned with the version
number.
Hence we have decided to decouple the name from the version number and
from this version and onwards the product will simply be called PROJ.
In recognition of the history of the software we are keeping PROJ.4 as
the *name of the organizing project*. The same project team also
produces the datum-grid package.
In summary:
o The PROJ.4 project provides the product PROJ, which is now at
version 5.0.0.
o The foundational component of PROJ is the library libproj.
o Other PROJ components include the application proj, which provides
a command line interface to libproj.
o The PROJ.4 project also distributes the datum-grid package,
which at the time of writing is at version 1.6.0.
UPDATES
-------
o Introduced new API in proj.h.
- The new API is orthogonal to the existing proj_api.h API and the
internally used projects.h API.
- The new API adds the ability to transform spatiotemporal (4D)
coordinates.
- Functions in the new API use the "proj_" namespace.
- Data types in the new API use the "PJ_" namespace, with a few
historic exceptions such as XY, XYZ, LP and LPZ.
o Introduced the concept of "transformation pipelines" that makes it
possible to do complex geodetic transformations of spatiotemporal
coordinates by daisy chaining simple coordinate operations.
o Introduced cct, the Coordinate Conversion and Transformation
application.
o Introduced gie, the Geospatial Integrity Investigation Environment.
- Selftest invoked by -C flag in proj has been removed
- Ported approx. 1300 built-in selftests to gie format
- Ported approx. 1000 tests from the gigs test framework
- Added approx. 200 new tests
o Adopted terminology from the OGC/ISO-19100 geospatial standards
series. Key definitions are:
- At the most generic level, a *coordinate operation* is a change
of coordinates, based on a one-to-one relationship, from one
coordinate reference system to another.
- A *transformation* is a coordinate operation in which the two
coordinate reference systems are based on different datums, e.g.
a change from a global reference frame to a regional frame.
- A *conversion* is a coordinate operation in which both
coordinate reference systems are based on the same datum,
e.g. change of units of coordinates.
- A *projection* is a coordinate conversion from an ellipsoidal
coordinate system to a plane. Although projections are simply
conversions according to the standard, they are treated as
separate entities in PROJ as they make up the vast majority
of operations in the library.
o New operations:
- The pipeline operator (pipeline)
- Transformations:
+ Helmert transform (helmert)
+ Horner real and complex polynomial evaluation (horner)
+ Horizontal gridshift (hgridshift)
+ Vertical gridshift (vgridshift)
+ Molodensky transform (molodensky)
+ Kinematic gridshift with deformation model (deformation)
- Conversions:
+ Unit conversion (unitconvert)
+ Axis swap (axisswap)
- Projections:
+ Central Conic projection (ccon)
o Significant documentation updates, including
- Overhaul of the structure of the documentation
- A better introduction to the use of PROJ
- A complete reference to the new proj.h API
- a complete rewrite of the section on geodesic calculations
- Figures for all projections
o New "free format" option for operation definitions, which
permits separating tokens by whitespace when specifying key/value-
pairs, e.g. "proj = merc lat_0 = 45".
o Added metadata to init-files that can be read with the
proj_init_info() function in the new proj.h API.
o Added ITRF2000, ITRF2008 and ITRF2014 init-files with ITRF
transformation parameters, including plate motion model
parameters.
o Added ellipsoid parameters for GSK2011, PZ90 and "danish". The
latter is similar to the already supported andrae ellipsoid,
but has a slightly different semimajor axis.
o Added Copenhagen prime meridian.
o Updated EPSG database to version 9.2.0.
o Geodesic library updated to version 1.49.1-c.
o Support for analytical partial derivatives has been removed.
o Improved performance in Winkel Tripel and Aitoff.
o Introduced pj_has_inverse() function to proj_api.h. Checks if an
operation has an inverse. Use this instead of checking whether
P->inv exists, since that can no longer be relied on.
o Removed support for Windows CE.
o Removed the VB6 COM interface.
BUG FIXES
------------
All bug fix numbers refer to issues indexed at
https://github.com/OSGeo/proj.4/issues/
o Fixed incorrect convergence calculation in Lambert Conformal
Conic. #16.
o Handle ellipsoid parameters correctly when using +nadgrids=@null.
#22.
o Return correct latitude when using negative northings in
Transverse Mercator (tmerc). #138.
o Return correct result at origin in inverse Mod. Stererographic
of Alaska. #161.
o Return correct result at origin in inverse Mod. Stererographic
of 48 U.S. #162.
o Return correct result at origin in inverse Mod. Stererographic
of 50 U.S. #163.
o Return correct result at origin in inverse Lee Oblated
Stereographic. #164.
o Return correct result at origin in inverse Miller Oblated
Stereographic. #164.
o Fixed scaling and wrap-around issues in Oblique Cylindrical
Equal Area. #166.
o Corrected a coefficient error in inverse Transverse Mercator. #174.
o Respect -r flag when calling proj with -V. #184.
o Remove multiplication by 2 at the equator error in Stereographic
projection. #194.
o Allow +alpha=0 and +gamma=0 when using Oblique Mercator. #195.
o Return correct result of inverse Oblique Mercator when alpha is
between 90 and 270. #331.
o Avoid segmentation fault when accessing point outside grid. #369.
o Avoid segmentation fault on NaN input in Robin inverse. #463.
o Very verbose use of proj (-V) on Windows is fixed. #484.
o Fixed memory leak in General Oblique Transformation. #497.
o Equations for meridian convergence and partial derivatives have
been corrected for non-conformal projections. #526.
o Fixed scaling of cartesian coordiantes in pj_transform(). #726.
o Additional bug fixes courtesy of Googles OSS-Fuzz program:
https://bugs.chromium.org/p/oss-fuzz/issues/list?can=1&q=proj4
DEPRECATIONS
------------
o The projects.h header and the functions related to it is
considered deprecated from version 5.0.0 and onwards.
!!! PROJECTS.H WILL BE REMOVED FROM THE LIBRARY !!!
!!! WITH VERSION 6.0.0 !!!
o The nmake build system on Windows will not be supported from
version 6.0.0 on onwards. Use CMake instead.
!!! NMAKE BUILD SYSTEM WILL BE REMOVED FROM THE LIBRARY !!!
!!! WITH VERSION 6.0.0 !!!
o The proj_api.h header and the functions related to it is
consided deprecated from version 5.0.0 and onwards.
!!! PROJ_API.H WILL BE REMOVED FROM THE LIBRARY !!!
!!! WITH VERSION 7.0.0 !!!
THANKS TO
------------
Version 5.0.0 is made possible by the following contributors:
Lukasz Komsta
Maxim Churilin
edechaux
dusanjovic
Zoltan Siki
Tom Fili
Nicolas David
Mike Toews
Micah Cochran
Luke Campbell
Ilya Oshchepkov
Adam Wulkiewicz
Jonas Tittmann
Mateusz Loskot
Etienne Jacques
Bas Couwenberg
Elliott Sales de Andrade
Charles Karney
Aaron Puchert
Julien Moquet
Charles Karney
Howard Butler
Even Rouault
Thomas Knudsen
Kristian Evers
4.9.3 Release Notes
-------------------
o UTM now uses etmerc, following NGA recommendations. Tests adjusted
for tiny changes in values.
o new projections: Times, Natural Earth II, Compact Miller, Patterson
Cylindrical, and inverse for Hammer and Eckert-Greifendorff.
o runtime self tests are now opt-in instead of opt-out
o math constants moved to projects.h
o bugfixes
o New (optional) runtime self tests added to proj
4.9.2 Release Notes
-------------------
o proj_def.dat was missing from source distribution
see https://github.com/OSGeo/proj.4/issues/274 for more detail
o Update Geodesic library from GeographicLib
o Remove setlocale() use in pj_init_ctx()
o Renamed PVALUE in pj_param.c to prevent clash with Windows
4.9.1 Release Notes
-------------------
......
-------------------- P R O J . 4 --------------------
-------------------- P R O J --------------------
This is Release 4.4 of cartographic projection software.
PROJ is a generic coordinate transformation software, that transforms
coordinates from one coordinate reference system (CRS) to another. This
includes cartographic projections as well as geodetic transformations.
PLEASE read the following information as well as READMEs in the src
and nad directories.
For more information on the PROJ.4 project please see the web page at:
For more information on PROJ.4 maintenance please see the web page at:
http://proj4.org/
http://www.remotesensing.org/proj
or
http://proj.maptools.org/
The PROJ.4 mailing list can be found at:
---------------------------------------------------
http://lists.maptools.org/mailman/listinfo/proj
Installation:
-------------
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
- 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.
UNIX/Linux build and installation:
---------------------------------
FSF's configuration procedure is used to ease installation of the
PROJ.4 system.
PROJ system.
The default destination path prefix for installed files is /usr/local.
Results from the installation script will be placed into subdirectories
......@@ -40,17 +51,17 @@ After executing configure, execute:
The install target will create, if necessary, all required sub-directories.
Windows Build
-------------
PROJ.4 can be built with Microsoft Visual C/C++ using the makefile.vc
Windows build and installation:
-------------------------------
PROJ can be built with Microsoft Visual C/C++ using the makefile.vc
in the PROJ directory. First edit the PROJ\nmake.opt and modify
the INSTDIR value at the top to point to the directory where
the PROJ tree shall be installed. If you want to install into
C:\PROJ, it can remain unchanged.
Then use the makefile.vc to build the software:
Then use the makefile.vc to build the software e.g.:
eg.
C:\> cd proj
C:\PROJ> nmake /f makefile.vc
C:\PROJ> nmake /f makefile.vc install-all
......@@ -61,70 +72,17 @@ of the Visual C++ tree.
The makefile.vc builds proj.exe, proj.dll and proj.lib.
It should also be possible to build using the Unix instructions
and Cygwin32, but this hasn't been tested recently.
---------------------------------------------------
Distribution files and format.
------------------------------
Sources are distributed in one or more files. The principle elements
of the system are in a compress tar file named `PROJ.4.x.tar.gz' where
"x" will indicate level.sub-level of the release. For U.S. users
interested in NADCON datum shifting procedures, additional files
containing conversion matricies are distributed with the name
`PROJ.4.x.y.tar' where y is an uppercase letter starting with "A."
These supplementary files will contain compressed files and thus
the tar file is not compressed.
Interim reports on Rel. 4 proj are available in PostScript form as
*.ps.gz . New and old users are strongly recommended to carefully read
these manuals. They are supplements and NOT a replacement for the full
manual OF 90-284 (which new users should also obtain).
---------------------------------------------------
Principle new aspects of system:
--------------------------------
ANSI X3.159-1989 C code. Site must have ANSI C compiler and header files.
Several method of determining radius from specified ellipsoid.
Use of initialization files through +init=file:key. Default projection
specifications also may be defined in an ASCII file.
+inv option REMOVED and -I may be used in its place. Use of invproj
alias of proj still functions as per Rel.3.
+ellps=list and +proj=list REMOVED. Use respective -le and -lp.
+units= to specify cartesian coordinate system units. To get list
use -lu.
-v added to dump final cartographic parameters employed.
Addition of computing scale factors and angular distortion added through
-S option. Valuable for designing new projection parameter details.
-V option which verbosely lists projected point characteristics.
Programmers may use projection library with calls to pj_init,
pj_fwd, pj_inv and pj_transform.
Program nad2nad for conversion of data to and from NAD27 and NAD83
datums.
Program cs2cs for converting between coordinate systems, with optional
datum translation.
-------------------------------------------------------------
Things currently left undone:
----------------------------
proj_def.dat NOT fully in place. Needs additional settings for
many of the projections. Probably will not be completed until main
manual rewritten.
of the system are in a compress tar file named `PROJ-x.y.z.tar.gz' where
"x" will indicate major release number, "y" indicates minor release
number and "z" indicates the patch number of the release.
In addition to the PROJ software package, a distribution of datum
conversion grid files is also available. The grid package is
distributed under the name `PROJ-datumgrid-x.y.zip', where "x" is the
major release version and "y" the minor release version numbers. The
grid package can be downloaded from the PROJ.4 website.
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
......@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.14'
[am__api_version='1.13'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.14.1], [],
m4_if([$1], [1.13.4], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.14.1])dnl
[AM_AUTOMAKE_VERSION([1.13.4])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
......@@ -418,12 +418,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
......@@ -532,48 +526,7 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
......@@ -581,6 +534,7 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
......@@ -642,42 +596,6 @@ fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
# Default is to disable them, unless 'enable' is passed literally.
# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
[enable], [m4_define([am_maintainer_other], [disable])],
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
am_maintainer_other[ make rules and dependencies not useful
(and sometimes confusing) to the casual installer])],
[USE_MAINTAINER_MODE=$enableval],
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
AC_SUBST([MAINT])dnl
]
)
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
......@@ -827,70 +745,6 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
......
......@@ -2,13 +2,7 @@
# ${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.)
if (NOT WIN32)
set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
set (PROJECT_ROOT_DIR "../../..")
else ()
set (INSTALL_CMAKE_DIR "cmake")
set (PROJECT_ROOT_DIR "..")
endif ()
file(RELATIVE_PATH PROJECT_ROOT_DIR ${CMAKE_INSTALL_PREFIX}/${CMAKECONFIGDIR} ${CMAKE_INSTALL_PREFIX})
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
configure_file (project-config.cmake.in project-config.cmake @ONLY)
......@@ -16,14 +10,14 @@ configure_file (project-config-version.cmake.in
project-config-version.cmake @ONLY)
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
DESTINATION "${CMAKECONFIGDIR}"
RENAME "${PROJECT_NAME_LOWER}-config.cmake")
install (FILES
"${CMAKE_CURRENT_BINARY_DIR}/project-config-version.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}"
DESTINATION "${CMAKECONFIGDIR}"
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
# Make information about the cmake targets (the library and the tools)
# available.
install (EXPORT targets
FILE ${PROJECT_NAME_LOWER}-targets.cmake
DESTINATION "${INSTALL_CMAKE_DIR}")
DESTINATION "${CMAKECONFIGDIR}")
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.13.4 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
......@@ -78,16 +78,15 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = cmake
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/mkinstalldirs
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cflags_warn_all.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.in
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/proj_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
......@@ -153,7 +152,6 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
......@@ -177,6 +175,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
THREAD_LIB = @THREAD_LIB@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
......@@ -247,7 +246,7 @@ EXTRA_DIST = CMakeLists.txt \
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
......@@ -272,9 +271,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
......
......@@ -9,6 +9,7 @@
################################################################################
include (CheckIncludeFiles)
include (CheckLibraryExists)
include (CheckFunctionExists)
# check needed include file
check_include_files (dlfcn.h HAVE_DLFCN_H)
......@@ -23,6 +24,8 @@ check_include_files (sys/types.h HAVE_SYS_TYPES_H)
check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
# check libm need on unix
check_library_exists(m ceil "" HAVE_LIBM)
......
......@@ -15,19 +15,29 @@ endif(UNIX)
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH "Foo install
SET(CMAKE_INSTALL_PREFIX ${DEFAULT_PROJ_ROOT_DIR} CACHE PATH "Proj.4 install
prefix" FORCE)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
#TODO
# for data install testing the PROJ_LIB envVar
string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
if(WIN32)
set(DEFAULT_BIN_SUBDIR bin)
set(DEFAULT_LIB_SUBDIR local/lib)
set(DEFAULT_DATA_SUBDIR share)
set(DEFAULT_INCLUDE_SUBDIR local/include)
set(DEFAULT_DOC_SUBDIR share/doc/proj)
set(DEFAULT_CMAKE_SUBDIR local/lib/cmake/${PROJECT_NAME_LOWER})
elseif(UNIX)
include(GNUInstallDirs)
set(DEFAULT_BIN_SUBDIR ${CMAKE_INSTALL_BINDIR})
set(DEFAULT_LIB_SUBDIR ${CMAKE_INSTALL_LIBDIR})
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})
else()
# Common locatoins for Unix and Mac OS X
set(DEFAULT_BIN_SUBDIR bin)
......@@ -35,9 +45,11 @@ else()
set(DEFAULT_DATA_SUBDIR share/proj)
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})
endif()
# Locations are changeable by user to customize layout of PDAL installation
# Locations are changeable by user to customize layout of Proj.4 installation
# (default values are platform-specific)
set(PROJ_BIN_SUBDIR ${DEFAULT_BIN_SUBDIR} CACHE STRING
"Subdirectory where executables will be installed")
......@@ -48,7 +60,9 @@ set(PROJ_INCLUDE_SUBDIR ${DEFAULT_INCLUDE_SUBDIR} CACHE STRING
set(PROJ_DATA_SUBDIR ${DEFAULT_DATA_SUBDIR} CACHE STRING
"Subdirectory where data will be installed")
set(PROJ_DOC_SUBDIR ${DEFAULT_DOC_SUBDIR} CACHE STRING
"Subdirectory where data will be installed")
"Subdirectory where doc will be installed")
set(PROJ_CMAKE_SUBDIR ${DEFAULT_CMAKE_SUBDIR} CACHE STRING
"Subdirectory where cmake proj4-config file will be installed")
# Mark *DIR variables as advanced and dedicated to use by power-users only.
mark_as_advanced(PROJ_ROOT_DIR
......@@ -56,12 +70,14 @@ mark_as_advanced(PROJ_ROOT_DIR
PROJ_LIB_SUBDIR
PROJ_INCLUDE_SUBDIR
PROJ_DATA_SUBDIR
PROJ_DOC_SUBDIR )
PROJ_DOC_SUBDIR
PROJ_CMAKE_SUBDIR )
set(DEFAULT_BINDIR "${PROJ_BIN_SUBDIR}")
set(DEFAULT_LIBDIR "${PROJ_LIB_SUBDIR}")
set(DEFAULT_DATADIR "${PROJ_DATA_SUBDIR}")
set(DEFAULT_DOCDIR "${PROJ_DOC_SUBDIR}")
set(DEFAULT_INCLUDEDIR "${PROJ_INCLUDE_SUBDIR}")
set(DEFAULT_CMAKEDIR "${PROJ_CMAKE_SUBDIR}")
......@@ -15,8 +15,7 @@ endif(APPLE)
set(PROJ_RESOURCES "" )
if(APPLE)
option(BUILD_FRAMEWORKS_AND_BUNDLE "if set to ON, build a library framework and application bundle,
otherwise install classical UNIX bin/lib" OFF )
option(BUILD_FRAMEWORKS_AND_BUNDLE "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)
......
......@@ -50,6 +50,12 @@ if(WIN32)
if(MSVC_VERSION EQUAL 1800)
set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
endif()
if(MSVC_VERSION EQUAL 1900) # CMake 3.1+
set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015
endif()
if(MSVC_VERSION GREATER 1900 AND MSVC_VERSION LESS 1920) # CMake 3.8+
set(PROJ_COMPILER_NAME "msvc-14.1") #Visual Studio 2017
endif()
endif(MSVC)
if(MINGW)
......
......@@ -15,9 +15,9 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
endif(EXISTS ${GRID_FULLNAME})
endif(ARGV2)
if( CMAKE_MINOR_VERSION LESS 8 OR CMAKE_PATCH_VERSION LESS 4 )
if( CMAKE_VERSION VERSION_LESS 2.8.4 )
set(TEST_OK 0)
message(STATUS "test with bash script need a cmake version > 2.8.3 ")
message(STATUS "test with bash script need a cmake version >= 2.8.4")
endif()
if(${TEST_OK})
......@@ -30,3 +30,16 @@ function(proj_add_test_script_sh SH_NAME BIN_USE)
endif(UNIX)
endfunction()
function(proj_add_gie_test TESTNAME TESTCASE)
set(GIE_BIN "gie")
set(TESTFILE ${CMAKE_SOURCE_DIR}/test/${TESTCASE})
add_test( NAME ${TESTNAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${GIE_BIN}
${TESTFILE}
)
endfunction()
if (CMAKE_MAJOR_VERSION GREATER 2)
cmake_policy(SET CMP0022 OLD) # interface link libraries
cmake_policy(SET CMP0042 NEW) # osx rpath
cmake_policy(SET CMP0011 NEW) # policy setting
endif()
......@@ -10,6 +10,9 @@
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
/* Define to 1 if you have localeconv */
#cmakedefine HAVE_LOCALECONV 1
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2015-02-21'
timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -24,12 +24,12 @@ timestamp='2015-02-21'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
#
# Please send patches to <config-patches@gnu.org>.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
me=`echo "$0" | sed -e 's,.*/,,'`
......@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
;;
esac
......@@ -168,10 +168,8 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || \
echo unknown)`
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
case "${UNAME_MACHINE_ARCH}" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
......@@ -581,9 +579,8 @@ EOF
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
......@@ -829,7 +826,7 @@ EOF
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
*:MSYS*:*)
i*:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
......@@ -972,10 +969,10 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
or1k:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
or32:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
......@@ -1263,7 +1260,6 @@ EOF
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
......@@ -1275,15 +1271,6 @@ EOF
esac
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
......@@ -1374,6 +1361,154 @@ EOF
exit ;;
esac
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
#endif
main ()
{
#if defined (sony)
#if defined (MIPSEB)
/* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
"4"
#else
""
#endif
); exit (0);
#endif
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
printf ("m68k-hp-bsd\n"); exit (0);
#endif
#if defined (NeXT)
#if !defined (__ARCHITECTURE__)
#define __ARCHITECTURE__ "m68k"
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
#if defined (MULTIMAX) || defined (n16)
#if defined (UMAXV)
printf ("ns32k-encore-sysv\n"); exit (0);
#else
#if defined (CMU)
printf ("ns32k-encore-mach\n"); exit (0);
#else
printf ("ns32k-encore-bsd\n"); exit (0);
#endif
#endif
#endif
#if defined (__386BSD__)
printf ("i386-pc-bsd\n"); exit (0);
#endif
#if defined (sequent)
#if defined (i386)
printf ("i386-sequent-dynix\n"); exit (0);
#endif
#if defined (ns32000)
printf ("ns32k-sequent-dynix\n"); exit (0);
#endif
#endif
#if defined (_SEQUENT_)
struct utsname un;
uname(&un);
if (strncmp(un.version, "V2", 2) == 0) {
printf ("i386-sequent-ptx2\n"); exit (0);
}
if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
printf ("i386-sequent-ptx1\n"); exit (0);
}
printf ("i386-sequent-ptx\n"); exit (0);
#endif
#if defined (vax)
# if !defined (ultrix)
# include <sys/param.h>
# if defined (BSD)
# if BSD == 43
printf ("vax-dec-bsd4.3\n"); exit (0);
# else
# if BSD == 199006
printf ("vax-dec-bsd4.3reno\n"); exit (0);
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# endif
# else
printf ("vax-dec-bsd\n"); exit (0);
# endif
# else
printf ("vax-dec-ultrix\n"); exit (0);
# endif
#endif
#if defined (alliant) && defined (i860)
printf ("i860-alliant-bsd\n"); exit (0);
#endif
exit (1);
}
EOF
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
{ echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
if [ -x /usr/convex/getsysinfo ]
then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
c34*)
echo c34-convex-bsd
exit ;;
c38*)
echo c38-convex-bsd
exit ;;
c4*)
echo c4-convex-bsd
exit ;;
esac
fi
cat >&2 <<EOF
$0: unable to guess system type
......
#! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2015 Free Software Foundation, Inc.
# Copyright 1992-2013 Free Software Foundation, Inc.
timestamp='2015-01-01'
timestamp='2013-04-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
......@@ -25,7 +25,7 @@ timestamp='2015-01-01'
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>.
# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
......@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2015 Free Software Foundation, Inc.
Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
......@@ -257,15 +257,14 @@ case $basic_machine in
| avr | avr32 \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv | ft32 \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
......@@ -283,10 +282,8 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
......@@ -298,11 +295,11 @@ case $basic_machine in
| nds32 | nds32le | nds32be \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| open8 \
| or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
......@@ -313,7 +310,6 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| we32k \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
......@@ -328,10 +324,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
......@@ -379,7 +372,7 @@ case $basic_machine in
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | cydra-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
......@@ -388,7 +381,6 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
......@@ -408,10 +400,8 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
......@@ -423,7 +413,6 @@ case $basic_machine in
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
......@@ -441,7 +430,6 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
......@@ -779,9 +767,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
......@@ -809,7 +794,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
......@@ -837,10 +822,6 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos)
basic_machine=i386-pc
os=-msdos
......@@ -849,7 +830,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
basic_machine=i386-pc
os=-msys
;;
mvs)
......@@ -1025,7 +1006,7 @@ case $basic_machine in
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
......@@ -1386,14 +1367,14 @@ case $os in
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
......@@ -1565,9 +1546,6 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
......@@ -1611,6 +1589,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
or1k-*)
os=-elf
;;
or32-*)
os=-coff
;;
......