From 22d9b162d27595b2affc98b877ae518878a8482c Mon Sep 17 00:00:00 2001
From: chrisbeall
Date: Sat, 18 May 2019 20:51:00 -0700
Subject: [PATCH 1/3] Fix more clang issues with FactorIndices
---
gtsam_unstable/nonlinear/tests/testBatchFixedLagSmoother.cpp | 2 +-
.../nonlinear/tests/testIncrementalFixedLagSmoother.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gtsam_unstable/nonlinear/tests/testBatchFixedLagSmoother.cpp b/gtsam_unstable/nonlinear/tests/testBatchFixedLagSmoother.cpp
index 20a7beff5..a4811abd8 100644
--- a/gtsam_unstable/nonlinear/tests/testBatchFixedLagSmoother.cpp
+++ b/gtsam_unstable/nonlinear/tests/testBatchFixedLagSmoother.cpp
@@ -216,7 +216,7 @@ TEST( BatchFixedLagSmoother, Example )
Timestamps emptyNewTimestamps;
size_t factorIndex = 6; // any index that does not break connectivity of the graph
- FastVector factorToRemove;
+ FactorIndices factorToRemove;
factorToRemove.push_back(factorIndex);
const NonlinearFactorGraph smootherFactorsBeforeRemove = smoother.getFactors();
diff --git a/gtsam_unstable/nonlinear/tests/testIncrementalFixedLagSmoother.cpp b/gtsam_unstable/nonlinear/tests/testIncrementalFixedLagSmoother.cpp
index ab6c1298a..8d99ed482 100644
--- a/gtsam_unstable/nonlinear/tests/testIncrementalFixedLagSmoother.cpp
+++ b/gtsam_unstable/nonlinear/tests/testIncrementalFixedLagSmoother.cpp
@@ -206,7 +206,7 @@ TEST( IncrementalFixedLagSmoother, Example )
Timestamps emptyNewTimestamps;
size_t factorIndex = 25; // any index that does not break connectivity of the graph
- FastVector factorToRemove;
+ FactorIndices factorToRemove;
factorToRemove.push_back(factorIndex);
const NonlinearFactorGraph smootherFactorsBeforeRemove = smoother.getFactors();
From ba09d5d676f5b536e7edc5bcbe1d5a8f8393771b Mon Sep 17 00:00:00 2001
From: chrisbeall
Date: Sat, 18 May 2019 20:52:21 -0700
Subject: [PATCH 2/3] Fix GeographicLib configuration when
GTSAM_INSTALL_GEOGRAPHICLIB is toggled from ON to OFF, or when
system-installed copy disappears.
---
gtsam/3rdparty/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gtsam/3rdparty/CMakeLists.txt b/gtsam/3rdparty/CMakeLists.txt
index 6ca7514ac..9a99bdba8 100644
--- a/gtsam/3rdparty/CMakeLists.txt
+++ b/gtsam/3rdparty/CMakeLists.txt
@@ -41,6 +41,10 @@ add_subdirectory(ceres)
# add_subdirectory (tools)
# Find GeographicLib using the find script distributed with it
+unset(GEOGRAPHICLIB_FOUND CACHE)
+unset(GeographicLib_INCLUDE_DIRS CACHE)
+unset(GeographicLib_LIBRARIES CACHE)
+unset(GeographicLib_LIBRARY_DIRS CACHE)
include(GeographicLib/cmake/FindGeographicLib.cmake)
# Set up the option to install GeographicLib
From c5488c7568e192a85759b9604890609441537968 Mon Sep 17 00:00:00 2001
From: chrisbeall
Date: Sat, 18 May 2019 21:07:00 -0700
Subject: [PATCH 3/3] Upgrade to GeographicLib 1.49 - Apple clang was no longer
happy with 32bit config flags. Fixed in version 1.48.
---
gtsam/3rdparty/GeographicLib/00README.txt | 166 +-
gtsam/3rdparty/GeographicLib/AUTHORS | 7 +-
gtsam/3rdparty/GeographicLib/CMakeLists.txt | 531 +-
gtsam/3rdparty/GeographicLib/INSTALL | 2 +-
gtsam/3rdparty/GeographicLib/LICENSE.txt | 5 +-
gtsam/3rdparty/GeographicLib/Makefile.am | 39 +-
gtsam/3rdparty/GeographicLib/Makefile.in | 382 +-
gtsam/3rdparty/GeographicLib/Makefile.mk | 21 +-
gtsam/3rdparty/GeographicLib/NEWS | 1105 +-
gtsam/3rdparty/GeographicLib/README.md | 11 +
gtsam/3rdparty/GeographicLib/aclocal.m4 | 533 +-
.../GeographicLib/cmake/CMakeLists.txt | 39 +-
.../cmake/FindGeographicLib.cmake | 23 +-
.../3rdparty/GeographicLib/cmake/Makefile.in | 127 +-
.../cmake/project-config-version.cmake.in | 37 +-
.../cmake/project-config.cmake.in | 26 +-
.../GeographicLib/cmake/project.pc.in | 14 +
gtsam/3rdparty/GeographicLib/compile | 347 +
gtsam/3rdparty/GeographicLib/config.guess | 349 +-
gtsam/3rdparty/GeographicLib/config.sub | 125 +-
gtsam/3rdparty/GeographicLib/configure | 4255 ++++----
gtsam/3rdparty/GeographicLib/configure.ac | 62 +-
gtsam/3rdparty/GeographicLib/depcomp | 456 +-
.../3rdparty/GeographicLib/doc/CMakeLists.txt | 110 +-
.../GeographicLib/doc/GeographicLib.dox | 5574 ----------
.../GeographicLib/doc/GeographicLib.dox.in | 9147 +++++++++++++++++
gtsam/3rdparty/GeographicLib/doc/Makefile.am | 76 +-
gtsam/3rdparty/GeographicLib/doc/Makefile.in | 201 +-
gtsam/3rdparty/GeographicLib/doc/Makefile.mk | 8 -
.../GeographicLib/doc/NETGeographicLib.dox | 41 +-
.../3rdparty/GeographicLib/doc/doxyfile-c.in | 50 +-
.../GeographicLib/doc/doxyfile-for.in | 53 +-
.../GeographicLib/doc/doxyfile-net.in | 50 +-
gtsam/3rdparty/GeographicLib/doc/doxyfile.in | 56 +-
.../3rdparty/GeographicLib/doc/geodesic-c.dox | 222 +-
.../GeographicLib/doc/geodesic-for.dox | 188 +-
.../GeographicLib/doc/geodseries30.html | 45 +-
.../3rdparty/GeographicLib/doc/index.html.in | 6 +-
.../doc/normal-gravity-potential-1.svg | 170 +
.../doc/scripts/GeographicLib/DMS.js | 364 -
.../doc/scripts/GeographicLib/Geodesic.js | 1019 --
.../doc/scripts/GeographicLib/GeodesicLine.js | 294 -
.../doc/scripts/GeographicLib/Interface.js | 257 -
.../doc/scripts/GeographicLib/Math.js | 172 -
.../doc/scripts/GeographicLib/PolygonArea.js | 241 -
.../GeographicLib/doc/scripts/geod-calc.html | 471 -
.../doc/scripts/geod-google-instructions.html | 118 -
.../doc/scripts/geod-google.html | 226 -
.../GeographicLib/doc/tmseries30.html | 11 +-
.../GeographicLib/doc/utilities.html.in | 6 +-
gtsam/3rdparty/GeographicLib/doc/vptree.gif | Bin 0 -> 175551 bytes
.../dotnet/NETGeographicLib/Accumulator.cpp | 2 +-
.../dotnet/NETGeographicLib/Accumulator.h | 4 +-
.../NETGeographicLib/AlbersEqualArea.cpp | 8 +-
.../dotnet/NETGeographicLib/AlbersEqualArea.h | 33 +-
.../NETGeographicLib/AzimuthalEquidistant.cpp | 4 +-
.../NETGeographicLib/AzimuthalEquidistant.h | 32 +-
.../dotnet/NETGeographicLib/CMakeLists.txt | 36 +-
.../NETGeographicLib/CassiniSoldner.cpp | 4 +-
.../dotnet/NETGeographicLib/CassiniSoldner.h | 13 +-
.../NETGeographicLib/CircularEngine.cpp | 2 +-
.../dotnet/NETGeographicLib/CircularEngine.h | 2 +-
.../dotnet/NETGeographicLib/DMS.cpp | 19 +-
.../dotnet/NETGeographicLib/DMS.h | 92 +-
.../dotnet/NETGeographicLib/Ellipsoid.cpp | 4 +-
.../dotnet/NETGeographicLib/Ellipsoid.h | 12 +-
.../NETGeographicLib/EllipticFunction.cpp | 2 +-
.../NETGeographicLib/EllipticFunction.h | 10 +-
.../dotnet/NETGeographicLib/GARS.cpp | 57 +
.../dotnet/NETGeographicLib/GARS.h | 109 +
.../dotnet/NETGeographicLib/GeoCoords.cpp | 34 +-
.../dotnet/NETGeographicLib/GeoCoords.h | 64 +-
.../dotnet/NETGeographicLib/Geocentric.cpp | 4 +-
.../dotnet/NETGeographicLib/Geocentric.h | 14 +-
.../dotnet/NETGeographicLib/Geodesic.cpp | 41 +-
.../dotnet/NETGeographicLib/Geodesic.h | 276 +-
.../dotnet/NETGeographicLib/GeodesicExact.cpp | 41 +-
.../dotnet/NETGeographicLib/GeodesicExact.h | 255 +-
.../dotnet/NETGeographicLib/GeodesicLine.cpp | 63 +-
.../dotnet/NETGeographicLib/GeodesicLine.h | 217 +-
.../NETGeographicLib/GeodesicLineExact.cpp | 62 +-
.../NETGeographicLib/GeodesicLineExact.h | 216 +-
.../dotnet/NETGeographicLib/Geohash.cpp | 2 +-
.../dotnet/NETGeographicLib/Geohash.h | 10 +-
.../dotnet/NETGeographicLib/Geoid.cpp | 21 +-
.../dotnet/NETGeographicLib/Geoid.h | 63 +-
.../dotnet/NETGeographicLib/Georef.cpp | 57 +
.../dotnet/NETGeographicLib/Georef.h | 119 +
.../dotnet/NETGeographicLib/Gnomonic.cpp | 4 +-
.../dotnet/NETGeographicLib/Gnomonic.h | 47 +-
.../dotnet/NETGeographicLib/GravityCircle.cpp | 2 +-
.../dotnet/NETGeographicLib/GravityCircle.h | 7 +-
.../dotnet/NETGeographicLib/GravityModel.cpp | 2 +-
.../dotnet/NETGeographicLib/GravityModel.h | 9 +-
.../LambertConformalConic.cpp | 4 +-
.../NETGeographicLib/LambertConformalConic.h | 40 +-
.../NETGeographicLib/LocalCartesian.cpp | 6 +-
.../dotnet/NETGeographicLib/LocalCartesian.h | 17 +-
.../dotnet/NETGeographicLib/MGRS.cpp | 2 +-
.../dotnet/NETGeographicLib/MGRS.h | 20 +-
.../NETGeographicLib/MagneticCircle.cpp | 2 +-
.../dotnet/NETGeographicLib/MagneticCircle.h | 2 +-
.../dotnet/NETGeographicLib/MagneticModel.cpp | 4 +-
.../dotnet/NETGeographicLib/MagneticModel.h | 26 +-
.../NETGeographicLib/NETGeographicLib.cpp | 10 +-
.../NETGeographicLib/NETGeographicLib.h | 36 +-
.../dotnet/NETGeographicLib/NormalGravity.cpp | 36 +-
.../dotnet/NETGeographicLib/NormalGravity.h | 80 +-
.../dotnet/NETGeographicLib/OSGB.cpp | 2 +-
.../dotnet/NETGeographicLib/OSGB.h | 10 +-
.../NETGeographicLib/PolarStereographic.cpp | 4 +-
.../NETGeographicLib/PolarStereographic.h | 8 +-
.../dotnet/NETGeographicLib/PolygonArea.cpp | 230 +-
.../dotnet/NETGeographicLib/PolygonArea.h | 358 +-
.../dotnet/NETGeographicLib/Rhumb.cpp | 237 +
.../dotnet/NETGeographicLib/Rhumb.h | 543 +
.../SphericalCoefficients.cpp | 2 +-
.../NETGeographicLib/SphericalCoefficients.h | 2 +-
.../NETGeographicLib/SphericalHarmonic.cpp | 2 +-
.../NETGeographicLib/SphericalHarmonic.h | 2 +-
.../NETGeographicLib/SphericalHarmonic1.cpp | 2 +-
.../NETGeographicLib/SphericalHarmonic1.h | 2 +-
.../NETGeographicLib/SphericalHarmonic2.cpp | 2 +-
.../NETGeographicLib/SphericalHarmonic2.h | 2 +-
.../NETGeographicLib/TransverseMercator.cpp | 4 +-
.../NETGeographicLib/TransverseMercator.h | 21 +-
.../TransverseMercatorExact.cpp | 4 +-
.../TransverseMercatorExact.h | 25 +-
.../dotnet/NETGeographicLib/UTMUPS.cpp | 6 +-
.../dotnet/NETGeographicLib/UTMUPS.h | 23 +-
.../dotnet/Projections/AccumPanel.cs | 2 +-
.../dotnet/Projections/AlbersPanel.cs | 2 +-
.../dotnet/Projections/EllipsoidPanel.cs | 2 +-
.../dotnet/Projections/EllipticPanel.cs | 2 +-
.../dotnet/Projections/Form1.Designer.cs | 14 +-
.../GeographicLib/dotnet/Projections/Form1.cs | 3 +-
.../dotnet/Projections/GeocentricPanel.cs | 2 +-
.../dotnet/Projections/GeodesicPanel.cs | 24 +-
.../dotnet/Projections/GeoidPanel.cs | 6 +-
.../dotnet/Projections/GravityPanel.cs | 2 +-
.../dotnet/Projections/LocalCartesianPanel.cs | 2 +-
.../dotnet/Projections/MagneticPanel.cs | 5 +-
.../dotnet/Projections/MiscPanel.Designer.cs | 29 +-
.../dotnet/Projections/MiscPanel.cs | 36 +-
.../dotnet/Projections/PolarStereoPanel.cs | 2 +-
.../dotnet/Projections/PolyPanel.cs | 21 +-
.../dotnet/Projections/Program.cs | 2 +-
.../Projections/Projections-vs13.csproj | 273 +
.../dotnet/Projections/Projections.csproj | 48 +-
.../dotnet/Projections/ProjectionsPanel.cs | 2 +-
.../dotnet/Projections/RhumbPanel.Designer.cs | 260 +
.../dotnet/Projections/RhumbPanel.cs | 120 +
.../dotnet/Projections/RhumbPanel.resx | 120 +
.../Projections/SphericalHarmonicsPanel.cs | 2 +-
.../dotnet/Projections/TypeIIIProjPanel.cs | 4 +-
.../examples/CS/example-AlbersEqualArea.cs | 2 +-
.../dotnet/examples/CS/example-GARS.cs | 36 +
.../dotnet/examples/CS/example-Georef.cs | 38 +
.../dotnet/examples/CS/example-Rhumb.cs | 38 +
.../dotnet/examples/CS/example-RhumbLine.cs | 42 +
.../dotnet/examples/CS/example-UTMUPS.cs | 2 +-
.../dotnet/examples/ManagedCPP/CMakeLists.txt | 11 +-
.../ManagedCPP/example-AlbersEqualArea.cpp | 2 +-
.../examples/ManagedCPP/example-GARS.cpp | 32 +
.../ManagedCPP/example-GeodesicLine.cpp | 4 +-
.../ManagedCPP/example-GeodesicLineExact.cpp | 4 +-
.../examples/ManagedCPP/example-Georef.cpp | 34 +
.../examples/ManagedCPP/example-Rhumb.cpp | 32 +
.../examples/ManagedCPP/example-RhumbLine.cpp | 35 +
.../examples/ManagedCPP/example-UTMUPS.cpp | 2 +-
.../examples/VB/example-AlbersEqualArea.vb | 2 +-
.../dotnet/examples/VB/example-GARS.vb | 23 +
.../dotnet/examples/VB/example-Georef.vb | 25 +
.../dotnet/examples/VB/example-Rhumb.vb | 24 +
.../dotnet/examples/VB/example-RhumbLine.vb | 27 +
.../dotnet/examples/VB/example-UTMUPS.vb | 2 +-
.../GeographicLib/examples/CMakeLists.txt | 51 +-
.../GeographicLib/examples/GeoidToGTX.cpp | 32 +-
.../examples/JacobiConformal.cpp | 43 +
.../examples/JacobiConformal.hpp | 167 +
.../GeographicLib/examples/Makefile.am | 9 +-
.../GeographicLib/examples/Makefile.in | 132 +-
.../examples/example-Accumulator.cpp | 3 +-
.../examples/example-AlbersEqualArea.cpp | 11 +-
.../examples/example-AzimuthalEquidistant.cpp | 3 +-
.../examples/example-CassiniSoldner.cpp | 3 +-
.../examples/example-CircularEngine.cpp | 1 -
.../examples/example-Constants.cpp | 1 -
.../GeographicLib/examples/example-DMS.cpp | 2 +-
.../examples/example-Ellipsoid.cpp | 3 +-
.../examples/example-EllipticFunction.cpp | 11 +-
.../GeographicLib/examples/example-GARS.cpp | 39 +
.../examples/example-GeoCoords.cpp | 2 -
.../examples/example-Geocentric.cpp | 3 +-
.../examples/example-Geodesic-small.cpp | 3 +-
.../examples/example-Geodesic.cpp | 3 +-
.../examples/example-GeodesicExact.cpp | 3 +-
.../examples/example-GeodesicLine.cpp | 20 +-
.../examples/example-GeodesicLineExact.cpp | 20 +-
.../examples/example-GeographicErr.cpp | 1 -
.../examples/example-Geohash.cpp | 1 -
.../GeographicLib/examples/example-Geoid.cpp | 1 -
.../GeographicLib/examples/example-Georef.cpp | 41 +
.../examples/example-Gnomonic.cpp | 3 +-
.../examples/example-GravityCircle.cpp | 1 -
.../examples/example-GravityModel.cpp | 1 -
.../example-LambertConformalConic.cpp | 7 +-
.../examples/example-LocalCartesian.cpp | 3 +-
.../GeographicLib/examples/example-MGRS.cpp | 1 -
.../examples/example-MagneticCircle.cpp | 1 -
.../examples/example-MagneticModel.cpp | 1 -
.../GeographicLib/examples/example-Math.cpp | 1 -
.../examples/example-NearestNeighbor.cpp | 140 +
.../examples/example-NormalGravity.cpp | 8 +-
.../GeographicLib/examples/example-OSGB.cpp | 1 -
.../examples/example-PolarStereographic.cpp | 6 +-
.../examples/example-PolygonArea.cpp | 3 +-
.../GeographicLib/examples/example-Rhumb.cpp | 36 +
.../examples/example-RhumbLine.cpp | 43 +
.../examples/example-SphericalEngine.cpp | 1 -
.../examples/example-SphericalHarmonic.cpp | 1 -
.../examples/example-SphericalHarmonic1.cpp | 1 -
.../examples/example-SphericalHarmonic2.cpp | 1 -
.../examples/example-TransverseMercator.cpp | 51 +-
.../example-TransverseMercatorExact.cpp | 6 +-
.../GeographicLib/examples/example-UTMUPS.cpp | 5 +-
.../examples/example-Utility.cpp | 1 -
.../GeographicLib/examples/make-egmcof.cpp | 45 +
.../include/GeographicLib/Accumulator.hpp | 66 +-
.../include/GeographicLib/AlbersEqualArea.hpp | 96 +-
.../GeographicLib/AzimuthalEquidistant.hpp | 59 +-
.../include/GeographicLib/CassiniSoldner.hpp | 77 +-
.../include/GeographicLib/CircularEngine.hpp | 61 +-
.../include/GeographicLib/Config-ac.h.in | 21 +-
.../include/GeographicLib/Config.h | 6 +-
.../include/GeographicLib/Config.h.in | 10 +-
.../include/GeographicLib/Constants.hpp | 213 +-
.../include/GeographicLib/DMS.hpp | 180 +-
.../include/GeographicLib/Ellipsoid.hpp | 135 +-
.../GeographicLib/EllipticFunction.hpp | 348 +-
.../include/GeographicLib/GARS.hpp | 143 +
.../include/GeographicLib/GeoCoords.hpp | 178 +-
.../include/GeographicLib/Geocentric.hpp | 76 +-
.../include/GeographicLib/Geodesic.hpp | 322 +-
.../include/GeographicLib/GeodesicExact.hpp | 290 +-
.../include/GeographicLib/GeodesicLine.hpp | 246 +-
.../GeographicLib/GeodesicLineExact.hpp | 232 +-
.../include/GeographicLib/Geohash.hpp | 65 +-
.../include/GeographicLib/Geoid.hpp | 164 +-
.../include/GeographicLib/Georef.hpp | 161 +
.../include/GeographicLib/Gnomonic.hpp | 75 +-
.../include/GeographicLib/GravityCircle.hpp | 92 +-
.../include/GeographicLib/GravityModel.hpp | 93 +-
.../GeographicLib/LambertConformalConic.hpp | 121 +-
.../include/GeographicLib/LocalCartesian.hpp | 71 +-
.../include/GeographicLib/MGRS.hpp | 124 +-
.../include/GeographicLib/MagneticCircle.hpp | 66 +-
.../include/GeographicLib/MagneticModel.hpp | 98 +-
.../include/GeographicLib/Math.hpp | 872 +-
.../include/GeographicLib/NearestNeighbor.hpp | 838 ++
.../include/GeographicLib/NormalGravity.hpp | 232 +-
.../include/GeographicLib/OSGB.hpp | 76 +-
.../GeographicLib/PolarStereographic.hpp | 58 +-
.../include/GeographicLib/PolygonArea.hpp | 157 +-
.../include/GeographicLib/Rhumb.hpp | 590 ++
.../include/GeographicLib/SphericalEngine.hpp | 71 +-
.../GeographicLib/SphericalHarmonic.hpp | 82 +-
.../GeographicLib/SphericalHarmonic1.hpp | 44 +-
.../GeographicLib/SphericalHarmonic2.hpp | 68 +-
.../GeographicLib/TransverseMercator.hpp | 84 +-
.../GeographicLib/TransverseMercatorExact.hpp | 88 +-
.../include/GeographicLib/UTMUPS.hpp | 85 +-
.../include/GeographicLib/Utility.hpp | 367 +-
.../GeographicLib/include/Makefile.am | 4 +
.../GeographicLib/include/Makefile.in | 187 +-
.../GeographicLib/include/Makefile.mk | 12 +-
gtsam/3rdparty/GeographicLib/install-sh | 354 +-
gtsam/3rdparty/GeographicLib/java/README.txt | 11 +-
.../GeographicLib/java/direct/pom.xml | 145 +-
.../GeographicLib/java/inverse/pom.xml | 145 +-
.../GeographicLib/java/planimeter/pom.xml | 145 +-
gtsam/3rdparty/GeographicLib/java/pom.xml | 231 +-
.../net/sf/geographiclib/Accumulator.java | 10 +-
.../java/net/sf/geographiclib/Constants.java | 2 +-
.../java/net/sf/geographiclib/GeoMath.java | 188 +-
.../java/net/sf/geographiclib/Geodesic.java | 1062 +-
.../net/sf/geographiclib/GeodesicData.java | 2 +-
.../net/sf/geographiclib/GeodesicLine.java | 368 +-
.../net/sf/geographiclib/GeodesicMask.java | 18 +-
.../net/sf/geographiclib/GeographicErr.java | 2 +-
.../java/net/sf/geographiclib/Gnomonic.java | 280 +
.../net/sf/geographiclib/GnomonicData.java | 98 +
.../main/java/net/sf/geographiclib/Pair.java | 2 +-
.../net/sf/geographiclib/PolygonArea.java | 60 +-
.../net/sf/geographiclib/PolygonResult.java | 2 +-
.../net/sf/geographiclib/package-info.java | 267 +-
.../net/sf/geographiclib/GeodesicTest.java | 649 ++
.../3rdparty/GeographicLib/js/CMakeLists.txt | 134 +
.../GeographicLib/js/GeographicLib.md | 135 +
gtsam/3rdparty/GeographicLib/js/HEADER.js | 22 +
gtsam/3rdparty/GeographicLib/js/Makefile.am | 44 +
gtsam/3rdparty/GeographicLib/js/Makefile.in | 502 +
gtsam/3rdparty/GeographicLib/js/Makefile.mk | 36 +
gtsam/3rdparty/GeographicLib/js/README.md | 50 +
gtsam/3rdparty/GeographicLib/js/conf.json | 17 +
.../GeographicLib/js/doc/1-geodesics.md | 172 +
.../GeographicLib/js/doc/2-interface.md | 117 +
.../GeographicLib/js/doc/3-examples.md | 276 +
.../GeographicLib/js/doc/tutorials.json | 11 +
gtsam/3rdparty/GeographicLib/js/js-cat.sh | 37 +
.../3rdparty/GeographicLib/js/js-compress.sh | 38 +
gtsam/3rdparty/GeographicLib/js/package.json | 37 +
.../GeographicLib/js/samples/geod-calc.html | 593 ++
.../js/samples/geod-google-instructions.html | 127 +
.../GeographicLib/js/samples/geod-google.html | 340 +
gtsam/3rdparty/GeographicLib/js/src/DMS.js | 477 +
.../3rdparty/GeographicLib/js/src/Geodesic.js | 1393 +++
.../GeographicLib/js/src/GeodesicLine.js | 415 +
gtsam/3rdparty/GeographicLib/js/src/Math.js | 428 +
.../GeographicLib/js/src/PolygonArea.js | 321 +
.../GeographicLib/js/test/geodesictest.js | 654 ++
.../GeographicLib/legacy/C/00README.txt | 6 +-
.../GeographicLib/legacy/C/CMakeLists.txt | 49 +-
.../3rdparty/GeographicLib/legacy/C/direct.c | 2 +-
.../GeographicLib/legacy/C/geodesic.c | 1034 +-
.../GeographicLib/legacy/C/geodesic.h | 645 +-
.../GeographicLib/legacy/C/geodtest.c | 829 ++
.../3rdparty/GeographicLib/legacy/C/inverse.c | 2 +-
.../GeographicLib/legacy/C/planimeter.c | 2 +-
.../GeographicLib/legacy/Fortran/00README.txt | 11 +-
.../legacy/Fortran/CMakeLists.txt | 34 +-
.../legacy/Fortran/geoddirect.for | 15 +-
.../GeographicLib/legacy/Fortran/geodesic.for | 1166 ++-
.../GeographicLib/legacy/Fortran/geodesic.inc | 12 +-
.../legacy/Fortran/geodinverse.for | 8 +-
.../GeographicLib/legacy/Fortran/geodtest.for | 1217 +++
.../legacy/Fortran/ngscommon.for | 806 ++
.../legacy/Fortran/ngsforward.for | 490 +
.../legacy/Fortran/ngsinverse.for | 513 +
gtsam/3rdparty/GeographicLib/ltmain.sh | 5580 ++++++----
gtsam/3rdparty/GeographicLib/m4/libtool.m4 | 2562 +++--
gtsam/3rdparty/GeographicLib/m4/ltoptions.m4 | 127 +-
gtsam/3rdparty/GeographicLib/m4/ltsugar.m4 | 7 +-
gtsam/3rdparty/GeographicLib/m4/ltversion.m4 | 12 +-
.../3rdparty/GeographicLib/m4/lt~obsolete.m4 | 7 +-
gtsam/3rdparty/GeographicLib/m4/pkg.m4 | 287 +
.../3rdparty/GeographicLib/man/CMakeLists.txt | 27 +-
.../3rdparty/GeographicLib/man/CartConvert.1 | 91 +-
.../GeographicLib/man/CartConvert.1.html | 42 +-
.../GeographicLib/man/CartConvert.pod | 57 +-
.../GeographicLib/man/CartConvert.usage | 74 +-
gtsam/3rdparty/GeographicLib/man/ConicProj.1 | 107 +-
.../GeographicLib/man/ConicProj.1.html | 42 +-
.../3rdparty/GeographicLib/man/ConicProj.pod | 64 +-
.../GeographicLib/man/ConicProj.usage | 77 +-
gtsam/3rdparty/GeographicLib/man/GeoConvert.1 | 350 +-
.../GeographicLib/man/GeoConvert.1.html | 219 +-
.../3rdparty/GeographicLib/man/GeoConvert.pod | 301 +-
.../GeographicLib/man/GeoConvert.usage | 298 +-
gtsam/3rdparty/GeographicLib/man/GeodSolve.1 | 232 +-
.../GeographicLib/man/GeodSolve.1.html | 121 +-
.../3rdparty/GeographicLib/man/GeodSolve.pod | 194 +-
.../GeographicLib/man/GeodSolve.usage | 187 +-
.../3rdparty/GeographicLib/man/GeodesicProj.1 | 132 +-
.../GeographicLib/man/GeodesicProj.1.html | 48 +-
.../GeographicLib/man/GeodesicProj.pod | 91 +-
.../GeographicLib/man/GeodesicProj.usage | 98 +-
gtsam/3rdparty/GeographicLib/man/GeoidEval.1 | 179 +-
.../GeographicLib/man/GeoidEval.1.html | 70 +-
.../3rdparty/GeographicLib/man/GeoidEval.pod | 112 +-
.../GeographicLib/man/GeoidEval.usage | 124 +-
gtsam/3rdparty/GeographicLib/man/Gravity.1 | 143 +-
.../3rdparty/GeographicLib/man/Gravity.1.html | 56 +-
gtsam/3rdparty/GeographicLib/man/Gravity.pod | 91 +-
.../3rdparty/GeographicLib/man/Gravity.usage | 102 +-
.../GeographicLib/man/MagneticField.1 | 194 +-
.../GeographicLib/man/MagneticField.1.html | 97 +-
.../GeographicLib/man/MagneticField.pod | 138 +-
.../GeographicLib/man/MagneticField.usage | 153 +-
gtsam/3rdparty/GeographicLib/man/Makefile.am | 53 +-
gtsam/3rdparty/GeographicLib/man/Makefile.in | 248 +-
gtsam/3rdparty/GeographicLib/man/Makefile.mk | 1 +
gtsam/3rdparty/GeographicLib/man/Planimeter.1 | 124 +-
.../GeographicLib/man/Planimeter.1.html | 72 +-
.../3rdparty/GeographicLib/man/Planimeter.pod | 91 +-
.../GeographicLib/man/Planimeter.usage | 106 +-
gtsam/3rdparty/GeographicLib/man/RhumbSolve.1 | 352 +
.../GeographicLib/man/RhumbSolve.1.html | 212 +
.../3rdparty/GeographicLib/man/RhumbSolve.pod | 253 +
.../GeographicLib/man/RhumbSolve.usage | 217 +
.../man/TransverseMercatorProj.1 | 106 +-
.../man/TransverseMercatorProj.1.html | 40 +-
.../man/TransverseMercatorProj.pod | 65 +-
.../man/TransverseMercatorProj.usage | 77 +-
.../GeographicLib/man/dummy.1.html.in | 6 +-
gtsam/3rdparty/GeographicLib/man/dummy.1.in | 15 +-
.../3rdparty/GeographicLib/man/dummy.usage.in | 4 +-
gtsam/3rdparty/GeographicLib/man/makeusage.sh | 2 +-
gtsam/3rdparty/GeographicLib/man/script.8.in | 15 +
.../GeographicLib/matlab/CMakeLists.txt | 94 +-
.../3rdparty/GeographicLib/matlab/Makefile.am | 171 +-
.../3rdparty/GeographicLib/matlab/Makefile.in | 283 +-
.../3rdparty/GeographicLib/matlab/Makefile.mk | 33 +-
.../GeographicLib/matlab/cassini_fwd.m | 92 -
.../GeographicLib/matlab/cassini_inv.m | 46 -
.../3rdparty/GeographicLib/matlab/ecc2flat.m | 10 -
.../GeographicLib/matlab/eqdazim_fwd.m | 61 -
.../GeographicLib/matlab/eqdazim_inv.m | 59 -
.../3rdparty/GeographicLib/matlab/flat2ecc.m | 9 -
.../matlab/geocentricforward.cpp | 92 -
.../GeographicLib/matlab/geocentricforward.m | 36 -
.../matlab/geocentricreverse.cpp | 86 -
.../GeographicLib/matlab/geocentricreverse.m | 37 -
.../GeographicLib/matlab/geodesicdirect.cpp | 117 -
.../GeographicLib/matlab/geodesicdirect.m | 51 -
.../GeographicLib/matlab/geodesicline.cpp | 124 -
.../GeographicLib/matlab/geodesicline.m | 54 -
.../3rdparty/GeographicLib/matlab/geodproj.m | 139 -
.../matlab/geographiclib-legacy/Contents.m | 33 +
.../geographiclib-legacy/geocentricforward.m | 48 +
.../geographiclib-legacy/geocentricreverse.m | 45 +
.../geographiclib-legacy/geodesicdirect.m | 48 +
.../geographiclib-legacy/geodesicinverse.m | 47 +
.../geographiclib-legacy/geodesicline.m | 50 +
.../matlab/geographiclib-legacy/geoidheight.m | 35 +
.../localcartesianforward.m | 61 +
.../localcartesianreverse.m | 57 +
.../matlab/geographiclib-legacy/mgrsforward.m | 32 +
.../{ => geographiclib-legacy}/mgrsreverse.m | 27 +-
.../matlab/geographiclib-legacy/polygonarea.m | 40 +
.../utmupsforward.m | 34 +-
.../geographiclib-legacy/utmupsreverse.m | 34 +
.../matlab/geographiclib/Contents.m | 93 +
.../matlab/geographiclib/cassini_fwd.m | 80 +
.../matlab/geographiclib/cassini_inv.m | 39 +
.../{ => geographiclib}/defaultellipsoid.m | 16 +-
.../matlab/geographiclib/ecc2flat.m | 12 +
.../matlab/geographiclib/eqdazim_fwd.m | 55 +
.../matlab/geographiclib/eqdazim_inv.m | 53 +
.../matlab/geographiclib/flat2ecc.m | 11 +
.../matlab/geographiclib/gedistance.m | 131 +
.../matlab/geographiclib/gedoc.m | 120 +
.../matlab/geographiclib/geocent_fwd.m | 53 +
.../matlab/geographiclib/geocent_inv.m | 148 +
.../matlab/{ => geographiclib}/geodarea.m | 38 +-
.../matlab/{ => geographiclib}/geoddistance.m | 428 +-
.../matlab/{ => geographiclib}/geoddoc.m | 77 +-
.../matlab/{ => geographiclib}/geodreckon.m | 151 +-
.../matlab/geographiclib/geographiclib_test.m | 728 ++
.../matlab/geographiclib/geoid_height.m | 176 +
.../matlab/geographiclib/geoid_load.m | 65 +
.../matlab/geographiclib/gereckon.m | 139 +
.../matlab/{ => geographiclib}/gnomonic_fwd.m | 58 +-
.../matlab/{ => geographiclib}/gnomonic_inv.m | 62 +-
.../matlab/geographiclib/loccart_fwd.m | 56 +
.../matlab/geographiclib/loccart_inv.m | 55 +
.../matlab/geographiclib/mgrs_fwd.m | 173 +
.../matlab/geographiclib/mgrs_inv.m | 258 +
.../matlab/geographiclib/polarst_fwd.m | 64 +
.../matlab/geographiclib/polarst_inv.m | 62 +
.../matlab/geographiclib/private/A1m1f.m | 16 +
.../matlab/geographiclib/private/A2m1f.m | 16 +
.../matlab/geographiclib/private/A3coeff.m | 28 +
.../matlab/geographiclib/private/A3f.m | 8 +
.../matlab/geographiclib/private/AngDiff.m | 11 +
.../geographiclib/private/AngNormalize.m | 10 +
.../{ => geographiclib}/private/AngRound.m | 5 +-
.../matlab/geographiclib/private/C1f.m | 29 +
.../matlab/geographiclib/private/C1pf.m | 29 +
.../matlab/geographiclib/private/C2f.m | 29 +
.../matlab/geographiclib/private/C3coeff.m | 40 +
.../matlab/geographiclib/private/C3f.m | 18 +
.../matlab/geographiclib/private/C4coeff.m | 47 +
.../matlab/geographiclib/private/C4f.m | 19 +
.../matlab/geographiclib/private/G4coeff.m | 47 +
.../geographiclib/private/GeoRotation.m | 26 +
.../matlab/geographiclib/private/LatFix.m | 9 +
.../private/SinCosSeries.m | 11 +-
.../matlab/geographiclib/private/atan2dx.m | 28 +
.../matlab/geographiclib/private/cbrtx.m | 17 +
.../matlab/geographiclib/private/copysignx.m | 18 +
.../{ => geographiclib}/private/cvmgt.m | 8 +-
.../matlab/geographiclib/private/eatanhe.m | 13 +
.../matlab/geographiclib/private/geoid_file.m | 27 +
.../geographiclib/private/geoid_load_file.m | 32 +
.../matlab/geographiclib/private/norm2.m | 10 +
.../matlab/geographiclib/private/sincosdx.m | 30 +
.../matlab/{ => geographiclib}/private/sumx.m | 4 +-
.../matlab/geographiclib/private/swap.m | 5 +
.../matlab/geographiclib/private/tauf.m | 23 +
.../matlab/geographiclib/private/taupf.m | 11 +
.../matlab/geographiclib/projdoc.m | 72 +
.../matlab/geographiclib/tranmerc_fwd.m | 159 +
.../matlab/geographiclib/tranmerc_inv.m | 161 +
.../matlab/geographiclib/utmups_fwd.m | 118 +
.../matlab/geographiclib/utmups_inv.m | 83 +
.../GeographicLib/matlab/geoidheight.cpp | 108 -
.../GeographicLib/matlab/geoidheight.m | 38 -
.../matlab/localcartesianforward.cpp | 107 -
.../matlab/localcartesianforward.m | 41 -
.../matlab/localcartesianreverse.cpp | 101 -
.../matlab/localcartesianreverse.m | 41 -
.../GeographicLib/matlab/mgrsforward.cpp | 82 -
.../GeographicLib/matlab/mgrsforward.m | 31 -
.../GeographicLib/matlab/mgrsreverse.cpp | 76 -
.../GeographicLib/matlab/polygonarea.cpp | 88 -
.../GeographicLib/matlab/polygonarea.m | 47 -
.../GeographicLib/matlab/private/A1m1f.m | 10 -
.../GeographicLib/matlab/private/A2m1f.m | 10 -
.../GeographicLib/matlab/private/A3coeff.m | 15 -
.../GeographicLib/matlab/private/A3f.m | 12 -
.../GeographicLib/matlab/private/AngDiff.m | 13 -
.../matlab/private/AngNormalize.m | 9 -
.../matlab/private/AngNormalize2.m | 8 -
.../GeographicLib/matlab/private/C1f.m | 22 -
.../GeographicLib/matlab/private/C1pf.m | 22 -
.../GeographicLib/matlab/private/C2f.m | 22 -
.../GeographicLib/matlab/private/C3coeff.m | 25 -
.../GeographicLib/matlab/private/C3f.m | 25 -
.../GeographicLib/matlab/private/C4coeff.m | 32 -
.../GeographicLib/matlab/private/C4f.m | 26 -
.../GeographicLib/matlab/private/SinCosNorm.m | 10 -
.../GeographicLib/matlab/private/atanhee.m | 15 -
.../GeographicLib/matlab/private/cbrt.m | 9 -
.../GeographicLib/matlab/private/swap.m | 8 -
.../GeographicLib/matlab/tranmerc_fwd.m | 170 -
.../GeographicLib/matlab/tranmerc_inv.m | 185 -
gtsam/3rdparty/GeographicLib/matlab/utm_fwd.m | 50 -
gtsam/3rdparty/GeographicLib/matlab/utm_inv.m | 51 -
.../GeographicLib/matlab/utmupsforward.cpp | 94 -
.../GeographicLib/matlab/utmupsreverse.cpp | 77 -
.../GeographicLib/matlab/utmupsreverse.m | 33 -
.../3rdparty/GeographicLib/maxima/Makefile.mk | 2 +-
.../3rdparty/GeographicLib/maxima/auxlat.mac | 269 +
.../3rdparty/GeographicLib/maxima/ellint.mac | 2 +-
.../3rdparty/GeographicLib/maxima/gearea.mac | 138 +
gtsam/3rdparty/GeographicLib/maxima/geod.mac | 85 +-
.../GeographicLib/maxima/geodesic.mac | 372 +-
.../GeographicLib/maxima/polyprint.mac | 144 +
.../GeographicLib/maxima/rhumbarea.mac | 202 +
gtsam/3rdparty/GeographicLib/maxima/tm.mac | 22 +-
.../GeographicLib/maxima/tmseries.mac | 17 +-
gtsam/3rdparty/GeographicLib/missing | 403 +-
gtsam/3rdparty/GeographicLib/pom.xml | 82 -
.../3rdparty/GeographicLib/python/MANIFEST.in | 2 +-
.../3rdparty/GeographicLib/python/Makefile.am | 18 +-
.../3rdparty/GeographicLib/python/Makefile.in | 132 +-
.../3rdparty/GeographicLib/python/Makefile.mk | 4 +-
.../3rdparty/GeographicLib/python/README.rst | 7 +
.../3rdparty/GeographicLib/python/README.txt | 12 -
.../GeographicLib/python/doc/code.rst | 30 +
.../3rdparty/GeographicLib/python/doc/conf.py | 271 +
.../GeographicLib/python/doc/examples.rst | 142 +
.../GeographicLib/python/doc/geodesics.rst | 204 +
.../GeographicLib/python/doc/index.rst | 131 +
.../GeographicLib/python/doc/interface.rst | 130 +
.../python/geographiclib/CMakeLists.txt | 3 +
.../python/geographiclib/__init__.py | 6 +
.../python/geographiclib/accumulator.py | 5 +-
.../python/geographiclib/constants.py | 16 +-
.../python/geographiclib/geodesic.py | 1194 ++-
.../geographiclib/geodesiccapability.py | 15 +-
.../python/geographiclib/geodesicline.py | 382 +-
.../python/geographiclib/geomath.py | 125 +-
.../python/geographiclib/polygonarea.py | 333 +-
.../python/geographiclib/test/__init__.py | 12 +
.../geographiclib/test/test_geodesic.py | 544 +
gtsam/3rdparty/GeographicLib/python/setup.py | 76 +-
.../GeographicLib/src/Accumulator.cpp | 2 +-
.../GeographicLib/src/AlbersEqualArea.cpp | 151 +-
.../src/AzimuthalEquidistant.cpp | 24 +-
.../3rdparty/GeographicLib/src/CMakeLists.txt | 69 +-
.../GeographicLib/src/CassiniSoldner.cpp | 42 +-
.../GeographicLib/src/CircularEngine.cpp | 26 +-
gtsam/3rdparty/GeographicLib/src/DMS.cpp | 117 +-
.../3rdparty/GeographicLib/src/Ellipsoid.cpp | 107 +-
.../GeographicLib/src/EllipticFunction.cpp | 392 +-
gtsam/3rdparty/GeographicLib/src/GARS.cpp | 122 +
.../3rdparty/GeographicLib/src/GeoCoords.cpp | 70 +-
.../3rdparty/GeographicLib/src/Geocentric.cpp | 52 +-
gtsam/3rdparty/GeographicLib/src/Geodesic.cpp | 2061 ++--
.../GeographicLib/src/GeodesicExact.cpp | 7567 +-------------
.../GeographicLib/src/GeodesicExactC4.cpp | 7306 +++++++++++++
.../GeographicLib/src/GeodesicLine.cpp | 166 +-
.../GeographicLib/src/GeodesicLineExact.cpp | 169 +-
.../3rdparty/GeographicLib/src/Geographic.pro | 75 -
gtsam/3rdparty/GeographicLib/src/Geohash.cpp | 61 +-
gtsam/3rdparty/GeographicLib/src/Geoid.cpp | 96 +-
gtsam/3rdparty/GeographicLib/src/Georef.cpp | 136 +
gtsam/3rdparty/GeographicLib/src/Gnomonic.cpp | 37 +-
.../GeographicLib/src/GravityCircle.cpp | 82 +-
.../GeographicLib/src/GravityModel.cpp | 93 +-
.../src/LambertConformalConic.cpp | 145 +-
.../GeographicLib/src/LocalCartesian.cpp | 27 +-
gtsam/3rdparty/GeographicLib/src/MGRS.cpp | 256 +-
.../GeographicLib/src/MagneticCircle.cpp | 25 +-
.../GeographicLib/src/MagneticModel.cpp | 111 +-
gtsam/3rdparty/GeographicLib/src/Makefile.am | 17 +-
gtsam/3rdparty/GeographicLib/src/Makefile.in | 295 +-
gtsam/3rdparty/GeographicLib/src/Makefile.mk | 20 +-
gtsam/3rdparty/GeographicLib/src/Math.cpp | 63 +
.../GeographicLib/src/NormalGravity.cpp | 392 +-
gtsam/3rdparty/GeographicLib/src/OSGB.cpp | 58 +-
.../GeographicLib/src/PolarStereographic.cpp | 88 +-
.../GeographicLib/src/PolygonArea.cpp | 55 +-
gtsam/3rdparty/GeographicLib/src/Rhumb.cpp | 384 +
.../GeographicLib/src/SphericalEngine.cpp | 113 +-
.../GeographicLib/src/TransverseMercator.cpp | 638 +-
.../src/TransverseMercatorExact.cpp | 163 +-
gtsam/3rdparty/GeographicLib/src/UTMUPS.cpp | 145 +-
gtsam/3rdparty/GeographicLib/src/Utility.cpp | 21 +-
.../GeographicLib/tools/CMakeLists.txt | 279 +-
.../GeographicLib/tools/CartConvert.cpp | 86 +-
.../GeographicLib/tools/ConicProj.cpp | 82 +-
.../GeographicLib/tools/GeoConvert.cpp | 100 +-
.../GeographicLib/tools/GeodSolve.cpp | 270 +-
.../GeographicLib/tools/GeodesicProj.cpp | 84 +-
.../GeographicLib/tools/GeoidEval.cpp | 80 +-
.../3rdparty/GeographicLib/tools/Gravity.cpp | 82 +-
.../GeographicLib/tools/MagneticField.cpp | 87 +-
.../3rdparty/GeographicLib/tools/Makefile.am | 19 +-
.../3rdparty/GeographicLib/tools/Makefile.in | 331 +-
.../3rdparty/GeographicLib/tools/Makefile.mk | 34 +-
.../GeographicLib/tools/Planimeter.cpp | 121 +-
.../GeographicLib/tools/RhumbSolve.cpp | 244 +
.../tools/TransverseMercatorProj.cpp | 83 +-
.../tools/geographiclib-get-geoids.sh | 18 +-
.../tools/geographiclib-get-gravity.sh | 20 +-
.../tools/geographiclib-get-magnetic.sh | 36 +-
.../3rdparty/GeographicLib/tools/tests.cmake | 659 ++
.../windows/CartConvert-vc10x.vcxproj | 92 +
.../windows/CartConvert-vc8.vcproj | 340 -
.../windows/ConicProj-vc10x.vcxproj | 92 +
.../windows/ConicProj-vc8.vcproj | 340 -
.../windows/GeoConvert-vc10x.vcxproj | 92 +
.../windows/GeoConvert-vc8.vcproj | 340 -
.../windows/GeodSolve-vc10x.vcxproj | 92 +
.../windows/GeodesicProj-vc10x.vcxproj | 92 +
.../windows/GeodesicProj-vc8.vcproj | 340 -
.../windows/Geographic-vc10.vcxproj | 9 +-
.../windows/Geographic-vc10x.vcxproj | 164 +
.../windows/Geographic-vc13n.vcxproj | 232 +
.../windows/Geographic-vc8.vcproj | 567 -
.../windows/Geographic-vc9.vcproj | 32 +
.../windows/GeographicLib-vc10.sln | 15 +
...hicLib-vc8.sln => GeographicLib-vc10x.sln} | 82 +-
.../windows/GeographicLib-vc9.sln | 14 +
.../windows/GeoidEval-vc10x.vcxproj | 92 +
.../windows/GeoidEval-vc8.vcproj | 340 -
.../windows/Gravity-vc10x.vcxproj | 92 +
.../GeographicLib/windows/Gravity-vc8.vcproj | 340 -
.../windows/MagneticField-vc10x.vcxproj | 92 +
.../windows/MagneticField-vc8.vcproj | 340 -
.../windows/NETGeographic-vc10.sln | 59 +
.../windows/NETGeographic-vc10.vcxproj | 6 +
.../windows/NETGeographic-vc13.sln | 76 +
.../windows/NETGeographic-vc13.vcxproj | 247 +
.../windows/Planimeter-vc10x.vcxproj | 92 +
.../windows/Planimeter-vc8.vcproj | 340 -
.../windows/RhumbSolve-vc10.vcxproj | 163 +
.../windows/RhumbSolve-vc10x.vcxproj | 92 +
...Solve-vc8.vcproj => RhumbSolve-vc9.vcproj} | 23 +-
.../TransverseMercatorProj-vc10x.vcxproj | 92 +
.../windows/TransverseMercatorProj-vc8.vcproj | 340 -
.../GeographicLib/wrapper/00README.txt | 23 +
.../GeographicLib/wrapper/C/00README.txt | 48 +
.../GeographicLib/wrapper/C/CMakeLists.txt | 41 +
.../GeographicLib/wrapper/C/cgeoid.cpp | 14 +
.../3rdparty/GeographicLib/wrapper/C/cgeoid.h | 9 +
.../GeographicLib/wrapper/C/geoidtest.c | 13 +
.../GeographicLib/wrapper/js/00README.txt | 11 +
.../GeographicLib/wrapper/matlab/00README.txt | 48 +
.../{ => wrapper}/matlab/geodesicinverse.cpp | 6 +-
.../{ => wrapper}/matlab/geodesicinverse.m | 20 +-
.../matlab/geographiclibinterface.m | 38 +-
.../GeographicLib/wrapper/python/00README.txt | 69 +
.../wrapper/python/CMakeLists.txt | 59 +
.../wrapper/python/PyGeographicLib.cpp | 21 +
678 files changed, 76108 insertions(+), 42957 deletions(-)
create mode 100644 gtsam/3rdparty/GeographicLib/README.md
create mode 100644 gtsam/3rdparty/GeographicLib/cmake/project.pc.in
create mode 100755 gtsam/3rdparty/GeographicLib/compile
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox
create mode 100644 gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox.in
create mode 100644 gtsam/3rdparty/GeographicLib/doc/normal-gravity-potential-1.svg
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/DMS.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Geodesic.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/GeodesicLine.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Interface.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Math.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/PolygonArea.js
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/geod-calc.html
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/geod-google-instructions.html
delete mode 100644 gtsam/3rdparty/GeographicLib/doc/scripts/geod-google.html
create mode 100644 gtsam/3rdparty/GeographicLib/doc/vptree.gif
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/GARS.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/GARS.h
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/Georef.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/Georef.h
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/Rhumb.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/NETGeographicLib/Rhumb.h
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/Projections/Projections-vs13.csproj
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/Projections/RhumbPanel.Designer.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/Projections/RhumbPanel.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/Projections/RhumbPanel.resx
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/CS/example-GARS.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/CS/example-Georef.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/CS/example-Rhumb.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/CS/example-RhumbLine.cs
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/ManagedCPP/example-GARS.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/ManagedCPP/example-Georef.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/ManagedCPP/example-Rhumb.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/ManagedCPP/example-RhumbLine.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/VB/example-GARS.vb
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/VB/example-Georef.vb
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/VB/example-Rhumb.vb
create mode 100644 gtsam/3rdparty/GeographicLib/dotnet/examples/VB/example-RhumbLine.vb
create mode 100644 gtsam/3rdparty/GeographicLib/examples/JacobiConformal.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/JacobiConformal.hpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/example-GARS.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/example-Georef.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/example-NearestNeighbor.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/example-Rhumb.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/example-RhumbLine.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/examples/make-egmcof.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/include/GeographicLib/GARS.hpp
create mode 100644 gtsam/3rdparty/GeographicLib/include/GeographicLib/Georef.hpp
create mode 100644 gtsam/3rdparty/GeographicLib/include/GeographicLib/NearestNeighbor.hpp
create mode 100644 gtsam/3rdparty/GeographicLib/include/GeographicLib/Rhumb.hpp
create mode 100644 gtsam/3rdparty/GeographicLib/java/src/main/java/net/sf/geographiclib/Gnomonic.java
create mode 100644 gtsam/3rdparty/GeographicLib/java/src/main/java/net/sf/geographiclib/GnomonicData.java
create mode 100644 gtsam/3rdparty/GeographicLib/java/src/test/java/net/sf/geographiclib/GeodesicTest.java
create mode 100644 gtsam/3rdparty/GeographicLib/js/CMakeLists.txt
create mode 100644 gtsam/3rdparty/GeographicLib/js/GeographicLib.md
create mode 100644 gtsam/3rdparty/GeographicLib/js/HEADER.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/Makefile.am
create mode 100644 gtsam/3rdparty/GeographicLib/js/Makefile.in
create mode 100644 gtsam/3rdparty/GeographicLib/js/Makefile.mk
create mode 100644 gtsam/3rdparty/GeographicLib/js/README.md
create mode 100644 gtsam/3rdparty/GeographicLib/js/conf.json
create mode 100644 gtsam/3rdparty/GeographicLib/js/doc/1-geodesics.md
create mode 100644 gtsam/3rdparty/GeographicLib/js/doc/2-interface.md
create mode 100644 gtsam/3rdparty/GeographicLib/js/doc/3-examples.md
create mode 100644 gtsam/3rdparty/GeographicLib/js/doc/tutorials.json
create mode 100755 gtsam/3rdparty/GeographicLib/js/js-cat.sh
create mode 100755 gtsam/3rdparty/GeographicLib/js/js-compress.sh
create mode 100644 gtsam/3rdparty/GeographicLib/js/package.json
create mode 100644 gtsam/3rdparty/GeographicLib/js/samples/geod-calc.html
create mode 100644 gtsam/3rdparty/GeographicLib/js/samples/geod-google-instructions.html
create mode 100644 gtsam/3rdparty/GeographicLib/js/samples/geod-google.html
create mode 100644 gtsam/3rdparty/GeographicLib/js/src/DMS.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/src/Geodesic.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/src/GeodesicLine.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/src/Math.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/src/PolygonArea.js
create mode 100644 gtsam/3rdparty/GeographicLib/js/test/geodesictest.js
create mode 100644 gtsam/3rdparty/GeographicLib/legacy/C/geodtest.c
create mode 100644 gtsam/3rdparty/GeographicLib/legacy/Fortran/geodtest.for
create mode 100644 gtsam/3rdparty/GeographicLib/legacy/Fortran/ngscommon.for
create mode 100644 gtsam/3rdparty/GeographicLib/legacy/Fortran/ngsforward.for
create mode 100644 gtsam/3rdparty/GeographicLib/legacy/Fortran/ngsinverse.for
create mode 100644 gtsam/3rdparty/GeographicLib/m4/pkg.m4
create mode 100644 gtsam/3rdparty/GeographicLib/man/RhumbSolve.1
create mode 100644 gtsam/3rdparty/GeographicLib/man/RhumbSolve.1.html
create mode 100644 gtsam/3rdparty/GeographicLib/man/RhumbSolve.pod
create mode 100644 gtsam/3rdparty/GeographicLib/man/RhumbSolve.usage
create mode 100644 gtsam/3rdparty/GeographicLib/man/script.8.in
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/cassini_fwd.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/cassini_inv.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/ecc2flat.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/eqdazim_fwd.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/eqdazim_inv.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/flat2ecc.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geocentricforward.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geocentricforward.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geocentricreverse.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geocentricreverse.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geodesicdirect.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geodesicdirect.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geodesicline.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geodesicline.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geodproj.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/Contents.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geocentricforward.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geocentricreverse.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geodesicdirect.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geodesicinverse.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geodesicline.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/geoidheight.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/localcartesianforward.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/localcartesianreverse.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/mgrsforward.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib-legacy}/mgrsreverse.m (54%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/polygonarea.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib-legacy}/utmupsforward.m (51%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib-legacy/utmupsreverse.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/Contents.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/cassini_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/cassini_inv.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/defaultellipsoid.m (50%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/ecc2flat.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/eqdazim_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/eqdazim_inv.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/flat2ecc.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/gedistance.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/gedoc.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/geocent_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/geocent_inv.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/geodarea.m (81%)
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/geoddistance.m (55%)
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/geoddoc.m (72%)
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/geodreckon.m (65%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/geographiclib_test.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/geoid_height.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/geoid_load.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/gereckon.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/gnomonic_fwd.m (50%)
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/gnomonic_inv.m (59%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/loccart_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/loccart_inv.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/mgrs_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/mgrs_inv.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/polarst_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/polarst_inv.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/A1m1f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/A2m1f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/A3coeff.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/A3f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/AngDiff.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/AngNormalize.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/private/AngRound.m (62%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C1f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C1pf.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C2f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C3coeff.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C3f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C4coeff.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/C4f.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/G4coeff.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/GeoRotation.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/LatFix.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/private/SinCosSeries.m (71%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/atan2dx.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/cbrtx.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/copysignx.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/private/cvmgt.m (58%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/eatanhe.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/geoid_file.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/geoid_load_file.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/norm2.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/sincosdx.m
rename gtsam/3rdparty/GeographicLib/matlab/{ => geographiclib}/private/sumx.m (59%)
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/swap.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/tauf.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/private/taupf.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/projdoc.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/tranmerc_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/tranmerc_inv.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/utmups_fwd.m
create mode 100644 gtsam/3rdparty/GeographicLib/matlab/geographiclib/utmups_inv.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geoidheight.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/geoidheight.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/localcartesianforward.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/localcartesianforward.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/localcartesianreverse.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/localcartesianreverse.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/mgrsforward.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/mgrsforward.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/mgrsreverse.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/polygonarea.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/polygonarea.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/A1m1f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/A2m1f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/A3coeff.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/A3f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/AngDiff.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/AngNormalize.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/AngNormalize2.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C1f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C1pf.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C2f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C3coeff.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C3f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C4coeff.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/C4f.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/SinCosNorm.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/atanhee.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/cbrt.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/private/swap.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/tranmerc_fwd.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/tranmerc_inv.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/utm_fwd.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/utm_inv.m
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/utmupsforward.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/utmupsreverse.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/matlab/utmupsreverse.m
create mode 100644 gtsam/3rdparty/GeographicLib/maxima/auxlat.mac
create mode 100644 gtsam/3rdparty/GeographicLib/maxima/gearea.mac
create mode 100644 gtsam/3rdparty/GeographicLib/maxima/polyprint.mac
create mode 100644 gtsam/3rdparty/GeographicLib/maxima/rhumbarea.mac
delete mode 100644 gtsam/3rdparty/GeographicLib/pom.xml
create mode 100644 gtsam/3rdparty/GeographicLib/python/README.rst
delete mode 100644 gtsam/3rdparty/GeographicLib/python/README.txt
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/code.rst
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/conf.py
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/examples.rst
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/geodesics.rst
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/index.rst
create mode 100644 gtsam/3rdparty/GeographicLib/python/doc/interface.rst
create mode 100644 gtsam/3rdparty/GeographicLib/python/geographiclib/test/__init__.py
create mode 100644 gtsam/3rdparty/GeographicLib/python/geographiclib/test/test_geodesic.py
create mode 100644 gtsam/3rdparty/GeographicLib/src/GARS.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/src/GeodesicExactC4.cpp
delete mode 100644 gtsam/3rdparty/GeographicLib/src/Geographic.pro
create mode 100644 gtsam/3rdparty/GeographicLib/src/Georef.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/src/Math.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/src/Rhumb.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/tools/RhumbSolve.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/tools/tests.cmake
create mode 100644 gtsam/3rdparty/GeographicLib/windows/CartConvert-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/CartConvert-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/ConicProj-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/ConicProj-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/GeoConvert-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/GeoConvert-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/GeodSolve-vc10x.vcxproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/GeodesicProj-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/GeodesicProj-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/Geographic-vc10x.vcxproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/Geographic-vc13n.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/Geographic-vc8.vcproj
rename gtsam/3rdparty/GeographicLib/windows/{GeographicLib-vc8.sln => GeographicLib-vc10x.sln} (61%)
create mode 100644 gtsam/3rdparty/GeographicLib/windows/GeoidEval-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/GeoidEval-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/Gravity-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/Gravity-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/MagneticField-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/MagneticField-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/NETGeographic-vc10.sln
create mode 100644 gtsam/3rdparty/GeographicLib/windows/NETGeographic-vc13.sln
create mode 100644 gtsam/3rdparty/GeographicLib/windows/NETGeographic-vc13.vcxproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/Planimeter-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/Planimeter-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/RhumbSolve-vc10.vcxproj
create mode 100644 gtsam/3rdparty/GeographicLib/windows/RhumbSolve-vc10x.vcxproj
rename gtsam/3rdparty/GeographicLib/windows/{GeodSolve-vc8.vcproj => RhumbSolve-vc9.vcproj} (88%)
create mode 100644 gtsam/3rdparty/GeographicLib/windows/TransverseMercatorProj-vc10x.vcxproj
delete mode 100644 gtsam/3rdparty/GeographicLib/windows/TransverseMercatorProj-vc8.vcproj
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/00README.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/C/00README.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/C/CMakeLists.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/C/cgeoid.cpp
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/C/cgeoid.h
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/C/geoidtest.c
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/js/00README.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/matlab/00README.txt
rename gtsam/3rdparty/GeographicLib/{ => wrapper}/matlab/geodesicinverse.cpp (95%)
rename gtsam/3rdparty/GeographicLib/{ => wrapper}/matlab/geodesicinverse.m (60%)
rename gtsam/3rdparty/GeographicLib/{ => wrapper}/matlab/geographiclibinterface.m (58%)
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/python/00README.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/python/CMakeLists.txt
create mode 100644 gtsam/3rdparty/GeographicLib/wrapper/python/PyGeographicLib.cpp
diff --git a/gtsam/3rdparty/GeographicLib/00README.txt b/gtsam/3rdparty/GeographicLib/00README.txt
index 47ef4b8fb..8a16e66ea 100644
--- a/gtsam/3rdparty/GeographicLib/00README.txt
+++ b/gtsam/3rdparty/GeographicLib/00README.txt
@@ -3,7 +3,7 @@ A library for geographic projections.
Written by Charles Karney and licensed under
the MIT/X11 License. For more information, see
- http://geographiclib.sourceforge.net/
+ https://geographiclib.sourceforge.io/
Files
@@ -13,131 +13,57 @@ Files
INSTALL -- brief installation instructions
NEWS -- a history of changes
- include/GeographicLib/ and src/
- Config.h.in, Config.h -- system dependent configuration
- Constants.hpp -- WGS84 constants
- Math.hpp -- math routines
- Utility.hpp -- I/O and date routines
- Accumulator.[ch]pp -- quad precision adder
- PolarStereographic.[ch]pp -- polar stereographic projection
- TransverseMercator.[ch]pp -- transverse Mercator projection
- UTMUPS.[ch]pp -- UTM and UPS
- MGRS.[ch]pp -- MGRS
- TransverseMercatorExact.[ch]pp -- exact TM projection
- EllipticFunction.[ch]pp -- elliptic functions
- GeoCoords.[ch]pp -- hold geographic location
- DMS.[ch]pp -- handle degrees minutes seconds
- Geocentric.[ch]pp -- geocentric coordinates
- LocalCartesian.[ch]pp -- local cartesian coordinates
- Geodesic.[ch]pp -- geodesic calculations
- GeodesicLine.[ch]pp -- calculations on a single geodesic
- PolygonArea.[ch]pp -- polygon area
- AzimuthalEquidistant.[ch]pp -- azimuthal equidistant projection
- Gnomonic.[ch]pp -- gnomonic projection
- CassiniSoldner.[ch]pp -- Cassini-Soldner equidistant projection
- Geoid.[ch]pp -- geoid heights
- Gravity{Model,Circle}.[ch]pp -- gravity models
- Magnetic{Model,Circle}.[ch]pp -- geomagentic models
- {Spherical,Circular}Engine.[ch]pp -- spherical harmonic sums
- SphericalHarmonic{,1,2}.hpp -- frontend for spherical harmonics
- LambertConformalConic.[ch]pp -- Lambert conformal conic projection
- AlbersEqualArea.[ch]pp -- Albers equal area projection
- Gnomonic.[ch]pp -- Ellipsoidal gnomonic projection
- OSGB.[ch]pp -- Ordnance Survey grid system
- Geohash.[ch]pp -- conversions for geohashes
- Ellipsoid.[ch]pp -- ellipsoid properties
+ include/GeographicLib/*.hpp
+ headers for the library
+ src/*.cpp
+ implementation for the library
examples/
- example-*.cpp -- simple usage examples for all the classes
- GeoidToGTX.cpp -- a parallelization example
+ examples for each class
tools/
- GeoConvert.cpp -- geographic conversion utility
- TransverseMercatorTest.cpp -- TM tester
- GeodSolve.cpp -- geodesic utility
- CartConvert.cpp -- convert to geocentric and local cartesian
- EquidistantTest.cpp -- exercise AzimuthalEquidistant and CassiniSoldner
- GeoidEval.cpp -- evaluate geoid heights
- Gravity.cpp -- evaluate gravity
- MagneticField.cpp -- evaluate magnetic field
- Planimeter.cpp -- computer polygon areas
- geographiclib-get-geoids -- download geoid datasets
- geographiclib-get-magnetic -- download geomagnetic models
-
- windows/
- GeographicLib-vc9.sln -- MS Studio 2008 solution
- Geographic-vc9.vcproj -- project for library
- GeoConvert-vc9.vcproj -- project for GeoConvert
- TransverseMercatorTest-vc9.vcproj -- project for TransverseMercatorTest
- Geod-vc9.vcproj -- project for Geod
- Planimeter-vc9.vcproj -- project for Planimeter
- CartConvert-vc9.vcproj -- project for CartConvert
- EquidistantTest-vc9.vcproj -- project for EquidistantTest
- GeoidEval-vc9.vcproj -- project for GeoidEval
- Gravity-vc9.vcproj -- project for Gravity
- MagneticField-vc9.vcproj -- project for MagneticField
- also files for MS Studio 2005 (with vc8)
- also files for MS Studio 2010 (with vc10)
- NETGeographic-vc10.vcxproj -- project for .NET wrapper
-
- maxima/
- tm.mac -- Maxima code for high precision TM
- ellint.mac -- Maxima code for elliptic functions needed by tm.mac
- tmseries.mac -- Maxima code for series approximations for TM
- geod.mac -- Maxima code for series approximations for Geodesic
- geodesic.mac -- Maxima code for geodesic problems
-
- matlab/
- geographiclibinterface.m -- Matlab code to compile Matlab interfaces
- utmupsforward.{cpp,m} -- Matlab code to convert geographic to UTM/UPS
- utmupsreverse.{cpp,m} -- Matlab code to convert UTM/UPS to geographic
- mgrsforward.{cpp,m} -- Matlab code to convert UTM/UPS to MGRS
- mgrsreverse.{cpp,m} -- Matlab code to convert MGRS to UTM/UPS
- geodesicdirect.{cpp,m} -- Matlab code for the direct geodesic problem
- geodesicinverse.{cpp,m} -- Matlab code for the inverse geodesic problem
- geodesicline.{cpp,m} -- Matlab code for geodesic lines
- geoidheight.{cpp,m} -- Matlab code to look up geoid heights
- polygonarea.{cpp,m} -- Matlab code for polygon areas
- geoddoc.m -- documentation for native Matlab geodesic routines
- geodreckon.m -- native Matlab implementation of direct geodesic problem
- geoddistance.m -- native Matlab implementation of inverse geodesic problem
- geodarea.m -- native Matlab implementation of polygon area
- defaultellipsoid.m, ecc2flat.m, flat2ecc.m -- auxiliary functions
- geodproj.m -- documentation for geodesic projections
- *_{fwd,inv}.m -- native Matlab implementation of geodesic projections
- private/*.m -- internal functions for geodesic routines
-
- doc/
- doxyfile.in -- Doxygen config file
- Geographic.dox -- main page of Doxygen documentation
- geodseries30.html -- geodesic series to 30th order
- tmseries30.html -- transverse Mercator series to 30th order
- html/* -- directory with built documentation
- scripts/*.html -- demonstrations of the JavaScript interface
- scripts/GeographicLib/*.js -- JavaScript implementation of geodesics
-
- man/
- *.pod -- plain old documentation
- *.1 -- man pages in nroff format
- *.1.html -- man pages in html format
- *.usage -- documentation for incorporation into executables
-
- python/GeographicLib/*.py -- Python implementation of geodesic routines
-
- java/.../*.java -- Java implementation of geodesic routines
-
- dotnet/NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
- dotnet/examples/CS/*.cs -- simple C# examples for each class
- dotnet/examples/ManagedCPP/*.cpp -- Managed C++ examples for each class
- dotnet/examples/VB/*.vb -- simple Visual Basic examples for each class
- dotnet/Projection/* -- a more complex C# application
-
- legacy/C/* -- C implementation of geodesic routines
- legacy/Fortran/* -- Fortran implementation of geodesic routines
+ command-line utilities
Makefile.mk -- Unix/Linux makefiles
configure -- autoconf configuration script
CMakeLists.txt -- cmake configuration files
cmake/
- FindGeographicLib.cmake -- cmake find script
- *.cmake.in -- cmake config templates
+ support files for building with CMake
+
+ windows/
+ project files for building under Windows (but CMake is preferred)
+
+ maxima/
+ Maxima code for generating series expansions, etc.
+
+ matlab/
+ geographiclib/
+ *.m, private/*.m -- Matlab implementation of some classes
+ geographiclib-legacy/
+ *.{m,cpp} -- legacy Matlab routines
+
+ doc/
+ files for generating documentation with Doxygen
+
+ man/
+ man pages for the utilities
+
+ python/GeographicLib/*.py -- Python implementation of geodesic routines
+
+ java/.../*.java -- Java implementation of geodesic routines
+
+ js/
+ src/*.js -- JavaScript implementation of geodesic routines
+ samples/*.html -- demonstrations of the JavaScript interface
+
+ legacy/
+ C/ -- C implementation of geodesic routines
+ Fortran/ -- Fortran implementation of geodesic routines
+
+ dotnet/
+ NETGeographicLib/*.{cpp,h} -- .NET wrapper for GeographicLib
+ examples/
+ CS/*.cs -- simple C# examples for each class
+ ManagedCPP/*.cpp -- Managed C++ examples for each class
+ VB/*.vb -- simple Visual Basic examples for each class
+ Projection/ -- a more complex C# application
diff --git a/gtsam/3rdparty/GeographicLib/AUTHORS b/gtsam/3rdparty/GeographicLib/AUTHORS
index 01c69972b..8a9c048c1 100644
--- a/gtsam/3rdparty/GeographicLib/AUTHORS
+++ b/gtsam/3rdparty/GeographicLib/AUTHORS
@@ -2,5 +2,10 @@ Charles Karney
Francesco Paolo Lovergine (autoconfiscation)
Mathieu Peyréga (help with gravity models)
Andrew MacIntyre (python/setup.py)
-Skip Breidbach (maven support for Java)
+Skip Breidbach (maven support for Java)
Scott Heiman (.NET wrappers + C# examples)
+Chris Bennight (deploying Java library)
+Sebastian Mattheis (gnomonic projection in Java)
+Yurij Mikhalevich <0@39.yt> (node.js port)
+Phil Miller (putting tests into python/setup.py)
+Jonathan Takahashi (boost-python sample)
diff --git a/gtsam/3rdparty/GeographicLib/CMakeLists.txt b/gtsam/3rdparty/GeographicLib/CMakeLists.txt
index e698f622a..a0d54a5db 100644
--- a/gtsam/3rdparty/GeographicLib/CMakeLists.txt
+++ b/gtsam/3rdparty/GeographicLib/CMakeLists.txt
@@ -2,7 +2,7 @@ project (GeographicLib)
# Version information
set (PROJECT_VERSION_MAJOR 1)
-set (PROJECT_VERSION_MINOR 35)
+set (PROJECT_VERSION_MINOR 49)
set (PROJECT_VERSION_PATCH 0)
set (PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}")
if (PROJECT_VERSION_PATCH GREATER 0)
@@ -12,23 +12,23 @@ endif ()
if (DEFINED CPACK_PACKAGE_VERSION_COUNT)
# majic (version 0.1.9 and later) invokes cmake defining, e.g.,
- # -D CPACK_PACKAGE_VERSION=1.35-SNAPSHOT
+ # -D CPACK_PACKAGE_VERSION=1.37-001-SNAPSHOT
# -D CPACK_PACKAGE_VERSION_COUNT=2
# -D CPACK_PACKAGE_VERSION_MAJOR=1
- # -D CPACK_PACKAGE_VERSION_MINOR=35
- # -D CPACK_PACKAGE_VERSION_SUFFIX=-SNAPSHOT
- # Check that the first two version numbers are consistent.
+ # -D CPACK_PACKAGE_VERSION_MINOR=36
+ # -D CPACK_PACKAGE_VERSION_SUFFIX=-001-SNAPSHOT
+ # Check that the version numbers are consistent.
if (CPACK_PACKAGE_VERSION_COUNT EQUAL 2)
- set (CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
+ set (CPACK_PACKAGE_VERSION_PATCH 0)
elseif (CPACK_PACKAGE_VERSION_COUNT LESS 2)
message (FATAL_ERROR "CPACK_PACKAGE_VERSION_COUNT must be 2 or more")
endif ()
if (NOT (
CPACK_PACKAGE_VERSION_MAJOR EQUAL PROJECT_VERSION_MAJOR AND
- CPACK_PACKAGE_VERSION_MINOR EQUAL PROJECT_VERSION_MINOR))
+ CPACK_PACKAGE_VERSION_MINOR EQUAL PROJECT_VERSION_MINOR AND
+ CPACK_PACKAGE_VERSION_PATCH EQUAL PROJECT_VERSION_PATCH))
message (FATAL_ERROR "Inconsistency in CPACK and PROJECT version numbers")
endif ()
- set (PROJECT_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
set (PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
else ()
@@ -42,8 +42,8 @@ endif ()
# The library version tracks the numbering given by libtool in the
# autoconf set up.
-set (LIBVERSION 10)
-set (LIBVERSIONFULL 10.1.2)
+set (LIBVERSION_API 17)
+set (LIBVERSION_BUILD 17.1.2)
string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER)
@@ -61,63 +61,22 @@ cmake_minimum_required (VERSION 2.8.4) # This version was released 2011-02-16
# CMAKE_INSTALL_PREFIX being used when it's ON.
if (WIN32)
- option (COMMON_INSTALL_PATH "Use a common installation path for packages" OFF)
+ option (COMMON_INSTALL_PATH "Use a common installation path for packages"
+ OFF)
else ()
option (COMMON_INSTALL_PATH "Use a common installation path for packages" ON)
endif ()
-# The use of PACKAGE_PATH and INSTALL_PATH is now DEPRECATED.
-# (2) PACKAGE_PATH and INSTALL_PATH govern the find_package search
-# path and the installation directory. (find_package is not used by
-# GeographicLib since it doesn't depend on other packages. However
-# PACKAGE_PATH is used here for uniformity with other packages which
-# adopt the same conventions.)
-#
-# If PACKAGE_PATH is defined, it is prepended to CMAKE_PREFIX_PATH.
-#
-# If INSTALL_PATH is not specified but PACKAGE_PATH is, then
-# INSTALL_PATH is set to
-# ${PACKAGE_PATH}, if COMMON_INSTALL_PATH is ON;
-# ${PACKAGE_PATH}/${PROJECT_NAME}-${PROJECT_VERSION}, otherwise.
-#
-# If INSTALL_PATH is now defined, then set CMAKE_INSTALL_PREFIX to
-# INSTALL_PATH.
-#
-# Typically, only PACKAGE_PATH needs to be specified, e.g.,
-# cmake -D PACKAGE_PATH=/opt .. (on Linux)
-# => CMAKE_PREFIX_PATH=/opt CMAKE_INSTALL_PREFIX=/opt
-# cmake -D PACKAGE_PATH=C:/pkg .. (on Windows)
-# => CMAKE_PREFIX_PATH=C:/pkg CMAKE_INSTALL_PREFIX=C:/pkg/GeographicLib-1.22
-
-if (PACKAGE_PATH)
- set (CMAKE_PREFIX_PATH ${PACKAGE_PATH} ${CMAKE_PREFIX_PATH})
- message (STATUS "CMAKE_PREFIX_PATH set to ${CMAKE_PREFIX_PATH}")
-endif ()
-
-if (NOT INSTALL_PATH AND PACKAGE_PATH)
- if (COMMON_INSTALL_PATH)
- set (INSTALL_PATH ${PACKAGE_PATH} CACHE PATH "Installation directory" FORCE)
- else ()
- set (INSTALL_PATH ${PACKAGE_PATH}/${PROJECT_NAME}-${PROJECT_VERSION}
- CACHE PATH "Installation directory" FORCE)
- endif ()
-endif ()
-if (INSTALL_PATH)
- file (TO_CMAKE_PATH ${INSTALL_PATH} CMAKE_INSTALL_PREFIX)
- message (STATUS "CMAKE_INSTALL_PREFIX set to ${CMAKE_INSTALL_PREFIX}")
-endif ()
+# (2) PACKAGE_PATH and INSTALL_PATH have now been removed
# (3) Where to look for data files. Various classes look in the geoids,
# gravity, magnetic, subdirectories of ${GEOGRAPHICLIB_DATA}.
if (WIN32)
# The binary installers for the data files for Windows are created
- # with Inno Setup which uses {commonappdata}. On most Windows
- # systems this is
- # "C:/Documents and Settings/All Users/Application Data", while on
- # newer systems (Windows 7), it is C:/ProgramData. However the
- # longer name "works" on all Windows systems.
+ # with Inno Setup which uses {commonappdata} which (since Windows
+ # Vista) is C:/ProgramData.
set (GEOGRAPHICLIB_DATA
- "C:/Documents and Settings/All Users/Application Data/GeographicLib"
+ "C:/ProgramData/GeographicLib"
CACHE PATH "Location for data for GeographicLib")
else ()
set (GEOGRAPHICLIB_DATA
@@ -136,15 +95,15 @@ endif ()
set_property (CACHE GEOGRAPHICLIB_LIB_TYPE
PROPERTY STRINGS "SHARED" "STATIC" "BOTH")
-if ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "BOTH")
+if (GEOGRAPHICLIB_LIB_TYPE STREQUAL "BOTH")
set (GEOGRAPHICLIB_SHARED_LIB ON)
set (GEOGRAPHICLIB_STATIC_LIB ON)
set (GEOGRAPHICLIB_LIB_TYPE_VAL 2)
-elseif ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "SHARED")
+elseif (GEOGRAPHICLIB_LIB_TYPE STREQUAL "SHARED")
set (GEOGRAPHICLIB_SHARED_LIB ON)
set (GEOGRAPHICLIB_STATIC_LIB OFF)
set (GEOGRAPHICLIB_LIB_TYPE_VAL 1)
-elseif ("${GEOGRAPHICLIB_LIB_TYPE}" STREQUAL "STATIC")
+elseif (GEOGRAPHICLIB_LIB_TYPE STREQUAL "STATIC")
set (GEOGRAPHICLIB_SHARED_LIB OFF)
set (GEOGRAPHICLIB_STATIC_LIB ON)
set (GEOGRAPHICLIB_LIB_TYPE_VAL 0)
@@ -174,29 +133,24 @@ else ()
set (PROJECT_DEFINITIONS ${PROJECT_STATIC_DEFINITIONS})
endif ()
-# (5) Compile the Matlab interfaces? Skip Matlab compilation if OFF
-set (MATLAB_COMPILER OFF CACHE STRING
- "Compiler for matlab/octave interface: mex or mkoctfile or OFF")
-set_property (CACHE MATLAB_COMPILER PROPERTY STRINGS "mex" "mkoctfile" OFF)
-
-# (6) Create the documentation? This depends on whether doxygen can be
+# (5) Create the documentation? This depends on whether doxygen can be
# found. If this is OFF, then links will be provided to the online
# documentation on Sourceforge.
option (GEOGRAPHICLIB_DOCUMENTATION
"Use doxygen to create the documentation" OFF)
-# (7) Build .NET wrapper library NETGeographicLib. This only applies to
+# (6) Build .NET wrapper library NETGeographicLib. This only applies to
# Windows. Default is OFF, because, currently, most people don't use
# this interface.
option (BUILD_NETGEOGRAPHICLIB "Build NETGeographicLib library" OFF)
-# (8) Set the default "real" precision. This should probably be left
+# (7) Set the default "real" precision. This should probably be left
# at 2 (double).
set (GEOGRAPHICLIB_PRECISION 2 CACHE STRING
- "Default real precision: 1 = float, 2 = double, 3 = long double")
-set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3)
+ "Precision: 1 = float, 2 = double, 3 = extended, 4 = quadruple, 5 = variable")
+set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3 4 5)
-# (9) When making a binary package, should we include the debug version
+# (8) When making a binary package, should we include the debug version
# of the library? This applies to MSVC only, because that's the
# platform where debug and release compilations do not inter-operate.
# It requires building as follows:
@@ -206,6 +160,23 @@ set_property (CACHE GEOGRAPHICLIB_PRECISION PROPERTY STRINGS 1 2 3)
option (PACKAGE_DEBUG_LIBS
"Include debug versions of library in binary package" OFF)
+# (9) Try to link against boost when building the examples. The
+# NearestNeighbor example optionally uses the Boost library. Set to ON,
+# if you want to exercise this functionality. Default is OFF, so that
+# cmake configuration isn't slowed down looking for Boost.
+option (USE_BOOST_FOR_EXAMPLES
+ "Look for Boost library when compiling examples" OFF)
+
+# (10) On Mac OS X, build multiple architectures? Set to ON to build
+# i386 and x86_64. Default is OFF, meaning build for default
+# architecture.
+option (APPLE_MULTIPLE_ARCHITECTURES
+ "Build multiple architectures for Apple systems" OFF)
+
+# (11) Convert warnings into errors? Default is OFF. If the tests
+# directory is present you get this behavior regardless.
+option (CONVERT_WARNINGS_TO_ERRORS "Convert warnings into errors?" OFF)
+
set (LIBNAME Geographic)
if (MSVC OR CMAKE_CONFIGURATION_TYPES)
# For multi-config systems and for Visual Studio, the debug version of
@@ -213,48 +184,262 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES)
set (CMAKE_DEBUG_POSTFIX _d)
endif ()
+if (EXISTS ${PROJECT_SOURCE_DIR}/tests/CMakeLists.txt)
+ set (DEVELOPER ON)
+else ()
+ set (DEVELOPER OFF)
+endif ()
+
if (NOT MSVC)
# Set the run time path for shared libraries for non-Windows machines.
# (1) include link path for external packages (not needed with
- # GeographicLib because there are no external packages).
- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ # GeographicLib because there are no external packages). This only
+ # makes sense for native builds.
+ if (NOT CMAKE_CROSSCOMPILING)
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+ endif ()
# (2) include installed path for GeographicLib.
if (NOT APPLE)
# Use relative path so that package is relocatable
set (CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LIB_SUFFIX}")
else ()
- # Need absolute path with MacOSx
- set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ if (CMAKE_VERSION VERSION_LESS 2.8.12)
+ # Use absolute path with MacOSx
+ set (CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ else ()
+ # cmake 2.8.12 introduced a way to make the package relocatable.
+ # See also INSTALL_RPATH property on the tools.
+ set (CMAKE_MACOSX_RPATH ON)
+ endif ()
endif ()
endif ()
-if (NOT (CYGWIN OR ANDROID))
- # cygwin and android have a long double but the support for ::cbrtl,
- # etc., is missing
- include (CheckTypeSize)
- check_type_size ("long double" LONG_DOUBLE BUILTIN_TYPES_ONLY)
-endif ()
+include (CheckTypeSize)
+check_type_size ("long double" LONG_DOUBLE BUILTIN_TYPES_ONLY)
+set (GEOGRAPHICLIB_HAVE_LONG_DOUBLE ${HAVE_LONG_DOUBLE})
include (TestBigEndian)
-test_big_endian (WORDS_BIGENDIAN)
+test_big_endian (GEOGRAPHICLIB_WORDS_BIGENDIAN)
+
+# Make the compiler more picky.
+include (CheckCXXCompilerFlag)
+if (MSVC)
+ string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ # Turn on parallel builds for Visual Studio
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MP")
+else ()
+ set (FLOAT_CONVERSION_FLAG "-Wfloat-conversion")
+ check_cxx_compiler_flag (${FLOAT_CONVERSION_FLAG} FLOAT_CONVERSION)
+ if (NOT FLOAT_CONVERSION)
+ set (FLOAT_CONVERSION_FLAG)
+ endif ()
+ set (CMAKE_CXX_FLAGS
+ "${CMAKE_CXX_FLAGS} -Wall -Wextra ${FLOAT_CONVERSION_FLAG}")
+ # g++ 6.0 defaults to -std=gnu++14
+ if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND
+ NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) OR
+ # but Boost 1.60 quadmath needs c++14 and not gnu++14
+ GEOGRAPHICLIB_PRECISION EQUAL 4)
+ # check for C++11 support. This flag is *not* propagated to clients
+ # that use GeographicLib. However, this is of no consequence. When
+ # the client code is being compiled (and the GeographicLib headers
+ # being included), work-alike substitutions are used.
+ # The only "deprecated" flag included here is "0x" to activate C++11
+ # with old versions of g++. We'll add "17" when it's available.
+ # Note: C++11 (actually gnu++14) support is turned on by default in
+ # g++ 6.1 and later.
+ foreach (_F 14 11 0x)
+ set (CXX11_FLAG "-std=c++${_F}")
+ set (_T CXX11TEST${_F})
+ check_cxx_compiler_flag (${CXX11_FLAG} ${_T})
+ if (${_T})
+ break ()
+ endif ()
+ unset (CXX11_FLAG)
+ endforeach ()
+ if (CXX11_FLAG)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_FLAG}")
+ endif ()
+ endif ()
+endif ()
+if (DEVELOPER OR CONVERT_WARNINGS_TO_ERRORS)
+ if (MSVC)
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+ set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /WX")
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /WX")
+ set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /WX")
+ else ()
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+ endif ()
+endif ()
+
+include (CheckCXXSourceCompiles)
+if (MSVC)
+ set (CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+else ()
+ set (CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+endif ()
+# Check whether the C++11 math function: std::expm1, std::atanh,
+# etc. are available. This flag is *not* propagated to clients that use
+# GeographicLib. However, this is of no consequence. When the client
+# code is being compiled (and the GeographicLib headers being included),
+# work-alike substitutions are used.
+check_cxx_source_compiles (
+ "#include
+int main() {
+ int q;
+ return int(std::hypot(3.0, 4.0) + std::expm1(0.5) +
+ std::log1p(2.0) + std::asinh(10.0) +
+ std::atanh(0.8) + std::cbrt(8.0) +
+ std::fma(1.0, 2.0, 3.0) + std::remquo(100.0, 90.0, &q) +
+ std::remainder(100.0, 90.0) + std::copysign(1.0, -0.0)) +
+ std::isfinite(4.0) + std::isnan(0.0);
+}\n" CXX11_MATH)
+if (CXX11_MATH)
+ add_definitions (-DGEOGRAPHICLIB_CXX11_MATH=1)
+else ()
+ add_definitions (-DGEOGRAPHICLIB_CXX11_MATH=0)
+endif ()
+
+# Check whether the C++11 static_assert macro is available. This flag
+# is *not* propagated to clients that use GeographicLib. However, this
+# is of no consequence. When the client code is being compiled (and the
+# GeographicLib headers being included), a work-alike substitution is
+# used.
+check_cxx_source_compiles (
+ "#include
+int main() {
+ static_assert(true, \"static assert test\");
+ return 0;
+}\n" CXX11_STATIC_ASSERT)
+if (CXX11_STATIC_ASSERT)
+ add_definitions (-DGEOGRAPHICLIB_HAS_STATIC_ASSERT=1)
+else ()
+ add_definitions (-DGEOGRAPHICLIB_HAS_STATIC_ASSERT=0)
+endif ()
+
+# Set the include directories. Look in ${PROJECT_BINARY_DIR}/include
+# first because that's where Config.h will be
+include_directories ("${PROJECT_BINARY_DIR}/include" include)
+
+#if (USE_BOOST_FOR_EXAMPLES)
+# # quad precision numbers appeared in Boost 1.54.
+# find_package (Boost 1.54 COMPONENTS serialization)
+#elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
+# if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
+# find_package (Boost 1.54)
+# endif ()
+#endif ()
+
+set (HIGHPREC_LIBRARIES)
+if (GEOGRAPHICLIB_PRECISION EQUAL 1)
+ message (WARNING "Compiling with floats which results in poor accuracy")
+elseif (GEOGRAPHICLIB_PRECISION EQUAL 2)
+ # This is the default
+elseif (GEOGRAPHICLIB_PRECISION EQUAL 3)
+ if (WIN32)
+ message (WARNING
+ "Cannot support long double on Windows, switching to double")
+ set (GEOGRAPHICLIB_PRECISION 2)
+ endif ()
+elseif (GEOGRAPHICLIB_PRECISION EQUAL 4)
+ if (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND CXX11_MATH)
+ if (Boost_FOUND)
+ include_directories ("${Boost_INCLUDE_DIRS}")
+ set (HIGHPREC_LIBRARIES quadmath)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+ # Enable Q suffix for quad precision in g++ 4.8 and later
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fext-numeric-literals")
+ endif ()
+ # Boost uses std::auto_ptr which is deprecated in C++11. Suppress
+ # ensuing warnings. See also
+ # https://svn.boost.org/trac/boost/ticket/11411
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+ # Suppress the warnings that boost can spew out, e.g.,
+ # "typedef 'boost_concept_check905' locally defined but not used"
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs")
+ endif ()
+ endif ()
+ if (NOT HIGHPREC_LIBRARIES)
+ message (WARNING "Cannot support quad precision, switching to double")
+ set (GEOGRAPHICLIB_PRECISION 2)
+ endif ()
+elseif (GEOGRAPHICLIB_PRECISION EQUAL 5)
+ if (CXX11_MATH)
+ # Install MPFR C++ version 3.6.5 (2016-12-19) or later from
+ # http://www.holoborodko.com/pavel/mpfr and install mpreal.h in the
+ # include directory. NOTE: MPFR C++ is covered by the GPL; be sure
+ # to abide by the terms of this license.
+ #
+ # For Linux, use system versions of mpfr and gmp. For Apple, use
+ # brew install mpfr. Recent versions of mpfr (3.0 or later) work
+ # fine. For Windows, download MPFR-MPIR-x86-x64-MSVC2010.zip from
+ # the MPFR C++ site and unpack in the top-level directory. The
+ # Windows build only works with GEOGRAPHICLIB_LIB_TYPE=STATIC.
+ # NOTE: mpfr, gmp, and mpir are covered by the LGPL; be sure to
+ # abide by the terms of this license.
+ #
+ # Need Visual Studio 12 2013 or later, g++ 4.5 or later; not sure
+ # about clang.
+ if (WIN32)
+ if (MSVC AND NOT MSVC_VERSION LESS 1800)
+ if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set (_ARCH x64)
+ else ()
+ set (_ARCH Win32)
+ endif ()
+ include_directories (mpfr_mpir_x86_x64_msvc2010/mpfr
+ mpfr_mpir_x86_x64_msvc2010/mpir/dll/${_ARCH}/Release)
+ # These are C libraries so it's OK to use release versions for
+ # debug builds. Also these work for later versions of Visual
+ # Studio (specifically version 12).
+ link_directories (mpfr_mpir_x86_x64_msvc2010/mpfr/dll/${_ARCH}/Release
+ mpfr_mpir_x86_x64_msvc2010/mpir/dll/${_ARCH}/Release)
+ set (HIGHPREC_LIBRARIES mpfr mpir)
+ # Suppress the myriad of "conditional expression is constant"
+ # warnings
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4127")
+ endif ()
+ else ()
+ if (APPLE)
+ include_directories (/usr/local/include)
+ link_directories (/usr/local/lib)
+ endif ()
+ # g++ before 4.5 doesn't work (no explicit cast operator)
+ if (NOT (CMAKE_CXX_COMPILER_ID STREQUAL GNU AND
+ CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.5))
+ set (HIGHPREC_LIBRARIES mpfr gmp)
+ endif ()
+ endif ()
+ endif ()
+ if (NOT HIGHPREC_LIBRARIES)
+ message (WARNING "Cannot support mpfr, switching to double")
+ set (GEOGRAPHICLIB_PRECISION 2)
+ endif ()
+endif ()
+
+if (APPLE AND APPLE_MULTIPLE_ARCHITECTURES)
+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR
+ CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
+ CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
+ set (CMAKE_OSX_ARCHITECTURES "i386;x86_64")
+ endif ()
+endif ()
# Create a Config.h to expose system information to the compiler
configure_file (
include/GeographicLib/Config.h.in
- include/GeographicLib/Config.h )
+ include/GeographicLib/Config.h
+ @ONLY)
-# The documentation depends on doxygen. Need version 1.8.1.2 or later
-# for support of greek letters and math symbols.
+# The documentation depends on doxygen.
if (GEOGRAPHICLIB_DOCUMENTATION)
set (DOXYGEN_SKIP_DOT ON)
- find_package (Doxygen 1.8.1.2)
- if (DOXYGEN_FOUND)
- execute_process (COMMAND ${DOXYGEN_EXECUTABLE} --version
- OUTPUT_VARIABLE DOXYGEN_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (DOXYGEN_VERSION VERSION_LESS 1.4.0)
- set (DOXYGEN_FOUND FALSE)
- message (STATUS "Doxygen version found, ${DOXYGEN_VERSION}, is too old")
- endif ()
- endif ()
+ # Version 1.8.7 or later needed for …
+ find_package (Doxygen 1.8.7)
+ # For JavaScript documentation
+ find_program (JSDOC jsdoc)
+ # For Python documentation
+ find_program (SPHINX sphinx-build)
endif ()
# The man pages are written as pod files and converted to nroff format,
@@ -262,7 +447,9 @@ endif ()
# available on an end-user's system, the creation of the final
# documentation is therefore only done in "MAINTAINER" mode. The
# maintainer runs "make distrib-all" which installs the transformed
-# documentation files into the source tree.
+# documentation files into the source tree. Skip Apple here because
+# man/makeusage.sh uses "head --lines -4" to drop the last 4 lines of a
+# file and there's no simple equivalent for MacOSX
if (NOT WIN32 AND NOT APPLE)
find_program (HAVE_POD2MAN pod2man)
find_program (HAVE_POD2HTML pod2html)
@@ -278,116 +465,54 @@ if (MAINTAINER)
add_dependencies (distrib-all distrib-man)
endif ()
-# Look for the tool to compile the Matlab interfaces.
-if (MATLAB_COMPILER)
- if (WIN32)
- set (MATLAB_COMPILER_EXT ".bat")
- else ()
- set (MATLAB_COMPILER_EXT "")
- endif ()
- find_program (MEX "${MATLAB_COMPILER}${MATLAB_COMPILER_EXT}")
- if (MATLAB_COMPILER MATCHES "mex")
- get_filename_component (MATLABDIR "${MEX}" REALPATH)
- get_filename_component (MATLABDIR "${MATLABDIR}" PATH)
- find_program (MEXEXTPROG "mexext${MATLAB_COMPILER_EXT}"
- PATHS "${MATLABDIR}")
- execute_process (COMMAND "${MEXEXTPROG}"
- OUTPUT_VARIABLE MEXEXT OUTPUT_STRIP_TRAILING_WHITESPACE)
- set (MEXOPTIONS "-largeArrayDims")
- else ()
- set (MEXEXT "mex")
- set (MEXOPTIONS "--mex")
- endif ()
- if (NOT MSVC)
- # mex files are shared objects => require static lib to be built with
- # position independent code
- set (CMAKE_POSITION_INDEPENDENT_CODE ON)
- endif ()
- if (NOT MEX)
- message (WARNING
- "Cannot find Matlab compiler ${MATLAB_COMPILER}${MATLAB_COMPILER_EXT}")
- elseif (NOT MEXEXT)
- set (MEX OFF)
- message (WARNING "Cannot determine extension for Matlab compiled code")
- endif ()
-endif ()
-
-# Set a default build type for single-configuration cmake generators if
-# no build type is set.
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+ # Set a default build type for single-configuration cmake generators
+ # if no build type is set.
set (CMAKE_BUILD_TYPE Release)
endif ()
-# Make the compiler more picky.
-if (MSVC)
- string (REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
-else ()
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
- # check for C++11 support. If available, the C++11 static_assert and
- # various math functions (std::atanh, etc.) are used. This flag is
- # *not* propagated to clients that use GeographicLib. However, this
- # is of no consequence. When the client code is being compiled (and
- # the GeographicLib headers being included), work-alike substitutions
- # for static_assert and std::atanh are used.
- include (CheckCXXCompilerFlag)
- set (CXX11FLAG "-std=c++11")
- check_cxx_compiler_flag (${CXX11FLAG} CXX11TEST1)
- if (NOT CXX11TEST1)
- set (CXX11FLAG "-std=c++0x")
- check_cxx_compiler_flag (${CXX11FLAG} CXX11TEST2)
- if (NOT CXX11TEST2)
- unset (CXX11FLAG)
- endif ()
- endif ()
- if (CXX11FLAG)
- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11FLAG}")
- endif ()
-endif ()
-
-if (APPLE)
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" OR
- CMAKE_SYSTEM_PROCESSOR MATCHES "amd64" OR
- CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
- set (CMAKE_OSX_ARCHITECTURES "i386 -arch x86_64")
- endif ()
+# Set output directories for Windows so that executables and dlls are
+# put in the same place
+if (WIN32)
+ # static libaries
+ set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
+ # shared libraries
+ set (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
+ # executables and dlls
+ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
endif ()
# The list of tools (to be installed into, e.g., /usr/local/bin)
#set (TOOLS CartConvert ConicProj GeodesicProj GeoConvert GeodSolve
-# GeoidEval Gravity MagneticField Planimeter TransverseMercatorProj)
+# GeoidEval Gravity MagneticField Planimeter RhumbSolve TransverseMercatorProj)
# The list of scripts (to be installed into, e.g., /usr/local/sbin)
-set (SCRIPTS
- geographiclib-get-geoids geographiclib-get-gravity geographiclib-get-magnetic)
+#set (SCRIPTS geographiclib-get-geoids geographiclib-get-gravity
+# geographiclib-get-magnetic)
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
-# Set the include directories. Look in ${PROJECT_BINARY_DIR}/include
-# first because that's where Config.h will be
-include_directories ("${PROJECT_BINARY_DIR}/include" include)
-
# The list of subdirectories to process
add_subdirectory (src)
add_subdirectory (include/GeographicLib)
-# add_subdirectory (tools)
+add_subdirectory (tools)
add_subdirectory (man)
add_subdirectory (doc)
+add_subdirectory (js)
add_subdirectory (matlab)
add_subdirectory (python/geographiclib)
-# if (GEOGRAPHICLIB_PRECISION EQUAL 2)
-# # The examples assume double precision
-# add_subdirectory (examples)
-# endif ()
-if (BUILD_NETGEOGRAPHICLIB)
- set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
- set (NETLIBNAME NETGeographic)
- add_subdirectory (dotnet/NETGeographicLib)
- if (GEOGRAPHICLIB_PRECISION EQUAL 2)
- add_subdirectory (dotnet/examples/ManagedCPP)
- endif ()
-endif ()
+#add_subdirectory (examples)
+#if (MSVC AND BUILD_NETGEOGRAPHICLIB)
+# if (GEOGRAPHICLIB_PRECISION EQUAL 2)
+# set (NETGEOGRAPHICLIB_LIBRARIES NETGeographicLib)
+# set (NETLIBNAME NETGeographic)
+# add_subdirectory (dotnet/NETGeographicLib)
+# add_subdirectory (dotnet/examples/ManagedCPP)
+# else ()
+# message (WARNING "Build of NETGeographicLib only works with doubles")
+# endif ()
+#endif ()
add_subdirectory (cmake)
-if (EXISTS ${PROJECT_SOURCE_DIR}/tests/CMakeLists.txt)
+if (DEVELOPER)
add_subdirectory (tests)
endif ()
@@ -421,10 +546,10 @@ set (CPACK_SOURCE_IGNORE_FILES
"${PROJECT_SOURCE_DIR}/BUILD"
"${PROJECT_SOURCE_DIR}/(tests|testdata|cgi-bin|.*\\\\.cache)/"
"${PROJECT_SOURCE_DIR}/(distrib|.*-distrib|.*-installer|geodesic-papers)/"
- "${PROJECT_SOURCE_DIR}/[^/]*\\\\.(html|kmz|pdf)\$"
- "${PROJECT_SOURCE_DIR}/(autogen|biblio|js-compress)\\\\.sh\$"
- "${PROJECT_SOURCE_DIR}/(geodesic-biblio.txt|makefile-admin|[^/]*\\\\.png)\$"
- "${PROJECT_SOURCE_DIR}/matlab/matlab-.*blurb.txt\$" )
+ "${PROJECT_SOURCE_DIR}/[^/]*\\\\.(xml|html|css|kmz|pdf)\$"
+ "${PROJECT_SOURCE_DIR}/(autogen|biblio)\\\\.sh\$"
+ "${PROJECT_SOURCE_DIR}/(robots.txt|geodesic-biblio.txt|makefile-admin|[^/]*\\\\.png)\$"
+ "${PROJECT_SOURCE_DIR}/matlab/.*blurb.txt\$")
set (CPACK_SOURCE_GENERATOR TGZ)
set (CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.txt)
@@ -435,31 +560,31 @@ if (WIN32)
# The Windows binary packager is NSIS. Set the necessary variables
# for this.
set (CPACK_NSIS_CONTACT "charles@karney.com")
- set (CPACK_NSIS_URL_INFO_ABOUT "http://geographiclib.sf.net")
+ set (CPACK_NSIS_URL_INFO_ABOUT "https://geographiclib.sourceforge.io")
set (CPACK_NSIS_HELP_LINK "mailto:charles@karney.com")
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
- # Hardcode the prefix for Visual Studio 10
- set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc10-x64")
+ # Hardcode the prefix for Visual Studio 12 2013
+ set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc12-x64")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}-win64")
set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} x64 ${PROJECT_VERSION}")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY
"${PROJECT_NAME}-x64-${PROJECT_VERSION}")
else ()
- # Hardcode the prefix for Visual Studio 10
- set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc10")
+ # Hardcode the prefix for Visual Studio 12 2013
+ set (CPACK_NSIS_INSTALL_ROOT "C:\\\\pkg-vc12-win32")
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}-win32")
- set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} ${PROJECT_VERSION}")
+ set (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} win32 ${PROJECT_VERSION}")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY
- "${PROJECT_NAME}-${PROJECT_VERSION}")
+ "${PROJECT_NAME}-win32-${PROJECT_VERSION}")
endif ()
set (CPACK_NSIS_DISPLAY_NAME ${CPACK_NSIS_PACKAGE_NAME})
set (CPACK_NSIS_MENU_LINKS
- "http://geographiclib.sf.net/${PROJECT_VERSION}/index.html"
+ "https://geographiclib.sourceforge.io/${PROJECT_VERSION}/index.html"
"Library documentation"
- "http://geographiclib.sf.net/${PROJECT_VERSION}/utilities.html"
+ "https://geographiclib.sourceforge.io/${PROJECT_VERSION}/utilities.html"
"Utilities documentation"
- "http://geographiclib.sf.net" "GeographicLib home page"
- "http://sf.net/projects/geographiclib/" "Main project page")
+ "https://geographiclib.sourceforge.io" "GeographicLib home page"
+ "https://sourceforge.net/projects/geographiclib/" "Main project page")
set (CPACK_NSIS_MODIFY_PATH ON)
elseif (APPLE)
# Not tested
@@ -510,7 +635,7 @@ if (MAINTAINER)
_CPack_Packages/Linux-Source/TGZ.DOS/ &&
cd _CPack_Packages/Linux-Source/TGZ.DOS &&
find . -type f |
- egrep '/\(doxyfile.*\\.in|MANIFEST.in|NEWS|AUTHORS|INSTALL|pom\\.xml|dummy.*\\.in|.*\\.\(cpp|hpp|h\\.in|txt|pro|usage|pod|py|m|mac|cmake\\.in|cmake|h|js|c|for|dox|cs|vb|inc|java|html\\.in\)\)$$' |
+ egrep -v '/\(compile|config[^/]*|depcomp|install-sh|missing|[Mm]akefile[^/]*|[^/]*\\.\(ac|am|csproj|eps|kmz|m4|pdf|png|resx|settings|sh|sln|vcproj|vcxproj\)\)$$' |
xargs unix2dos -q -k &&
find ${CPACK_SOURCE_PACKAGE_FILE_NAME} -type f |
zip -q ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.zip -@
@@ -518,5 +643,5 @@ if (MAINTAINER)
add_dependencies (dist distrib-all)
endif ()
-# Add a test target; the tests are in tools.
-enable_testing ()
+# The test suite -- split into a separate file because it's rather large.
+#include (tools/tests.cmake)
diff --git a/gtsam/3rdparty/GeographicLib/INSTALL b/gtsam/3rdparty/GeographicLib/INSTALL
index f669d15f1..79d1162a5 100644
--- a/gtsam/3rdparty/GeographicLib/INSTALL
+++ b/gtsam/3rdparty/GeographicLib/INSTALL
@@ -1,3 +1,3 @@
For installation instructions, open
- http://geographiclib.sourceforge.net/html/install.html
+ https://geographiclib.sourceforge.io/html/install.html
diff --git a/gtsam/3rdparty/GeographicLib/LICENSE.txt b/gtsam/3rdparty/GeographicLib/LICENSE.txt
index e70861b2a..d0df4c1aa 100644
--- a/gtsam/3rdparty/GeographicLib/LICENSE.txt
+++ b/gtsam/3rdparty/GeographicLib/LICENSE.txt
@@ -1,6 +1,7 @@
-This license applies to GeographicLib, versions 1.12 and later.
+The MIT License (MIT); this license applies to GeographicLib,
+versions 1.12 and later.
-Copyright (c) 2008-2013, Charles Karney
+Copyright (c) 2008-2017, Charles Karney
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
diff --git a/gtsam/3rdparty/GeographicLib/Makefile.am b/gtsam/3rdparty/GeographicLib/Makefile.am
index 8accc4719..f7a0f419f 100644
--- a/gtsam/3rdparty/GeographicLib/Makefile.am
+++ b/gtsam/3rdparty/GeographicLib/Makefile.am
@@ -7,34 +7,44 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src man tools doc include matlab python cmake examples
+SUBDIRS = src man tools doc js include matlab python cmake examples
-EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL pom.xml \
- Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
+EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL README.md \
+ Makefile.mk CMakeLists.txt windows maxima doc legacy java js dotnet \
+ wrapper
+
+# Install the pkg-config file; the directory is set using
+# PKG_INSTALLDIR in configure.ac.
+pkgconfig_DATA = cmake/geographiclib.pc
dist-hook:
- rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
- find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
- rm -rf $(distdir)/java/targets ; \
- find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
- find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
+ rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
+ $(distdir)/doc/GeographicLib.dox
+ find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
+ rm -rf $(distdir)/java/targets
+ find $(distdir)/java -type f -name '*.class' | xargs rm -rf
+ find $(distdir)/wrapper -mindepth 2 -type d | xargs rm -rf
+ find $(distdir)/wrapper -type f -name '*.o' -o -name '*.mex*' | \
+ xargs rm -f
+ find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
find $(distdir)/windows -type f \
! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
- xargs rm -f ; \
+ xargs rm -f
find $(distdir) \
- \( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
- xargs rm -rf ; \
- echo include Makefile.mk > $(distdir)/Makefile ; \
+ \( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
+ xargs rm -rf
+ echo include Makefile.mk > $(distdir)/Makefile
sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
-e "s/PATCH .*/PATCH ${GEOGRAPHICLIB_VERSION_PATCH}/" \
$(top_srcdir)/include/GeographicLib/Config.h > \
$(distdir)/include/GeographicLib/Config.h
+
# Custom rules
all-local: man doc
-install-data-local: install-doc # install-matlab
+install-data-local: install-doc
doc: man
$(MAKE) -C doc doc
@@ -45,7 +55,4 @@ install-doc:
man:
$(MAKE) -C man man
-# install-matlab:
-# $(MAKE) -C matlab install-matlab
-
.PHONY: doc install-doc man install-matlab install-python
diff --git a/gtsam/3rdparty/GeographicLib/Makefile.in b/gtsam/3rdparty/GeographicLib/Makefile.in
index a8345a2e2..1325b01c8 100644
--- a/gtsam/3rdparty/GeographicLib/Makefile.in
+++ b/gtsam/3rdparty/GeographicLib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -18,24 +18,63 @@
# Makefile.am
#
# Copyright (C) 2009, Francesco P. Lovergine
+
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -56,47 +95,110 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = .
-DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/configure \
- $(top_srcdir)/include/GeographicLib/Config-ac.h.in AUTHORS \
- INSTALL NEWS config.guess config.sub depcomp install-sh \
- ltmain.sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(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.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/include/GeographicLib/Config-ac.h.in AUTHORS \
+ INSTALL NEWS compile config.guess config.sub depcomp \
+ install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -141,6 +243,7 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -189,6 +292,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -207,9 +311,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POD2HTML = @POD2HTML@
POD2MAN = @POD2MAN@
-POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -258,6 +364,7 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
@@ -275,10 +382,15 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src man tools doc include matlab python cmake examples
-EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL pom.xml \
- Makefile.mk CMakeLists.txt windows maxima doc legacy java dotnet
+SUBDIRS = src man tools doc js include matlab python cmake examples
+EXTRA_DIST = AUTHORS 00README.txt LICENSE.txt NEWS INSTALL README.md \
+ Makefile.mk CMakeLists.txt windows maxima doc legacy java js dotnet \
+ wrapper
+
+# Install the pkg-config file; the directory is set using
+# PKG_INSTALLDIR in configure.ac.
+pkgconfig_DATA = cmake/geographiclib.pc
all: all-recursive
.SUFFIXES:
@@ -297,7 +409,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -318,8 +429,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
include/GeographicLib/Config-ac.h: include/GeographicLib/stamp-h1
- @if test ! -f $@; then rm -f include/GeographicLib/stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/GeographicLib/stamp-h1; else :; fi
+ @test -f $@ || rm -f include/GeographicLib/stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/GeographicLib/stamp-h1
include/GeographicLib/stamp-h1: $(top_srcdir)/include/GeographicLib/Config-ac.h.in $(top_builddir)/config.status
@rm -f include/GeographicLib/stamp-h1
@@ -340,6 +451,27 @@ clean-libtool:
distclean-libtool:
-rm -f libtool config.lt
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
@@ -347,14 +479,13 @@ distclean-libtool:
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
-$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
@@ -375,31 +506,13 @@ $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
-cscopelist-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
- done
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -415,12 +528,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -432,15 +540,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -449,18 +553,16 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
-
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
-
clean-cscope:
-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
-cscope.files: clean-cscope cscopelist-recursive cscopelist
-
-cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP)'; \
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
@@ -545,7 +647,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@@ -561,11 +663,17 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: 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
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -583,7 +691,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -593,22 +701,23 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -663,9 +772,12 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile all-local
+all-am: Makefile $(DATA) all-local
installdirs: installdirs-recursive
installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
@@ -718,7 +830,7 @@ info: info-recursive
info-am:
-install-data-am: install-data-local
+install-data-am: install-data-local install-pkgconfigDATA
install-dvi: install-dvi-recursive
@@ -764,54 +876,59 @@ ps: ps-recursive
ps-am:
-uninstall-am:
+uninstall-am: uninstall-pkgconfigDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
- cscopelist-recursive ctags-recursive install-am install-strip \
- tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am all-local am--refresh check check-am clean \
- clean-cscope clean-generic clean-libtool cscope cscopelist \
- cscopelist-recursive ctags ctags-recursive dist dist-all \
- dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \
- dist-xz dist-zip distcheck distclean distclean-generic \
- distclean-hdr distclean-libtool distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-data install-data-am \
- install-data-local install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
+ dist-tarZ dist-xz dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-data-local install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgconfigDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
dist-hook:
- rm -rf $(distdir)/doc/html $(distdir)/doc/manpages ; \
- find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf ; \
- rm -rf $(distdir)/java/targets ; \
- find $(distdir)/java -type f -name '*.class' | xargs rm -rf ; \
- find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf ; \
+ rm -rf $(distdir)/doc/html $(distdir)/doc/manpages \
+ $(distdir)/doc/GeographicLib.dox
+ find $(distdir)/maxima -type f -name '*.lsp' | xargs rm -rf
+ rm -rf $(distdir)/java/targets
+ find $(distdir)/java -type f -name '*.class' | xargs rm -rf
+ find $(distdir)/wrapper -mindepth 2 -type d | xargs rm -rf
+ find $(distdir)/wrapper -type f -name '*.o' -o -name '*.mex*' | \
+ xargs rm -f
+ find $(distdir)/windows -mindepth 1 -type d | xargs rm -rf
find $(distdir)/windows -type f \
! \( -name '*.sln' -o -name '*.vc*proj' -o -name '*.mk' \)| \
- xargs rm -f ; \
+ xargs rm -f
find $(distdir) \
- \( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \)| \
- xargs rm -rf ; \
- echo include Makefile.mk > $(distdir)/Makefile ; \
+ \( -name .svn -o -name '.git*' -o -name CVS -o -name Makefile -o -name '*~' -o -name '*#*' -o -name 'CMakeFiles' -o -name '*.log' -o -name '*.tmp' -o -name '*.pyc' -o -name '*.bak' -o -name '*.BAK' -o -name geographiclib.js \) | \
+ xargs rm -rf
+ echo include Makefile.mk > $(distdir)/Makefile
sed -e "s/Unconfigured/$(PACKAGE_VERSION)/" \
-e "s/MAJOR .*/MAJOR ${GEOGRAPHICLIB_VERSION_MAJOR}/" \
-e "s/MINOR .*/MINOR ${GEOGRAPHICLIB_VERSION_MINOR}/" \
-e "s/PATCH .*/PATCH ${GEOGRAPHICLIB_VERSION_PATCH}/" \
$(top_srcdir)/include/GeographicLib/Config.h > \
$(distdir)/include/GeographicLib/Config.h
+
# Custom rules
all-local: man doc
-install-data-local: install-doc # install-matlab
+install-data-local: install-doc
doc: man
$(MAKE) -C doc doc
@@ -822,9 +939,6 @@ install-doc:
man:
$(MAKE) -C man man
-# install-matlab:
-# $(MAKE) -C matlab install-matlab
-
.PHONY: doc install-doc man install-matlab install-python
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/gtsam/3rdparty/GeographicLib/Makefile.mk b/gtsam/3rdparty/GeographicLib/Makefile.mk
index e9d2b6368..90fb16f6e 100644
--- a/gtsam/3rdparty/GeographicLib/Makefile.mk
+++ b/gtsam/3rdparty/GeographicLib/Makefile.mk
@@ -1,17 +1,18 @@
MAKEFILE := $(lastword $(MAKEFILE_LIST))
MAKE := $(MAKE) -f $(MAKEFILE)
-SUBDIRS = src man tools doc
+SUBDIRS = src man tools doc js
ALLDIRS = include $(SUBDIRS) maxima matlab python cmake
-all: src man tools
+all: src man tools js
$(SUBDIRS):
$(MAKE) -C $@
tools: src
install: install-headers install-lib install-tools install-man install-cmake \
- install-doc install-matlab install-python
-clean: clean-src clean-tools clean-doc clean-man clean-matlab clean-python
+ install-doc install-js install-matlab install-python
+clean: clean-src clean-tools clean-doc clean-js clean-man clean-matlab \
+ clean-python
install-headers:
$(MAKE) -C include install
@@ -23,6 +24,8 @@ install-cmake:
$(MAKE) -C cmake install
install-doc: doc
$(MAKE) -C doc install
+install-js: js
+ $(MAKE) -C js install
install-man: man
$(MAKE) -C man install
install-matlab: matlab
@@ -35,6 +38,8 @@ clean-tools:
$(MAKE) -C tools clean
clean-doc:
$(MAKE) -C doc clean
+clean-js:
+ $(MAKE) -C js clean
clean-man:
$(MAKE) -C man clean
clean-matlab: matlab
@@ -44,8 +49,8 @@ clean-python: python
VERSION:=$(shell grep '\bVERSION=' configure | cut -f2 -d\' | head -1)
-.PHONY: all $(SUBDIRS) install \
- install-headers install-lib install-tools install-cmake install-man \
- install-matlab install-python \
- clean clean-src clean-tools clean-doc clean-man clean-matlab \
+.PHONY: all $(SUBDIRS) install clean \
+ install-headers install-lib install-tools install-man install-cmake \
+ install-doc install-js install-matlab install-python \
+ clean-src clean-tools clean-doc clean-js clean-man clean-matlab \
clean-python
diff --git a/gtsam/3rdparty/GeographicLib/NEWS b/gtsam/3rdparty/GeographicLib/NEWS
index 71b3d25d2..b1076d60d 100644
--- a/gtsam/3rdparty/GeographicLib/NEWS
+++ b/gtsam/3rdparty/GeographicLib/NEWS
@@ -2,243 +2,985 @@ A reverse chronological list of changes to GeographicLib
For more information, see
- http://geographiclib.sourceforge.net/
+ https://geographiclib.sourceforge.io/
-The current version of the library is 1.35.
+The current version of the library is 1.49.
+
+Changes between 1.49 (released 2017-10-05) and 1.48 versions:
+
+ * Add the Enhanced Magnetic Model 2017, emm2017. This is valid for
+ 2000 thru the end of 2021.
+
+ * Avoid potential problems with the order of initializations in DMS,
+ GARS, Geohash, Georef, MGRS, OSGB, SphericalEngine; this only would
+ have been an issue if GeographicLib objects were instantiated
+ globally. Now no GeographicLib initialization code should be run
+ prior to the entry of main().
+
+ * To support the previous fix, add an overload, Utility::lookup(const
+ char* s, char c).
+
+ * NearestNeighbor::Search throws an error if pts is the wrong size
+ (instead of merely returning no results).
+
+ * Use complex arithmetic for Clenshaw sums in TransverseMercator and
+ tranmerc_{fwd,inv}.m.
+
+ * Changes in cmake support:
+ + fix compiler flags for GEOGRAPHICLIB_PRECISION = 4;
+ + add CONVERT_WARNINGS_TO_ERRORS option (default OFF), if ON then
+ compiler warnings are treated as errors.
+
+ * Fix warnings about implicit conversions of doubles to bools in C++,
+ C, and JavaScript packages.
+
+ * Binary installers for Windows now use Visual Studio 14 2015.
+
+Changes between 1.48 (released 2017-04-09) and 1.47 versions:
+
+ * The "official" URL for GeographicLib is now
+ https://geographiclib.sourceforge.io (instead of
+ http://geographiclib.sourceforge.net).
+
+ * The default range for longitude and azimuth is now (-180d, 180d],
+ instead of [-180d, 180d). This was already the case for the C++
+ library; now the change has been made to the other implementations
+ (C, Fortran, Java, JavaScript, Python, MATLAB, and Maxima).
+
+ * Changes to NearestNeighbor:
+ + fix BUG in reading a NearestNeighbor object from a stream which
+ sometimes incorrectly caused a "Bad index" exception to be thrown;
+ + add operator<<, operator>>, swap,
+ std::swap(NearestNeighbor&, NearestNeighbor&);
+
+ * Additions to the documentation:
+ + add documentation on finding nearest neighbors;
+ + normal gravity documentation is now on its own page and now has an
+ illustrative figure;
+ + document the truncation error in the series for auxiliary
+ latitudes.
+
+ * Fix BUGS in MATLAB function geodreckon with mixed scalar and array
+ arguments.
+
+ * Workaround bug in math.fmod for Python 2.7 on 32-bit Windows
+ machines.
+
+ * Changes in cmake support:
+ + add USE_BOOST_FOR_EXAMPLES option (default OFF), if ON search for
+ Boost libraries for building examples;
+ + add APPLE_MULTIPLE_ARCHITECTURES option (default OFF), if ON build
+ for both i386 and x86_64 on Mac OS X systems;
+ + don't add flag for C++11 for g++ 6.0 (since it's not needed).
+
+ * Fix compiler warnings with Visual Studio 2017 and for the C library.
+
+Changes between 1.47 (released 2017-02-15) and 1.46 versions:
+
+ * Add NearestNeighbor class.
+
+ * Improve accuracy of area calculation (fixing a flaw introduced in
+ version 1.46); fix applied in Geodesic, GeodesicExact, and the
+ implementations in C, Fortran, Java, JavaScript, Python, MATLAB, and
+ Maxima.
+
+ * Generalize NormalGravity to allow oblate and prolate ellipsoids. As
+ a consequence a new form of constructor has been introduced and the
+ old form is now deprecated (and because the signatures of the two
+ constructors are similar, the compiler will warn about the use of
+ the old one).
+
+ * Changes in Math class:
+ + Math::sincosd, Math::sind, Math::cosd only return -0 for the case
+ sin(-0);
+ + Math::atan2d and Math::AngNormalize return results in (-180deg,
+ 180deg]; this may affect the longitudes and azimuth returned by
+ several other functions.
+
+ * Add Utility::trim() and Utility::val(); Utility::num() is now
+ DEPRECATED.
+
+ * Changes in cmake support:
+ + remove support of PACKAGE_PATH and INSTALL_PATH in cmake
+ configuration;
+ + fix to FindGeographicLib.cmake to make it work on Debian systems;
+ + use $ (cmake version >= 3.1);
+ + use NAMESPACE for exported targets;
+ + geographiclib-config.cmake exports GEOGRAPHICLIB_DATA,
+ GEOGRAPHICLIB_PRECISION, and GeographicLib_HIGHPREC_LIBRARIES.
+
+ * Add pkg-config support for cmake and autoconf builds.
+
+ * Minor fixes:
+ + fix the order of declarations in C library, incorporating the
+ patches in version 1.46.1;
+ + fix the packaging of the python library, incorporating the patches
+ in version 1.46.3;
+ + restrict junit dependency in the Java package to testing scope
+ (thanks to Mick Killianey);
+ + various behind-the-scenes fixes to EllipticFunction;
+ + fix documentation and default install location for Windows binary
+ installers;
+ + fix clang compiler warnings in GeodesicExactC4 and
+ TransverseMercator.
+
+Changes between 1.46 (released 2016-02-15) and 1.45 versions:
+
+ * The following BUGS have been fixed:
+ + the -w flag to Planimeter(1) was being ignored;
+ + in the Java package, the wrong longitude was being returned with
+ direct geodesic calculation with a negative distance when starting
+ point was at a pole (this bug was introduced in version 1.44);
+ + in the JavaScript package, PolygonArea.TestEdge contained a
+ misspelling of a variable name and other typos (problem found by
+ threepointone).
+
+ * INCOMPATIBLE CHANGES:
+ + make the -w flag (to swap the default order of latitude and
+ longitude) a toggle for all utility programs;
+ + the -a option to GeodSolve(1) now toggles (instead of sets) arc
+ mode;
+ + swap order coslon and sinlon arguments in CircularEngine class.
+
+ * Remove deprecated functionality:
+ + remove gradient calculation from the Geoid class and GeoidEval(1)
+ (this was inaccurate and of dubious utility);
+ + remove reciprocal flattening functions, InverseFlattening in many
+ classes and Constants::WGS84_r(); stop treating flattening > 1 as
+ the reciprocal flattening in constructors;
+ + remove DMS::Decode(string), DMS::DecodeFraction,
+ EllipticFunction:m, EllipticFunction:m1, Math::extradigits,
+ Math::AngNormalize2, PolygonArea::TestCompute;
+ + stop treating LONG_NOWRAP as an alias for LONG_UNROLL in Geodesic
+ (and related classes) and Rhumb;
+ + stop treating full/schmidt as aliases for FULL/SCHMIDT in
+ SphericalEngine (and related classes);
+ + remove qmake project file src/GeographicLib.pro because QtCreator
+ can handle cmake projects now;
+ + remove deprecated Visual Studio 2005 project and solution files.
+
+ * Changes to GeodesicLine and GeodesicLineExact classes; these changes
+ (1) simplify the process of computing waypoints on a geodesic given
+ two endpoints and (2) allow a GeodesicLine to be defined which is
+ consistent with the solution of the inverse problem (in particular
+ Geodesic::InverseLine the specification of south-going lines which
+ pass the poles in a westerly direction by setting sin alpha_1 = -0):
+ + the class stores the distance s13 and arc length a13 to a
+ reference point 3; by default these quantities are NaNs;
+ + GeodesicLine::SetDistance (and GeodesicLine::SetArc) specify the
+ distance (and arc length) to point 3;
+ + GeodesicLine::Distance (and GeodesicLine::Arc) return the distance
+ (and arc length) to point 3;
+ + new methods Geodesic::InverseLine and Geodesic::DirectLine return
+ a GeodesicLine with the reference point 3 defined as point 2 of
+ the corresponding geodesic calculation;
+ + these changes are also included in the C, Java, JavaScript, and
+ Python packages.
+
+ * Other changes to the geodesic routines:
+ + more accurate solution of the inverse problem when longitude
+ difference is close to 180deg (also in C, Fortran, Java,
+ JavaScript, Python, MATLAB, and Maxima packages);
+ + more accurate calculation of lon2 in the inverse calculation with
+ LONG_UNROLL (also in Java, JavaScript, Python packages).
+
+ * Changes to GeodSolve(1) utility:
+ + the -I and -D options now specify geodesic line calculation via
+ the standard inverse or direct geodesic problems;
+ + rename -l flag to -L to parallel the new -I and -D flags (-l is is
+ retained for backward compatibility but is deprecated), and
+ similarly for RhumbSolve(1);
+ + the -F flag (in conjunction with the -I or -D flags) specifies
+ that distances read on standard input are fractions of s13 or a13;
+ + the -a option now toggles arc mode (noted above);
+ + the -w option now toggles longitude first mode (noted above).
+
+ * Changes to Math class:
+ + Math::copysign added;
+ + add overloaded version of Math::AngDiff which returns the error in
+ the difference. This allows a more accurate treatment of inverse
+ geodesic problem when lon12 is close to 180deg;
+ + Math::AngRound now converts tiny negative numbers to -0 (instead
+ of +0), however -0 is still converted to +0.
+
+ * Add -S and -T options to GeoConvert(1).
+
+ * Add Sphinx documentation for Python package.
+
+ * Samples of wrapping the C++ library, so it's accessible in other
+ languages, are given in wrapper/C, wrapper/python, and
+ wrapper/matlab.
+
+ * Binary installers for Windows now use Visual Studio 12 2013.
+
+ * Remove top-level pom.xml from release (it was specific to SRI).
+
+ * A reminder: because of the JavaScript changes introduced in version
+ 1.45, you should remove the following installation directories from
+ your system:
+ + Windows: ${CMAKE_INSTALL_PREFIX}/doc/scripts
+ + Others: ${CMAKE_INSTALL_PREFIX}/share/doc/GeographicLib/scripts
+
+Changes between 1.45 (released 2015-09-30) and 1.44 versions:
+
+ * Fix BUG in solution of inverse geodesic caused by misbehavior of
+ some versions of Visual Studio on Windows (fmod(-0.0, 360.0) returns
+ +0.0 instead of -0.0) and Octave (sind(-0.0) returns +0.0 instead of
+ -0.0). These bugs were exposed because max(-0.0, +0.0) returns -0.0
+ for some languages.
+
+ * Geodesic::Inverse now correctly returns NaNs if one of the latitudes
+ is a NaN.
+
+ * Changes to JavaScript package:
+ + thanks to help from Yurij Mikhalevich, it is a now a node package
+ that can be installed with npm;
+ + make install now installs the node package in
+ lib/node_modules/geographiclib;
+ + add unit tests using mocha;
+ + add documentation via JSDoc;
+ + fix bug Geodesic.GenInverse (this bug, introduced in version 1.44,
+ resulted in the wrong azimuth being reported for points at the
+ pole).
+
+ * Changes to Java package:
+ + add implementation of ellipsoidal Gnomonic projection (courtesy of
+ Sebastian Mattheis);
+ + add unit tests using JUnit;
+ + Math.toRadians and Math.toDegrees are used instead of
+ GeoMath.degree (which is now removed), as a result...
+ + Java version 1.2 (released 1998-12) or later is now required.
+
+ * Changes to Python package:
+ + add unit tests using the unittest framework;
+ + fixed bug in normalization of the area.
+
+ * Changes to MATLAB package:
+ + fix array size mismatch in geoddistance by avoiding calls to
+ subfunctions with zero-length arrays;
+ + fix tranmerc_{fwd,inv} so that they work with arrays and mixed
+ array/scalar arguments;
+ + work around Octave problem which causes mgrs_fwd to return garbage
+ with prec = 10 or 11;
+ + add geographiclib_test.m to run a test suite.
+
+ * Behavior of substituting 1/f for f if f > 1 is now deprecated. This
+ behavior has been removed from the JavaScript, C, and Python
+ implementations (it was never documented). Maxima, MATLAB, and
+ Fortran implementations never included this behavior.
+
+ * Other changes:
+ + fix bug, introduced in version 1.42, in the C++ implementation to
+ the computation of area which causes NaNs to be returned in the
+ case of a sphere;
+ + fixed bug, introduced in version 1.44, in the detection of C++11
+ math functions in configure.ac;
+ + throw error on non-convergence in Gnomonic::Reverse if
+ GEOGRAPHICLIB_PRECISION > 3;
+ + add geod_polygon_clear to C library;
+ + turn illegal latitudes into NaNs for Fortran library;
+ + add test suites for the C and Fortran libraries.
+
+Changes between 1.44 (released 2015-08-14) and 1.43 versions:
+
+ * Various changes to improve accuracy, e.g., by minimizing round-off
+ errors:
+ + Add Math::sincosd, Math::sind, Math::cosd which take their
+ arguments in degrees. These functions do exact range reduction
+ and thus they obey exactly the elementary properties of the
+ trigonometric functions, e.g., sin 9d = cos 81d
+ = - sin 123456789d.
+ + Math::AngNormalize now works for any angles, instead of angles in
+ the range [-540d, 540d); the function Math::AngNormalize2 is now
+ deprecated.
+ + This means that there is now no restriction on longitudes and
+ azimuths; any values can be used.
+ + Improve the accuracy of Math::atan2d.
+ + DMS::Decode avoids unnecessary round-off errors; thus 7:33:36 and
+ 7.56 result in identical values. DMS::Encode rounds ties to even.
+ These changes have also been made to DMS.js.
+ + More accurate rounding in MGRS::Reverse and mgrs_inv.m; this
+ change only makes a difference at sub-meter precisions.
+ + With MGRS::Forward and mgrs_fwd.m, ensure that digits in lower
+ precision results match those at higher precision; as a result,
+ strings of trailing 9s are less likely to be generated. This
+ change only makes a difference at sub-meter precisions.
+ + Replace the series for A2 in the Geodesic class with one with
+ smaller truncation errors.
+ + Geodesic::Inverse sets s12 to zero for coincident points at pole
+ (instead of returning a tiny quantity).
+ + Math::LatFix returns its argument if it is in [-90d, 90d]; if not,
+ it returns NaN.
+ + Using Math::LatFix, routines which don't check their arguments now
+ interpret a latitude outside the legal range of [-90d, 90d] as a
+ NaN; such routines will return NaNs instead of finite but
+ incorrect results; caution: code that (dangerously) relied on the
+ "reasonable" results being returned for values of the latitude
+ outside the allowed range will now malfunction.
+
+ * All the utility programs accept the -w option to swap the
+ latitude-longitude order on input and output (and where appropriate
+ on the command-line arguments). CartConvert now accepts the -p
+ option to set the precision; now all of the utilities except
+ GeoidEval accept -p.
+
+ * Add classes for GARS, the Global Area Reference System, and for
+ Georef, the World Geographic Reference System.
+
+ * Changes to DMS::Decode and DMS.js:
+ + tighten up the rules:
+ o 30:70.0 and 30:60 are illegal (minutes and second must be
+ strictly less than 60), however
+ o 30:60.0 and 30:60. are legal (floating point 60 is OK, since it
+ might have been generated by rounding 59.99...);
+ + generalize a+b concept, introduced in version 1.42, to any number
+ of pieces; thus 8+0:40-0:0:10 is interpreted as 8:39:50.
+
+ * Documentation fixes:
+ + update man pages to refer to GeoConvert(1) on handling of
+ geographic coordinates;
+ + document limitations of the series used for TransverseMercator;
+ + hide the documentation of the computation of the gradient of the
+ geoid height (now deprecated) in the Geoid class;
+ + warn about the possible misinterpretation of 7.0E+1 by
+ DMS::Decode;
+ + swaplatlong optional argument of DMS::DecodeLatLon and various
+ functions in the GeoCoords class is now called longfirst;
+ + require Doxygen 1.8.7 or later.
+
+ * More systematic treatment of version numbers:
+ + Python: __init__.py defines __version__ and __version_info__;
+ + JavaScript:
+ o Math.js defines Constants.version and Constants.version_string;
+ o version number included as comment in packed script
+ geographiclib.js;
+ o geod-calc.html and geod-google.html report the version number;
+ o https://geographiclib.sourceforge.io/scripts/ gives access to
+ earlier versions of geographiclib.js as geographiclib-m.nn.js;
+ + Fortran: add geover subroutine to return version numbers;
+ + Maxima: geodesic.mac defines geod_version;
+ + CGI scripts: these report the version numbers of the utilities.
+
+ * BUG FIXES:
+ + NormalGravity now works properly for a sphere (omega = f = J2 =
+ 0), instead of returning NaNs (problem found by htallon);
+ + CassiniSoldner::Forward and cassini_fwd.m now returns the correct
+ azimuth for points at the pole.
+
+ * MATLAB-specific fixes:
+ + mgrs_fwd now treats treats prec > 11 as prec = 11;
+ + illegal letter combinations are now correctly detected by
+ mgrs_inv;
+ + fixed bug where mgrs_inv returned the wrong results for prec = 0
+ strings and center = 0;
+ + mgrs_inv now decodes prec = 11 strings properly;
+ + routines now return array results with the right shape;
+ + routines now properly handle mixed scalar and array arguments.
+
+ * Add Accumulator::operator*=(T y).
+
+ * Geohash uses "invalid" instead of "nan" when the latitude or
+ longitude is a nan.
+
+Changes between 1.43 (released 2015-05-23) and 1.42 versions:
+
+ * Add the Enhanced Magnetic Model 2015, emm2015. This is valid for
+ 2000 thru the end of 2019. This required some changes in the
+ MagneticModel and MagneticCircle classes; so this model cannot be
+ used with versions of GeographicLib prior to 1.43.
+
+ * Fix BLUNDER in PolarStereographic constructor introduced in version
+ 1.42. This affected UTMUPS conversions for UPS which could be
+ incorrect by up to 0.5 km.
+
+ * Changes in the LONG_NOWRAP option (added in version 1.39) in the
+ Geodesic and GeodesicLine classes:
+ + The option is now called LONG_UNROLL (a less negative sounding
+ term); the original name, LONG_NOWRAP, is retained for backwards
+ compatibility.
+ + There were two bad BUGS in the implementation of this capability:
+ (a) it gave incorrect results for west-going geodesics; (b) the
+ option was ignored if used directly via the GeodesicLine class.
+ The first bug affected the implementations in all languages. The
+ second affected the implementation in C++ (GeodesicLine and
+ GeodesicLineExact), JavaScript, Java, C, Python. These bugs have
+ now been FIXED.
+ + The GeodSolve utility now accepts a -u option, which turns on the
+ LONG_UNROLL treatment. With this option lon1 is reported as
+ entered and lon2 is given such that lon2 - lon1 indicates how
+ often and in what sense the geodesic has encircled the earth.
+ (This option also affects the value of longitude reported when an
+ inverse calculation is run with the -f option.)
+ + The inverse calculation with the JavaScript and python libraries
+ similarly sets lon1 and lon2 in output dictionary respecting the
+ LONG_UNROLL flag.
+ + The online version of GeodSolve now offers an option to unroll the
+ longitude.
+ + To support these changes DMS::DecodeLatLon no longer reduces the
+ longitude to the range [-180deg, 180deg) and Math::AngRound now
+ coverts -0 to +0.
+
+ * Add Math::polyval (also to C, Java, JavaScript, Fortran, python
+ versions of the library; this is a built-in function for
+ MATLAB/Octave). This evaluates a polynomial using Horner's method.
+ The Maxima-generated code fragments for the evaluation of series in
+ the Geodesic, TransverseMercator, and Rhumb classes and MATLAB
+ routines for great ellipses have been replaced by Maxima-generated
+ arrays of polynomial coefficients which are used as input to
+ Math::polyval.
+
+ * Add MGRS::Check() to verify that a, f, k_UTM, and k_UPS are
+ consistent with the assumptions in the UTMUPS and MGRS classes.
+ This is invoked with GeoConvert --version. (This function was added
+ to document and check the assumptions used in the UTMUPS and MGRS
+ classes in case they are extended to deal with ellipsoids other than
+ WS84.)
+
+ * MATLAB function mgrs_inv now takes an optional center argument and
+ strips white space from both beginning and end of the string.
+
+ * Minor internal changes:
+ + GeodSolve sets the geodesic mask so that unnecessary calculations
+ are avoided;
+ + some routines have migrated into a math class for for python,
+ Java, JavaScript libraries.
+
+ * A reminder: because of changes in the installation directories for
+ non-Windows systems introduced in version 1.42, you should remove
+ the following directories from your system:
+ + ${CMAKE_INSTALL_PREFIX}/share/cmake/GeographicLib*
+ + ${CMAKE_INSTALL_PREFIX}/libexec/GeographicLib/matlab
+
+Changes between 1.42 (released 2015-04-28) and 1.41 versions:
+
+ * DMS::Decode allows a single addition or subtraction operation, e.g.,
+ 70W+0:0:15. This affects the GeoCoords class and the utilities
+ (which use the DMS class for reading coordinates).
+
+ * Add Math::norm, Math::AngRound, Math::tand, Math::atan2d,
+ Math::eatanhe, Math::taupf, Math::tauf, Math::fma and remove
+ duplicated (but private) functionality from other classes.
+
+ * On non-Windows systems, the cmake config-style find_package files
+ are now installed under ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+ instead of ${CMAKE_INSTALL_PREFIX}/share, because the files are
+ architecture-specific. This change will let 32-bit and 64-bit
+ versions coexist on the same machine (in lib and lib64). You should
+ remove the versions in the old "share" location.
+
+ * MATLAB changes:
+ + provide native MATLAB implementations for compiled interface
+ functions;
+ + the compiled MATLAB interface is now deprecated and so the
+ MATLAB_COMPILER option in the cmake build has been removed;
+ + reorganize directories, so that
+ o matlab/geographiclib contains the native matlab code;
+ o matlab/geographiclib-legacy contains wrapper functions to mimic
+ the previous compiled functionality;
+ + the installed MATLAB code mirrors this layout, but the parent
+ installation directory on non-Windows systems is
+ ${CMAKE_INSTALL_PREFIX}/share (instead of
+ ${CMAKE_INSTALL_PREFIX}/libexec), because the files are now
+ architecture independent;
+ + matlab/geographiclib is now packaged and distributed as MATLAB
+ File Exchange package 50605 (this supersedes three earlier MATLAB
+ packages);
+ + point fix for geodarea.m to correct bug in area of polygons which
+ encircle a pole multiple times (released as version 1.41.1 of
+ MATLAB File Exchange package 39108, 2014-04-22).
+
+ * artifactId for Java package changed from GeographicLib to
+ GeographicLib-Java and the package is now deployed to Maven Central
+ (thanks to Chris Bennight for help on this).
+
+ * Fix autoconf mismatch of version numbers (which were inconsistent in
+ versions 1.40 and 1.41).
+
+ * Mark the computation of the gradient of the geoid height in the
+ Geoid class and the GeoidEval utility
+ as deprecated.
+
+ * Work around the boost-quadmath bug with setprecision(0).
+
+ * Deprecate use of Visual Studio 2005 "-vc8" project files in the
+ windows directory.
+
+Changes between 1.41 (released 2015-03-09) and 1.40 versions:
+
+ * Fix bug in Rhumb::Inverse (with exact = true) and related functions
+ which causes the wrong distance to be reported if one of the end
+ points is at a pole. Thanks to Thomas Murray for reporting this.
+
+ * Add International Geomagnetic Reference Field (12th generation),
+ which approximates the main magnetic field of the earth for the
+ period 1900-2020.
+
+ * Split information about Jacobi's conformal projection to a separate
+ section and include more material.
+
+Changes between 1.40 (released 2014-12-18) and 1.39 versions:
+
+ * Add the World Magnetic Model 2015, wmm2015. This is now the default
+ magnetic model for MagneticField (replacing wmm2010 which is valid
+ thru the end of 2014).
+
+ * Geodesic::Inverse didn't return NaN if one of the longitudes was a
+ NaN (bug introduced in version 1.25). Fixed in the C++, Java,
+ JavaScript, C, Fortran, and Python implementations of the geodesic
+ routines. This bug was not present in the Matlab version.
+
+ * Fix bug in Utility::readarray and Utility::writearray which caused
+ an exception in debug mode with zero-sized arrays.
+
+ * Fix BLUNDER in OSGB::GridReference (found by kalderami) where the
+ wrong result was returned if the easting or northing was negative.
+
+ * OSGB::GridReference now returns "INVALID" if either coordinate is
+ NaN. Similarly a grid reference starting with "IN" results in NaNs
+ for the coordinates.
+
+ * Default constructor for GeoCoords corresponds to an undefined
+ position (latitude and longitude = NaN), instead of the north pole.
+
+ * Add an online version of RhumbSolve at
+ https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve.
+
+ * Additions to the documentation:
+ + documentation on Jacobi's conformal projection;
+ + a page on Auxiliary latitudes (actually, this was added in
+ version 1.39);
+ + document the use of two single quotes to stand for a double quote
+ in DMS (this feature was introduced in version 1.13).
+
+ * The Matlab function, geographiclibinterface, which compiles the
+ wrapper routines for Matlab now works with Matlab 2014b on a Mac.
+
+Changes between 1.39 (released 2014-11-11) and 1.38 versions:
+
+ * GeographicLib usually normalizes longitudes to the range [-180deg,
+ 180deg). However, when solving the direct geodesic and rhumb line
+ problems, it is sometimes necessary to know how many lines the line
+ encircled the earth by returning the longitude "unwrapped". So the
+ following changes have been made:
+ + add a LONG_NOWRAP flag to mask enums for the outmask arguments for
+ Geodesic, GeodesicLine, Rhumb, and RhumbLine;
+ + similar changes have been made to the Python, Javascript, and
+ Java implementations of the geodesic routines;
+ + for the C, Fortran, and Matlab implementations the arcmode
+ argument to the routines was generalized to allow a combination of
+ ARCMODE and LONG_NOWRAP bits;
+ + the Maxima version now returns the longitude unwrapped.
+ These changes were necessary to fix the PolygonAreaT::AddEdge (see
+ the next item).
+
+ * Changes in area calculations:
+ + fix BUG in PolygonAreaT::AddEdge (also in C, Java, Javascript, and
+ Python implementations) which sometimes causes the wrong area to
+ be returned if the edge spanned more than 180deg;
+ + add area calculation to the Rhumb and RhumbLine classes and the
+ RhumbSolve utility;
+ + add PolygonAreaRhumb typedef for PolygonAreaT;
+ + add -R option to Planimeter to use PolygonAreaRhumb (and -G option
+ for the default geodesic polygon);
+ + fix BLUNDER in area calculation in Matlab routine geodreckon;
+ + add area calculation to Matlab/Octave routines for great ellipses.
+
+ * Fix bad BUG in Geohash::Reverse; this was introduced in version 1.37
+ and affected all platforms where unsigned longs are 32-bits. Thanks
+ to Christian Csar for reporting and diagnosing this.
+
+ * Binary installers for Windows are now built with Visual Studio 11
+ 2012 (instead of Visual Studio 10 2010). Compiled Matlab support
+ still with version 2013a (64-bit).
+
+ * Update GeographicLib.pro for builds with qmake to include all the
+ source files.
+
+ * Cmake updates:
+ + include cross-compiling checks in cmake config file;
+ + improve the way unsuitable versions are reported;
+ + include_directories (${GeographicLib_INCLUDE_DIRS}) is no longer
+ necessary with cmake 2.8.11 or later.
+
+ * legacy/Fortran now includes drop-in replacements for the geodesic
+ utilities from the NGS.
+
+ * geographiclib-get-{geoids,gravity,magnetic} with no arguments now
+ print the usage instead of loading the minimal sets.
+
+ * Utility::date(const std::string&, int&, int&, int&) and hence the
+ MagneticField utility accepts the string "now" as a legal time
+ (meaning today).
+
+Changes between 1.38 (released 2014-10-02) and 1.37 versions:
+
+ * On MacOSX, the installed package is relocatable (for cmake version
+ 2.8.12 and later).
+
+ * On Mac OSX, GeographicLib can be installed using homebrew.
+
+ * In cmake builds under Windows, set the output directories so that
+ binaries and shared libraries are together.
+
+ * Accept the minus sign as a synonym for - in DMS.{cpp,js}.
+
+ * The cmake configuration file geographiclib-depends.cmake has been
+ renamed to geographiclib-targets.cmake.
+
+ * Matlab/Octave routines for great ellipses added.
+
+ * Provide man pages for geographiclib-get-{geoids,gravity,magnetic}.
+
+Changes between 1.37 (released 2014-08-08) and 1.36 versions:
+
+ * Add support for high precision arithmetic.
+
+ * INCOMPATIBLE CHANGE: the static instantiations of various classes
+ for the WGS84 ellipsoid have been changed to a "construct on first
+ use idiom". This avoids a lot of wasteful initialization before the
+ user's code starts. Unfortunately it means that existing source
+ code that relies on any of the following static variables will need
+ to be changed to a function call:
+ + AlbersEqualArea::AzimuthalEqualAreaNorth
+ + AlbersEqualArea::AzimuthalEqualAreaSouth
+ + AlbersEqualArea::CylindricalEqualArea
+ + Ellipsoid::WGS84
+ + Geocentric::WGS84
+ + Geodesic::WGS84
+ + GeodesicExact::WGS84
+ + LambertConformalConic::Mercator
+ + NormalGravity::GRS80
+ + NormalGravity::WGS84
+ + PolarStereographic::UPS
+ + TransverseMercator::UTM
+ + TransverseMercatorExact::UTM
+ Thus, occurrences of, for example,
+ const Geodesic& geod = Geodesic::WGS84; // version 1.36 and earlier
+ need to be changed to
+ const Geodesic& geod = Geodesic::WGS84(); // version 1.37 and later
+ (note the parentheses!); alternatively use
+ // works with all versions
+ const Geodesic geod(Constants::WGS84_a(), Constants::WGS84_a());
+
+ * Incompatible change: the environment variables
+ {GEOID,GRAVITY,MAGNETIC}_{NAME,PATH} are now prefixed with
+ GEOGRAPHICLIB_.
+
+ * Incompatible change for Windows XP: retire the Windows XP common
+ data path. If you're still using Windows XP, then you might have to
+ move the folder C:\Documents and Settings\All Users\Application
+ Data\GeographicLib to C:\ProgramData\GeographicLib.
+
+ * All macro names affecting the compilation now start with
+ GEOGRAPHICLIB_; this applies to GEOID_DEFAULT_NAME,
+ GRAVITY_DEFAULT_NAME, MAGNETIC_DEFAULT_NAME, PGM_PIXEL_WIDTH,
+ HAVE_LONG_DOUBLE, STATIC_ASSERT, WORDS_BIGENDIAN.
+
+ * Changes to PolygonArea:
+ + introduce PolygonAreaT which takes a geodesic class as a
+ parameter;
+ + PolygonArea and PolygonAreaExact are typedef'ed to
+ PolygonAreaT and PolygonAreaT;
+ + add -E option to Planimeter to use PolygonAreaExact;
+ + add -Q option to Planimeter to calculate the area on the authalic
+ sphere.
+
+ * Add -p option to Planimeter, ConicProj, GeodesicProj,
+ TransverseMercatorProj.
+
+ * Add Rhumb and RhumbLine classes and the RhumbSolve utility.
+
+ * Minor changes to NormalGravity:
+ + add J2ToFlattening and FlatteningToJ2;
+ + use Newton's method to determine f from J2;
+ + in constructor, allow omega = 0 (i.e., treat the spherical case).
+
+ * Add grs80 GravityModel.
+
+ * Make geographiclib-get-{geoids,gravity,magnetic} scripts work on
+ MacOS.
+
+ * Minor changes:
+ + simplify cross-platform support for C++11 mathematical functions;
+ + change way area coefficients are given in GeodesicExact to improve
+ compile times;
+ + enable searching the online documentation;
+ + add macros GEOGRAPHICLIB_VERSION and GEOGRAPHICLIB_VERSION_NUM;
+ + add solution and project files for Visual Studio Express 2010.
+
+Changes between 1.36 (released 2014-05-13) and 1.35 versions:
+
+ * Changes to comply with NGA's prohibition of the use of the
+ upper-case letters N/S to designate the hemisphere when displaying
+ UTM/UPS coordinates:
+ + UTMUPS::DecodeZone allows north/south as hemisphere designators
+ (in addition to n/s);
+ + UTMUPS::EncodeZone now encodes the hemisphere in lower case (to
+ distinguish this use from a grid zone designator);
+ + UTMUPS::EncodeZone takes an optional parameter abbrev to
+ indicate whether to use n/s or north/south as the hemisphere
+ designator;
+ + GeoCoords::UTMUPSRepresentation and AltUTMUPSRepresentation
+ similarly accept the abbrev parameter;
+ + GeoConvert uses the flags -a and -l to govern whether UTM/UPS
+ output uses n/s (the -a flag) or north/south (the -l flag) to
+ denote the hemisphere;
+ + Fixed a bug what allowed +3N to be accepted as an alternation
+ UTM zone designation (instead of 3N).
+ WARNING: The use of lower case n/s for the hemisphere might cause
+ compatibility problems. However DecodeZone has always accepted
+ either case; so the issue will only arise with other software
+ reading the zone information. To avoid possible misinterpretation
+ of the zone designator, consider calling EncodeZone with abbrev =
+ false and GeoConvert with -l, so that north/south are used to
+ denote the hemisphere.
+
+ * MGRS::Forward with prec = -1 will produce a grid zone designation.
+ Similarly MGRS::Reverse will decode a grid zone designation (and
+ return prec = -1).
+
+ * Stop using the throw() declaration specification which is
+ deprecated in C++11.
+
+ * Add missing std:: qualifications to copy in LocalCartesion and
+ Geocentric headers (bug found by Clemens).
Changes between 1.35 (released 2014-03-13) and 1.34 versions:
- * Fix blunder in UTMUPS::EncodeEPSG (found by Ben Adler).
+ * Fix blunder in UTMUPS::EncodeEPSG (found by Ben Adler).
- * Matlab wrapper routines geodesic{direct,inverse,line} switch to
- "exact" routes if |f| > 0.02.
+ * Matlab wrapper routines geodesic{direct,inverse,line} switch to
+ "exact" routes if |f| > 0.02.
- * GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
- for GeodSolve).
+ * GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
+ for GeodSolve).
- * Set title in HTML versions of man pages for the utility programs.
+ * Set title in HTML versions of man pages for the utility programs.
- * Changes in cmake support:
- + add _d to names of executables in debug mode of Visual Studio;
- + add support for Android (cmake-only), thanks to Pullan Yu;
- + check CPACK version numbers supplied on command line;
- + configured version of project-config.cmake.in is
- project-config.cmake (instead of geographiclib-config.cmake), to
- prevent find_package incorrectly using this file;
- + fix tests with multi-line output;
- + this release includes a file, pom.xml, which is used by an
- experimental build system (based on maven) at SRI.
+ * Changes in cmake support:
+ + add _d to names of executables in debug mode of Visual Studio;
+ + add support for Android (cmake-only), thanks to Pullan Yu;
+ + check CPACK version numbers supplied on command line;
+ + configured version of project-config.cmake.in is
+ project-config.cmake (instead of geographiclib-config.cmake), to
+ prevent find_package incorrectly using this file;
+ + fix tests with multi-line output;
+ + this release includes a file, pom.xml, which is used by an
+ experimental build system (based on maven) at SRI.
Changes between 1.34 (released 2013-12-11) and 1.33 versions:
- * Many changes in cmake support:
- + minimum version of cmake needed increased to 2.8.4 (which was
- released in 2011-02);
- + allow building both shared and static librarys with
- -D GEOGRAPHICLIB_LIB_TYPE=BOTH;
- + both shared and static libraries (Release plus Debug) included in
- binary installer;
- + find_package uses COMPONENTS and GeographicLib_USE_STATIC_LIBS to
- select the library to use;
- + find_package version checking allows nmake and Visual Studio
- generators to interoperate on Windows;
- + find_package (GeographicLib ...) requires that GeographicLib be
- capitalized correctly;
- + on Unix/Linux, don't include the version number in directory for
- the cmake configuration files;
- + defaults for GEOGRAPHICLIB_DOCUMENTATION and
- BUILD_NETGEOGRAPHICLIB are now OFF;
- + the GEOGRAPHICLIB_EXAMPLES configuration parameter is no longer
- used; cmake always configures to build the examples, but they are
- not built by default (instead build targets: exampleprograms and
- netexamples);
- + matlab-all target renamed to matlabinterface;
- + the configuration parameters PACKAGE_PATH and INSTALL_PATH are
- now deprecated (use CMAKE_INSTALL_PREFIX instead);
- + on Linux, the installed package is relocatable;
- + on MacOSX, the installed utilities can find the shared library.
+ * Many changes in cmake support:
+ + minimum version of cmake needed increased to 2.8.4 (which was
+ released in 2011-02);
+ + allow building both shared and static librarys with
+ -D GEOGRAPHICLIB_LIB_TYPE=BOTH;
+ + both shared and static libraries (Release plus Debug) included in
+ binary installer;
+ + find_package uses COMPONENTS and GeographicLib_USE_STATIC_LIBS to
+ select the library to use;
+ + find_package version checking allows nmake and Visual Studio
+ generators to interoperate on Windows;
+ + find_package (GeographicLib ...) requires that GeographicLib be
+ capitalized correctly;
+ + on Unix/Linux, don't include the version number in directory for
+ the cmake configuration files;
+ + defaults for GEOGRAPHICLIB_DOCUMENTATION and
+ BUILD_NETGEOGRAPHICLIB are now OFF;
+ + the GEOGRAPHICLIB_EXAMPLES configuration parameter is no longer
+ used; cmake always configures to build the examples, but they are
+ not built by default (instead build targets: exampleprograms and
+ netexamples);
+ + matlab-all target renamed to matlabinterface;
+ + the configuration parameters PACKAGE_PATH and INSTALL_PATH are
+ now deprecated (use CMAKE_INSTALL_PREFIX instead);
+ + on Linux, the installed package is relocatable;
+ + on MacOSX, the installed utilities can find the shared library.
- * Use a more precise value for OSGB::CentralScale().
+ * Use a more precise value for OSGB::CentralScale().
- * Add Arc routines to python interface.
+ * Add Arc routines to python interface.
- * The Geod utility has been removed; the same functionality lives on
- with GeodSolve (introduced in version 1.30).
+ * The Geod utility has been removed; the same functionality lives on
+ with GeodSolve (introduced in version 1.30).
Changes between 1.33 (released 2013-10-08) and 1.32 versions:
- * Add NETGeographic .NET wrapper library (courtesy of Scott Heiman).
+ * Add NETGeographic .NET wrapper library (courtesy of Scott Heiman).
- * Make inspector functions in GeographicLib::Ellipsoid const.
+ * Make inspector functions in GeographicLib::Ellipsoid const.
- * Add Accumulator.cpp to instantiate GeographicLib::Accumulator.
+ * Add Accumulator.cpp to instantiate GeographicLib::Accumulator.
- * Defer some of the initialization of GeographicLib::OSGB to when it
- is first called.
+ * Defer some of the initialization of GeographicLib::OSGB to when it
+ is first called.
- * Fix bug in autoconf builds under MacOS.
+ * Fix bug in autoconf builds under MacOS.
Changes between 1.32 (released 2013-07-12) and 1.31 versions:
- * Generalize C interface for polygon areas to allow vertices to be
- specified incrementally.
+ * Generalize C interface for polygon areas to allow vertices to be
+ specified incrementally.
- * Fix way flags for C++11 support are determined.
+ * Fix way flags for C++11 support are determined.
Changes between 1.31 (released 2013-07-01) and 1.30 versions:
- * Changes breaking binary compatibility (source compatibility is
- maintained):
- + overloaded versions of DMS::Encode,
- EllipticFunction::EllipticFunction, and
- GeoCoords::DMSRepresentation, have been eliminated by the use of
- optional arguments;
- + correct the declaration of first arg to UTMUPS::DecodeEPSG.
+ * Changes breaking binary compatibility (source compatibility is
+ maintained):
+ + overloaded versions of DMS::Encode,
+ EllipticFunction::EllipticFunction, and
+ GeoCoords::DMSRepresentation, have been eliminated by the use of
+ optional arguments;
+ + correct the declaration of first arg to UTMUPS::DecodeEPSG.
- * FIX BUG in GeographicLib::GravityCircle constructor (found by
- Mathieu Peyréga) which caused bogus results for the gravity
- disturbance and gravity anomaly vectors. (This only affected
- calculations using GravityCircle. GravityModel calculations did not
- suffer from this bug.)
+ * FIX BUG in GeographicLib::GravityCircle constructor (found by
+ Mathieu Peyréga) which caused bogus results for the gravity
+ disturbance and gravity anomaly vectors. (This only affected
+ calculations using GravityCircle. GravityModel calculations did not
+ suffer from this bug.)
- * Improvements to the build:
- + add macros GEOGRAPHICLIB_VERSION_{MAJOR,MINOR,PATCH} to Config.h;
- + fix documentation for new version of perlpod;
- + improving setting of runtime path for Unix-like systems with
- cmake;
- + install PDB files when compiling with Visual Studio to aid
- debugging;
- + Windows binary release now uses Matlab R2013a (64-bit) and uses
- the -largeArrayDims option.
+ * Improvements to the build:
+ + add macros GEOGRAPHICLIB_VERSION_{MAJOR,MINOR,PATCH} to Config.h;
+ + fix documentation for new version of perlpod;
+ + improving setting of runtime path for Unix-like systems with
+ cmake;
+ + install PDB files when compiling with Visual Studio to aid
+ debugging;
+ + Windows binary release now uses Matlab R2013a (64-bit) and uses
+ the -largeArrayDims option.
- * Changes to the geodesic routines:
- + add Java implementation of the geodesic routines (thanks to Skip
- Breidbach for the maven support);
- + FIX BUG: avoid altering input args in Fortran implementation;
- + more systematic treatment of very short geodesic;
- + fixes to python port so that they work with version 3.x, in
- addition to 2.x (courtesy of Amato);
- + accumulate the perimeter and area of polygons via a double-wide
- accumulator in Fortran, C, and Matlab implementations (this is
- already included in the other implementations);
- + port PolygonArea::AddEdge and PolygonArea::TestEdge to JavaScript
- and python interfaces;
- + include documentation on short geodesics.
+ * Changes to the geodesic routines:
+ + add Java implementation of the geodesic routines (thanks to Skip
+ Breidbach for the maven support);
+ + FIX BUG: avoid altering input args in Fortran implementation;
+ + more systematic treatment of very short geodesic;
+ + fixes to python port so that they work with version 3.x, in
+ addition to 2.x (courtesy of Amato);
+ + accumulate the perimeter and area of polygons via a double-wide
+ accumulator in Fortran, C, and Matlab implementations (this is
+ already included in the other implementations);
+ + port PolygonArea::AddEdge and PolygonArea::TestEdge to JavaScript
+ and python interfaces;
+ + include documentation on short geodesics.
- * Unix scripts for downloading datasets,
- geographiclib-get-{geoids,gravity,magnetic}, skip already download
- models by default, unless the -f flag is given.
+ * Unix scripts for downloading datasets,
+ geographiclib-get-{geoids,gravity,magnetic}, skip already download
+ models by default, unless the -f flag is given.
- * FIX BUGS: meridian convergence and scale returned by
- TransverseMercatorExact was wrong at a pole.
+ * FIX BUGS: meridian convergence and scale returned by
+ TransverseMercatorExact was wrong at a pole.
- * Improve efficiency of MGRS::Forward by avoiding the calculation of
- the latitude if possible (adapting an idea of Craig Rollins).
+ * Improve efficiency of MGRS::Forward by avoiding the calculation of
+ the latitude if possible (adapting an idea of Craig Rollins).
- * Fixes to the way the Matlab interface routines are built (thanks to
- Phil Miller and Chris F.).
+ * Fixes to the way the Matlab interface routines are built (thanks to
+ Phil Miller and Chris F.).
Changes between 1.30 (released 2013-02-27) and 1.29 versions:
- * Changes to geodesic routines:
- + fix BUG in fail-safe mechanisms in Geodesic::Inverse;
- + the command line utility Geod is now called GeodSolve;
- + allow addition of polygon edges in PolygonArea;
- + add full Maxima implementation of geodesic algorithms.
+ * Changes to geodesic routines:
+ + fix BUG in fail-safe mechanisms in Geodesic::Inverse;
+ + the command line utility Geod is now called GeodSolve;
+ + allow addition of polygon edges in PolygonArea;
+ + add full Maxima implementation of geodesic algorithms.
Changes between 1.29 (released 2013-01-16) and 1.28 versions:
- * Changes to allow compilation with libc++ (courtesy of Kal Conley).
+ * Changes to allow compilation with libc++ (courtesy of Kal Conley).
- * Add description of geodesics on triaxial ellipsoid to
- documentation.
+ * Add description of geodesics on triaxial ellipsoid to
+ documentation.
- * Update journal reference for "Algorithms for geodesics".
+ * Update journal reference for "Algorithms for geodesics".
Changes between 1.28 (released 2012-12-11) and 1.27 versions:
- * Changes to geodesic routines:
- + compute longitude difference exactly;
- + hence fix BUG in area calculations for polygons with vertices very
- close to the prime meridian;
- + fix BUG is geoddistance.m where the value of m12 was wrong for
- meridional geodesics;
- + add Matlab implementations of the geodesic projections;
- + remove unneeded special code for geodesics which start at a pole;
- + include polygon area routine in C and Fortran implementations;
- + add doxygen documentation for C and Fortran libraries.
+ * Changes to geodesic routines:
+ + compute longitude difference exactly;
+ + hence fix BUG in area calculations for polygons with vertices very
+ close to the prime meridian;
+ + fix BUG is geoddistance.m where the value of m12 was wrong for
+ meridional geodesics;
+ + add Matlab implementations of the geodesic projections;
+ + remove unneeded special code for geodesics which start at a pole;
+ + include polygon area routine in C and Fortran implementations;
+ + add doxygen documentation for C and Fortran libraries.
Changes between 1.27 (released 2012-11-29) and 1.26 versions:
- * Changes to geodesic routines:
- + add native Matlab implementations: geoddistance.m, geodreckon.m,
- geodarea.m;
- + add C and Fortran implementations;
- + improve the solution of the direct problem so that the series
- solution is accurate to round off for |f| < 1/50;
- + tighten up the convergence criteria for solution of the inverse
- problem;
- + no longer signal failures of convergence with NaNs (a slightly
- less accurate answer is returned instead).
+ * Changes to geodesic routines:
+ + add native Matlab implementations: geoddistance.m, geodreckon.m,
+ geodarea.m;
+ + add C and Fortran implementations;
+ + improve the solution of the direct problem so that the series
+ solution is accurate to round off for |f| < 1/50;
+ + tighten up the convergence criteria for solution of the inverse
+ problem;
+ + no longer signal failures of convergence with NaNs (a slightly
+ less accurate answer is returned instead).
- * Fix DMS::Decode double rounding BUG.
+ * Fix DMS::Decode double rounding BUG.
- * On MacOSX platforms with the cmake configuration, universal
- binaries are built.
+ * On MacOSX platforms with the cmake configuration, universal
+ binaries are built.
Changes between 1.26 (released 2012-10-22) and 1.25 versions:
- * Replace the series used for geodesic areas by one with better
- convergence (this only makes an appreciable difference if |f| >
- 1/150).
+ * Replace the series used for geodesic areas by one with better
+ convergence (this only makes an appreciable difference if |f| >
+ 1/150).
Changes between 1.25 (released 2012-10-16) and 1.24 versions:
- * Changes to geodesic calculations:
- + restart Newton's method in Geodesic::Inverse when it goes awry;
- + back up Newton's method with the bisection method;
- + Geodesic::Inverse now converges for any value of f;
- + add GeodesicExact and GeodesicLineExact which are formulated in
- terms of elliptic integrals and thus yield accurate results
- even for very eccentric ellipsoids.
- + the -E option to Geod invokes these exact classes.
+ * Changes to geodesic calculations:
+ + restart Newton's method in Geodesic::Inverse when it goes awry;
+ + back up Newton's method with the bisection method;
+ + Geodesic::Inverse now converges for any value of f;
+ + add GeodesicExact and GeodesicLineExact which are formulated in
+ terms of elliptic integrals and thus yield accurate results
+ even for very eccentric ellipsoids;
+ + the -E option to Geod invokes these exact classes.
- * Add functionality to EllipticFunction:
- + add all the traditional elliptic integrals;
- + remove restrictions on argument range for incomplete elliptic
- integrals;
- + allow imaginary modulus for elliptic integrals and elliptic
- functions;
- + make interface to the symmetric elliptic integrals public.
+ * Add functionality to EllipticFunction:
+ + add all the traditional elliptic integrals;
+ + remove restrictions on argument range for incomplete elliptic
+ integrals;
+ + allow imaginary modulus for elliptic integrals and elliptic
+ functions;
+ + make interface to the symmetric elliptic integrals public.
- * Allow GeographicLib::Ellipsoid to be copied.
+ * Allow GeographicLib::Ellipsoid to be copied.
- * Changes to the build tools:
- + cmake uses folders in Visual Studio to reduce clutter;
- + allow precision of reals to be set in cmake;
- + fail gracefully in the absence of pod documentation tools;
- + remove support for maintainer tasks in Makefile.mk.
+ * Changes to the build tools:
+ + cmake uses folders in Visual Studio to reduce clutter;
+ + allow precision of reals to be set in cmake;
+ + fail gracefully in the absence of pod documentation tools;
+ + remove support for maintainer tasks in Makefile.mk;
+ + upgrade to automake 1.11.6 to fix the "make distcheck" security
+ vulnerability; see
+ http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
Changes between 1.24 (released 2012-09-22) and 1.23 versions:
- * Allow the specification of the hemisphere in UTM coordinates in
- order to provide continuity across the equator:
- + add UTMUPS::Transfer;
- + add GeoCoords::UTMUPSRepresentation(bool, int) and
- GeoCoords::AltUTMUPSRepresentation(bool, int);
- + use the hemisphere letter in, e.g., GeoConvert -u -z 31N.
+ * Allow the specification of the hemisphere in UTM coordinates in
+ order to provide continuity across the equator:
+ + add UTMUPS::Transfer;
+ + add GeoCoords::UTMUPSRepresentation(bool, int) and
+ GeoCoords::AltUTMUPSRepresentation(bool, int);
+ + use the hemisphere letter in, e.g., GeoConvert -u -z 31N.
- * Add UTMUPS::DecodeEPSG and UTMUPS::EncodeEPSG.
+ * Add UTMUPS::DecodeEPSG and UTMUPS::EncodeEPSG.
- * cmake changes:
- + restore support for cmake 2.4.x;
- + explicitly check version of doxygen.
+ * cmake changes:
+ + restore support for cmake 2.4.x;
+ + explicitly check version of doxygen.
- * Fix building under cygwin.
+ * Fix building under cygwin.
- * Document restrictions on f in the Introduction.
+ * Document restrictions on f in the Introduction.
- * Fix python interface to work with version 2.6.x.
+ * Fix python interface to work with version 2.6.x.
Changes between 1.23 (released 2012-07-17) and 1.22 versions:
@@ -303,7 +1045,8 @@ Changes between 1.21 (released 2012-04-25) and 1.20 versions:
* cmake tweaks:
+ simplify the configuration of doxygen;
- + allow the Matlab compiler to be specified with the MATLAB_COMPILER option.
+ + allow the Matlab compiler to be specified with the MATLAB_COMPILER
+ option.
Changes between 1.20 (released 2012-03-23) and 1.19 versions:
@@ -313,7 +1056,7 @@ Changes between 1.20 (released 2012-03-23) and 1.19 versions:
+ add "x64" to the package name for the 64-bit binary installer;
+ fix cmake warning with Visual Studio Express.
- * Fix SphericalEngine to deal with aggessive iterator checking by
+ * Fix SphericalEngine to deal with aggressive iterator checking by
Visual Studio.
* Fix transcription BUG is Geodesic.js.
@@ -509,16 +1252,16 @@ Changes between 1.11 (released 2011-06-27) and 1.10 versions:
Changes between 1.10 (released 2011-06-11) and 1.9 versions:
* Improvements to Matlab/Octave interface:
- + add {geocentric,localcartesian}{forward,reverse};
- + make geographiclibinterface more general;
- + install the source for the interface;
- + cmake compiles the interface if ENABLE_MATLAB=ON;
- + include compiled interface with Windows binary installer.
+ + add {geocentric,localcartesian}{forward,reverse};
+ + make geographiclibinterface more general;
+ + install the source for the interface;
+ + cmake compiles the interface if ENABLE_MATLAB=ON;
+ + include compiled interface with Windows binary installer.
* Fix various configuration issues
- + autoconf did not install Config.h;
- + cmake installed in man/man1 instead of share/man/man1;
- + cmake did not set the rpath on the tools.
+ + autoconf did not install Config.h;
+ + cmake installed in man/man1 instead of share/man/man1;
+ + cmake did not set the rpath on the tools.
Changes between 1.9 (released 2011-05-28) and 1.8 versions:
@@ -664,7 +1407,7 @@ Changes between 1.4 (released 2010-09-12) and 1.3 versions:
* Add GeographicLib::Geoid::ConvertHeight.
- * Add -msltohae, -haetomsl, and -z options to \ref geoideval.
+ * Add -msltohae, -haetomsl, and -z options to GeoidEval.
* Constructors check that minor radius is positive.
@@ -792,7 +1535,7 @@ Changes between 2009-11 and 2009-10 versions:
Changes between 2009-10 and 2009-09 versions:
- * Change web site to http://geographiclib.sourceforge.net
+ * Change web site to https://geographiclib.sourceforge.io
* Several house-cleaning changes:
+ Change from the a flat directory structure to a more easily
diff --git a/gtsam/3rdparty/GeographicLib/README.md b/gtsam/3rdparty/GeographicLib/README.md
new file mode 100644
index 000000000..3ab31c8d0
--- /dev/null
+++ b/gtsam/3rdparty/GeographicLib/README.md
@@ -0,0 +1,11 @@
+GeographicLib
+=============
+
+A C++ library for geographic projections. The web site for the package
+is
+
+> https://geographiclib.sourceforge.io
+
+The API for the library is documented at
+
+> https://geographiclib.sourceforge.io/html
diff --git a/gtsam/3rdparty/GeographicLib/aclocal.m4 b/gtsam/3rdparty/GeographicLib/aclocal.m4
index ec1e5deda..59ed64414 100644
--- a/gtsam/3rdparty/GeographicLib/aclocal.m4
+++ b/gtsam/3rdparty/GeographicLib/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,7 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
@@ -19,24 +20,97 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2012 Free Software Foundation, Inc.
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim
+# Copyright (c) 2011 Maarten Bosmans
+#
+# 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 3 of the License, 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 .
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
+
+# Copyright (C) 2002-2014 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.
-# serial 8
-
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# 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.12'
+[am__api_version='1.15'
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.12.2], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -52,21 +126,19 @@ 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.12.2])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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.
-# serial 2
-
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
@@ -106,22 +178,19 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 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.
-# serial 10
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
@@ -147,13 +216,12 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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.
-# serial 17
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -339,19 +407,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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.
-# serial 6
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -380,7 +447,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -416,17 +483,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 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.
-# serial 19
-
# 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])
# -----------------------------------------------
@@ -439,7 +510,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -469,8 +540,7 @@ AC_SUBST([CYGPATH_W])
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
-[$0: two- and three-arguments forms are deprecated. For more info, see:
-http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
+ [$0: two- and three-arguments forms are deprecated.])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
@@ -503,8 +573,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
#
#
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -524,21 +594,63 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
-dnl Support for Objective C++ was only introduced in Autoconf 2.65,
-dnl but we still cater to Autoconf 2.62.
-m4_ifdef([AC_PROG_OBJCXX],
-[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
- m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+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:
+
+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: .
+
+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 The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -547,7 +659,6 @@ 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.
@@ -569,20 +680,18 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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.
-# serial 8
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -592,14 +701,12 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 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.
-# serial 2
-
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
@@ -616,14 +723,12 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 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.
-# serial 7
-
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
@@ -651,18 +756,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
]
)
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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.
-# serial 5
-
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
@@ -707,14 +808,12 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2012 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 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.
-# serial 7
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -722,11 +821,10 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -739,8 +837,8 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
@@ -749,14 +847,12 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 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.
-# serial 6
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
@@ -780,15 +876,77 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 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.
-# serial 9
+# _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-2014 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-2014 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_SANITY_CHECK
# ---------------
@@ -865,13 +1023,71 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 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.
-# serial 2
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 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_INSTALL_STRIP
# ---------------------
@@ -895,14 +1111,12 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2012 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 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.
-# serial 3
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -916,14 +1130,12 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 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.
-# serial 3
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
@@ -937,76 +1149,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of '-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- # tar/untar a dummy directory, and stop if the command works
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
@@ -1016,3 +1266,4 @@ m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
+m4_include([m4/pkg.m4])
diff --git a/gtsam/3rdparty/GeographicLib/cmake/CMakeLists.txt b/gtsam/3rdparty/GeographicLib/cmake/CMakeLists.txt
index bbb5192cf..0c8ad6447 100644
--- a/gtsam/3rdparty/GeographicLib/cmake/CMakeLists.txt
+++ b/gtsam/3rdparty/GeographicLib/cmake/CMakeLists.txt
@@ -8,20 +8,27 @@
# geographiclib-config.cmake for the build tree
set (PROJECT_ROOT_DIR "${PROJECT_BINARY_DIR}")
set (PROJECT_INCLUDE_DIRS
- "${PROJECT_BINARY_DIR}/include" "${PROJECT_SOURCE_DIR}/include" )
+ "${PROJECT_BINARY_DIR}/include" "${PROJECT_SOURCE_DIR}/include")
configure_file (project-config.cmake.in
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake" @ONLY)
configure_file (project-config-version.cmake.in
"${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config-version.cmake" @ONLY)
-export (TARGETS ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
- FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-depends.cmake")
+export (TARGETS
+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
+ FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-targets.cmake")
+export (TARGETS
+ ${PROJECT_SHARED_LIBRARIES} ${PROJECT_STATIC_LIBRARIES} ${TOOLS}
+ NAMESPACE ${PROJECT_NAME}::
+ FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME_LOWER}-namespace-targets.cmake")
# geographiclib-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.)
if (COMMON_INSTALL_PATH)
- set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}")
+ # Install under lib${LIB_SUFFIX} so that 32-bit and 64-bit packages
+ # can be installed on a single machine.
+ set (INSTALL_CMAKE_DIR "lib${LIB_SUFFIX}/cmake/${PROJECT_NAME}")
set (PROJECT_ROOT_DIR "../../..")
else ()
set (INSTALL_CMAKE_DIR "cmake")
@@ -44,12 +51,30 @@ install (FILES
RENAME "${PROJECT_NAME_LOWER}-config-version.cmake")
# Make information about the cmake targets (the library and the tools)
# available.
-install (EXPORT depends
- FILE ${PROJECT_NAME_LOWER}-depends.cmake
+install (EXPORT targets
+ FILE ${PROJECT_NAME_LOWER}-targets.cmake
+ DESTINATION "${INSTALL_CMAKE_DIR}")
+install (EXPORT targets
+ NAMESPACE ${PROJECT_NAME}::
+ FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake
DESTINATION "${INSTALL_CMAKE_DIR}")
if (MSVC AND PACKAGE_DEBUG_LIBS)
install (FILES
- "${PROJECT_BINARY_DIR}/cmake/CMakeFiles/Export/cmake/${PROJECT_NAME_LOWER}-depends-debug.cmake"
+ "${PROJECT_BINARY_DIR}/cmake/CMakeFiles/Export/cmake/${PROJECT_NAME_LOWER}-targets-debug.cmake"
DESTINATION "${INSTALL_CMAKE_DIR}" CONFIGURATIONS Release)
endif ()
+
+# Support for pkgconfig/geographiclib.pc
+set (prefix ${CMAKE_INSTALL_PREFIX})
+set (exec_prefix "\${prefix}")
+set (libdir "\${exec_prefix}/lib${LIB_SUFFIX}")
+set (includedir "\${prefix}/include")
+set (bindir "\${exec_prefix}/bin")
+set (PACKAGE_NAME "${PROJECT_NAME}")
+set (PACKAGE_VERSION "${PROJECT_VERSION}")
+
+configure_file (project.pc.in geographiclib.pc @ONLY)
+install (FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/geographiclib.pc"
+ DESTINATION "lib${LIB_SUFFIX}/pkgconfig")
diff --git a/gtsam/3rdparty/GeographicLib/cmake/FindGeographicLib.cmake b/gtsam/3rdparty/GeographicLib/cmake/FindGeographicLib.cmake
index 9c52b3e7f..58932cc70 100644
--- a/gtsam/3rdparty/GeographicLib/cmake/FindGeographicLib.cmake
+++ b/gtsam/3rdparty/GeographicLib/cmake/FindGeographicLib.cmake
@@ -1,7 +1,7 @@
# Look for GeographicLib
#
# Set
-# GEOGRAPHICLIB_FOUND = TRUE
+# GeographicLib_FOUND = GEOGRAPHICLIB_FOUND = TRUE
# GeographicLib_INCLUDE_DIRS = /usr/local/include
# GeographicLib_LIBRARIES = /usr/local/lib/libGeographic.so
# GeographicLib_LIBRARY_DIRS = /usr/local/lib
@@ -15,17 +15,26 @@ if (GeographicLib_LIBRARIES)
get_filename_component (_ROOT_DIR "${GeographicLib_LIBRARY_DIRS}" PATH)
set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")
set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")
- unset (_ROOT_DIR)
if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")
- unset (GeographicLib_INCLUDE_DIRS)
- unset (GeographicLib_LIBRARIES)
- unset (GeographicLib_LIBRARY_DIRS)
- unset (GeographicLib_BINARY_DIRS)
+ # On Debian systems the library is in e.g.,
+ # /usr/lib/x86_64-linux-gnu/libGeographic.so
+ # so try stripping another element off _ROOT_DIR
+ get_filename_component (_ROOT_DIR "${_ROOT_DIR}" PATH)
+ set (GeographicLib_INCLUDE_DIRS "${_ROOT_DIR}/include")
+ set (GeographicLib_BINARY_DIRS "${_ROOT_DIR}/bin")
+ if (NOT EXISTS "${GeographicLib_INCLUDE_DIRS}/GeographicLib/Config.h")
+ unset (GeographicLib_INCLUDE_DIRS)
+ unset (GeographicLib_LIBRARIES)
+ unset (GeographicLib_LIBRARY_DIRS)
+ unset (GeographicLib_BINARY_DIRS)
+ endif ()
endif ()
+ unset (_ROOT_DIR)
endif ()
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (GeographicLib DEFAULT_MSG
- GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
+ GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES
+ GeographicLib_INCLUDE_DIRS)
mark_as_advanced (GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES
GeographicLib_INCLUDE_DIRS)
diff --git a/gtsam/3rdparty/GeographicLib/cmake/Makefile.in b/gtsam/3rdparty/GeographicLib/cmake/Makefile.in
index a781b6583..2e7b11ca2 100644
--- a/gtsam/3rdparty/GeographicLib/cmake/Makefile.in
+++ b/gtsam/3rdparty/GeographicLib/cmake/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -19,23 +19,61 @@
#
# Copyright (C) 2011, Charles Karney
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -56,18 +94,30 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = cmake
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(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.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = geographiclib.pc
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -75,9 +125,12 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/project.pc.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -126,6 +179,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -144,9 +198,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POD2HTML = @POD2HTML@
POD2MAN = @POD2MAN@
-POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -195,6 +251,7 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
@@ -229,7 +286,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cmake/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu cmake/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -247,17 +303,17 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
+geographiclib.pc: $(top_builddir)/config.status $(srcdir)/project.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
cscope cscopelist:
@@ -394,15 +450,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
install:
diff --git a/gtsam/3rdparty/GeographicLib/cmake/project-config-version.cmake.in b/gtsam/3rdparty/GeographicLib/cmake/project-config-version.cmake.in
index 2b20f0bc6..3b3b9e864 100644
--- a/gtsam/3rdparty/GeographicLib/cmake/project-config-version.cmake.in
+++ b/gtsam/3rdparty/GeographicLib/cmake/project-config-version.cmake.in
@@ -9,24 +9,28 @@ if (NOT PACKAGE_FIND_NAME STREQUAL "@PROJECT_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., _FOUND, are consistently spelled. Make
- # this a WARNING, because this is a user error that needs to be fixed.
- message (WARNING
- "Mismatched package names: use find_package(@PROJECT_NAME@ ...) instead"
- " of find_package(${PACKAGE_FIND_NAME} ...)")
+ # variables, e.g., _FOUND, are consistently spelled.
+ set (REASON "package = @PROJECT_NAME@, NOT ${PACKAGE_FIND_NAME}")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
-elseif (NOT (APPLE OR CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
+elseif (NOT (APPLE OR (NOT DEFINED CMAKE_SIZEOF_VOID_P) OR
+ CMAKE_SIZEOF_VOID_P EQUAL @CMAKE_SIZEOF_VOID_P@))
# Reject if there's a 32-bit/64-bit mismatch (not necessary with Apple
# since a multi-architecture library is built for that platform).
- message (STATUS
- "${CMAKE_CURRENT_LIST_FILE} unsuitable because package built with "
- "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
+ set (REASON "sizeof(*void) = @CMAKE_SIZEOF_VOID_P@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (MSVC AND NOT MSVC_VERSION STREQUAL "@MSVC_VERSION@")
# Reject if there's a mismatch in MSVC compiler versions
- message (STATUS
- "${CMAKE_CURRENT_LIST_FILE} unsuitable because package built with "
- "_MSC_VER = @MSVC_VERSION@")
+ set (REASON "_MSC_VER = @MSVC_VERSION@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (NOT CMAKE_CROSSCOMPILING STREQUAL "@CMAKE_CROSSCOMPILING@")
+ # Reject if there's a mismatch in ${CMAKE_CROSSCOMPILING}
+ set (REASON "cross-compiling = @CMAKE_CROSSCOMPILING@")
+ set (PACKAGE_VERSION_UNSUITABLE TRUE)
+elseif (CMAKE_CROSSCOMPILING AND
+ NOT (CMAKE_SYSTEM_NAME STREQUAL "@CMAKE_SYSTEM_NAME@" AND
+ CMAKE_SYSTEM_PROCESSOR STREQUAL "@CMAKE_SYSTEM_PROCESSOR@"))
+ # Reject if cross-compiling and there's a mismatch in the target system
+ set (REASON "target = @CMAKE_SYSTEM_NAME@-@CMAKE_SYSTEM_PROCESSOR@")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
elseif (PACKAGE_FIND_VERSION)
if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
@@ -42,13 +46,20 @@ set (@PROJECT_NAME@_STATIC_FOUND @GEOGRAPHICLIB_STATIC_LIB@)
set (@PROJECT_NAME@_NETGeographicLib_FOUND @BUILD_NETGEOGRAPHICLIB@)
# Check for the components requested. The convention is that
-# GeographicLib_${comp}_FOUND should be true for all the required
+# @PROJECT_NAME@_${comp}_FOUND should be true for all the required
# components.
if (@PROJECT_NAME@_FIND_COMPONENTS)
foreach (comp ${@PROJECT_NAME@_FIND_COMPONENTS})
if (@PROJECT_NAME@_FIND_REQUIRED_${comp} AND
NOT @PROJECT_NAME@_${comp}_FOUND)
+ set (REASON "without ${comp}")
set (PACKAGE_VERSION_UNSUITABLE TRUE)
endif ()
endforeach ()
endif ()
+
+# If unsuitable, append the reason to the package version so that it's
+# visible to the user.
+if (PACKAGE_VERSION_UNSUITABLE)
+ set (PACKAGE_VERSION "${PACKAGE_VERSION} (${REASON})")
+endif ()
diff --git a/gtsam/3rdparty/GeographicLib/cmake/project-config.cmake.in b/gtsam/3rdparty/GeographicLib/cmake/project-config.cmake.in
index 9bd50c24d..2120d9f17 100644
--- a/gtsam/3rdparty/GeographicLib/cmake/project-config.cmake.in
+++ b/gtsam/3rdparty/GeographicLib/cmake/project-config.cmake.in
@@ -9,7 +9,8 @@
# @PROJECT_NAME@_STATIC_DEFINITIONS = GEOGRAPHICLIB_SHARED_LIB=0
# @PROJECT_NAME@_LIBRARY_DIRS = /usr/local/lib
# @PROJECT_NAME@_BINARY_DIRS = /usr/local/bin
-# @PROJECT_NAME@_VERSION = 1.9 (for example)
+# @PROJECT_NAME@_VERSION = 1.34 (for example)
+# @PROJECT_NAME_UPPER@_DATA = /usr/local/share/GeographicLib (for example)
# Depending on @PROJECT_NAME@_USE_STATIC_LIBS
# @PROJECT_NAME@_LIBRARIES = ${@PROJECT_NAME@_SHARED_LIBRARIES}, if OFF
# @PROJECT_NAME@_LIBRARIES = ${@PROJECT_NAME@_STATIC_LIBRARIES}, if ON
@@ -17,9 +18,18 @@
# @PROJECT_NAME@_DEFINITIONS = ${@PROJECT_NAME@_STATIC_DEFINITIONS}, if ON
# If only one of the libraries is provided, then
# @PROJECT_NAME@_USE_STATIC_LIBS is ignored.
+#
+# For cmake 2.8.11 or later, there's no need to include
+# include_directories (${GeographicLib_INCLUDE_DIRS})
+# add_definitions (${GeographicLib_DEFINITIONS})
+#
+# The following variables are only relevant if the library has been
+# compiled with a default precision different from double:
+# @PROJECT_NAME_UPPER@_PRECISION = the precision of the library (usually 2)
+# @PROJECT_NAME@_HIGHPREC_LIBRARIES = the libraries need for high precision
message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
-set (@PROJECT_NAME@_VERSION "@PROJECT_VERSION@")
+# @PROJECT_NAME@_VERSION is set by version file
message (STATUS
"@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}")
@@ -36,17 +46,23 @@ else ()
# current directory.
get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/include")
- set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/lib")
+ set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/lib@LIB_SUFFIX@")
set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
endif ()
-message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
+set (@PROJECT_NAME_UPPER@_DATA "@GEOGRAPHICLIB_DATA@")
+set (@PROJECT_NAME_UPPER@_PRECISION @GEOGRAPHICLIB_PRECISION@)
+set (@PROJECT_NAME@_HIGHPREC_LIBRARIES "@HIGHPREC_LIBRARIES@")
set (@PROJECT_NAME@_SHARED_LIBRARIES @PROJECT_SHARED_LIBRARIES@)
set (@PROJECT_NAME@_STATIC_LIBRARIES @PROJECT_STATIC_LIBRARIES@)
set (@PROJECT_NAME@_SHARED_DEFINITIONS @PROJECT_SHARED_DEFINITIONS@)
set (@PROJECT_NAME@_STATIC_DEFINITIONS @PROJECT_STATIC_DEFINITIONS@)
# Read in the exported definition of the library
-include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
+include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
+include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake")
+
+unset (_ROOT)
+unset (_DIR)
if ((NOT @PROJECT_NAME@_SHARED_LIBRARIES) OR
(@PROJECT_NAME@_USE_STATIC_LIBS AND @PROJECT_NAME@_STATIC_LIBRARIES))
diff --git a/gtsam/3rdparty/GeographicLib/cmake/project.pc.in b/gtsam/3rdparty/GeographicLib/cmake/project.pc.in
new file mode 100644
index 000000000..2eb0c4ca4
--- /dev/null
+++ b/gtsam/3rdparty/GeographicLib/cmake/project.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+bindir=@bindir@
+
+Name: @PACKAGE_NAME@
+Description: A library for geographic projections
+Version: @PACKAGE_VERSION@
+URL: https://geographiclib.sourceforge.io
+
+Requires:
+Libs: -L${libdir} -lGeographic
+Cflags: -I${includedir}
diff --git a/gtsam/3rdparty/GeographicLib/compile b/gtsam/3rdparty/GeographicLib/compile
new file mode 100755
index 000000000..a85b723c7
--- /dev/null
+++ b/gtsam/3rdparty/GeographicLib/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey .
+#
+# 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 .
+
+# 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 or send patches to
+# .
+
+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 .
+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:
diff --git a/gtsam/3rdparty/GeographicLib/config.guess b/gtsam/3rdparty/GeographicLib/config.guess
index c0adba94b..dbfb9786c 100755
--- a/gtsam/3rdparty/GeographicLib/config.guess
+++ b/gtsam/3rdparty/GeographicLib/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2015 Free Software Foundation, Inc.
-timestamp='2012-06-10'
+timestamp='2015-01-01'
# 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-06-10'
# 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.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# 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 .
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -560,8 +579,9 @@ EOF
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
@@ -801,10 +821,13 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
- i*:MSYS*:*)
+ *:MSYS*:*)
echo ${UNAME_MACHINE}-pc-msys
exit ;;
i*:windows32*:*)
@@ -852,21 +875,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +902,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -950,54 +968,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1201,6 +1228,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1227,19 +1257,31 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- 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) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ 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) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ 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]*:*)
@@ -1330,157 +1372,6 @@ EOF
exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <
-# include
-#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
- 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
-# 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 <.
@@ -26,11 +20,12 @@ timestamp='2012-04-18'
# 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.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to . Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches to .
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2015 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."
@@ -123,7 +116,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
@@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -259,21 +252,24 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
- | fido | fr30 | frv \
+ | fido | fr30 | frv | ft32 \
| 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 \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -287,23 +283,26 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or32 \
+ | open8 | or1k | or1knd | 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 \
@@ -314,6 +313,7 @@ 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,7 +328,10 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -370,13 +373,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -385,11 +388,13 @@ case $basic_machine in
| hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -403,18 +408,22 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -432,6 +441,7 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -769,6 +779,9 @@ 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
@@ -788,11 +801,15 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -820,6 +837,10 @@ case $basic_machine in
basic_machine=powerpc-unknown
os=-morphos
;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -828,7 +849,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1004,7 +1025,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
@@ -1019,7 +1040,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1346,29 +1371,29 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -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*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1492,9 +1517,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1543,6 +1565,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
diff --git a/gtsam/3rdparty/GeographicLib/configure b/gtsam/3rdparty/GeographicLib/configure
index a9a70828a..13fe3f5af 100755
--- a/gtsam/3rdparty/GeographicLib/configure
+++ b/gtsam/3rdparty/GeographicLib/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for GeographicLib 1.35.
+# Generated by GNU Autoconf 2.69 for GeographicLib 1.49.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GeographicLib'
PACKAGE_TARNAME='geographiclib'
-PACKAGE_VERSION='1.35'
-PACKAGE_STRING='GeographicLib 1.35'
+PACKAGE_VERSION='1.49'
+PACKAGE_STRING='GeographicLib 1.49'
PACKAGE_BUGREPORT='charles@karney.com'
PACKAGE_URL=''
@@ -635,6 +635,11 @@ ac_includes_default="\
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
+LIBOBJS
+pkgconfigdir
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
HAVE_PODPROGS_FALSE
HAVE_PODPROGS_TRUE
COL
@@ -643,9 +648,8 @@ POD2MAN
HAVE_DOXYGEN_FALSE
HAVE_DOXYGEN_TRUE
DOXYGEN
-LIBOBJS
-POW_LIB
CXXCPP
+LT_SYS_LIBRARY_PATH
OTOOL64
OTOOL
LIPO
@@ -700,6 +704,10 @@ MAINTAINER_MODE_TRUE
GEOGRAPHICLIB_VERSION_PATCH
GEOGRAPHICLIB_VERSION_MINOR
GEOGRAPHICLIB_VERSION_MAJOR
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
@@ -776,15 +784,18 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_maintainer_mode
enable_dependency_tracking
enable_shared
enable_static
with_pic
enable_fast_install
+with_aix_soname
with_gnu_ld
with_sysroot
enable_libtool_lock
+with_pkgconfigdir
'
ac_precious_vars='build_alias
host_alias
@@ -798,7 +809,11 @@ CPP
CXX
CXXFLAGS
CCC
-CXXCPP'
+LT_SYS_LIBRARY_PATH
+CXXCPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR'
# Initialize some variables set by options.
@@ -1339,7 +1354,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures GeographicLib 1.35 to adapt to many kinds of systems.
+\`configure' configures GeographicLib 1.49 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1410,7 +1425,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of GeographicLib 1.35:";;
+ short | recursive ) echo "Configuration of GeographicLib 1.49:";;
esac
cat <<\_ACEOF
@@ -1418,6 +1433,8 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
@@ -1436,9 +1453,14 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
+ --with-pkgconfigdir pkg-config installation directory
+ ['${libdir}/pkgconfig']
Some influential environment variables:
CC C compiler command
@@ -1451,7 +1473,14 @@ Some influential environment variables:
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
CXXCPP C++ preprocessor
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1519,7 +1548,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GeographicLib configure 1.35
+GeographicLib configure 1.49
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1915,155 +1944,52 @@ fi
} # ac_fn_cxx_try_link
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
+# ac_fn_cxx_try_run LINENO
+# ------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_cxx_try_run ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## --------------------------------- ##
-## Report this to charles@karney.com ##
-## --------------------------------- ##"
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_type
+} # ac_fn_cxx_try_run
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by GeographicLib $as_me 1.35, which was
+It was created by GeographicLib $as_me 1.49, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2554,7 +2480,7 @@ test -n "$target_alias" &&
-am__api_version='1.12'
+am__api_version='1.15'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -2726,8 +2652,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -2738,15 +2664,15 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2979,6 +2905,45 @@ else
fi
rmdir .tst 2>/dev/null
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3001,7 +2966,7 @@ fi
# Define the identity of the package.
PACKAGE='geographiclib'
- VERSION='1.35'
+ VERSION='1.49'
cat >>confdefs.h <<_ACEOF
@@ -3035,12 +3000,16 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
#
mkdir_p='$(MKDIR_P)'
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -3048,8 +3017,51 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+# 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:
+
+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: .
+
+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
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
GEOGRAPHICLIB_VERSION_MAJOR=1
-GEOGRAPHICLIB_VERSION_MINOR=35
+GEOGRAPHICLIB_VERSION_MINOR=49
GEOGRAPHICLIB_VERSION_PATCH=0
cat >>confdefs.h <<_ACEOF
@@ -3097,7 +3109,7 @@ fi
ac_config_headers="$ac_config_headers include/GeographicLib/Config-ac.h"
-LT_CURRENT=11
+LT_CURRENT=18
LT_REVISION=2
LT_AGE=1
@@ -3957,6 +3969,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # 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 { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && 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
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+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_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -4647,8 +4718,8 @@ esac
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.6'
+macro_revision='2.4.6'
@@ -4662,7 +4733,7 @@ macro_revision='1.3337'
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
# double-quoted strings.
@@ -4711,7 +4782,7 @@ func_echo_all ()
$ECHO ""
}
-case "$ECHO" in
+case $ECHO in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -5034,19 +5105,19 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5060,7 +5131,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -5071,7 +5142,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -5082,32 +5153,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 &5
$as_echo "$LD" >&6; }
@@ -5150,33 +5221,38 @@ if ${lt_cv_path_NM+:} false; then :
else
if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM="$NM"
+ lt_cv_path_NM=$NM
else
- lt_nm_to_check="${ac_tool_prefix}nm"
+ lt_nm_to_check=${ac_tool_prefix}nm
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break
+ break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break
+ break 2
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5187,15 +5263,15 @@ else
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
@@ -5301,9 +5377,9 @@ esac
fi
fi
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols"
+ DUMPBIN="$DUMPBIN -symbols -headers"
;;
*)
DUMPBIN=:
@@ -5311,8 +5387,8 @@ fi
esac
fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
fi
fi
test -z "$NM" && NM=nm
@@ -5363,7 +5439,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
- teststring="ABCD"
+ teststring=ABCD
case $build_os in
msdosdjgpp*)
@@ -5403,7 +5479,7 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5453,22 +5529,23 @@ else
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
+ for i in 1 2 3 4 5 6 7 8; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
+ test 17 != "$i" # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -5486,7 +5563,7 @@ else
fi
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
@@ -5504,30 +5581,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
: ${MV="mv -f"}
: ${RM="rm -f"}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
@@ -5650,13 +5703,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
reload_cmds=false
fi
;;
darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -5784,13 +5837,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
case $host_os in
aix[4-9]*)
@@ -5817,8 +5870,7 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ if ( file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -5854,10 +5906,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5896,7 +5944,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5918,8 +5966,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -5972,6 +6020,9 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -6129,8 +6180,8 @@ else
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6142,7 +6193,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
@@ -6297,7 +6348,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
+ if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6305,7 +6356,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -ne 0; then
+ if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
fi
fi
@@ -6318,7 +6369,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -6535,7 +6586,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- openbsd*)
+ bitrig* | openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -6625,7 +6676,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
symcode='[ABCDEGRST]'
fi
;;
@@ -6658,14 +6709,44 @@ case `$NM -V 2>&1` in
symcode='[ABCDGIRSTW]' ;;
esac
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -6683,21 +6764,24 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -6745,11 +6829,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -6775,7 +6859,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -6795,13 +6879,13 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
+ LIBS=conftstm.$ac_objext
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -6822,7 +6906,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
+ if test yes = "$pipe_works"; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -6864,6 +6948,16 @@ fi
+
+
+
+
+
+
+
+
+
+
@@ -6887,9 +6981,9 @@ fi
lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -6899,8 +6993,8 @@ case ${with_sysroot} in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
@@ -6912,18 +7006,99 @@ $as_echo "${lt_sysroot:-no}" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
fi
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -6932,24 +7107,25 @@ ia64-*-hpux*)
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE="32"
+ HPUX_IA64_MODE=32
;;
*ELF-64*)
- HPUX_IA64_MODE="64"
+ HPUX_IA64_MODE=64
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo '#line '$LINENO' "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -6978,9 +7154,50 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -6994,9 +7211,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -7015,7 +7242,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7033,7 +7263,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
+ SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7073,13 +7303,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ CFLAGS=$SAVE_CFLAGS
fi
;;
*-*solaris*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -7091,7 +7322,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*)
+ i?86-*-solaris*|x86_64-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -7100,7 +7331,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
+ LD=${LD-ld}_sol2
fi
;;
*)
@@ -7116,7 +7347,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
;;
esac
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7227,7 +7458,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -7730,7 +7961,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
+ if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -7748,7 +7979,7 @@ else
cat conftest.err >&5
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -7787,7 +8018,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -7816,7 +8047,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&5
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -7829,32 +8060,32 @@ fi
$as_echo "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -7862,6 +8093,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
@@ -8010,9 +8276,9 @@ done
func_stripname_cnf ()
{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
esac
} # func_stripname_cnf
@@ -8039,14 +8305,14 @@ if test "${enable_shared+set}" = set; then :
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8070,14 +8336,14 @@ if test "${enable_static+set}" = set; then :
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8101,14 +8367,14 @@ if test "${with_pic+set}" = set; then :
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8116,8 +8382,6 @@ else
fi
-test -z "$pic_mode" && pic_mode=default
-
@@ -8133,14 +8397,14 @@ if test "${enable_fast_install+set}" = set; then :
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8154,11 +8418,63 @@ fi
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8207,7 +8523,7 @@ test -z "$LN_S" && LN_S="ln -s"
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
@@ -8246,7 +8562,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
+ if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -8257,14 +8573,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -8273,15 +8589,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$LD" && LD=ld
test -z "$ac_objext" && ac_objext=o
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
# Only perform the check for file, if the check method requires it
@@ -8296,22 +8605,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -8334,13 +8643,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -8362,22 +8671,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -8400,13 +8709,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -8427,7 +8736,7 @@ esac
# Use C for the default configuration in the libtool script
-lt_save_CC="$CC"
+lt_save_CC=$CC
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8489,7 +8798,7 @@ if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -8505,7 +8814,7 @@ else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -8535,7 +8844,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
@@ -8553,17 +8862,18 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
+ lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -8574,8 +8884,8 @@ lt_prog_compiler_static=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -8591,6 +8901,11 @@ lt_prog_compiler_static=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
darwin* | rhapsody*)
@@ -8661,7 +8976,7 @@ lt_prog_compiler_static=
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
@@ -8669,10 +8984,29 @@ lt_prog_compiler_static=
fi
;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
hpux9* | hpux10* | hpux11*)
@@ -8688,7 +9022,7 @@ lt_prog_compiler_static=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
+ lt_prog_compiler_static='$wl-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -8697,9 +9031,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
+ # old Intel for x86_64, which still supported -KPIC.
ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
@@ -8724,6 +9058,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -8821,7 +9161,7 @@ lt_prog_compiler_static=
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
@@ -8850,7 +9190,7 @@ lt_prog_compiler_static=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
@@ -8882,7 +9222,7 @@ else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -8912,7 +9252,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -8944,7 +9284,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -8963,13 +9303,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
:
else
lt_prog_compiler_static=
@@ -9089,8 +9429,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9102,9 +9442,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -9147,9 +9487,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9164,7 +9504,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
@@ -9172,7 +9512,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd*)
+ openbsd* | bitrig*)
with_gnu_ld=no
;;
esac
@@ -9182,7 +9522,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -9204,24 +9544,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test "$lt_use_gnu_ld_interface" = yes; then
+ if test yes = "$lt_use_gnu_ld_interface"; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
+ wlarc='$wl'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v 2>&1` in
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9234,7 +9574,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
+ if test ia64 != "$host_cpu"; then
ld_shlibs=no
cat <<_LT_EOF 1>&2
@@ -9253,7 +9593,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -9269,7 +9609,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
@@ -9279,7 +9619,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='${wl}--export-all-symbols'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -9287,61 +9627,89 @@ _LT_EOF
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
+ if test linux-dietlibc = "$host_os"; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
+ && test no = "$tmp_diet"
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -9352,42 +9720,47 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -9401,8 +9774,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -9420,8 +9793,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -9433,7 +9806,7 @@ _LT_EOF
ld_shlibs=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -9448,9 +9821,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -9467,15 +9840,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test "$ld_shlibs" = no; then
+ if test no = "$ld_shlibs"; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
@@ -9491,7 +9864,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
@@ -9499,34 +9872,57 @@ _LT_EOF
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global
- # defined symbols, whereas GNU nm marks them as "W".
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
aix_use_runtimelinking=yes
break
fi
done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
;;
esac
@@ -9545,13 +9941,21 @@ _LT_EOF
hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
- file_list_spec='${wl}-f,'
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -9570,35 +9974,42 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec='${wl}-bexpall'
+ export_dynamic_flag_spec='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -9633,7 +10044,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -9641,17 +10052,17 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -9686,7 +10097,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -9694,21 +10105,33 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
fi
fi
;;
@@ -9717,7 +10140,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -9747,16 +10170,17 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
@@ -9765,18 +10189,18 @@ fi
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -9785,7 +10209,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -9804,24 +10228,24 @@ fi
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
+ allow_undefined_flag=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
else
ld_shlibs=no
@@ -9863,33 +10287,33 @@ fi
;;
hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
;;
hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -9897,25 +10321,25 @@ fi
;;
hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ if test yes,no = "$GCC,$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
@@ -9927,7 +10351,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9946,14 +10370,14 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
-if test x"$lt_cv_prog_compiler__b" = xyes; then
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -9961,8 +10385,8 @@ fi
;;
esac
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
case $host_cpu in
@@ -9973,7 +10397,7 @@ fi
*)
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -9984,8 +10408,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -9995,8 +10419,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
@@ -10008,24 +10432,34 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test "$lt_cv_irix_exported_symbol" = yes; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
inherit_rpath=yes
link_all_deplibs=yes
;;
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
@@ -10040,7 +10474,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -10048,27 +10482,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
fi
else
ld_shlibs=no
@@ -10079,33 +10505,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
;;
osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10116,24 +10562,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -10143,11 +10589,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
else
whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
fi
@@ -10157,10 +10603,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test "x$host_vendor" = xsequent; then
+ if test sequent = "$host_vendor"; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -10209,43 +10655,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
+ no_undefined_flag='$wl-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
+ export_dynamic_flag_spec='$wl-Bexport'
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -10260,10 +10706,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test x$host_vendor = xsni; then
+ if test sni = "$host_vendor"; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
+ export_dynamic_flag_spec='$wl-Blargedynsym'
;;
esac
fi
@@ -10271,7 +10717,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -10297,7 +10743,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -10512,14 +10958,14 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -10535,28 +10981,35 @@ if test "$GCC" = yes; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
+ # and add multilib dir if necessary...
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
+ lt_foo = "/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -10570,7 +11023,7 @@ BEGIN {RS=" "; FS="/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -10579,7 +11032,7 @@ fi
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -10596,14 +11049,16 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
+
+
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -10611,41 +11066,91 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
# If using run time linking (on AIX 4.2 or later) use lib.so
# instead of lib.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
shlibpath_var=LIBPATH
fi
;;
@@ -10655,18 +11160,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -10674,8 +11179,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -10687,7 +11192,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -10696,8 +11201,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -10713,17 +11218,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -10732,8 +11237,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -10760,7 +11265,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -10773,8 +11278,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -10787,7 +11292,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -10800,8 +11305,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -10814,8 +11319,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -10833,12 +11338,13 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -10863,26 +11369,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -10900,14 +11395,15 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -10915,8 +11411,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -10925,8 +11421,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -10939,8 +11435,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -10951,7 +11447,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -10959,8 +11455,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -10979,8 +11475,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -10989,13 +11485,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -11042,11 +11558,15 @@ fi
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
- # Append ld.so.conf contents to the search path
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -11063,12 +11583,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -11078,7 +11598,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -11087,58 +11607,68 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -11149,8 +11679,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -11160,11 +11690,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -11172,8 +11702,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -11194,24 +11724,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
+ version_type=sco
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -11229,7 +11759,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -11237,8 +11767,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -11248,20 +11778,35 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
@@ -11358,15 +11903,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
+ test yes = "$hardcode_automatic"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
+ if test no != "$hardcode_direct" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
@@ -11381,12 +11926,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
$as_echo "$hardcode_action" >&6; }
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -11396,7 +11941,7 @@ fi
- if test "x$enable_dlopen" != xyes; then
+ if test yes != "$enable_dlopen"; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -11406,23 +11951,23 @@ else
case $host_os in
beos*)
- lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen=load_add_on
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -11460,10 +12005,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
- lt_cv_dlopen="dyld"
+ lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -11471,10 +12016,18 @@ fi
;;
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load"
+ lt_cv_dlopen=shl_load
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -11513,11 +12066,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -11556,7 +12109,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -11595,7 +12148,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -11634,7 +12187,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -11655,21 +12208,21 @@ fi
;;
esac
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
+ if test no = "$lt_cv_dlopen"; then
enable_dlopen=no
+ else
+ enable_dlopen=yes
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS="$LIBS"
+ save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -11677,7 +12230,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -11724,9 +12277,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -11756,7 +12309,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -11776,14 +12329,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
- if test "x$lt_cv_dlopen_self" = xyes; then
+ if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -11830,9 +12383,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -11862,7 +12415,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -11883,9 +12436,9 @@ fi
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
;;
esac
@@ -11929,7 +12482,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP" ; then
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -11957,7 +12510,7 @@ fi
- # Report which library types will actually be built
+ # Report what library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -11965,13 +12518,13 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -11979,8 +12532,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
;;
aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
fi
;;
esac
@@ -11990,7 +12547,7 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
@@ -12004,11 +12561,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CC="$lt_save_CC"
+CC=$lt_save_CC
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
+ if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -12187,7 +12744,7 @@ objext_CXX=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
@@ -12248,46 +12805,39 @@ $RM -r conftest*
CFLAGS=$CXXFLAGS
compiler=$CC
compiler_CXX=$CC
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+ func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
if test -n "$compiler"; then
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
else
lt_prog_compiler_no_builtin_flag_CXX=
fi
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
# Set up default GNU C++ configuration
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -12301,7 +12851,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -12312,7 +12862,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -12323,32 +12873,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 &5
$as_echo "$LD" >&6; }
@@ -12384,22 +12934,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ if test yes = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
- wlarc='${wl}'
+ wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
$GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec_CXX=
fi
@@ -12436,18 +12986,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
ld_shlibs_CXX=no
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
@@ -12457,6 +13019,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
esac
done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
;;
esac
@@ -12475,13 +13044,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
hardcode_direct_absolute_CXX=yes
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- file_list_spec_CXX='${wl}-f,'
+ file_list_spec_CXX='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct_CXX=no
+ hardcode_direct_absolute_CXX=no
+ ;;
+ esac
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -12499,36 +13076,44 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
fi
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ export_dynamic_flag_spec_CXX='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to
# export.
always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
+ # The "-G" linker flag allows undefined symbols.
+ no_undefined_flag_CXX='-bernotok'
# Determine the default libpath from the value encoded in an empty
# executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -12563,7 +13148,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
fi
@@ -12571,18 +13156,18 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -12617,7 +13202,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
fi
@@ -12625,22 +13210,34 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag_CXX=' $wl-bernotok'
+ allow_undefined_flag_CXX=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec_CXX='$convenience'
fi
archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
fi
fi
;;
@@ -12650,7 +13247,7 @@ fi
allow_undefined_flag_CXX=unsupported
# Joseph Beckenbach says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs_CXX=no
fi
@@ -12678,57 +13275,58 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
enable_shared_with_static_runtimes_CXX=yes
# Don't use ranlib
old_postinstall_cmds_CXX='chmod 644 $oldlib'
postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# g++
# _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec_CXX='-L$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+ export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=no
enable_shared_with_static_runtimes_CXX=yes
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs_CXX=no
fi
@@ -12742,27 +13340,27 @@ fi
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec_CXX=''
fi
link_all_deplibs_CXX=yes
- allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ allow_undefined_flag_CXX=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
else
@@ -12771,6 +13369,34 @@ fi
;;
+ os2*)
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_minus_L_CXX=yes
+ allow_undefined_flag_CXX=unsupported
+ shrext_cmds=.dll
+ archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes_CXX=yes
+ ;;
+
dgux*)
case $cc_basename in
ec++*)
@@ -12805,18 +13431,15 @@ fi
ld_shlibs_CXX=yes
;;
- gnu*)
- ;;
-
haiku*)
- archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs_CXX=yes
;;
hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
+ export_dynamic_flag_spec_CXX='$wl-E'
hardcode_direct_CXX=yes
hardcode_minus_L_CXX=yes # Not in the search PATH,
# but as the default
@@ -12828,7 +13451,7 @@ fi
ld_shlibs_CXX=no
;;
aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -12837,11 +13460,11 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GXX"; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -12851,15 +13474,15 @@ fi
;;
hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
hardcode_libdir_separator_CXX=:
case $host_cpu in
hppa*64*|ia64*)
;;
*)
- export_dynamic_flag_spec_CXX='${wl}-E'
+ export_dynamic_flag_spec_CXX='$wl-E'
;;
esac
fi
@@ -12885,13 +13508,13 @@ fi
aCC*)
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
# Commands to make compiler produce verbose output that lists
@@ -12902,20 +13525,20 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
fi
@@ -12930,22 +13553,22 @@ fi
interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
CC*)
# SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
@@ -12954,22 +13577,22 @@ fi
old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
fi
fi
link_all_deplibs_CXX=yes
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
hardcode_libdir_separator_CXX=:
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -12977,8 +13600,8 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -12987,10 +13610,10 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -13004,59 +13627,59 @@ fi
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
;;
pgCC* | pgcpp*)
# Portland Group C++ compiler
case `$CC -V` in
*pgCC\ [1-5].* | *pgcpp\ [1-5].*)
prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 6 and above use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
;;
cxx*)
# Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -13070,18 +13693,18 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# IBM XL 8.0 on PPC, with GNU ld
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
@@ -13089,10 +13712,10 @@ fi
*Sun\ C*)
# Sun C++ 5.9
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object_CXX=yes
# Not sure whether something based on
@@ -13150,22 +13773,17 @@ fi
ld_shlibs_CXX=yes
;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
-
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_CXX=yes
hardcode_shlibpath_var_CXX=no
hardcode_direct_absolute_CXX=yes
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='$wl-E'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
fi
output_verbose_link_cmd=func_echo_all
else
@@ -13181,9 +13799,9 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
hardcode_libdir_separator_CXX=:
# Archives containing C++ object files must be created using
@@ -13201,17 +13819,17 @@ fi
cxx*)
case $host in
osf3*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
;;
*)
allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
;;
esac
@@ -13226,21 +13844,21 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
case $host in
osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
*)
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
hardcode_libdir_separator_CXX=:
# Commands to make compiler produce verbose output that lists
@@ -13286,9 +13904,9 @@ fi
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-R$libdir'
hardcode_shlibpath_var_CXX=no
@@ -13296,7 +13914,7 @@ fi
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
+ # but understands '-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
@@ -13313,30 +13931,30 @@ fi
;;
gcx*)
# Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ no_undefined_flag_CXX=' $wl-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -13344,11 +13962,11 @@ fi
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
fi
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
;;
esac
fi
@@ -13357,52 +13975,52 @@ fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
+ no_undefined_flag_CXX='$wl-z,text'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
+ no_undefined_flag_CXX='$wl-z,text'
+ allow_undefined_flag_CXX='$wl-z,nodefs'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ export_dynamic_flag_spec_CXX='$wl-Bexport'
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
- '"$old_archive_cmds_CXX"
+ '"$old_archive_cmds_CXX"
reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
- '"$reload_cmds_CXX"
+ '"$reload_cmds_CXX"
;;
*)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
@@ -13434,10 +14052,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
- test "$ld_shlibs_CXX" = no && can_build_shared=no
+ test no = "$ld_shlibs_CXX" && can_build_shared=no
- GCC_CXX="$GXX"
- LD_CXX="$LD"
+ GCC_CXX=$GXX
+ LD_CXX=$LD
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -13481,13 +14099,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case ${prev}${p} in
+ case $prev$p in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
prev=$p
continue
fi
@@ -13503,16 +14121,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test "$pre_test_object_deps_done" = no; then
- case ${prev} in
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
+ compiler_lib_search_path_CXX=$prev$p
else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
fi
;;
# The "-l" case would never come before the object being
@@ -13520,9 +14138,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
esac
else
if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
+ postdeps_CXX=$prev$p
else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ postdeps_CXX="${postdeps_CXX} $prev$p"
fi
fi
prev=
@@ -13537,15 +14155,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
continue
fi
- if test "$pre_test_object_deps_done" = no; then
+ if test no = "$pre_test_object_deps_done"; then
if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
+ predep_objects_CXX=$p
else
predep_objects_CXX="$predep_objects_CXX $p"
fi
else
if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
+ postdep_objects_CXX=$p
else
postdep_objects_CXX="$postdep_objects_CXX $p"
fi
@@ -13575,51 +14193,6 @@ interix[3-9]*)
postdep_objects_CXX=
postdeps_CXX=
;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
esac
@@ -13628,7 +14201,7 @@ case " $postdeps_CXX " in
esac
compiler_lib_search_dirs_CXX=
if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
fi
@@ -13667,17 +14240,18 @@ lt_prog_compiler_static_CXX=
# C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_static_CXX='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
fi
+ lt_prog_compiler_pic_CXX='-fPIC'
;;
amigaos*)
@@ -13688,8 +14262,8 @@ lt_prog_compiler_static_CXX=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -13704,6 +14278,11 @@ lt_prog_compiler_static_CXX=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_CXX='$wl-static'
+ ;;
+ esac
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -13753,7 +14332,7 @@ lt_prog_compiler_static_CXX=
case $host_os in
aix[4-9]*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
else
@@ -13793,14 +14372,14 @@ lt_prog_compiler_static_CXX=
case $cc_basename in
CC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
lt_prog_compiler_pic_CXX='+Z'
fi
;;
aCC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -13829,7 +14408,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -13837,7 +14416,7 @@ lt_prog_compiler_static_CXX=
lt_prog_compiler_pic_CXX='-fPIC'
;;
ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
+ # old Intel C++ for x86_64, which still supported -KPIC.
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
@@ -13982,7 +14561,7 @@ lt_prog_compiler_static_CXX=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_CXX=
;;
@@ -14014,7 +14593,7 @@ else
lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -14044,7 +14623,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
case $lt_prog_compiler_pic_CXX in
"" | " "*) ;;
*) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -14070,7 +14649,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -14089,13 +14668,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
:
else
lt_prog_compiler_static_CXX=
@@ -14209,8 +14788,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -14222,9 +14801,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -14241,17 +14820,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global defined
- # symbols, whereas GNU nm marks them as "W".
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
+ export_symbols_cmds_CXX=$ltdll_cmds
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
@@ -14271,7 +14854,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
+test no = "$ld_shlibs_CXX" && can_build_shared=no
with_gnu_ld_CXX=$with_gnu_ld
@@ -14288,7 +14871,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc_CXX=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds_CXX in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -14416,7 +14999,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -14433,14 +15016,16 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
+
+
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -14448,41 +15033,91 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
# If using run time linking (on AIX 4.2 or later) use lib.so
# instead of lib.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
shlibpath_var=LIBPATH
fi
;;
@@ -14492,18 +15127,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -14511,8 +15146,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -14524,7 +15159,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -14533,8 +15168,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -14550,16 +15185,16 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -14568,8 +15203,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -14596,7 +15231,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -14609,8 +15244,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -14623,7 +15258,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -14636,8 +15271,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -14649,8 +15284,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -14668,12 +15303,13 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -14698,26 +15334,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -14735,14 +15360,15 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -14750,8 +15376,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -14760,8 +15386,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -14774,8 +15400,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -14786,7 +15412,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -14794,8 +15420,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -14814,8 +15440,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -14824,13 +15450,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -14877,11 +15523,15 @@ fi
# Add ABI-specific directories to the system library path.
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
- # Append ld.so.conf contents to the search path
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
-
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -14898,12 +15548,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -14913,7 +15563,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -14922,58 +15572,68 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -14984,8 +15644,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -14995,11 +15655,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -15007,8 +15667,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -15029,24 +15689,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
+ version_type=sco
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -15064,7 +15724,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -15072,8 +15732,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -15083,20 +15743,32 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
@@ -15139,15 +15811,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" ||
test -n "$runpath_var_CXX" ||
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
+ test yes = "$hardcode_automatic_CXX"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct_CXX" != no &&
+ if test no != "$hardcode_direct_CXX" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
+ test no != "$hardcode_minus_L_CXX"; then
# Linking always hardcodes the temporary library directory.
hardcode_action_CXX=relink
else
@@ -15162,12 +15834,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
$as_echo "$hardcode_action_CXX" >&6; }
-if test "$hardcode_action_CXX" = relink ||
- test "$inherit_rpath_CXX" = yes; then
+if test relink = "$hardcode_action_CXX" ||
+ test yes = "$inherit_rpath_CXX"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -15190,7 +15862,7 @@ fi
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -15220,157 +15892,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Only expand once:
-
-# Checks for header files.
-for ac_header in float.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "float.h" "ac_cv_header_float_h" "$ac_includes_default"
-if test "x$ac_cv_header_float_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_FLOAT_H 1
-_ACEOF
-
-fi
-
-done
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
- #endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
- #endif
-
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(_Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- /* The following fails for
- HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- _Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- /* Catch a bug in an HP-UX C compiler. See
- http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
- */
- _Bool q = true;
- _Bool *pq = &q;
-
-int
-main ()
-{
-
- bool e = &s;
- *pq |= q;
- *pq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdbool_h=yes
-else
- ac_cv_header_stdbool_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
- ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
-
-
-fi
-
-
-if test $ac_cv_header_stdbool_h = yes; then
-
-$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_inline=$ac_kw
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- test "$ac_cv_c_inline" != no && break
-done
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
+# Checks for long double
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
$as_echo_n "checking for long double... " >&6; }
@@ -15397,7 +15926,7 @@ return test_array [0];
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_type_long_double=yes
else
ac_cv_type_long_double=no
@@ -15414,300 +15943,6 @@ $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
fi
-# Checks for library functions.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
-$as_echo_n "checking for working strtod... " >&6; }
-if ${ac_cv_func_strtod+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_strtod=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-$ac_includes_default
-#ifndef strtod
-double strtod ();
-#endif
-int
-main()
-{
- {
- /* Some versions of Linux strtod mis-parse strings with leading '+'. */
- char *string = " +69";
- char *term;
- double value;
- value = strtod (string, &term);
- if (value != 69 || term != (string + 4))
- return 1;
- }
-
- {
- /* Under Solaris 2.4, strtod returns the wrong value for the
- terminating character under some conditions. */
- char *string = "NaN";
- char *term;
- strtod (string, &term);
- if (term != string && *(term - 1) == 0)
- return 1;
- }
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_strtod=yes
-else
- ac_cv_func_strtod=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
-$as_echo "$ac_cv_func_strtod" >&6; }
-if test $ac_cv_func_strtod = no; then
- case " $LIBOBJS " in
- *" strtod.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
- ;;
-esac
-
-ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
-if test "x$ac_cv_func_pow" = xyes; then :
-
-fi
-
-if test $ac_cv_func_pow = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
-$as_echo_n "checking for pow in -lm... " >&6; }
-if ${ac_cv_lib_m_pow+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lm $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pow ();
-int
-main ()
-{
-return pow ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_pow=yes
-else
- ac_cv_lib_m_pow=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
-$as_echo "$ac_cv_lib_m_pow" >&6; }
-if test "x$ac_cv_lib_m_pow" = xyes; then :
- POW_LIB=-lm
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
-$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
-fi
-
-fi
-
-fi
-
-for ac_func in strtol
-do :
- ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
-if test "x$ac_cv_func_strtol" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOL 1
-_ACEOF
-
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5
-$as_echo_n "checking for library containing floor... " >&6; }
-if ${ac_cv_search_floor+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char floor ();
-int
-main ()
-{
-return floor ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' m; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_floor=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_floor+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_floor+:} false; then :
-
-else
- ac_cv_search_floor=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5
-$as_echo "$ac_cv_search_floor" >&6; }
-ac_res=$ac_cv_search_floor
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5
-$as_echo_n "checking for library containing pow... " >&6; }
-if ${ac_cv_search_pow+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pow ();
-int
-main ()
-{
-return pow ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' m; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_pow=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_pow+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_pow+:} false; then :
-
-else
- ac_cv_search_pow=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5
-$as_echo "$ac_cv_search_pow" >&6; }
-ac_res=$ac_cv_search_pow
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5
-$as_echo_n "checking for library containing sqrt... " >&6; }
-if ${ac_cv_search_sqrt+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sqrt ();
-int
-main ()
-{
-return sqrt ();
- ;
- return 0;
-}
-_ACEOF
-for ac_lib in '' m; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_sqrt=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_sqrt+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_sqrt+:} false; then :
-
-else
- ac_cv_search_sqrt=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5
-$as_echo "$ac_cv_search_sqrt" >&6; }
-ac_res=$ac_cv_search_sqrt
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-
# Check endianness
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
@@ -15724,7 +15959,7 @@ else
typedef int dummy;
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# Check for potential -arch flags. It is not universal unless
# there are at least two -arch flags with different values.
@@ -15769,7 +16004,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# It does; now see whether it defined to BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15787,7 +16022,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
ac_cv_c_bigendian=no
@@ -15813,7 +16048,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
# It does; now see whether it defined to _BIG_ENDIAN or not.
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15830,7 +16065,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
ac_cv_c_bigendian=yes
else
ac_cv_c_bigendian=no
@@ -15869,7 +16104,7 @@ return use_ascii (foo) == use_ebcdic (foo);
return 0;
}
_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+if ac_fn_cxx_try_compile "$LINENO"; then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
@@ -15904,7 +16139,7 @@ main ()
return 0;
}
_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_cxx_try_run "$LINENO"; then :
ac_cv_c_bigendian=no
else
ac_cv_c_bigendian=yes
@@ -15934,8 +16169,109 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
esac
-# Check for doxygen.
-# Need version 1.8.1.2 or later for greek and math symbols.
+# Check flags for C++11
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++11" >&5
+$as_echo_n "checking whether C++ compiler accepts -std=c++11... " >&6; }
+if ${ax_cv_check_cxxflags___std_cpp11+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ax_cv_check_cxxflags___std_cpp11=yes
+else
+ ax_cv_check_cxxflags___std_cpp11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXXFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp11" >&5
+$as_echo "$ax_cv_check_cxxflags___std_cpp11" >&6; }
+if test "x$ax_cv_check_cxxflags___std_cpp11" = xyes; then :
+ CXXFLAGS="$CXXFLAGS -std=c++11"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts -std=c++0x" >&5
+$as_echo_n "checking whether C++ compiler accepts -std=c++0x... " >&6; }
+if ${ax_cv_check_cxxflags___std_cpp0x+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_check_save_flags=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ ax_cv_check_cxxflags___std_cpp0x=yes
+else
+ ax_cv_check_cxxflags___std_cpp0x=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CXXFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cxxflags___std_cpp0x" >&5
+$as_echo "$ax_cv_check_cxxflags___std_cpp0x" >&6; }
+if test "x$ax_cv_check_cxxflags___std_cpp0x" = xyes; then :
+ CXXFLAGS="$CXXFLAGS -std=c++0x"
+else
+ :
+fi
+
+fi
+
+# Check for C++11 math functions
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++11 math functions" >&5
+$as_echo_n "checking for C++11 math functions... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include
+int
+main ()
+{
+int q;
+ return int(std::hypot(3.0, 4.0) + std::expm1(0.5) +
+ std::log1p(2.0) + std::asinh(10.0) +
+ std::atanh(0.8) + std::cbrt(8.0) +
+ std::fma(1.0, 2.0, 3.0) + std::remquo(100.0, 90.0, &q) +
+ std::remainder(100.0, 90.0) + std::copysign(1.0, -0.0)) +
+ std::isfinite(4.0) + std::isnan(0.0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; };
+ CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=1"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; };
+ CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=0"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+# Check for doxygen. Version 1.8.7 or later needed for …
for ac_prog in doxygen
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -15979,7 +16315,7 @@ fi
done
if test "$DOXYGEN" && test `"$DOXYGEN" --version |
- sed 's/^\([0-9]\)\.\([0-9]\)\./\1.0\2./'` '>' 1.08.1.1; then
+ sed 's/\b\([0-9]\)\b/0\1/g'` '>' 01.08.06.99; then
HAVE_DOXYGEN_TRUE=
HAVE_DOXYGEN_FALSE='#'
else
@@ -16123,7 +16459,147 @@ else
fi
-ac_config_files="$ac_config_files Makefile src/Makefile include/Makefile tools/Makefile doc/Makefile man/Makefile matlab/Makefile python/Makefile cmake/Makefile examples/Makefile"
+ac_config_files="$ac_config_files Makefile src/Makefile include/Makefile tools/Makefile doc/Makefile js/Makefile man/Makefile matlab/Makefile python/Makefile cmake/Makefile examples/Makefile"
+
+
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+
+
+# Check whether --with-pkgconfigdir was given.
+if test "${with_pkgconfigdir+set}" = set; then :
+ withval=$with_pkgconfigdir;
+else
+ with_pkgconfigdir='${libdir}/pkgconfig'
+fi
+
+pkgconfigdir=$with_pkgconfigdir
+
+
+
+
+
+ac_config_files="$ac_config_files cmake/geographiclib.pc:cmake/project.pc.in"
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -16672,7 +17148,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by GeographicLib $as_me 1.35, which was
+This file was extended by GeographicLib $as_me 1.49, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16738,7 +17214,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-GeographicLib config.status 1.35
+GeographicLib config.status 1.49
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -16873,6 +17349,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -16922,10 +17399,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -16990,7 +17470,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -17095,9 +17576,12 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
nm_file_list_spec \
+lt_cv_truncate_bin \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
@@ -17163,7 +17647,7 @@ postdeps_CXX \
compiler_lib_search_path_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -17190,7 +17674,8 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
reload_cmds_CXX \
old_archive_cmds_CXX \
old_archive_from_new_cmds_CXX \
@@ -17204,7 +17689,7 @@ prelink_cmds_CXX \
postlink_cmds_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -17213,19 +17698,16 @@ postlink_cmds_CXX; do
done
ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -17250,11 +17732,13 @@ do
"include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "js/Makefile") CONFIG_FILES="$CONFIG_FILES js/Makefile" ;;
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"matlab/Makefile") CONFIG_FILES="$CONFIG_FILES matlab/Makefile" ;;
"python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;;
"cmake/Makefile") CONFIG_FILES="$CONFIG_FILES cmake/Makefile" ;;
"examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+ "cmake/geographiclib.pc") CONFIG_FILES="$CONFIG_FILES cmake/geographiclib.pc:cmake/project.pc.in" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -17851,7 +18335,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -17902,7 +18386,7 @@ $as_echo X"$mf" |
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
@@ -17945,55 +18429,53 @@ $as_echo X"$file" |
;;
"libtool":C)
- # See if we are running on zsh, and set the options which allow our
+ # See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
+ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
- cfgfile="${ofile}T"
+ cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 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.
+
+# GNU Libtool 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 of of the License, or
+# (at your option) any later version.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see .
# The names of the tagged configurations supported by this script.
-available_tags="CXX "
+available_tags='CXX '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
# ### BEGIN LIBTOOL CONFIG
@@ -18013,6 +18495,9 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
@@ -18130,18 +18615,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
lt_sysroot=$lt_sysroot
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
# The name of the directory that contains temporary libtool files.
objdir=$objdir
@@ -18232,8 +18726,11 @@ hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
@@ -18326,13 +18823,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -18396,6 +18893,65 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
# ### END LIBTOOL CONFIG
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
_LT_EOF
case $host_os in
@@ -18404,7 +18960,7 @@ _LT_EOF
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -18413,7 +18969,7 @@ _LT_EOF
esac
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -18423,165 +18979,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- if test x"$xsi_shell" = xyes; then
- sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\ # positional parameters, so assign one to ordinary parameter first.\
-\ func_stripname_result=${3}\
-\ func_stripname_result=${func_stripname_result#"${1}"}\
-\ func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\ func_split_long_opt_name=${1%%=*}\
-\ func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\ func_split_short_opt_arg=${1#??}\
-\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\ case ${1} in\
-\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\ *) func_lo2o_result=${1} ;;\
-\ esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
- func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
- func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
- func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
- sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
- eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\ func_quote_for_eval "${2}"\
-\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -18668,13 +19065,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_CXX
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
diff --git a/gtsam/3rdparty/GeographicLib/configure.ac b/gtsam/3rdparty/GeographicLib/configure.ac
index c0b539c5c..9ff747bad 100644
--- a/gtsam/3rdparty/GeographicLib/configure.ac
+++ b/gtsam/3rdparty/GeographicLib/configure.ac
@@ -1,7 +1,7 @@
dnl
dnl Copyright (C) 2009, Francesco P. Lovergine
-AC_INIT([GeographicLib],[1.35],[charles@karney.com])
+AC_INIT([GeographicLib],[1.49],[charles@karney.com])
AC_CANONICAL_SYSTEM
AC_PREREQ(2.61)
AC_CONFIG_SRCDIR(src/Geodesic.cpp)
@@ -9,14 +9,14 @@ AC_CONFIG_MACRO_DIR(m4)
AM_INIT_AUTOMAKE
GEOGRAPHICLIB_VERSION_MAJOR=1
-GEOGRAPHICLIB_VERSION_MINOR=35
+GEOGRAPHICLIB_VERSION_MINOR=49
GEOGRAPHICLIB_VERSION_PATCH=0
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_MAJOR],
- [$GEOGRAPHICLIB_VERSION_MAJOR],[major version number])
+ [$GEOGRAPHICLIB_VERSION_MAJOR],[major version number])
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_MINOR],
- [$GEOGRAPHICLIB_VERSION_MINOR],[minor version number])
+ [$GEOGRAPHICLIB_VERSION_MINOR],[minor version number])
AC_DEFINE_UNQUOTED([GEOGRAPHICLIB_VERSION_PATCH],
- [$GEOGRAPHICLIB_VERSION_PATCH],[patch number])
+ [$GEOGRAPHICLIB_VERSION_PATCH],[patch number])
AC_SUBST(GEOGRAPHICLIB_VERSION_MAJOR)
AC_SUBST(GEOGRAPHICLIB_VERSION_MINOR)
AC_SUBST(GEOGRAPHICLIB_VERSION_PATCH)
@@ -34,7 +34,7 @@ dnl Library code modified: REVISION++
dnl Interfaces changed/added/removed: CURRENT++ REVISION=0
dnl Interfaces added: AGE++
dnl Interfaces removed: AGE=0
-LT_CURRENT=11
+LT_CURRENT=18
LT_REVISION=2
LT_AGE=1
AC_SUBST(LT_CURRENT)
@@ -47,31 +47,40 @@ AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_PROG_CXX
AC_PROG_LIBTOOL
+AC_LANG_CPLUSPLUS
-# Checks for header files.
-AC_CHECK_HEADERS([float.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
-AC_C_INLINE
+# Checks for long double
AC_TYPE_LONG_DOUBLE
-# Checks for library functions.
-AC_FUNC_STRTOD
-AC_CHECK_FUNCS([strtol])
-AC_SEARCH_LIBS([floor],[m])
-AC_SEARCH_LIBS([pow],[m])
-AC_SEARCH_LIBS([sqrt],[m])
-
# Check endianness
AC_C_BIGENDIAN
-# Check for doxygen.
-# Need version 1.8.1.2 or later for greek and math symbols.
+# Check flags for C++11
+AX_CHECK_COMPILE_FLAG([-std=c++11],
+ [CXXFLAGS="$CXXFLAGS -std=c++11"],
+ [AX_CHECK_COMPILE_FLAG([-std=c++0x],
+ [CXXFLAGS="$CXXFLAGS -std=c++0x"])])
+# Check for C++11 math functions
+AC_MSG_CHECKING([for C++11 math functions])
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [#include ],
+ [int q;
+ return int(std::hypot(3.0, 4.0) + std::expm1(0.5) +
+ std::log1p(2.0) + std::asinh(10.0) +
+ std::atanh(0.8) + std::cbrt(8.0) +
+ std::fma(1.0, 2.0, 3.0) + std::remquo(100.0, 90.0, &q) +
+ std::remainder(100.0, 90.0) + std::copysign(1.0, -0.0)) +
+ std::isfinite(4.0) + std::isnan(0.0);])],
+ [AC_MSG_RESULT([yes]);
+ CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=1"],
+ [AC_MSG_RESULT([no]);
+ CXXFLAGS="$CXXFLAGS -DGEOGRAPHICLIB_CXX11_MATH=0"])
+
+# Check for doxygen. Version 1.8.7 or later needed for …
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AM_CONDITIONAL([HAVE_DOXYGEN],
- [test "$DOXYGEN" && test `"$DOXYGEN" --version |
- sed 's/^\([[0-9]]\)\.\([[0-9]]\)\./\1.0\2./'` '>' 1.08.1.1])
+ [test "$DOXYGEN" && test `"$DOXYGEN" --version |
+ sed 's/\b\([[0-9]]\)\b/0\1/g'` '>' 01.08.06.99])
AC_CHECK_PROGS([POD2MAN], [pod2man])
AC_CHECK_PROGS([POD2HTML], [pod2html])
@@ -87,10 +96,17 @@ src/Makefile
include/Makefile
tools/Makefile
doc/Makefile
+js/Makefile
man/Makefile
matlab/Makefile
python/Makefile
cmake/Makefile
examples/Makefile
])
+
+PKG_PROG_PKG_CONFIG
+PKG_INSTALLDIR
+
+AC_CONFIG_FILES([cmake/geographiclib.pc:cmake/project.pc.in])
+
AC_OUTPUT
diff --git a/gtsam/3rdparty/GeographicLib/depcomp b/gtsam/3rdparty/GeographicLib/depcomp
index debb6ffa3..fc98710e2 100755
--- a/gtsam/3rdparty/GeographicLib/depcomp
+++ b/gtsam/3rdparty/GeographicLib/depcomp
@@ -1,9 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-03-27.16; # UTC
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# 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
@@ -27,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC
case $1 in
'')
- echo "$0: No command. Try '$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -56,11 +56,65 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
# A tabulation character.
tab=' '
# A newline character.
nl='
'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
@@ -74,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -85,32 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvisualcpp
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
- # This is just like msvc7 but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
- depmode=msvc7
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
fi
if test "$depmode" = xlc; then
- # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
- gccflag=-qmakedep=gcc,-MF
- depmode=gcc
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -133,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -142,13 +198,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -156,15 +216,14 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
@@ -173,15 +232,15 @@ gcc)
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' "$nl" < "$tmpdepfile" |
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
- | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -199,8 +258,7 @@ sgi)
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -208,7 +266,6 @@ sgi)
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
-
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
@@ -216,19 +273,15 @@ sgi)
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr "$nl" ' ' >> "$depfile"
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
-
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
@@ -246,9 +299,8 @@ aix)
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
@@ -261,9 +313,7 @@ aix)
"$@" -M
fi
stat=$?
-
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
@@ -272,65 +322,113 @@ aix)
do
test -f "$tmpdepfile" && break
done
- if test -f "$tmpdepfile"; then
- # Each line is of the form 'foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
+ aix_post_process_depfile
;;
-icc)
- # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
- # However on
- # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using '\':
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
- # tcc 0.9.26 (FIXME still under development at the moment of writing)
- # will emit a similar output, but also prepend the continuation lines
- # with horizontal tabulation characters.
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
- # Each line is of the form 'foo.o: dependent.h',
- # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
- # '$object: dependent.h' and one to simply 'dependent.h:'.
- sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
- < "$tmpdepfile" > "$depfile"
- sed '
- s/[ '"$tab"'][ '"$tab"']*/ /g
- s/^ *//
- s/ *\\*$//
- s/^[^:]*: *//
- /^$/d
- /:$/d
- s/$/ :/
- ' < "$tmpdepfile" >> "$depfile"
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -341,9 +439,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -354,8 +451,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -365,76 +461,61 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in 'foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
msvc7)
if test "$libtool" = yes; then
@@ -445,8 +526,7 @@ msvc7)
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
- if test "$stat" = 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -472,6 +552,7 @@ $ {
G
p
}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
@@ -523,13 +604,14 @@ dashmstdout)
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' "$nl" < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -582,10 +664,12 @@ makedepend)
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -621,10 +705,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -656,15 +740,15 @@ msvisualcpp)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
"$@" -E 2>/dev/null |
diff --git a/gtsam/3rdparty/GeographicLib/doc/CMakeLists.txt b/gtsam/3rdparty/GeographicLib/doc/CMakeLists.txt
index 7390a40fd..6455055ed 100644
--- a/gtsam/3rdparty/GeographicLib/doc/CMakeLists.txt
+++ b/gtsam/3rdparty/GeographicLib/doc/CMakeLists.txt
@@ -29,38 +29,105 @@ endif ()
file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html-stage)
if (DOXYGEN_FOUND)
- configure_file (doxyfile.in doxyfile)
- configure_file (doxyfile-c.in doxyfile-c)
- configure_file (doxyfile-for.in doxyfile-for)
- configure_file (doxyfile-net.in doxyfile-net)
- file (GLOB SOURCES
+ set (DOCTARGETS)
+
+ configure_file (GeographicLib.dox.in GeographicLib.dox @ONLY)
+ configure_file (doxyfile.in doxyfile @ONLY)
+ file (GLOB CXXSOURCES
../src/[A-Za-z]*.cpp ../include/GeographicLib/[A-Za-z]*.hpp
../tools/[A-Za-z]*.cpp ../examples/[A-Za-z]*.cpp
- ../legacy/C/*.[ch] ../legacy/Fortran/*.for ../legacy/Fortran/*.inc
- ../dotnet/NETGeographicLib/*.cpp ../dotnet/NETGeographicLib/*.h
- ../dotnet/examples/CS/*.cs ../dotnet/examples/ManagedCPP/*.cpp
- ../dotnet/examples/VB/*.vb)
+ ../examples/[A-Za-z]*.hpp)
file (GLOB EXTRA_FILES ../maxima/[A-Za-z]*.mac
tmseries30.html geodseries30.html ../LICENSE.txt)
- file (GLOB FIGURES *.png)
+ file (GLOB FIGURES *.png *.svg *.gif)
file (COPY ${EXTRA_FILES} DESTINATION html-stage)
- add_custom_target (doc ALL
+ add_custom_target (cxxdoc ALL
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html)
- add_dependencies (doc htmlman)
+ add_dependencies (cxxdoc htmlman)
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile
- ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-c
- ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-for
- ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-net
- GeographicLib.dox geodesic-c.dox geodesic-for.dox NETGeographicLib.dox
- ${SOURCES} ${EXTRA_FILES} ${FIGURES} ${HTMLMAN}
+ ${CMAKE_CURRENT_BINARY_DIR}/GeographicLib.dox
+ ${CXXSOURCES} ${EXTRA_FILES} ${FIGURES} ${HTMLMAN}
COMMAND ${CMAKE_COMMAND} -E remove_directory html
COMMAND ${CMAKE_COMMAND} -E copy_directory html-stage html
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile > doxygen.log
+ COMMENT "Generating C++ documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} cxxdoc)
+
+ configure_file (doxyfile-c.in doxyfile-c @ONLY)
+ file (GLOB CSOURCES ../legacy/C/*.[ch])
+ add_custom_target (cdoc ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/C/index.html)
+ add_dependencies (cdoc cxxdoc)
+ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/C/index.html
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-c geodesic-c.dox ${CSOURCES}
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-c > doxygen-c.log
+ COMMENT "Generating C documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} cdoc)
+
+ configure_file (doxyfile-for.in doxyfile-for @ONLY)
+ file (GLOB FORTRANSOURCES ../legacy/Fortran/*.for ../legacy/Fortran/*.inc)
+ add_custom_target (fortrandoc ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/Fortran/index.html)
+ add_dependencies (fortrandoc cxxdoc)
+ add_custom_command (OUTPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/html/Fortran/index.html
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-for
+ geodesic-for.dox ${FORTRANSOURCES}
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-for > doxygen-for.log
+ COMMENT "Generating Fortran documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} fortrandoc)
+
+ configure_file (doxyfile-net.in doxyfile-net @ONLY)
+ file (GLOB DOTNETSOURCES
+ ../dotnet/NETGeographicLib/*.cpp ../dotnet/NETGeographicLib/*.h
+ ../dotnet/examples/CS/*.cs ../dotnet/examples/ManagedCPP/*.cpp
+ ../dotnet/examples/VB/*.vb)
+ add_custom_target (dotnetdoc ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/NET/index.html)
+ add_dependencies (dotnetdoc cxxdoc)
+ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/NET/index.html
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxyfile-net
+ NETGeographicLib.dox ${DOTNETSOURCES}
COMMAND ${DOXYGEN_EXECUTABLE} doxyfile-net > doxygen-net.log
- COMMENT "Generating html documentation tree")
+ COMMENT "Generating .NET documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} dotnetdoc)
+
+ if (JSDOC)
+ file (GLOB JSSOURCES
+ ../js/src/*.js ../js/GeographicLib.md ../js/doc/*.md)
+ add_custom_target (jsdoc ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/js/index.html)
+ add_dependencies (jsdoc cxxdoc)
+ add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/js/index.html
+ DEPENDS ${JSSOURCES}
+ COMMAND ${JSDOC} --verbose -d html/js
+ -u ${PROJECT_SOURCE_DIR}/js/doc
+ -c ${PROJECT_SOURCE_DIR}/js/conf.json
+ -R ${PROJECT_SOURCE_DIR}/js/GeographicLib.md
+ ${PROJECT_SOURCE_DIR}/js/src > jsdoc.log
+ COMMENT "Generating JavaScript documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} jsdoc)
+ endif ()
+
+ if (SPHINX)
+ file (GLOB PYTHONSOURCES
+ ../python/geographiclib/*.py ../python/doc/*.rst ../python/doc/conf.py)
+ add_custom_target (pythondoc ALL
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/python/index.html)
+ add_dependencies (pythondoc cxxdoc)
+ add_custom_command (OUTPUT
+ ${CMAKE_CURRENT_BINARY_DIR}/html/python/index.html
+ DEPENDS ${PYTHONSOURCES}
+ COMMAND ${SPHINX} -v -b html -d python-doctree
+ ${PROJECT_SOURCE_DIR}/python/doc html/python > pythondoc.log
+ COMMENT "Generating python documentation tree")
+ set (DOCTARGETS ${DOCTARGETS} pythondoc)
+ endif ()
+
+ add_custom_target (doc ALL)
+ add_dependencies (doc ${DOCTARGETS})
+
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html
DESTINATION ${INSTALL_DOC_DIR})
else ()
@@ -74,10 +141,3 @@ else ()
${CMAKE_CURRENT_BINARY_DIR}/html/utilities.html
DESTINATION ${INSTALL_DOC_DIR}/html)
endif ()
-
-# Finally install the JavaScript files
-file (GLOB SCRIPTDRIVERS scripts/[A-Za-z]*.html)
-file (GLOB JSSCRIPTS scripts/GeographicLib/[A-Za-z]*.js)
-install (FILES ${SCRIPTDRIVERS} DESTINATION ${INSTALL_DOC_DIR}/scripts)
-install (FILES ${JSSCRIPTS}
- DESTINATION ${INSTALL_DOC_DIR}/scripts/GeographicLib)
diff --git a/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox b/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox
deleted file mode 100644
index 7fd60e992..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox
+++ /dev/null
@@ -1,5574 +0,0 @@
-// -*- text -*-
-/**
- * \file GeographicLib.dox
- * \brief Documentation for GeographicLib
- *
- * Written by Charles Karney and licensed under the
- * MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-/**
-\mainpage GeographicLib library
-\author Charles F. F. Karney (charles@karney.com)
-\version 1.35
-\date 2014-03-13
-
-\section abstract Abstract
-
-%GeographicLib is a small set of C++
-classes for performing conversions between geographic, UTM, UPS,
-MGRS, geocentric, and local cartesian coordinates, for gravity (e.g.,
-EGM2008), geoid height and geomagnetic field (e.g., WMM2010)
-calculations, and for solving geodesic problems. The emphasis is on
-returning accurate results with errors close to round-off (about 5--15
-nanometers). New accurate algorithms for \ref geodesic and \ref
-transversemercator have been developed for this library. The
-functionality of the library can be accessed from user code, from the
-\ref utilities provided, or via the \ref other. Also included is a .NET
-wrapper library NETGeographicLib
-which exposes the functionality to .NET applications. For a sample of
-the geodesic capabilities in JavaScript, check out the
-online geodesic calculator and
-the script for displaying
-geodesics in Google Maps
-
-This library is not a general purpose projection library; use
-proj.4 for that. On the other
-hand, it does provide the core functionality offered by
-GEOTRANS.
-
-\section download Download
-
-The main project page is at
--
- http://sourceforge.net/projects/geographiclib
-.
-The code is available for download at
--
- GeographicLib-1.35.tar.gz
--
- GeographicLib-1.35.zip
-.
-as either a compressed tar file (tar.gz) or a zip file. (The two
-archives have identical contents, except that the zip file has DOS
-line endings.) Alternatively you can get the latest release using git
-\verbatim
- git clone -b r1.35 git://git.code.sf.net/p/geographiclib/code geographiclib
-\endverbatim
-There are also binary installers for Windows available at
--
- GeographicLib-1.35-win32.exe
--
- GeographicLib-1.35-win64.exe
-.
-It is licensed under the
-MIT/X11 License;
-see LICENSE.txt for the terms.
-For more information, see http://geographiclib.sourceforge.net/.
-
-\section contents Contents
- - \ref intro
- - \ref install
- - \ref start
- - \ref utilities
- - \ref organization
- - \ref other
- - \ref geoid
- - \ref gravity
- - \ref magnetic
- - \ref geodesic
- - \ref triaxial
- - \ref transversemercator
- - \ref geocentric
- - \ref old
-
-
-
-%GeographicLib offers a C++ interfaces to a small (but important!) set
-of geographic transformations. It grew out of a desire to improve on
-the geotrans
-package for transforming between geographic and MGRS coordinates. At
-present, %GeographicLib provides UTM, UPS, MGRS, geocentric, and local
-cartesian projections, gravity and geomagnetic models, and classes for
-geodesic calculations.
-
-The goals of %GeographicLib are:
- - Accuracy. In most applications the accuracy is close to round-off,
- about 5 nm (5 nanometers). Even though in many geographic
- applications 1 cm is considered "accurate enough", there is little
- penalty in providing much better accuracy. In situations where a
- faster approximate algorithm is necessary, %GeographicLib offers an
- accurate benchmark to guide the development.
- - Completeness. For each of the projections included, an attempt is
- made to provide a complete solution. For example,
- GeographicLib::Geodesic::Inverse works for anti-podal points.
- Similarly, GeographicLib::Geocentric.Reverse will return accurate
- geodetic coordinates even for points close to the center of the
- earth.
- - C++ interface. For the projection methods, this allows encapsulation
- of the ellipsoid parameters.
- - Emphasis on projections necessary for analyzing military data.
- - Uniform treatment of UTM/UPS. The GeographicLib::UTMUPS class treats
- UPS as zone 0. This simplifies conversions between UTM and UPS
- coordinates, etc.
- - Well defined and stable conventions for the conversion between
- UTM/UPS to MGRS coordinates.
- - Detailed internal documentation on the algorithms. For the most part
- %GeographicLib uses published algorithms and references are given. If
- changes have been made (usually to improve the numerical accuracy),
- these are described in the code.
-
-Various \ref utilities are provided with the library. These illustrate
-the use of the library and are useful in their own right. This library
-and the utilities have been tested with g++ 4.4 under Linux, with g++
-4.2 under Mac OS X, and with MS Visual Studio 9 (2008), 10 (2010), 11
-(2012), and 12 (2013) compiled for 32 bit and 64 bit.
-
-Matlab, JavaScript, and Python interfaces are provided to portions of
-%GeographicLib; see \ref other.
-
-The section \ref geodesic documents the method of solving the geodesic
-problem.
-
-The section \ref transversemercator documents various properties of this
-projection.
-
-The bulk of the testing has used geographically relevant values of the
-flattening. Thus, you can expect close to full accuracy for -0.01 ≤
-\e f ≤ 0.01 (but note that GeographicLib::TransverseMercatorExact is
-restricted to \e f > 0). However, reasonably accurate results can be
-expected if -0.1 ≤ \e f ≤ 0.1. Outside this range, you should
-attempt to verify the accuracy of the routines independently. Two types
-of problems may occur with larger values of \e f:
- - Some classes, specifically GeographicLib::Geodesic,
- GeographicLib::GeodesicLine, and GeographicLib::TransverseMercator,
- use series expansions using \e f as a small parameter. The accuracy
- of these routines will degrade as \e f becomes large.
- - Even when exact formulas are used, many of the classes need to invert
- the exact formulas (e.g., to invert a projection), typically, using
- Newton's method. This usually provides an essentially exact
- inversion. However, the choice of starting guess and the exit
- conditions have been tuned to cover small values of \e f and the
- inversion may be incorrect if \e f is large.
-
-Undoubtedly, bugs lurk in this code and in the documentation. Please
-report any you find to charles@karney.com.
-
-
-Back to \ref intro. Forward to \ref start. Up to \ref contents.
-
-
-%GeographicLib has been developed under Linux with the g++ compiler
-(versions 4.0 and later) and under Windows with Visual Studio 2005, 2008,
-and 2010. Earlier versions were tested also under Darwin and Solaris. It
-should compile on a wide range of other systems. First download either
-
-GeographicLib-1.35.tar.gz or
-
-GeographicLib-1.35.zip (or
-
-GeographicLib-1.35-win32.exe or
-
-GeographicLib-1.35-win64.exe for binary installation under Windows).
-Then pick one of the first five options below:
-- \ref cmake. This is the preferred installation method as it will work
- on the widest range of platforms. However it requires that you have
- cmake installed.
-- \ref autoconf. This method works for most Unix-like systems,
- including Linux and Mac OS X.
-- \ref gnu. This is a simple installation method that works with g++
- and GNU make on Linux and many Unix platforms.
-- \ref windows. This is a simple installation method that works with
- Visual Studio 2005, 2008, and 2010 under Windows.
-- \ref windowsbin. Use this installation method if you only need to use
- the \ref utilities supplied with %GeographicLib. (This method also
- installs the header files and the library for use by Visual Studio 10.)
-- \ref qt. How to compile %GeographicLib so that it can be used by Qt
- programs.
-- \ref maintainer. This describes addition tasks of interest only to
- the maintainers of this code.
-.
-This section documents only how to install the software. If you
-wish to use %GeographicLib to evaluate geoid heights or the earth's
-gravitational or magnetic fields, then you must also install the
-relevant data files. See \ref geoidinst, \ref gravityinst, and \ref
-magneticinst for instructions.
-
-The first two installation methods use two important techniques which
-make software maintanence simpler
-- Out-of-source builds: This means that you create a separate
- directory for compiling the code. In the description here the
- directories are called BUILD and are located in the top-level of the
- source tree. You might want to use a suffix to denote the type of
- build, e.g., BUILD-vc9 for Visual Studio 9, or BUILD-shared for a
- build which creates a shared library. The advantages of out-of-source
- builds are:
- - You don't mess up the source tree, so it's easy to "clean up".
- Indeed the source tree might be on a read-only file system.
- - Builds for multiple platforms or compilers don't interfere with each
- other.
-- The library is installed: After compilation, there is a
- separate install step which copies the headers, libraries,
- tools, and documentation to a "central" location. You may at this
- point delete the source and build directories. If you have
- administrative privileges, you can install %GeographicLib for the use
- of all users (e.g., in /usr/local). Otherwise, you can install it for
- your personal use (e.g., in $HOME/packages).
-
-\section cmake Installation with cmake
-
-This is the recommended method of installation; however it requires that
-cmake be installed on your system.
-This permits %GeographicLib to be built either as a shared or a static
-library on a wide variety of systems. cmake can also determine the
-capabilities of your system and adjust the compilation of the
-libraries and examples appropriately.
-
-cmake is available for most computer platforms. On Linux systems cmake
-will typically one of the standard packages and can be installed by a
-command like
- \verbatim
- yum install cmake \endverbatim
-(executed as root). The minimum version of cmake supported for building
-%GeographicLib is 2.8.4 (which was released on 2011-02-16). (Actually,
-a few earlier versions will also work for non-Windows platforms.)
-
-On other systems, download a binary installer from http://www.cmake.org
-click on download, and save and run the appropriate installer. Run the
-cmake command with no arguments to get help. Other useful tools are
-ccmake and cmake-gui which offer curses and graphical interfaces to
-cmake. Building under cmake depends on whether it is targeting an IDE
-(interactive development environment) or generating Unix-style
-makefiles. The instructions below have been tested with makefiles and
-g++ on Linux and with the Visual Studio IDE on Windows.
-
-Here are the steps to compile and install %GeographicLib:
-- Unpack the source, running one of \verbatim
- tar xfpz GeographicLib-1.35.tar.gz
- unzip -q GeographicLib-1.35.zip \endverbatim
- then enter the directory created with one of \verbatim
- cd GeographicLib-1.35 \endverbatim
-- Create a separate build directory and enter it, for example, \verbatim
- mkdir BUILD
- cd BUILD \endverbatim
-- Run cmake, pointing it to the source directory (..). On Linux, Unix,
- and MacOSX systems, the command is \verbatim
- cmake .. \endverbatim
- For Windows, the command is typically one of \verbatim
- cmake -G "Visual Studio 10" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib-1.35 ..
- cmake -G "Visual Studio 9 2008" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc9/GeographicLib-1.35 ..
-\endverbatim
- The definitions of CMAKE_INSTALL_PREFIX are optional (see below). The
- settings given above are recommended to ensure that packages that use
- %GeographicLib use the version compiled with the right compiler.
- If you need to rerun cmake, use \verbatim
- cmake . \endverbatim
- possibly including some options via -D (see the next step).
-- cmake allows you to configure how %GeographicLib is built and installed by
- supplying options, for example \verbatim
- cmake -D CMAKE_INSTALL_PREFIX=/tmp/geographic . \endverbatim
- The options you might need to change are
- - COMMON_INSTALL_PATH governs the installation
- convention. If it is on ON (the Linux default), the installation
- is to a common directory, e.g., /usr/local. If it is OFF (the
- Windows default), the installation directory contains the package
- name, e.g., C:/pkg/GeographicLib-1.35. The installation
- directories for the documentation, cmake configuration, python and
- matlab interfaces all depend on the variable with deeper paths
- relative to CMAKE_INSTALL_PREFIX being used when it's ON:
- - documentation: OFF: doc/html; ON: share/doc/GeographicLib/html;
- - cmake configuration: OFF cmake; ON: share/cmake/GeographicLib;
- - python interface: OFF: python; ON: lib/python/site-packages;
- - matlab interface: OFF: matlab; ON: libexec/GeographicLib/matlab;
- .
- - CMAKE_INSTALL_PREFIX (default: /usr/local
- on non-Windows systems, C:/Program Files/GeographicLib
- on Windows systems) specifies where the library will be installed.
- For windows systems, it is recommended to use a prefix which
- includes the compiler version, as shown above (and also, possibly,
- whether this is a 64-bit build, e.g., cmake -G "Visual Studio
- 10 Win64" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/GeographicLib-1.35
- ..). If you just want to try the library to see if it suits
- your needs, pick, for example,
- CMAKE_INSTALL_PREFIX=/tmp/geographic.
- - GEOGRAPHICLIB_DATA (default:
- /usr/local/share/GeographicLib for non-Windows systems,
- C:/Documents and Settings/All Users/Application
- Data/GeographicLib for Windows systems) specifies the default
- location for the various datasets for use by GeographicLib::Geoid,
- GeographicLib::GravityModel, and GeographicLib::MagneticModel.
- See \ref geoidinst, \ref gravityinst, and \ref magneticinst for more
- information.
- - GEOGRAPHICLIB_LIB_TYPE (allowed values: SHARED, STATIC, or
- BOTH), specifies the types of libraries build. The default is
- STATIC for Windows and SHARED otherwise. If building %GeographicLib
- for sytem-wide use, BOTH is recommended, because this provides users
- with the choice of which library to use.
- - CMAKE_BUILD_TYPE (default: Release). This
- flags only affects non-IDE compile environments (like make + g++).
- The default is actually blank, but this is treated as
- Release. Choose one of
- \verbatim
- Debug
- Release
- RelWithDebInfo
- MinSizeRel
-\endverbatim
- (With IDE compile environments, you get to select the build type in
- the IDE.)
- - MATLAB_COMPILER (default: OFF). Set this to either
- "mex" (for Matlab) or "mkoctfile" (for Octave) to specify the
- compiler to use for the Matlab/Octave interface. See \ref matlab
- for more information.
- - GEOGRAPHICLIB_DOCUMENTATION (default: OFF). If set to
- ON, then html documentation is created from the source files,
- provided a sufficiently recent version of doxygen can be found.
- Otherwise, the html documentation will redirect to the appropriate
- version of the online documentation.
- - BUILD_NETGEOGRAPHICLIB (default: OFF). If set to ON,
- build the managed C++ wrapper library
- NETGeographicLib. This only makes
- sense for Windows systems.
- - GEOGRAPHICLIB_PRECISION specifies the precision to be
- used for "real" (i.e., floating point) numbers. 1 means float
- (single precision); 2 (the default) means double; 3 means long
- double; 4 is reserved for quadruple precision. Nearly all the
- testing has been carried out with doubles and that's the
- recommended configuration. In particular you should avoid
- "installing" the library with a precision different from double.
-- Build and install the software. In non-IDE environments, run
- \verbatim
- make # compile the library and the examples
- make test # run some tests
- make install # as root, if CMAKE_INSTALL_PREFIX is a system directory
-\endverbatim
- Possible additional targets are \verbatim
- make matlabinterface (only for the Release configuration on Windows)
- make dist
- make exampleprograms
- make netexamples (supported only for Release configuration) \endverbatim
- On IDE environments, run your IDE (e.g., Visual Studio), load
- GeographicLib.sln, pick the build type (e.g., Release), and select
- "Build Solution". If this succeeds, select "RUN_TESTS" to build;
- finally, select "INSTALL" to install (RUN_TESTS and INSTALL are in
- the CMakePredefinedTargets folder). Alternatively, you run the
- Visual Studio compiler from the command line with \verbatim
- cmake --build . --config Release --target ALL_BUILD
- cmake --build . --config Release --target RUN_TESTS
- cmake --build . --config Release --target INSTALL \endverbatim
- For maximum flexibility, it's a good idea to build and install both
- the Debug and Release versions of the library (in that order). The
- installation directories will then contain the release versions of the
- tools and both versions (debug and release) of the libraries.
- If you use cmake to configure and build your programs, then the right
- version of the library (debug vs. release) will automatically be used.
-- The headers, library, and utilities are installed in the
- include/GeographicLib, lib, and bin directories under
- CMAKE_INSTALL_PREFIX. (dll dynamic libraries are
- installed in bin.) For documentation, open in a web browser
-
- PREFIX/share/doc/GeographicLib/html/index.html, if
- COMMON_INSTALL_PATH is ON, or
- PREFIX/doc/index.html, otherwise.
-
-\section autoconf Installation using the autoconfigure tools
-
-The method works on most Unix-like systems including Linux and Mac OS X.
-Here are the steps to compile and install %GeographicLib:
-- Unpack the source, running \verbatim
- tar xfpz GeographicLib-1.35.tar.gz \endverbatim
- then enter the directory created \verbatim
- cd GeographicLib-1.35 \endverbatim
-- Create a separate build directory and enter it, for example, \verbatim
- mkdir BUILD
- cd BUILD \endverbatim
-- Configure the software, specifing the path of the source directory,
- with \verbatim
- ../configure \endverbatim
-- By default %GeographicLib will be installed under /usr/local.
- You can change this with, for example \verbatim
- ../configure --prefix=/tmp/geographic \endverbatim
-- Compile and install the software with \verbatim
- make
- make install \endverbatim
-- The headers, library, and utilities are installed in the
- include/GeographicLib, lib, and bin directories under
- prefix. This installation method does not compile
- the Matlab/Octave interface; however the source for the interface is
- installed in libexec/GeographicLib/matlab, see \ref matlab of
- instructions on compiling the interface. For documentation, open
-
- share/doc/GeographicLib/html/index.html in a web browser.
-
-\section gnu Installation with GNU compiler and Make
-
-This method requires the standard GNU suite of tools, in particular make
-and g++. This builds a static library and the examples.
-
-Here are the steps to compile and install %GeographicLib:
-- Unpack the source, running \verbatim
- tar xfpz GeographicLib-1.35.tar.gz \endverbatim
- then enter the directory created \verbatim
- cd GeographicLib-1.35 \endverbatim
-- Edit \verbatim
- include/GeographicLib/Config.h \endverbatim
- If your C++ compiler does not recognize the long double type
- (unlikely), insert \code
- #undef HAVE_LONG_DOUBLE \endcode
- If your machine using big endian ordering, then insert \code
- #define WORDS_BIGENDIAN 1 \endcode
-- Build and install the software: \verbatim
- make # compile the library and the examples
- make install # as root \endverbatim
- The installation is in directories under /usr/local. You
- can specify a different installation directory with, for example,
- \verbatim
- make PREFIX=/tmp/geographic install \endverbatim
-- The headers, library, and utilities are installed in the
- include/GeographicLib, lib, and bin directories under
- PREFIX. This installation method does not compile
- the Matlab/Octave interface; however the source for the interface is
- installed in libexec/GeographicLib/matlab, see \ref matlab of
- instructions on compiling the interface. For documentation, open
-
- share/doc/GeographicLib/html/index.html in a web browser.
-
-\section windows Installation on Windows
-
-This method requires Visual Studio 2005, 2008, or 2010. This builds a
-static library and the utilities. If you only have Visual Studio 2003,
-use cmake to create the necessary solution file, see \ref cmake. (cmake
-is needed to build the Matlab interface and to run the tests.)
-- Unpack the source, running \verbatim
- unzip -q GeographicLib-1.35.zip \endverbatim
-- Open GeographicLib-1.35/windows/GeographicLib-vc10.sln in Visual Studio
- 2010 (for Visual Studio 2005 and 2008, replace -vc10 by -vc8 or -vc9).
-- Pick the build type (e.g., Release), and select "Build Solution".
-- The library and the compiled examples are in the windows/Release.
-- Copy the library windows/Release/GeographicLib.lib and the
- headers in include/GeographicLib somewhere convenient. The
- headers should remain in a directory named %GeographicLib. If you
- expect to use the Matlab/Octave interface, copy matlab/*.m and
- matlab/*.cpp to a directory in your matlab/octave path, see \ref
- matlab for instructions on compiling the interface. For documentation,
- open
- doc/html/index.html in a web
- browser.
-
-The Visual Studio 10 solution also contains projects to build
-NETGeographicLib and the C# example project.
-
-\section windowsbin Using a binary installer for Windows
-
-Use this method if you only need to use the %GeographicLib utilities.
-The header files and static and shared versions of library are also
-provided; these can only be used by Visual Studio 2010 (in either
-release or debug mode). However, if you plan to use the library, it may
-be advisable to build it with the compiler you are using for your own
-code using either \ref cmake or \ref windows.
-
-Download and run
-
-GeographicLib-1.35-win32.exe or
-
-GeographicLib-1.35-win64.exe:
- - read the MIT/X11 License agreement,
- - select whether you want your PATH modified,
- - select the installation folder, by default
- C:\\pkg-vc10\\GeographicLib-1.35 or C:\\pkg-vc10-x64\\GeographicLib-1.35,
- - select the start menu folder,
- - and install.
- .
-(Note that the default installation folder adheres the the convention
-given in \ref cmake.) The start menu will now include links to the
-documentation for the library and for the utilities (and a link for
-uninstalling the library). If you ask for your PATH to be modified, it
-will include C:/pkg-vc10/GeographicLib-1.35/bin where the utilities are
-installed. The headers and library are installed in the
-include/GeographicLib and lib folders. With the 64-bit installer, the
-Matlab interface is installed in the matlab folder. Add this to your
-path in Matlab to access this interface. The libraries were built using
-using Visual Studio 10 in release and debug modes. The utilities were
-linked against the release-mode shared library. The Matlab interface
-was compiled with Matlab R2013a 64-bit, however it may work with some
-other 64-bit versions of Matlab.
-NETGeographicLib library dlls (release and
-debug) are included with the binary installers; these are linked against
-the shared library for %GeographicLib.
-
-\section qt Building the library for use with Qt
-
-If Qt is using a standard compiler, then build %GeographicLib with that
-same compiler (and optimization flags) as Qt.
-
-If you are using the mingw compiler on Windows for Qt, then you need to
-build %GeographicLib with mingw. You can accomplish this with cmake
-under cygwin with, for example, \verbatim
- export PATH="`cygpath -m c:/QtSDK/mingw/bin`:$PATH"
- mkdir BUILD
- cd BUILD
- cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=C:/pkg-mingw/GeographicLib ..
- mingw32-make
- mingw32-make install \endverbatim
-If cmake complains that sh mustn't be in your path, invoke cmake with
-\verbatim
- env PATH="$( echo $PATH | tr : '\n' |
- while read d; do test -f "$d/sh.exe" || echo -n "$d:"; done |
- sed 's/:$//' )" \
- cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=C:/pkg-mingw/GeographicLib ..
-\endverbatim
-If cmake is not available, there is a simple project file that compiles
-the %GeographicLib library only with the Qt compiler: \verbatim
- cd src
- qmake GeographicLib.pro # configure the project
- make # build the library \endverbatim
-The library will be in the src directory (or the src/release or
-src/debug directory under Windows). The headers are in
-include/GeographicLib.
-
-\section maintainer Maintainer tasks
-
-Check the code out of git with \verbatim
- git clone -b master git://git.code.sf.net/p/geographiclib/code geographiclib
-\endverbatim
-Here the "master" branch is checked out. There are three branches in
-the git repository:
-- master: the main branch for code maintainence. Releases are
- tagged on this branch as, e.g., v1.35.
-- devel: the development branch; changes made here are merged
- into master.
-- release: the release branch created by unpacking the source
- releases (git is \e not used to merge changes from the other
- branches into this branch). This is the \e default branch of the
- repository (the branch you get if cloning the repository without
- specifying a branch). This differs from the master branch in that
- some administrative files are excluded while some intermediate files
- are included (in order to aid building on as many platforms as
- possible). Releases are tagged on this branch as, e.g., r1.35.
-.
-The autoconf configuration script and the formatted man pages are not
-checked into master branch of the repository. In order to create the
-autoconf configuration script, run \verbatim
- sh autogen.sh \endverbatim
-in the top level directory. Provided you are running on a system with
-doxygen, pod2man, and pod2html installed, then you can create the
-documentation and the man pages by building the system using cmake or
-configure.
-
-In the case of cmake, you then run \verbatim
- make dist \endverbatim
-which will copy the man pages from the build directory back into the
-source tree and package the resulting source tree for distribution as
-\verbatim
- GeographicLib-1.35.tar.gz
- GeographicLib-1.35.zip \endverbatim
-Finally, \verbatim
- make package \endverbatim
-or building PACKAGE in Visual Studio will create a binary installer for
-%GeographicLib. For Windows, this requires in the installation of
-NSIS. On Windows, you should
-configure %GeographicLib with PACKAGE_DEBUG_LIBS=ON, build both
-Release and Debug versions of the library and finally build PACKAGE in
-Release mode. This will get the release and debug versions of the
-library included in the package. For example, the 64-bit binary
-installer is created with \verbatim
- cmake -G "Visual Studio 10 Win64" \
- -D GEOGRAPHICLIB_LIB_TYPE=BOTH \
- -D PACKAGE_DEBUG_LIBS=ON \
- -D MATLAB_COMPILER=mex \
- -D BUILD_NETGEOGRAPHICLIB=ON \
- ..
- cmake --build . --config Debug --target ALL_BUILD
- cmake --build . --config Release --target ALL_BUILD
- cmake --build . --config Release --target matlabinterface
- cmake --build . --config Release --target PACKAGE \endverbatim
-
-With configure, run \verbatim
- make dist-gzip \endverbatim
-which will create the additional files and packages the results ready
-for distribution as \verbatim
- geographiclib-1.35.tar.gz \endverbatim
-
-
-Back to \ref intro. Forward to \ref start. Up to \ref contents.
-
-**********************************************************************/
-/**
-\page start Getting started
-
-
-Back to \ref install. Forward to \ref utilities. Up to \ref contents.
-
-
-Much (but not all!) of the useful functionality of %GeographicLib is
-available via simple command line utilities. Interfaces to some of them
-are available via the web. See \ref utilities for documentation on
-these.
-
-In order to use %GeographicLib from C++ code, you will need to
-- Include the header files for the %GeographicLib classes in your code.
- E.g., \code
- #include \endcode
-- Include the GeographicLib:: namespace prefix to the %GeographicLib classes,
- or include \code
- using namespace GeographicLib; \endcode
- in your code.
-- Finally compile and link your code. You have two options here.
- - Use cmake to build your package. If you are familiar with cmake
- this typically will be far the simplest option.
- - Set the include paths and linking options "manually".
-- Building your code with cmake. In brief, the necessary steps are:
- - include in your CMakeLists.txt files \verbatim
- find_package (GeographicLib 1.34 REQUIRED)
- include_directories (${GeographicLib_INCLUDE_DIRS})
- add_definitions (${GeographicLib_DEFINITIONS})
- add_executable (program source1.cpp source2.cpp)
- target_link_libraries (program ${GeographicLib_LIBRARIES}) \endverbatim
- (The add_definitions line is only needed for Windows
- and can be omitted if you're using cmake version 2.8.11 or later.)
- - configure your package, e.g., with \verbatim
- mkdir BUILD
- cd BUILD
- cmake -G "Visual Studio 10" \
- -D CMAKE_PREFIX_PATH=C:/pkg-vc10 \
- -D CMAKE_PREFIX_PATH=C:/pkg-vc10/testgeographic \
- .. \endverbatim
- Note that you almost always want to configure and build your code
- somewhere other than the source directory (in this case, we use the
- BUILD subdirectory).
- - build your package. On Linux and MacOS this usually involves just
- running make. On Windows, you can load the solution file created by
- cmake into Visual Studio; alternatively, you can get cmake to run
- build your code with \verbatim
- cmake --build . --config Release --target ALL_BUILD \endverbatim
- You might also want to install your package (using "make install" or
- build the "INSTALL" target with the command above).
- .
- The most import step is the find_package command. The cmake
- documentation describes the locations searched by find_package (the
- appropriate rule for %GeographicLib are those for "Config" mode lookups).
- In brief, the locations that are searched are (from least specific to
- most specific, i.e., in reverse order) are
- - under the system paths, i.e., locations such as C:/Program
- Files and /usr/local);
- - frequently, it's necessary to search within a "package directory"
- (or set of directories) for external dependencies; this is given by
- a (semicolon separated) list of directories specified by the cmake
- variable CMAKE_PREFIX_PATH (illustrated above);
- - the package directory for %GeographicLib can be overridden with the
- environment variableGeographicLib_DIR (which is the
- directory under which %GeographicLib is installed);
- - finally, if you need to point to a particular build of %GeographicLib,
- define the cmake variableGeographicLib_DIR, which
- specifies the directory containing the configuration file
- geographiclib-config.cmake (for debugging this be the
- top-level build directory, as opposed to installation
- directory, for %GeographicLib).
- .
- Typically, specifying nothing or CMAKE_PREFIX_PATH
- suffices. However the two GeographicLib_DIR variables allow
- for a specific version to be chosen. On Windows systems (with Visual
- Studio), find_package will only find versions of %GeographicLib built with
- the right version of the compiler. (If you used a non-cmake method of
- installing %GeographicLib, you can try copying cmake/FindGeographicLib.cmake
- to somewhere in your CMAKE_MODULE_PATH in order for
- find_package to work. However, this method has not been thoroughly
- tested.)
-
- If %GeographicLib is found, then the following cmake variables are set:
- - GeographicLib_FOUND = 1
- - GeographicLib_VERSION = 1.35
- - GeographicLib_INCLUDE_DIRS
- - GeographicLib_LIBRARIES = one of the following two:
- - GeographicLib_SHARED_LIBRARIES = %GeographicLib
- - GeographicLib_STATIC_LIBRARIES = GeographicLib_STATIC
- - GeographicLib_DEFINITIONS = one of the following two:
- - GeographicLib_SHARED_DEFINITIONS = -DGEOGRAPHICLIB_SHARED_LIB=1
- - GeographicLib_STATIC_DEFINITIONS = -DGEOGRAPHICLIB_SHARED_LIB=0
- - GeographicLib_LIBRARY_DIRS
- - GeographicLib_BINARY_DIRS
- .
- Either of GeographicLib_SHARED_LIBRARIES or
- GeographicLib_STATIC_LIBRARIES may be empty, if that version
- of the library is unavailable. If you require a specific version,
- SHARED or STATIC, of the library, add a COMPONENTS clause
- to find_package, e.g.,
- \verbatim
- find_package (GeographicLib 1.34 REQUIRED COMPONENTS SHARED) \endverbatim
- causes only packages which include the shared library to be found. If
- the package includes both versions of the library, then
- GeographicLib_LIBRARIES and
- GeographicLib_DEFINITIONS are set to the shared versions,
- unless you include \verbatim
- set (GeographicLib_USE_STATIC_LIBS ON) \endverbatim
- before the find_package command. You can check whether
- GeographicLib_LIBRARIES refers to the shared or static
- library with \verbatim
- get_target_property(_LIBTYPE ${GeographicLib_LIBRARIES} TYPE) \endverbatim
- which results in _LIBTYPE being set to
- SHARED_LIBRARY or STATIC_LIBRARY.
- On Windows, cmake takes care of linking to the release or debug
- version of the library as appropriate. (This assumes that the Release
- and Debug versions of the libraries were built and installed. This is
- true for the Windows binary installer for %GeographicLib version 1.34 and
- later.)
-- Here are the steps to compile and link your code using %GeographicLib
- "manually".
- - Tell the compiler where to find the header files. With g++ and with
- /usr/local specified as the installation directory,
- this is accomplished with \verbatim
- g++ -c -g -O3 -funroll-loops -I/usr/local/include testprogram.cpp
- \endverbatim
- With Visual Studio, specify the include directory in the IDE via,
- e.g.,
- \verbatim
- C/C++ -> General -> Additional Include Directories = C:\pkg-vc10\GeographicLib\include
- \endverbatim
- - If using the shared (or static) library with Visual Studio, define
- the macro GEOGRAPHICLIB_SHARED_LIB=1 (or
- 0), e.g.,
- \verbatim
- C/C++ -> Preprocessor -> Preprocessor Definitions = GEOGRAPHICLIB_SHARED_LIB=1
- \endverbatim
- This is only needed for Windows systems when both shared and static
- libraries have been installed. (If you configure your package with
- cmake, this definition is added automatically.)
- - Tell the linker the name, Geographic, and location of the
- library. Using g++ as the linker, you would use \verbatim
- g++ -g -o testprogram testprogram.o -L/usr/local/lib -lGeographic
- \endverbatim
- With Visual Studio, you supply this information in the IDE via,
- e.g., \verbatim
- Linker -> Input -> Additional Dependencies = Geographic-i.lib (for shared library)
- Linker -> Input -> Additional Dependencies = Geographic.lib (for static library)
- Linker -> General -> Additional Library Directories = C:\pkg-vc10\Geographic\lib
- \endverbatim
- Note that the library name is Geographic and not
- %GeographicLib. For the Debug version of your program on Windows
- add "_d" to the library, e.g., Geographic_d-i.lib or
- Geographic_d.lib.
- - Tell the runtime environment where to find the shared library
- (assuming you compiled %Geographic as a shared library). With g++,
- this is accomplished by modifying the link line above to read \verbatim
- g++ -g -o testprogram testprogram.o -Wl,-rpath=/usr/local/lib \
- -L/usr/local/lib -lGeographic
- \endverbatim
- (There are two other ways to specify the location of shared libraries
- at runtime: (1) define the environment variable
- LD_LIBRARY_PATH to be a colon-separated list of
- directories to search; (2) as root, specify /usr/local/lib as a
- directory searched by ldconfig(8).) On Windows, you need to ensure
- that Geographic.dll or Geographic_d.dll is in the same directory as
- your executable or else include the directory containing the dll in
- your PATH.
-
-Here is a very simple test code, which uses the GeographicLib::Geodesic
-class:
-\include example-Geodesic-small.cpp
-This example is examples/example-Geodesic-small.cpp. If you
-compile, link, and run it according to the instructions above, it should
-print out \verbatim
- 5551.76 km \endverbatim
-Here is a complete CMakeList.txt files you can use to build this test
-code using the installed library: \verbatim
-project (geodesictest)
-cmake_minimum_required (VERSION 2.8.4)
-
-find_package (GeographicLib 1.34 REQUIRED)
-
-if (NOT MSVC)
- set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-endif ()
-
-include_directories (${GeographicLib_INCLUDE_DIRS})
-add_definitions (${GeographicLib_DEFINITIONS})
-add_executable (${PROJECT_NAME} example-Geodesic-small.cpp)
-target_link_libraries (${PROJECT_NAME} ${GeographicLib_LIBRARIES})
-
-if (MSVC)
- get_target_property (_LIBTYPE ${GeographicLib_LIBRARIES} TYPE)
- if (_LIBTYPE STREQUAL "SHARED_LIBRARY")
- # On Windows systems, copy the shared library to build directory
- add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E
- copy $ ${CMAKE_CFG_INTDIR}
- COMMENT "Copying shared library for GeographicLib")
- endif ()
-endif () \endverbatim
-
-The next steps are:
- - Learn about and run the \ref utilities.
- - Read the section, \ref organization, for an overview of the library.
- - Browse the Class List for full documentation
- on the classes in the library.
- - Look at the example code in the examples directory. Each file
- provides a very simple standalone example of using one %GeographicLib
- class. These are included in the descriptions of the classes.
- - Look at the source code for the utilities in the tools directory for
- more examples of using %GeographicLib from C++ code, e.g.,
- GeodesicProj.cpp is a program to performing various geodesic
- projections.
-
-Here's a list of some of the abbreviations used here with links to the
-corresponding Wikipedia articles:
- -
- WGS84, World Geodetic System 1984.
- -
- UTM, Universal Transverse Mercator coordinate system.
- -
- UPS, Universal Polar Stereographic coordinate system.
- -
- MGRS, Military Grid Reference System.
- -
- EGM, Earth Gravity Model.
- -
- WMM, World Magnetic Model.
- -
- IGRF, International Geomagnetic Reference Field.
-
-
-Back to \ref install. Forward to \ref utilities. Up to \ref contents.
-
-Back to \ref start. Forward to \ref organization. Up to \ref contents.
-
-
-Various utility programs are provided with %GeographicLib. These should
-be installed in a directory included in your PATH (e.g.,
-/usr/local/bin). These programs are wrapper programs that invoke
-the underlying functionality provided by the library.
-
-The utilities are
- -
- GeoConvert: convert geographic coordinates using
- GeographicLib::GeoCoords.
- -
- GeodSolve: perform geodesic calculations using
- GeographicLib::Geodesic and GeographicLib::GeodesicLine.
- -
- Planimeter: compute the area of geodesic polygons using
- GeographicLib::PolygonArea.
- -
- TransverseMercatorProj: convert between geographic
- and transverse Mercator. This is for testing
- GeographicLib::TransverseMercatorExact and
- GeographicLib::TransverseMercator.
- -
- CartConvert: convert geodetic coordinates to geocentric or
- local cartesian using GeographicLib::Geocentric and
- GeographicLib::LocalCartesian.
- -
- GeodesicProj: perform projections based on geodesics
- using GeographicLib::AzimuthalEquidistant, GeographicLib::Gnomonic,
- and GeographicLib::CassiniSoldner.
- -
- ConicProj: perform conic projections using
- GeographicLib::LambertConformalConic and
- GeographicLib::AlbersEqualArea.
- -
- GeoidEval: look up geoid heights using
- GeographicLib::Geoid.
- -
- Gravity: compute the earth's gravitational field using
- GeographicLib::GravityModel and GeographicLib::GravityCircle.
- -
- MagneticField: compute the earth's magnetic field using
- GeographicLib::MagneticModel and GeographicLib::MagneticCircle.
- .
-The documentation for these utilities is in the form of man pages. This
-documentation can be accessed by clicking on the utility name in the
-list above, running the man command on Unix-like systems, or by invoking
-the utility with the --help option. A brief summary of usage is given
-by invoking the utility with the -h option. The version of the utility
-is given by the --version option.
-
-The utilities all accept data on standard input, transform it in some
-way, and print the results on standard output. This makes the utilities
-easy to use within scripts to transform tabular data; however they can
-also be used interactively, often with the input supplied via a pipe,
-e.g.,
- - echo 38SMB4488 | GeoConvert -d
-
-Online versions of four of these utilities are provided:
- - GeoConvert
- - GeodSolve
- - Planimeter
- - GeoidEval
-
-
-Back to \ref start. Forward to \ref organization. Up to \ref contents.
-
-Back to \ref utilities. Forward to \ref other. Up to \ref contents.
-
-
-Here is a brief description of the relationship between the various
-components of %GeographicLib. All of these are defined in the
-GeographicLib namespace.
-
-GeographicLib::TransverseMercator, GeographicLib::PolarStereographic,
-GeographicLib::LambertConformalConic, and GeographicLib::AlbersEqualArea
-provide the basic projections. The constructors for these classes
-specify the ellipsoid and the forward and reverse projections are
-implemented as const member functions. TransverseMercator uses
-Krüger's series which have been extended to sixth order in the
-square of the eccentricity. PolarStereographic, LambertConformalConic,
-and AlbersEqualArea use the exact formulas for the projections (e.g.,
-from Snyder).
-
-GeographicLib::TransverseMercator::UTM and
-GeographicLib::PolarStereographic::UPS are const static instantiations
-specific for the WGS84 ellipsoid with the UTM and UPS scale factors.
-(These do \e not add the standard false eastings or false northings for
-UTM and UPS.) Similarly GeographicLib::LambertConformalConic::Mercator
-is a const static instantiation of this projection for a WGS84 ellipsoid
-and a standard parallel of 0 (which gives the Mercator projection).
-GeographicLib::AlbersEqualArea::CylindricalEqualArea,
-AzimuthalEqualAreaNorth, and AzimuthalEqualAreaSouth, likewise provide
-special cases of the equal area projection.
-
-GeographicLib::UTMUPS uses TransverseMercator::UTM and
-PolarStereographic::UPS to perform the UTM and UPS
-projections. The class offers a uniform interface to UTM and UPS by
-treating UPS as UTM zone 0. This class stores no internal state and the
-forward and reverse projections are provided via static member
-functions. The forward projection offers the ability to override the
-standard UTM/UPS choice and the UTM zone.
-
-GeographicLib::MGRS transforms between UTM/UPS coordinates and MGRS.
-UPS coordinates are handled as UTM zone 0. This class stores no
-internal state and the forward (UTM/UPS to MGRS) and reverse (MGRS to
-UTM/UPS) conversions are provided via static member functions.
-
-GeographicLib::GeoCoords holds a single geographic location which may be
-specified as latitude and longitude, UTM or UPS, or MGRS. Member
-functions are provided to convert between coordinate systems and to
-provide formatted representations of them.
-GeoConvert is a simple command line
-utility to provide access to the GeoCoords class.
-
-GeographicLib::TransverseMercatorExact is a drop in replacement for
-TransverseMercator which uses the exact formulas, based on elliptic
-functions, for the projection as given by Lee.
-TransverseMercatorProj is a
-simple command line utility to test to the TransverseMercator and
-TransverseMercatorExact.
-
-GeographicLib::Geodesic and GeographicLib::GeodesicLine perform geodesic
-calculations. The constructor for GeographicLib::Geodesic specifies the
-ellipsoid and the direct and inverse calculations are implemented as
-const member functions. GeographicLib::Geocentric::WGS84 is a const
-static instantiation of Geodesic specific for the WGS84 ellipsoid. In
-order to perform a series of direct geodesic calculations on a single
-line, the GeographicLib::GeodesicLine class can be used. This packages
-all the information needed to specify a geodesic. A const member
-function returns the coordinates a specified distance from the starting
-point. GeodSolve is a simple command
-line utility to perform geodesic calculations.
-GeographicLib::PolygonArea is a class which compute the area of geodesic
-polygons using the Geodesic class and Planimeter is a command line utility for
-the same purpose. GeographicLib::AzimuthalEquidistant,
-GeographicLib::CassiniSoldner, and GeographicLib::Gnomonic are
-projections based on the Geodesic class. GeodesicProj is a command line utility to
-exercise these projections.
-
-GeographicLib::GeodesicExact and GeographicLib::GeodesicLineExact are
-drop in replacements for GeographicLib::Geodesic and
-GeographicLib::GeodesicLine in which the solution is given in terms of
-elliptic integrals (computed by GeographicLib::EllipticFunction).
-These classes should be used if the absolute value of the flattening
-exceeds 0.02. The -E option to GeodSolve
-uses these classes.
-
-GeographicLib::Geocentric and GeographicLib::LocalCartesian convert between
-geodetic and geocentric or a local cartesian system. The constructor for
-specifies the ellipsoid and the forward and reverse projections are
-implemented as const member functions. GeographicLib::Geocentric::WGS84 is a
-const static instantiation of Geocentric specific for the WGS84 ellipsoid.
-CartConvert is a simple command line
-utility to provide access to these classes.
-
-GeographicLib::Geoid evaluates geoid heights by interpolation. This is
-provided by the operator() member function.
-GeoidEval is a simple command line
-utility to provide access to this class. This class requires
-installation of data files for the various geoid models; see \ref
-geoidinst for details.
-
-GeographicLib::Ellipsoid is a class which performs latitude
-conversions and returns various properties of the ellipsoid.
-
-GeographicLib::GravityModel evaluates the earth's gravitational field
-using a particular gravity model. Various member functions return the
-gravitational field, the gravity disturbance, the gravity anomaly, and
-the geoid height Gravity is a simple
-command line utility to provide access to this class. If the field
-several points on a circle of latitude are sought then use
-GeographicLib::GravityModel::Circle to return a
-GeographicLib::GravityCircle object whose member functions performs the
-calculations efficiently. (This is particularly important for high
-degree models such as EGM2008.) These classes requires installation of
-data files for the various gravity models; see \ref gravityinst for
-details.
-
-GeographicLib::MagneticModel evaluates the earth's magnetic field using
-a particular magnetic model. The field is provided by the operator()
-member function. MagneticField is a
-simple command line utility to provide access to this class. If the
-field several points on a circle of latitude are sought then use
-GeographicLib::MagneticModel::Circle to return a
-GeographicLib::MagneticCircle object whose operator() member function
-performs the calculation efficiently. (This is particularly important
-for high degree models such as emm2010.) These classes requires
-installation of data files for the various magnetic models; see \ref
-magneticinst for details.
-
-GeographicLib::Constants, GeographicLib::Math, GeographicLib::Utility,
-GeographicLib::DMS, are general utility class which are used
-internally by the library; in addition GeographicLib::EllipticFunction
-is used by GeographicLib::TransverseMercatorExact,
-GeographicLib::Ellipsoid, and GeographicLib::GeodesicExact, and
-GeographicLib::GeodesicLineExact; GeographicLib::Accumulator is used
-by GeographicLib::PolygonArea, and GeographicLib::SphericalEngine,
-GeographicLib::CircularEngine, GeographicLib::SphericalHarmonic,
-GeographicLib::SphericalHarmonic1, and
-GeographicLib::SphericalHarmonic2 facilitate the summation of
-spherical harmonic series which is needed by and
-GeographicLib::MagneticModel and GeographicLib::MagneticCircle. One
-important definition is GeographicLib::Math::real which is the type
-used for real numbers. This allows the library to be easily switched
-to using floats, doubles, or long doubles. However all the testing
-has been with real set to double and the library should be installed
-in this way.
-
-In general, the constructors for the classes in %GeographicLib check
-their arguments and throw GeographicLib::GeographicErr exceptions with a
-explanatory message if these are illegal. The member functions, e.g.,
-the projections implemented by TransverseMercator and
-PolarStereographic, the solutions to the geodesic problem, etc.,
-typically do not check their arguments; the calling program
-should ensure that the arguments are legitimate. However, the functions
-implemented by UTMUPS, MGRS, and GeoCoords do check their arguments and
-may throw GeographicLib::GeographicErr exceptions. Similarly Geoid may
-throw exceptions on file errors. If a function does throw an exception,
-then the function arguments used for return values will not have been
-altered.
-
-%GeographicLib attempts to act sensibly with NaNs. NaNs in constructors
-typically throw errors (an exception is GeodesicLine). However, calling
-the class functions with NaNs as arguments is not an error; NaNs are
-returned as appropriate. "INV" is treated as an invalid zone
-designation by UTMUPS. "INVALID" is the corresponding invalid MGRS
-string. (Similary "nan" is the equivalent invalid Geohash.) NaNs allow
-the projection of polylines which are separated by NaNs; in this format
-they can be easily plotted in Matlab.
-
-A note about portability. For the most part, the code uses standard C++
-and should be able to be deployed on any system with a modern C++
-compiler. System dependencies come into
- - GeographicLib::Math -- GeographicLib needs to define functions such
- as atanh for systems that lack them. The system dependence will
- disappear with the adoption of C++11 because the needed functions are
- part of that standard.
- - use of long double -- the type is used only for testing. On systems
- which lack this data type the cmake and autoconf configuration
- methods should detect its absence and omit the code that depends on
- it.
- - GeographicLib::Geoid, GeographicLib::GravityModel, and
- GeographicLib::MagneticModel -- these class uses system-dependent
- default paths for looking up the respective datasets. It also relies
- on getenv to find the value of the environment variables.
- - GeographicLib::Utility::readarray reads numerical data from binary
- files. This assumes that floating point numbers are in IEEE format.
- It attempts to handled the "endianness" of the target platform using
- the WORDS_BIGENDIAN macro (which sets the compile-time constant
- GeographicLib::Math::bigendian).
-
-An attempt is made to maintain backward compatibility with
-%GeographicLib (especially at the level of your source code). Sometimes
-it's necessary to take actions that depend on what version of
-%GeographicLib is being used; for example, you may want to use a new
-feature of %GeographicLib, but want your code still to work with older
-versions. In that case, you can test the values of the macros
-GEOGRAPHICLIB_VERSION_MAJOR, GEOGRAPHICLIB_VERSION_MINOR, and
-GEOGRAPHICLIB_VERSION_PATCH; these expand to numbers (and the last one
-is usually 0); these macros appeared starting in version 1.31. There's
-also a macro GEOGRAPHICLIB_VERSION_STRING which expands to, e.g.,
-"1.35"; this macro has been defined since version 1.9.
-
-
-Back to \ref utilities. Forward to \ref other. Up to \ref contents.
-
-**********************************************************************/
-/**
-\page other Implementations in other languages
-
-
-Back to \ref organization. Forward to \ref geoid. Up to \ref contents.
-
-
-Implementations of subsets of %GeographicLib are available in other languages
-- \ref c-fortran
-- \ref java.
-- \ref javascript.
-- \ref python.
-- \ref matlab.
-- \ref maxima.
-- \ref dotnet.
-
-\section c-fortran C and Fortran implementation
-
-The directories legacy/C and legacy/Fortran
-contain implementations of GeographicLib::Geodesic,
-GeographicLib::GeodesicLine, and GeographicLib::PolygonArea in C and
-Fortran respectively. These are intended for use in old codes written
-in these languages and should work any reasonably modern compiler.
-These implementations are entirely self-contained and do not depend on
-the rest of %GeographicLib. Sample main programs to solve the direct
-and inverse geodesic problems and to compute polygonal areas are
-provided.
-
-For documentation, see
- - C library for geodesics,
- - Fortran library for geodesics.
-
-\section java Java implementation
-
-The directory java contains implementations of
-GeographicLib::Geodesic, GeographicLib::GeodesicLine, and
-GeographicLib::PolygonArea in Java. This implementation is entirely
-self-contained and does not depend on the rest of %GeographicLib.
-Sample main programs to solve the direct and inverse geodesic problems
-and to compute polygonal areas are provided.
-
-For documentation, see
- - Java library for geodesics.
-
-\section javascript JavaScript implementation
-
-The directory doc/scripts/GeographicLib contains the classes
-- GeographicLib::Math
-- GeographicLib::Accumulator
-- GeographicLib::Geodesic
-- GeographicLib::GeodesicLine
-- GeographicLib::PolygonArea
-- GeographicLib::DMS
-.
-translated into JavaScript. See Interface.js for a simple JavaScript
-interface to these routines (documented near the top of the file).
-Examples of using this interface are
-- a geodesic calculator showing
- the solution of direct and inverse geodesic problem, finding
- intermediate points on a geodesic line, and computing the area of a
- geodesic polygon.
-- displaying geodesics in Google
- Maps which shows the geodesic, the geodesic circle, and various
- geodesic envelopes.
-.
-These examples include a "stripped" version of the JavaScript code, \code
- \endcode
-which loads faster.
-
-\section python Python implementation
-
-A python implementation of the geodesic routines from GeographicLib
-are provided in the python/geographiclib directory (which is installed
-as PREFIX/lib/python/site-packages/geographiclib, if
-COMMON_INSTALL_PATH is ON, and as PREFIX/python/geographiclib,
-otherwise). This contains implementations of the classes
-- GeographicLib::Math
-- GeographicLib::Accumulator
-- GeographicLib::Geodesic
-- GeographicLib::GeodesicLine
-- GeographicLib::PolygonArea
-.
-You can also download the python interface independent of the rest of
-%GeographicLib from
--
- http://pypi.python.org/pypi/geographiclib
-.
-and then unpack the .tar.gz or .zip file.
-
-You can "install" these routines, so that they are in python's default
-path with, for example \verbatim
- cd geographiclib-1.16
- python setup.py install
-\endverbatim
-(this will require root privileges). Or else you can set the path
-within python using \code
->>> import sys
->>> sys.path.append("/usr/local/lib/python/site-packages")
-\endcode
-
-An example of using this interface is \code
->>> from geographiclib.geodesic import Geodesic
->>> # The geodesic inverse problem
-... Geodesic.WGS84.Inverse(-41.32, 174.81, 40.96, -5.50)
->>> # The geodesic direct problem
-... Geodesic.WGS84.Direct(40.6, -73.8, 45, 10000e3)
->>> # How to obtain several points along a geodesic
-... line = Geodesic.WGS84.Line(40.6, -73.8, 45)
->>> line.Position( 5000e3)
->>> line.Position(10000e3)
->>> # Computing the area of a geodesic polygon
-... def p(lat,lon): return {'lat': lat, 'lon': lon}
-...
->>> Geodesic.WGS84.Area([p(0, 0), p(0, 90), p(90, 0)])
->>> # Introductory help
-... help(Geodesic)
-\endcode
-
-Another illustrative exercise is finding the point midway between JFK
-Airport to Singapore Changi Airport
-\code
-from geographiclib.geodesic import Geodesic
-
-# Coordinates of airports
-lat1, lon1 = 40.640, -73.779 # JFK
-lat2, lon2 = 1.359, 103.989 # SIN
-
-# Compute path from 1 to 2
-g = Geodesic.WGS84.Inverse(lat1, lon1, lat2, lon2)
-
-# Compute midpoint starting at 1
-h = Geodesic.WGS84.Direct(lat1, lon1, g['azi1'], g['s12']/2)
-print(h['lat2'], h['lon2']);
-\endcode
-
-(Note: The initial version of setup.py was provided by Andrew MacIntyre
-of the Australian Communications and Media Authority.)
-
-\section matlab Matlab and Octave implementations
-
-The matlab directory contains
- - Native Matlab implementations of the geodesic routines. To use
- these, start Matlab or Octave and run one of (for example) \verbatim
- addpath /usr/local/libexec/GeographicLib/matlab
- addpath 'C:/pkg-vc10-x64/GeographicLib-1.35/libexec/GeographicLib/matlab'
- \endverbatim
- The available functions are:
- - geoddoc: briefly descibe the routines
- - geodreckon: solve the direct geodesic problem
- - geoddistance: solve the inverse geodesic problem
- - geodarea: compute the area of ellipsoidal polygons
- .
- Use the help function to get documentation, e.g., \code
- help geoddistance \endcode
- to obtain documentation. These functions are also available as a
- standalone package from
-
- Matlab File Exchange using the link
- -
- http://www.mathworks.com/matlabcentral/fileexchange/39108
- - Native Matlab implementations of projections which are related to
- geodesics. These are
- - geodproj: briefly descibe the routines
- - eqdazim_fwd, eqdazim_inv: azimuthal equidistant
- - cassini_fwd, cassini_inv: Cassini-Soldner
- - tranmerc_fwd, tranmerc_inv: transverse Mercator
- - gnomonic_fwd, gnomonic_inv: ellipsoidal gnomonic
- - utm_fwd, utm_inv: universal transverse Mercator
- .
- These functions are also available as a package from
-
- Matlab File Exchange using the link
- -
- http://www.mathworks.com/matlabcentral/fileexchange/39366
- .
- (This requires that the previous package also be installed.)
- - Interface code so that some %GeographicLib classes can be accessed
- from Matlab or Octave. The rest of this section describes how to
- compile and use these interfaces.
-
-There are two ways of compiling the interface code: (1) using cmake and
-(2) invoking the compiler from Matlab.
- - Using cmake: Before running cmake, configure MATLAB on
- Windows to use the same compiler that you're going to use for compiling
- %GeographicLib. For example \verbatim
- mex.bat -setup
-
- Please choose your compiler for building MEX-files:
- Would you like mex to locate installed compilers [y]/n? y
- Select a compiler:
- [1] Microsoft Visual C++ 2012 in C:\Program Files (x86)\Microsoft Visual Studio 11.0
- [2] Microsoft Visual C++ 2010 in C:\Program Files (x86)\Microsoft Visual Studio 10.0
-
- [0] None
-
- Compiler: 2
- etc. \endverbatim
- (This will require that mex.bat is in your PATH. With Linux, use
- mex -setup.) Then configure cmake with, for example
- \verbatim
- cmake -G "Visual Studio 10" -D MATLAB_COMPILER=mex ..
- cmake --build . --config Release --target matlabinterface \endverbatim
- (Note that only the Release configuration is supported for Matlab.)
- If you are running a 64-bit version of Matlab, be sure to select a
- 64-bit generator with cmake, e.g., "Visual Studio 10 Win64". Finally
- compile %GeographicLib with Visual Studio. (The binary installer for
- 64-bit Windows includes the compiled interface built with Visual
- Studio 10 and Matlab R2013a 64-bit).
- On Linux systems, you can compile the interface for use with octave
- instead by using \verbatim
- cmake -D MATLAB_COMPILER=mkoctfile ..
- make matlabinterface \endverbatim
- - Invoking the compiler from Matlab or Octave: Start Matlab or
- Octave and run, e.g., \code
- mex -setup
- cd 'C:/pkg-vc10-x64/GeographicLib-1.35/matlab'
- help geographiclibinterface
- geographiclibinterface('C:/pkg-vc10/GeographicLib-1.35');
- addpath(pwd);
- \endcode
- The first command allows you to select the compiler to use (which
- should be the same as that used to compile %GeographicLib).
-
-To use the interface routines for %GeographicLib, run one of (for
-example) \verbatim
- addpath /usr/local/libexec/GeographicLib/matlab
- addpath 'C:/pkg-vc10-x64/GeographicLib-1.35/libexec/GeographicLib/matlab'
-\endverbatim
-in Octave or Matlab. The available functions are:
- - geodesicdirect: solve direct geodesic problem
- (see GeographicLib::Geodesic::Direct)
- - geodesicinverse: solve inverse geodesic problem
- (see GeographicLib::Geodesic::Inverse)
- - geodesicline: compute points along a geodesic
- (see GeographicLib::GeodesicLine::Position)
- - polygonarea: compute area of a geodesic polygon
- (see GeographicLib::PolygonArea)
- - utmupsforward: convert geographic coordinates to UTM/UPS
- (see GeographicLib::UTMUPS::Forward)
- - utmupsreverse: convert UTM/UPS coordinates to geographic
- (see GeographicLib::UTMUPS::Reverse)
- - mgrsforward: convert UTM/UPS coordinates to MGRS
- (see GeographicLib::MGRS::Forward)
- - mgrsreverse: convert MGRS coordinates to UTM/UPS
- (see GeographicLib::MGRS::Reverse)
- - geoidheight: compute geoid height
- (see GeographicLib::Geoid::operator()())
- - geocentricforward: convert geographic coordinates to geocentric
- (see GeographicLib::Geocentric::Forward)
- - geocentricreverse: convert geocentric coordinates to geographic
- (see GeographicLib::Geocentric::Reverse)
- - localcartesianforward: convert geographic coordinates to local cartesian
- (see GeographicLib::LocalCartesian::Forward)
- - localcartesianreverse: convert local cartesian coordinates to geographic
- (see GeographicLib::LocalCartesian::Reverse)
- .
-These routines just offer a simple interface to the corresponding C++
-class. Use the help function to get documentation, e.g., \code
- help geodesicdirect \endcode
-Unfortunately, the help function does not work for compiled functions in
-Octave; in this case, just list the .m file, e.g., \code
- type geodesicdirect \endcode
-Other useful functions, e.g., to convert from geographic
-coordinates to MGRS can easily be written with Matlab code.
-
-Note that geoidheight, when compiled with Visual Studio 2008 causes
-Matlab to crash. (The problem does not occur with Visual Studio 2005 or
-Visual Studio 2010.)
-
-\section maxima Maxima routines
-
-Maxima is a free computer algebra system which can be downloaded from
-http://maxima.sf.net. Maxima was used to generate the series used by
-GeographicLib::TransverseMercator (
-tmseries.mac) and GeographicLib::Geodesic (
-geod.mac) and to generate accurate data for testing
-( tm.mac and
-geodesic.mac). The latter uses Maxima's bigfloat arithmetic
-together with series extended to high order or solutions in terms of
-elliptic integrals ( ellint.mac). These files
-contain brief instructions on how to use them.
-
-\section dotnet .NET wrapper
-
-This is a comprehensive wrapper library, written and maintained by Scott
-Heiman, which exposes all of the functionality of %GeographicLib to the
-.NET family of languages. For documentation, see
- - NETGeographicLib .NET wrapper library.
-
-
-Back to \ref organization. Forward to \ref geoid. Up to \ref contents.
-
-Back to \ref other. Forward to \ref gravity. Up to \ref contents.
-
-
-The gravitational equipotential surface approximately coinciding with
-mean sea level is called the geoid. The GeographicLib::Geoid class and
-the GeoidEval utility evaluate the height
-of the geoid above the WGS84 ellipsoid. This can be used to convert
-heights above mean sea level to heights above the WGS84 ellipsoid.
-Because the normal to the ellipsoid differs from the normal to the geoid
-(the direction of a plumb line) there is a slight ambiguity in the
-measurement of heights; however for heights up to 10 km this ambiguity
-is only 1 mm.
-
-The geoid is usually approximated by an "earth gravity model" (EGM).
-The models published by the NGA are:
-- EGM84:
- http://earth-info.nga.mil/GandG/wgs84/gravitymod/wgs84_180/wgs84_180.html
-- EGM96:
- http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html
-- EGM2008:
- http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
-.
-GeographicLib::Geoid offers a uniform way to handle all 3 geoids at a
-variety of grid resolutions. (In contrast, the software tools that NGA
-offers are different for each geoid, and the interpolation programs are
-different for each grid resolution. In addition these tools are written
-in Fortran with is nowadays difficult to integrate with other software.)
-
-Unlike other components of %GeographicLib, there is a appreciable error
-in the results obtained (at best, the RMS error is 1 mm). However the
-class provides methods to report the maximum and RMS errors in the
-results. The class also returns the gradient of the geoid. This can be
-used to estimate the direction of a plumb line relative to the WGS84
-ellipsoid.
-
-The GeographicLib::GravityModel class calculates geoid heights using the
-underlying gravity model. This is slower then GeographicLib::Geoid but
-considerably more accurate. This class also can accurately compute all
-the components of the acceleration due to gravity (and hence the
-direction of plumb line).
-
-Go to
- - \ref geoidinst
- - \ref geoidformat
- - \ref geoidinterp
- - \ref geoidcache
- - \ref testgeoid
-
-\section geoidinst Installing the geoid datasets
-
-The geoid heights are computed using interpolation into a rectangular
-grid. The grids are read from data files which have been are computed
-using the NGA synthesis programs in the case of the EGM84 and EGM96
-models and using the NGA binary gridded data files in the case of
-EGM2008. These data files are available for download:
-
-The "size" column is the size of the uncompressed data and it also
-gives the memory requirements for caching the entire dataset using the
-GeographicLib::Geoid::CacheAll method.
-At a minimum you should install egm96-5 and either egm2008-1 or
-egm2008-2_5. Many applications use the EGM96 geoid, however the use of
-EGM2008 is growing. (EGM84 is rarely used now.)
-
-For Linux and Unix systems, %GeographicLib provides a shell script
-geographiclib-get-geoids (typically installed in /usr/local/sbin) which
-automates the process of downloading and installing the geoid data. For
-example
-\verbatim
- geographiclib-get-geoids best # to install egm84-15, egm96-5, egm2008-1
- geographiclib-get-geoids -h # for help
-\endverbatim
-This script should be run as a user with write access to the
-installation directory, which is typically
-/usr/local/share/GeographicLib (this can be overridden with the -p
-flag), and the data will then be placed in the "geoids" subdirectory.
-
-Windows users should download and run the Windows installers. These
-will prompt for an installation directory with the default being one of
-\verbatim
- C:/Documents and Settings/All Users/Application Data/GeographicLib
- C:/ProgramData/GeographicLib
-\endverbatim
-(which you probably should not change) and the data is installed in the
-"geoids" sub-directory. (The second directory name is an alternate name
-that Windows 7 uses for the "Application Data" directory.)
-
-Otherwise download \e either the tar.bz2 file \e or the zip file (they
-have the same contents). If possible use the tar.bz2 files, since these
-are compressed about 2 times better than the zip file. To unpack these,
-run, for example
-\verbatim
- mkdir -p /usr/local/share/GeographicLib
- tar xofjC egm96-5.tar.bz2 /usr/local/share/GeographicLib
- tar xofjC egm2008-2_5.tar.bz2 /usr/local/share/GeographicLib
- etc.
-\endverbatim
-and, again, the data will be placed in the "geoids" subdirectory.
-
-However you install the geoid data, all the datasets should
-be installed in the same directory. GeographicLib::Geoid and
-GeoidEval uses a compile time default to
-locate the datasets. This is
-- /usr/local/share/GeographicLib/geoids, for non-Windows systems
-- C:/Documents and Settings/All Users/Application Data/GeographicLib/geoids,
- for Windows systems
-.
-consistent with the examples above. This may be overridden at run-time
-by defining the GEOID_PATH or the GEOGRAPHICLIB_DATA environment variables;
-see GeographicLib::Geoid::DefaultGeoidPath() for details. Finally, the
-path may be set using the optional second argument to the
-GeographicLib::Geoid constructor or with the "-d" flag to
-GeoidEval. Supplying the "-h" flag to
-GeoidEval reports the default geoid path
-for that utility. The "-v" flag causes GeoidEval to report the full
-path name of the data file it uses.
-
-\section geoidformat The format of the geoid data files
-
-The gridded data used by the GeographicLib::Geoid class is stored in
-16-bit PGM files. Thus the data for egm96-5 might be stored in the file
-- /usr/local/share/GeographicLib/geoids/egm96-5.pgm
-.
-PGM simple graphic format with the following properties
-- it is well documented
- here;
-- there are no separate "little-endian" and "big-endian" versions;
-- it uses 1 or 2 bytes per pixel;
-- pixels can be randomly accessed;
-- comments can be added to the file header;
-- it is sufficiently simple that it can be easily read without using the
- libnetpbm
- library (and thus we avoid adding a software dependency to
- %GeographicLib).
-.
-The major drawback of this format is that since there are only 65535
-possible pixel values, the height must be quantized to 3 mm. However,
-the resulting quantization error (up to 1.5 mm) is typically smaller
-than the linear interpolation errors. The comments in the header for
-egm96-5 are
-\verbatim
- # Geoid file in PGM format for the GeographicLib::Geoid class
- # Description WGS84 EGM96, 5-minute grid
- # URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html
- # DateTime 2009-08-29 18:45:03
- # MaxBilinearError 0.140
- # RMSBilinearError 0.005
- # MaxCubicError 0.003
- # RMSCubicError 0.001
- # Offset -108
- # Scale 0.003
- # Origin 90N 0E
- # AREA_OR_POINT Point
- # Vertical_Datum WGS84
-\endverbatim
-Of these lines, the Scale and Offset lines are required and define the
-conversion from pixel value to height (in meters) using \e height =
-\e offset + \e scale \e pixel. The Geoid constructor also reads the
-Description, DateTime, and error lines (if present) and stores the
-resulting data so that it can be returned by
-GeographicLib::Geoid::Description, GeographicLib::Geoid::DateTime,
-GeographicLib::Geoid::MaxError, and GeographicLib::Geoid::RMSError
-methods. The other lines serve as additional documentation but are not
-used by this class. Accompanying egm96-5.pgm (and similarly with the
-other geoid data files) are two files egm96-5.wld and
-egm96-5.pgm.aux.xml. The first is an ESRI "world" file and the second
-supplies complete projection metadata for use by
-GDAL. Neither of these files is read
-by GeographicLib::Geoid.
-
-You can use gdal_translate to convert the data files to a standard
-GeoTiff, e.g., with
-\verbatim
- gdal_translate -ot Float32 -scale 0 65000 -108 87 egm96-5.pgm egm96-5.tif
-\endverbatim
-The arguments to -scale here are specific to the Offset and Scale
-parameters used in the pgm file (note 65000 * 0.003 - 108 = 87). You
-can check these by running GeoidEval with
-the "-v" option.
-
-Here is a sample script which uses GDAL to create a 1-degree
-squared grid of geoid heights at 3" resolution (matching DTED1) by
-bilinear interpolation.
-\verbatim
- #! /bin/sh
- lat=37
- lon=067
- res=3 # resolution in seconds
- TEMP=`mktemp junkXXXXXXXXXX` # temporary file for GDAL
- gdalwarp -q -te `echo $lon $lat $res | awk '{
- lon = $1; lat = $2; res = $3;
- printf "%.14f %.14f %.14f %.14f",
- lon -0.5*res/3600, lat -0.5*res/3600,
- lon+1+0.5*res/3600, lat+1+0.5*res/3600;
- }'` -ts $((3600/res+1)) $((3600/res+1)) -r bilinear egm96-5.tif $TEMP
- gdal_translate -quiet \
- -mo AREA_OR_POINT=Point \
- -mo Description="WGS84 EGM96, $res-second grid" \
- -mo Vertical_Datum=WGS84 \
- -mo Tie_Point_Location=pixel_corner \
- $TEMP e$lon-n$lat.tif
- rm -f $TEMP
-\endverbatim
-
-Because the pgm files are uncompressed, they can take up a lot of disk
-space. Some compressed formats compress in tiles and so might be
-compatible with the requirement that the data can be randomly accessed.
-In particular gdal_translate can be used to convert the pgm files to
-compressed tiff files with
-\verbatim
-gdal_translate -co COMPRESS=LZW -co PREDICTOR=2 \
- -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 \
- egmyy-g.pgm egmyy-g.tif
-\endverbatim
-The resulting files sizes are
-\verbatim
- pgm tif
- egm84-30 0.6 MB 0.5 MB
- egm84-15 2.1 MB 1.4 MB
- egm96-15 2.1 MB 1.5 MB
- egm96-5 19 MB 8.5 MB
- egm2008-5 19 MB 9.8 MB
- egm2008-2_5 75 MB 28 MB
- egm2008-1 470 MB 97 MB
-\endverbatim
-Currently, there are no plans for %GeographicLib to support this
-compressed format.
-
-\section geoidinterp Interpolating the geoid data
-
-GeographicLib::Geoid evaluates the geoid height using bilinear or cubic
-interpolation. The gradient of the geoid height is obtained by
-differentiating the interpolated height and referencing the result to
-distance on the WGS84 ellipsoid.
-
-WARNING: Although GeographicLib::Geoid computes the gradient of
-the geoid height, this is subject to large quantization errors as a
-result of the way that the geoid data is stored. This is particularly
-acute for fine grids, at high latitudes, and for the easterly gradient.
-If you need to compute the direction of the acceleration due to gravity
-accurately, you should use GeographicLib::GravityModel::Gravity.
-
-The bilinear interpolation is based on the values at the 4 corners of
-the enclosing cell. The interpolated height is a continuous function of
-position; however the gradient has discontinuities are cell boundaries.
-The quantization of the data files exacerbates the errors in the
-gradients.
-
-The cubic interpolation is a least-squares fit to the values on a
-12-point stencil with weights as follows:
-\verbatim
- . 1 1 .
- 1 2 2 1
- 1 2 2 1
- . 1 1 .
-\endverbatim
-The cubic is constrained to be independent of longitude when evaluating
-the height at one of the poles. Cubic interpolation is considerably
-more accurate than bilinear interpolation; however, in this
-implementation there are small discontinuities in the heights are cell
-boundaries. The over-constrained cubic fit slightly reduces the
-quantization errors on average.
-
-The algorithm for the least squares fit is taken from, F. H. Lesh,
-Multi-dimensional least-squares polynomial curve fitting, CACM 2, 29-30
-(1959). This algorithm is not part of GeographicLib::Geoid; instead it is
-implemented as
-Maxima
-code which is used to precompute the matrices to convert the function
-values on the stencil into the coefficients from the cubic polynomial.
-This code is included as a comment in Geoid.cpp.
-
-The interpolation methods are quick and give good accuracy. Here is a
-summary of the combined quantization and interpolation errors for the
-heights.
-
-
Interpolation and quantization errors for geoid heights
-
-
name
-
geoid
-
grid
-
bilinear error
-
cubic error
-
-
max
rms
-
max
rms
-
-
egm84-30
EGM84
30'
-
1.546 m
70 mm
-
0.274 m
14 mm
-
-
egm84-15
EGM84
15'
-
0.413 m
18 mm
-
0.021 m
1.2 mm
-
-
egm96-15
EGM96
15'
-
1.152 m
40 mm
-
0.169 m
7.0 mm
-
-
egm96-5
EGM96
5'
-
0.140 m
4.6 mm
-
0.0032 m
0.7 mm
-
-
egm2008-5
EGM2008
5'
-
0.478 m
12 mm
-
0.294 m
4.5 mm
-
-
egm2008-2_5
EGM2008
2.5'
-
0.135 m
3.2 mm
-
0.031 m
0.8 mm
-
-
egm2008-1
EGM2008
1'
-
0.025 m
0.8 mm
-
0.0022 m
0.7 mm
-
-The errors are with respect to the specific NGA earth gravity model
-(not to any "real" geoid). The RMS values are obtained using 5 million
-uniformly distributed random points. The maximum values are obtained by
-evaluating the errors using a different grid with points at the
-centers of the original grid. (The RMS difference between EGM96 and
-EGM2008 is about 0.5 m. The RMS difference between EGM84 and EGM96 is
-about 1.5 m.)
-
-The errors in the table above include the quantization errors that arise
-because the height data that GeographicLib::Geoid uses are quantized to
-3 mm. If, instead, GeographicLib::Geoid were to use data files without
-such quantization artifacts, the overall error would be reduced but
-only modestly as shown in the following table, where only the
-changed rows are included and where the changed entries are given in
-bold:
-
-
Interpolation (only!) errors for geoid heights
-
-
name
-
geoid
-
grid
-
bilinear error
-
cubic error
-
-
max
rms
-
max
rms
-
-
egm96-5
EGM96
5'
-
0.140 m
4.6 mm
-
0.0026 m
0.1 mm
-
-
egm2008-2_5
EGM2008
2.5'
-
0.135 m
3.2 mm
-
0.031 m
0.4 mm
-
-
egm2008-1
EGM2008
1'
-
0.025 m
0.6 mm
-
0.0010 m
0.011 mm
-
-
-\section geoidcache Caching the geoid data
-
-A simple way of calling Geoid is as follows
-\code
- #include
- #include
- ...
- GeographicLib::Geoid g("egm96-5");
- double lat, lon;
- while (std::cin >> lat >> lon)
- std::cout << g(lat, lon) << "\n";
- ...
-\endcode
-
-The first call to g(lat, lon) causes the data for the stencil points (4
-points for bilinear interpolation and 12 for cubic interpolation) to be
-read and the interpolated value returned. A simple 0th-order caching
-scheme is provided by default, so that, if the second and subsequent
-points falls within the same grid cell, the data values are not reread
-from the file. This is adequate for most interactive use and also
-minimizes disk accesses for the case when a continuous track is being
-followed.
-
-If a large quantity of geoid calculations are needed, the calculation
-can be sped up by preloading the data for a rectangular block with
-GeographicLib::Geoid::CacheArea or the entire dataset with
-GeographicLib::Geoid::CacheAll. If the requested points lie within the
-cached area, the cached data values are used; otherwise the data is read
-from disk as before. Caching all the data is a reasonable choice for
-the 5' grids and coarser. Caching all the data for the 1' grid will
-require 0.5 GB of RAM and should only be used on systems with sufficient
-memory.
-
-The use of caching does not affect the values returned. Because of the
-caching and the random file access, this class is \e not normally thread
-safe; i.e., a single instantiation cannot be safely used by multiple
-threads. If multiple threads need to calculate geoid heights, there are
-two alternatives:
- - they should all construct thread-local instantiations.
- - GeographicLib::Geoid should be constructed with \e threadsafe = true.
- This causes all the data to be read at the time of construction (and
- if this fails, an exception is thrown), the data file to be closed
- and the single-cell caching to be turned off. The resulting object
- may then be shared safely between threads.
-
-\section testgeoid Test data for geoids
-
-A test set for the geoid models is available at
- -
- GeoidHeights.dat.gz
- .
-This is about 11 MB (compressed). This test set consists of a set of
-500000 geographic coordinates together with the corresponding geoid
-heights according to various earth gravity models.
-
-Each line of the test set gives 6 space delimited numbers
- - latitude (degrees, exact)
- - longitude (degrees, exact)
- - EGM84 height (meters, accurate to 1 μm)
- - EGM96 height (meters, accurate to 1 μm)
- - EGM2008 height (meters, accurate to 1 μm)
- .
-The latitude and longitude are all multiples of 10−6
-deg and should be regarded as exact. The geoid heights are computed
-using the harmonic NGA synthesis programs, where the programs were
-compiled (with gfortran) and run under Linux. In the case of the
-EGM2008 program, a SAVE statement needed to be added to
-subroutine latf, in order for the program to compile
-correctly with a stack-based compiler. Similarly the EGM96 code
-requires a SAVE statement in subroutine
-legfdn.
-
-
-Back to \ref other. Forward to \ref gravity. Up to \ref contents.
-
-Back to \ref geoid. Forward to \ref magnetic. Up to \ref contents.
-
-
-%GeographicLib can compute the earth's gravitational field with an
-earth gravity model using the GeographicLib::GravityModel and
-GeographicLib::GravityCircle classes and with the
-Gravity utility. These models expand the
-gravitational potential of the earth as sum of spherical harmonics. The
-models also specify a reference ellipsoid, relative to which geoid
-heights and gravity disturbances are measured.
-
-The supported models are
- - egm84, the
-
- Earth Gravity Model 1984, which includes terms up to degree 180.
- - egm96, the
-
- Earth Gravity Model 1996, which includes terms up to degree 360.
- - egm2008, the
-
- Earth Gravity Model 2008, which includes terms up to degree 2190.
- - wgs84, the
-
- WGS84 Reference Ellipsoid. This is just reproduces the normal
- gravitational field for the reference ellipsoid. Usually
- GeographicLib::NormalGravity::WGS84 should be used instead.
-
-See
- - W. A. Heiskanen and H. Moritz, Physical Geodesy (Freeman, San
- Francisco, 1967).
- .
-for more information.
-
-Acknowledgment: I would like to thank Mathieu Peyréga for
-sharing EGM_Geoid_CalculatorClass from his Geo library with me. His
-implementation was the first I could easily understand and he and I
-together worked through some of the issues with overflow and underflow
-the occur while performing high-degree spherical harmonic sums.
-
-Go to
- - \ref gravityinst
- - \ref gravityformat
- - \ref gravitynga
- - \ref gravitygeoid
- - \ref gravityatmos
- - \ref gravityparallel
-
-\section gravityinst Installing the gravity models
-
-These gravity models are available for download:
-
-The "size" column is the size of the uncompressed data.
-
-For Linux and Unix systems, %GeographicLib provides a shell script
-geographiclib-get-gravity (typically installed in /usr/local/sbin)
-which automates the process of downloading and installing the gravity
-models. For example
-\verbatim
- geographiclib-get-gravity all # to install egm84, egm96, egm2008, wgs84
- geographiclib-get-gravity -h # for help
-\endverbatim
-This script should be run as a user with write access to the
-installation directory, which is typically
-/usr/local/share/GeographicLib (this can be overridden with the -p
-flag), and the data will then be placed in the "gravity" subdirectory.
-
-Windows users should download and run the Windows installers. These
-will prompt for an installation directory with the default being one of
-\verbatim
- C:/Documents and Settings/All Users/Application Data/GeographicLib
- C:/ProgramData/GeographicLib
-\endverbatim
-(which you probably should not change) and the data is installed in the
-"gravity" sub-directory. (The second directory name is an alternate name
-that Windows 7 uses for the "Application Data" directory.)
-
-Otherwise download \e either the tar.bz2 file \e or the zip file (they
-have the same contents). To unpack these, run, for example
-\verbatim
- mkdir -p /usr/local/share/GeographicLib
- tar xofjC egm96.tar.bz2 /usr/local/share/GeographicLib
- tar xofjC egm2008.tar.bz2 /usr/local/share/GeographicLib
- etc.
-\endverbatim
-and, again, the data will be placed in the "gravity" subdirectory.
-
-However you install the gravity models, all the datasets should be
-installed in the same directory. GeographicLib::GravityModel and
-Gravity uses a compile time default to
-locate the datasets. This is
-- /usr/local/share/GeographicLib/gravity, for non-Windows systems
-- C:/Documents and Settings/All Users/Application Data/GeographicLib/gravity,
- for Windows systems
-.
-consistent with the examples above. This may be overridden at run-time
-by defining the GRAVITY_PATH or the GEOGRAPHICLIB_DATA environment
-variables; see GeographicLib::GravityModel::DefaultGravityPath() for
-details. Finally, the path may be set using the optional second
-argument to the GeographicLib::GravityModel constructor or with the "-d"
-flag to
-Gravity. Supplying the "-h" flag to
-Gravity reports the default path for
-gravity models for that utility. The "-v" flag causes Gravity to report
-the full path name of the data file it uses.
-
-\section gravityformat The format of the gravity model files
-
-The constructor for GeographicLib::GravityModel reads a file called
-NAME.egm which specifies various properties for the gravity model. It
-then opens a binary file NAME.egm.cof to obtain the coefficients of the
-spherical harmonic sum.
-
-The first line of the .egm file must consist of "EGMF-v" where EGMF
-stands for "Earth Gravity Model Format" and v is the version number of
-the format (currently "1").
-
-The rest of the File is read a line at a time. A # character and
-everything after it are discarded. If the result is just white space it
-is discarded. The remaining lines are of the form "KEY WHITESPACE
-VALUE". In general, the KEY and the VALUE are case-sensitive.
-
-GeographicLib::GravityModel only pays attention to the following
-keywords
- - keywords that affect the field calculation, namely:
- - ModelRadius (required), the normalizing radius for the model
- in meters.
- - ReferenceRadius (required), the major radius \e a for the
- reference ellipsoid meters.
- - ModelMass (required), the mass constant \e GM for the model
- in meters3/seconds2.
- - ReferenceMass (required), the mass constant \e GM for the
- reference ellipsoid in meters3/seconds2.
- - AngularVelocity (required), the angular velocity ω for
- the model \e and the reference ellipsoid in rad
- seconds−1.
- - Flattening, the flattening of the reference ellipsoid; this
- can be given a fraction, e.g., 1/298.257223563. One of
- Flattening and DynamicalFormFactor is required.
- - DynamicalFormFactor, the dynamical form factor
- J2 for the reference ellipsoid. One of
- Flattening and DynamicalFormFactor is required.
- - HeightOffset (default 0), the constant height offset
- (meters) added to obtain the geoid height.
- - CorrectionMultiplier (default 1), the multiplier for the
- "zeta-to-N" correction terms for the geoid height to convert them
- to meters.
- - Normalization (default full), the normalization used for the
- associated Legendre functions (full or schmidt).
- - ID (required), 8 printable characters which serve as a
- signature for the .egm.cof file (they must appear as the first 8
- bytes of this file).
- .
- The parameters ModelRadius, ModelMass, and
- AngularVelocity apply to the gravity model, while
- ReferenceRadius, ReferenceMass, AngularVelocity,
- and either Flattening or DynamicalFormFactor
- characterize the reference ellipsoid. AngularVelocity
- (because it can be measured precisely) is the same for the gravity
- model and the reference ellipsoid. ModelRadius is merely a
- scaling parameter for the gravity model and there's no requirement
- that it be close to the major radius of the earth (although that's
- typically how it is chosen). ModelMass and
- ReferenceMass need not be the same and, indeed, they are
- slightly difference for egm2008. As a result the disturbing
- potential \e T has a 1/\e r dependence at large distances.
- - keywords that store data that the user can query:
- - Name, the name of the model.
- - Description, a more descriptive name of the model.
- - ReleaseDate, when the model was created.
- - keywords that are examined to verify that their values are valid:
- - ByteOrder (default little), the order of bytes in the
- .egm.cof file. Only little endian is supported at present.
- .
-Other keywords are ignored.
-
-The coefficient file NAME.egm.cof is a binary file in little endian
-order. The first 8 bytes of this file must match the ID given in
-NAME.egm. This is followed by 2 sets of spherical harmonic
-coefficients. The first of these gives the gravity potential and the
-second gives the zeta-to-N corrections to the geoid height. The format
-for each set of coefficients is:
- - \e N, the maximum degree of the sum stored as a 4-byte signed integer.
- This must satisfy \e N ≥ −1.
- - \e M, the maximum order of the sum stored as a 4-byte signed integer.
- This must satisfy \e N ≥ \e M ≥ −1.
- - \e C\e nm, the coefficients of the cosine coefficients of
- the sum in column (i.e., \e m) major order. There are (\e M + 1)
- (2\e N - \e M + 2) / 2 elements which are stored as IEEE doubles (8
- bytes). For example for \e N = \e M = 3, there are 10 coefficients
- arranged as
- C00,
- C10,
- C20,
- C30,
- C11,
- C21,
- C31,
- C22,
- C32,
- C33.
- - \e S\e nm, the coefficients of the sine coefficients of
- the sum in column (i.e., \e m) major order starting at \e m = 1.
- There are \e M (2\e N - \e M + 1) / 2 elements which are stored as
- IEEE doubles (8 bytes). For example for \e N = \e M = 3, there are 6
- coefficients arranged as
- S11,
- S21,
- S31,
- S22,
- S32,
- S33.
- .
-Although the coefficient file is in little endian order, %GeographicLib
-can read it on big endian machines. It can only be read on machines
-which store doubles in IEEE format.
-
-As an illustration, here is egm2008.egm:
-\verbatim
-EGMF-1
-# An Earth Gravity Model (Format 1) file. For documentation on the
-# format of this file see
-# http://geographiclib.sf.net/html/gravity.html#gravityformat
-Name egm2008
-Publisher National Geospatial Intelligence Agency
-Description Earth Gravity Model 2008
-URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
-ReleaseDate 2008-06-01
-ConversionDate 2011-11-19
-DataVersion 1
-ModelRadius 6378136.3
-ModelMass 3986004.415e8
-AngularVelocity 7292115e-11
-ReferenceRadius 6378137
-ReferenceMass 3986004.418e8
-Flattening 1/298.257223563
-HeightOffset -0.41
-
-# Gravitational and correction coefficients taken from
-# EGM2008_to2190_TideFree and Zeta-to-N_to2160_egm2008 from
-# the egm2008 distribution.
-ID EGM2008A
-\endverbatim
-
-\section gravitynga Comments on the NGA harmonic synthesis code
-
-GeographicLib::GravityModel attempts to reproduce the results of NGA's
-harmonic synthesis code for EGM2008, hsynth_WGS84.f. Listed here are
-issues that I encountered using the NGA code:
- -# A compiler which allocates local variables on the stack produces an
- executable with just returns NaNs. The problem here is a missing
- SAVE statement in subroutine latf.
- -# Because the model and references masses for egm2008 differ (by about
- 1 part in 109), there should be a 1/\e r contribution to
- the disturbing potential \e T. However, this term is set to zero in
- hsynth_WGS84 (effectively altering the normal potential). This
- shifts the surface \e W = U0 outward by about 5 mm.
- Note too that the reference ellipsoid is no longer a level surface of
- the effective normal potential.
- -# Subroutine radgrav computes the ellipsoidal coordinate
- β incorrectly. This leads to small errors in the deflection
- of the vertical, ξ and η, when the height above the
- ellipsoid, \e h, is non-zero (about 10−7 arcsec at
- \e h = 400 km).
- -# There are several expressions which will return inaccurate results
- due to cancellation. For example, subroutine grs
- computes the flattening using \e f = 1 - sqrt(1 -
- e2). Much better is to use \e f =
- e2/(1 + sqrt(1 - e2)). The
- expressions for \e q and \e q' in grs and
- radgrav suffer from similar problems. The resulting
- errors are tiny (about 50 pm in the geoid height); however, given
- that's there's essentially no cost to using more accurate
- expressions, it's preferable to do so.
- -# hsynth_WGS84 returns an "undefined" value for \e xi and \e eta at the
- poles. Better would be to return the value obtained by taking the
- limit \e lat -> +/- 90°.
- .
-Issues 1--4 have been reported to the authors of hsynth_WGS84.
-Issue 1 is peculiar to Fortran and is not encountered in C++ code and
-GeographicLib::GravityModel corrects issues 3--5. On issue 2,
-GeographicLib::GravityModel neglects the 1/\e r term in \e T in
-GeographicLib::GravityModel::GeoidHeight and
-GeographicLib::GravityModel::SphericalAnomaly in order to produce
-results which match NGA's for these quantities. On the other hand,
-GeographicLib::GravityModel::Disturbance and
-GeographicLib::GravityModel::T do include this term.
-
-\section gravitygeoid Details of the geoid height and anomaly calculations
-
-Ideally, the geoid represents a surface of constant gravitational
-potential which approximates mean sea level. In reality some
-approximations are taken in determining this surface. The steps taking
-by GeographicLib::GravityModel in computing the geoid height are
-described here (in the context of EGM2008). This mimics NGA's code
-hsynth_WGS84 closely because most users of EGM2008 use the gridded data
-generated by this code (e.g., GeographicLib::Geoid) and it is desirable
-to use a consistent definition of the geoid height.
- - The model potential is band limited; the minimum wavelength that is
- represented is 360°/2160 = 10' (i.e., about 10NM or
- 18.5km). The maximum degree for the spherical harmonic sum is 2190;
- however the model was derived using ellipsoidal harmonics of degree
- and order 2160 and the degree was increased to 2190 in order to
- capture the ellipsoidal harmonics faithfully with spherical
- harmonics.
- - The 1/\e r term is omitted from the \e T (this is issue 2 in \ref
- gravitynga). This moves the equipotential surface by about 5mm.
- - The surface \e W = U0 is determined by Bruns'
- formula, which is roughly equivalent to a single iteration of
- Newton's method. The RMS error in this approximation is about 1.5mm
- with a maximum error of about 10 mm.
- - The model potential is only valid above the earth's surface. A
- correction therefore needs to be included where the geoid lies
- beneath the terrain. This is NGA's "zeta-to-N" correction, which is
- represented by a spherical harmonic sum of degree and order 2160 (and
- so it misses short wavelength terrain variations). In addition, it
- entails estimating the isostatic equilibrium of the earth's crust.
- The correction lies in the range [-5.05 m, 0.05 m], however for 99.9%
- of the earth's surface the correction is less than 10 mm in
- magnitude.
- - The resulting surface lies above the observed mean sea level,
- so -0.41m is added to the geoid height. (Better would be to change
- the potential used to define the geoid; but this would only change
- the result by about 2mm.)
- .
-A useful discussion of the problems with defining a geoid is given by
-Dru A. Smith in
-
-There is no such thing as "The" EGM96 geoid: Subtle points on the use of
-a global geopotential model, IGeS Bulletin No. 8, International
-Geoid Service, Milan, Italy, pp. 17--28 (1998).
-
-GeographicLib::GravityModel::GeoidHeight reproduces the results of the
-several NGA codes for harmonic synthesis with the following maximum
-discrepancies:
- - egm84 = 1.1mm. This is probably due to inconsistent parameters for the
- reference ellipsoid in the NGA code. (In particular, the value of
- mass constant excludes the atmosphere; however, it's not clear
- whether the other parameters have been correspondingly adjusted.)
- Note that geoid heights predicted by egm84 differ from those of more
- recent gravity models by about 1 meter.
- - egm96 = 23nm.
- - egm2008 = 78pm. After addressing some of the issues alluded to in
- issue 4 in \ref gravitynga, the maximum discrepancy becomes 23pm.
-
-The formula for the gravity anomaly vector involves computing gravity
-and normal gravity at two different points (with the displacement
-between the points unknown ab initio). Since the gravity anomaly
-is already a small quantity it is sometimes acceptable to employ
-approximations that change the quantities by \e O(\e f). The NGA code
-uses the spherical approximation described by Heiskanen and Moritz,
-Sec. 2-14 and GeographicLib::GravityModel::SphericalAnomaly uses the
-same approximation for compatibility. In this approximation, the
-gravity disturbance delta = grad \e T is calculated.
-Here, \e T once again excludes the 1/\e r term (this is issue 2 in \ref
-gravitynga and is consistent with the computation of the geoid height).
-Note that delta compares the gravity and the normal gravity at
-the \e same point; the gravity anomaly vector is then found by
-estimating the gradient of the normal gravity in the limit that the
-earth is spherically symmetric. delta is expressed in \e
-spherical coordinates as \e deltax, \e deltay, \e deltaz where, for
-example, \e deltaz is the \e radial component of delta (not the
-component perpendicular to the ellipsoid) and \e deltay is similarly
-slightly different from the usual northerly component. The components
-of the anomaly are then given by
- - gravity anomaly, \e Dg01 = \e deltaz - 2T/\e R, where \e R
- distance to the center of the earth;
- - northerly component of the deflection of the vertical, \e xi = -
- deltay/\e gamma, where \e gamma is the magnitude of the normal
- gravity;
- - easterly component of the deflection of the vertical, \e eta = -
- deltax/\e gamma.
- .
-GeographicLib::NormalGravity computes the normal gravity accurately and
-avoids issue 3 of \ref gravitynga. Thus while
-GeographicLib::GravityModel::SphericalAnomaly reproduces the results for
-\e xi and \e eta at \e h = 0, there is a slight discrepancy if \e h is
-non-zero.
-
-\section gravityatmos The effect of the mass of the atmosphere
-
-All of the supported models use WGS84 for the reference ellipsoid. This
-has (see
-
-TR8350.2, table 3.1)
- - \e a = 6378137 m
- - \e f = 1/298.257223563
- - ω = 7292115 × 10−11 rad
- s−1
- - \e GM = 3986004.418 × 108 m3
- s−2.
- .
-The value of \e GM includes the mass of the atmosphere and so strictly
-only applies above the earth's atmosphere. Near the surface of the
-earth, the value of \e g will be less (in absolute value) than the value
-predicted by these models by about δ\e g = (4πG/\e
-g) \e A = 8.552 × 10−11 \e A m2/kg,
-where \e G is the gravitational constant, \e g is the earth's gravity,
-and \e A is the pressure of the atmosphere. At sea level we have \e A =
-101.3 kPa, and δ\e g = 8.7 × 10−6 m
-s−2, approximately. (In other words the effect is
-about 1 part in a million; by way of comparison, buoyancy effects
-are about 100 times larger.)
-
-\section gravityparallel Geoid heights on a multi-processor system
-
-The egm2008 model includes many terms (over 2 million spherical
-harmonics). For that reason computations using this model may be slow;
-for example it takes about 78 ms to compute the geoid height at a single
-point. There are two ways to speed up this computation:
- - Use a GeographicLib::GravityCircle to compute the geoid height at
- several points on a circle of latitude. This reduces the cost per
- point to about 92 μs (a reduction by a factor of over 800).
- - Compute the values on several circles of latitude in parallel. One
- of the simplest ways of doing this is with
- OpenMP; on an 8-processor system,
- this can speed up the computation by another factor of 8.
- .
-Both of these techniques are illustrated by the following code,
-which computes a table of geoid heights on
-a regular grid and writes on the result in a
-.gtx
-file. On an 8-processor Intel 2.66 GHz machine using OpenMP
-(-DHAVE_OPENMP=1), it takes about 40 minutes of elapsed time to compute
-the geoid height for EGM2008 on a 1' gride. (Without these
-optimizations, the computation would have taken about 200 days!)
-\include GeoidToGTX.cpp
-
-This example, examples/GeoidToGTX.cpp, is built if cmake
-is configured with -D GEOGRAPHICLIB_EXAMPLES=ON. cmake
-will add in support for OpenMP, if it is available.
-
-
-Back to \ref geoid. Forward to \ref magnetic. Up to \ref contents.
-
-**********************************************************************/
-/**
-\page magnetic Magnetic models
-
-
-Back to \ref gravity. Forward to \ref geodesic. Up to \ref contents.
-
-
-%GeographicLib can compute the earth's magnetic field by a magnetic
-model using the GeographicLib::MagneticModel and
-GeographicLib::MagneticCircle classes and with the
-MagneticField utility. These models
-expand the internal magnetic potential of the earth as sum of spherical
-harmonics. They neglect magnetic fields due to the ionosphere, the
-magnetosphere, nearby magnetized materials, electric machinery, etc.
-Users of GeographicLib::MagneticModel are advised to read the
-"Health
-Warning" this is provided with igrf11. Although the advice is
-specific to igrf11, many of the comments apply to all magnetic field
-models.
-
-The supported models are
- - wmm2010, the
- World
- Magnetic Model 2010, which approximates the main magnetic field
- for the period 2010--2015.
- - igrf11, the
- International
- Geomagnetic Reference Field (11th generation), which approximates
- the main magnetic field for the period 1900--2015.
- - emm2010, the
- Enhanced
- Magnetic Model 2010, which approximates the main and crustal
- magnetic fields for the period 2010--2015.
-
-Go to
- - \ref magneticinst
- - \ref magneticformat
-
-\section magneticinst Installing the magnetic field models
-
-These magnetic models are available for download:
-
-The "size" column is the size of the uncompressed data.
-
-For Linux and Unix systems, %GeographicLib provides a shell script
-geographiclib-get-magnetic (typically installed in /usr/local/sbin)
-which automates the process of downloading and installing the magnetic
-models. For example
-\verbatim
- geographiclib-get-magnetic all # to install wmm2010, igrf11, emm2010
- geographiclib-get-magnetic -h # for help
-\endverbatim
-This script should be run as a user with write access to the
-installation directory, which is typically
-/usr/local/share/GeographicLib (this can be overridden with the -p
-flag), and the data will then be placed in the "magnetic" subdirectory.
-
-Windows users should download and run the Windows installers. These
-will prompt for an installation directory with the default being one of
-\verbatim
- C:/Documents and Settings/All Users/Application Data/GeographicLib
- C:/ProgramData/GeographicLib
-\endverbatim
-(which you probably should not change) and the data is installed in the
-"magnetic" sub-directory. (The second directory name is an alternate name
-that Windows 7 uses for the "Application Data" directory.)
-
-Otherwise download \e either the tar.bz2 file \e or the zip file (they
-have the same contents). To unpack these, run, for example
-\verbatim
- mkdir -p /usr/local/share/GeographicLib
- tar xofjC wmm2010.tar.bz2 /usr/local/share/GeographicLib
- tar xofjC emm2010.tar.bz2 /usr/local/share/GeographicLib
- etc.
-\endverbatim
-and, again, the data will be placed in the "magnetic" subdirectory.
-
-However you install the magnetic models, all the datasets should be
-installed in the same directory. GeographicLib::MagneticModel and
-MagneticField uses a compile time
-default to locate the datasets. This is
-- /usr/local/share/GeographicLib/magnetic, for non-Windows systems
-- C:/Documents and Settings/All Users/Application Data/GeographicLib/magnetic,
- for Windows systems
-.
-consistent with the examples above. This may be overridden at run-time
-by defining the MAGNETIC_PATH or the GEOGRAPHIC_DATA environment
-variables; see GeographicLib::MagneticModel::DefaultMagneticPath() for
-details. Finally, the path may be set using the optional second
-argument to the GeographicLib::MagneticModel constructor or with the
-"-d" flag to MagneticField.
-Supplying the "-h" flag to
-MagneticField reports the default
-path for magnetic models for that utility. The "-v" flag causes
-MagneticField to report the full path name of the data file it uses.
-
-\section magneticformat The format of the magnetic model files
-
-The constructor for GeographicLib::MagneticModel reads a file called
-NAME.wmm which specifies various properties for the magnetic model. It
-then opens a binary file NAME.wmm.cof to obtain the coefficients of the
-spherical harmonic sum.
-
-The first line of the .wmm file must consist of "WMMF-v" where WMMF
-stands for "World Magnetic Model Format" and v is the version number of
-the format (currently "1").
-
-The rest of the File is read a line at a time. A # character and
-everything after it are discarded. If the result is just white space it
-is discarded. The remaining lines are of the form "KEY WHITESPACE
-VALUE". In general, the KEY and the VALUE are case-sensitive.
-
-GeographicLib::MagneticModel only pays attention to the following
-keywords
- - keywords that affect the field calculation, namely:
- - Radius (required), the normalizing radius of the model in
- meters.
- - NumModels (default 1), the number of models. WMM2010
- consists of a single model giving the magnetic field and its time
- variation at 2010. IGRF11 consists of 23 models for 1900 thru 2010
- at 5 year intervals. The time variation is given only for the last
- model to allow extrapolation beyond 2010. For dates prior to 2010,
- linear interpolation is used.
- - Epoch (required), the time origin (in fractional years) for
- the first model.
- - DeltaEpoch (default 1), the interval between models in years
- (only relevant for NumModels > 1).
- - Normalization (default schmidt), the normalization used for
- the associated Legendre functions (schmidt or full).
- - ID (required), 8 printable characters which serve as a
- signature for the .wmm.cof file (they must appear as the first 8
- bytes of this file).
- - keywords that store data that the user can query:
- - Name, the name of the model.
- - Description, a more descriptive name of the model.
- - ReleaseDate, when the model was created.
- - MinTime, the minimum date at which the model should be used.
- - MaxTime, the maximum date at which the model should be used.
- - MinHeight, the minimum height above the ellipsoid for which
- the model should be used.
- - MaxHeight, the maximum height above the ellipsoid for which
- the model should be used.
- .
- GeographicLib::MagneticModel does not enforce the restrictions
- implied by last four quantities. However,
- MagneticField issues a warning if
- these limits are exceeded.
- - keywords that are examined to verify that their values are valid:
- - Type (default linear), the type of the model. "linear"
- means that the time variation is piece-wise linear (either using
- interpolation between the field at two dates or using the field and
- its first derivative with respect to time). This is the only type
- of model supported at present.
- - ByteOrder (default little), the order of bytes in the
- .wmm.cof file. Only little endian is supported at present.
- .
-Other keywords are ignored.
-
-The coefficient file NAME.wmm.cof is a binary file in little endian
-order. The first 8 bytes of this file must match the ID given in
-NAME.wmm. This is followed by NumModels + 1 sets of spherical harmonic
-coefficients. The first NumModels of these model the magnetic field at
-Epoch + \e i * DeltaEpoch for 0 ≤ \e i < NumModels. The last set of
-coefficients model the rate of change of the magnetic field at Epoch +
-(NumModels − 1) * DeltaEpoch. The format for each set of coefficients
-is:
- - \e N, the maximum degree of the sum stored as a 4-byte signed integer.
- This must satisfy \e N ≥ −1.
- - \e M, the maximum order of the sum stored as a 4-byte signed integer.
- This must satisfy \e N ≥ \e M ≥ −1.
- - \e C\e nm, the coefficients of the cosine coefficients of
- the sum in column (i.e., \e m) major order. There are (\e M + 1)
- (2\e N − \e M + 2) / 2 elements which are stored as IEEE doubles (8
- bytes). For example for \e N = \e M = 3, there are 10 coefficients
- arranged as
- C00,
- C10,
- C20,
- C30,
- C11,
- C21,
- C31,
- C22,
- C32,
- C33.
- - \e S\e nm, the coefficients of the sine coefficients of
- the sum in column (i.e., \e m) major order starting at \e m = 1.
- There are \e M (2\e N − \e M + 1) / 2 elements which are stored as
- IEEE doubles (8 bytes). For example for \e N = \e M = 3, there are 6
- coefficients arranged as
- S11,
- S21,
- S31,
- S22,
- S32,
- S33.
- .
-Although the coefficient file is in little endian order, %GeographicLib
-can read it on big endian machines. It can only be read on machines
-which store doubles in IEEE format.
-
-As an illustration, here is igrf11.wmm:
-\verbatim
-WMMF-1
-# A World Magnetic Model (Format 1) file. For documentation on the
-# format of this file see
-# http://geographiclib.sf.net/html/magnetic.html#magneticformat
-Name igrf11
-Description International Geomagnetic Reference Field 11th Generation
-URL http://ngdc.noaa.gov/IAGA/vmod/igrf.html
-Publisher National Oceanic and Atmospheric Administration
-ReleaseDate 2009-12-15
-DataCutOff 2009-10-01
-ConversionDate 2011-11-04
-DataVersion 1
-Radius 6371200
-NumModels 23
-Epoch 1900
-DeltaEpoch 5
-MinTime 1900
-MaxTime 2015
-MinHeight -1000
-MaxHeight 600000
-
-# The coefficients are stored in a file obtained by appending ".cof" to
-# the name of this file. The coefficients were obtained from IGRF11.COF
-# in the geomag70 distribution.
-ID IGRF11-A
-\endverbatim
-
-
-Back to \ref gravity. Forward to \ref geodesic. Up to \ref contents.
-
-**********************************************************************/
-/**
-\page geodesic Geodesics on an ellipsoid of revolution
-
-
-Back to \ref magnetic. Forward to \ref triaxial. Up to \ref contents.
-
-
-GeographicLib::Geodesic and GeographicLib::GeodesicLine provide accurate
-solutions to the direct and inverse geodesic problems. The
-GeodSolve utility provides an interface
-to these classes. GeographicLib::AzimuthalEquidistant implements the
-azimuthal equidistant projection in terms of geodesics.
-GeographicLib::CassiniSoldner implements a transverse cylindrical
-equidistant projection in terms of geodesics. The GeodesicProj utility provides an
-interface to these projections.
-
-The algorithms used by GeographicLib::Geodesic and
-GeographicLib::GeodesicLine are based on a Taylor expansion of the
-geodesic integrals valid when the flattening \e f is small.
-GeographicLib::GeodesicExact and GeographicLib::GeodesicLineExact
-evaluate the integrals exactly (in terms of incomplete elliptic
-integrals). For the WGS84 ellipsoid, the series solutions are about
-2--3 times faster and 2--3 times more accurate (because it's easier to
-control round-off errors with series solutions); thus
-GeographicLib::Geodesic and GeographicLib::GeodesicLine are
-recommended for most geodetic applications. However, in applications
-where the absolute value of \e f is greater than about 0.02, the exact
-classes should be used.
-
-Go to
- - \ref testgeod
- - \ref geodseries
- - \ref geodellip
- - \ref meridian
- - \ref geodshort
- .
-For some background information on geodesics on triaxial ellipsoids, see
-\ref triaxial.
-
-References
- - F. W. Bessel,
- The calculation
- of longitude and latitude from geodesic measurements (1825),
- Astron. Nachr. 331(8), 852-861 (2010);
- translated by C. F. F. Karney and R. E. Deakin. Preprint:
- arXiv:0908.1824.
- - F. R. Helmert,
-
- Mathematical and Physical Theories of Higher Geodesy, Part 1 (1880),
- Aeronautical Chart and Information Center (St. Louis, 1964),
- Chaps. 5--7.
- - J. Danielsen,
- The Area under the Geodesic,
- Survey Review 30(232), 61--66 (1989).
- - C. F. F. Karney,
-
- Algorithms for geodesics,
- J. Geodesy 87(1), 43--55 (Jan. 2013);
- DOI:
- 10.1007/s00190-012-0578-z;
- addenda:
- geod-addenda.html;
- resource page:
- geod.html.
- - A collection of some papers on geodesics is available at
- http://geographiclib.sourceforge.net/geodesic-papers/biblio.html
- - The wikipedia page,
-
- Geodesics on an ellipsoid.
-
-\section testgeod Test data for geodesics
-
-A test set a geodesics is available at
- -
- GeodTest.dat.gz
- .
-This is about 39 MB (compressed). This consists of a set of geodesics
-for the WGS84 ellipsoid. A subset of this (consisting of 1/50 of the
-members — about 690 kB, compressed) is available at
- -
- GeodTest-short.dat.gz
-
-Each line of the test set gives 10 space delimited numbers
- - latitude for point 1, \e lat1 (degrees, exact)
- - longitude for point 1, \e lon1 (degrees, always 0)
- - azimuth for point 1, \e azi1 (clockwise from north in degrees, exact)
- - latitude for point 2, \e lat2 (degrees, accurate to
- 10−18 deg)
- - longitude for point 2, \e lon2 (degrees, accurate to
- 10−18 deg)
- - azimuth for point 2, \e azi2 (degrees, accurate to
- 10−18 deg)
- - geodesic distance from point 1 to point 2, \e s12 (meters, exact)
- - arc distance on the auxiliary sphere, \e a12 (degrees, accurate to
- 10−18 deg)
- - reduced length of the geodesic, \e m12 (meters, accurate to 0.1 pm)
- - the area under the geodesic, \e S12 (m2, accurate to
- 1 mm2)
- .
-These are computed using as direct geodesic calculations with the given
-\e lat1, \e lon1, \e azi1, and \e s12. The distance \e s12 always
-corresponds to an arc length \e a12 ≤ 180°, so the given
-geodesics give the shortest paths from point 1 to point 2. For
-simplicity and without loss of generality, \e lat1 is chosen in
-[0°, 90°], \e lon1 is taken to be zero, \e azi1 is
-chosen in [0°, 180°]. Furthermore, \e lat1 and \e
-azi1 are taken to be multiples of 10−12 deg and \e s12
-is a multiple of 0.1 μm in [0 m, 20003931.4586254 m]. This results \e
-lon2 in [0°, 180°] and \e azi2 in [0°, 180°].
-
-The direct calculation uses an expansion of the geodesic equations
-accurate to f30 (approximately 1 part in 1050)
-and is computed with with
-Maxima's
-bfloats and fpprec set to 100 (so the errors in the data are probably
-1/2 of the values quoted above).
-
-The contents of the file are as follows:
- - 100000 entries randomly distributed
- - 50000 entries which are nearly antipodal
- - 50000 entries with short distances
- - 50000 entries with one end near a pole
- - 50000 entries with both ends near opposite poles
- - 50000 entries which are nearly meridional
- - 50000 entries which are nearly equatorial
- - 50000 entries running between vertices (\e azi1 = \e azi2 = 90°)
- - 50000 entries ending close to vertices
- .
-(a total of 500000 entries). The values for \e s12 for the geodesics
-running between vertices are truncated to a multiple of 0.1 pm and this
-is used to determine point 2.
-
-This data can be fed to the GeodSolve
-utility as follows
- - Direct from point 1:
-\verbatim
- gunzip -c GeodTest.dat.gz | cut -d' ' -f1,2,3,7 | ./GeodSolve
-\endverbatim
- This should yield columns 4, 5, 6, and 9 of the test set.
- - Direct from point 2:
-\verbatim
- gunzip -c GeodTest.dat.gz | cut -d' ' -f4,5,6,7 |
- sed "s/ \([^ ]*$\)/ -\1/" | ./GeodSolve
-\endverbatim
- (The sed command negates the distance.) This should yield columns 1,
- 2, and 3, and the negative of column 9 of the test set.
- - Inverse between points 1 and 2:
-\verbatim
- gunzip -c GeodTest.dat.gz | cut -d' ' -f1,2,4,5 | ./GeodSolve -i
-\endverbatim
- This should yield columns 3, 6, 7, and 9 of the test set.
- .
-Add, e.g., "-p 6", to the call to GeodSolve to change the precision of
-the output. Adding "-f" causes GeodSolve to print 12 fields specifying
-the geodesic; these include the 10 fields in the test set plus the
-geodesic scales \e M12 and \e M21 which are inserted between \e m12 and
-\e S12.
-
-Code for computing arbitrarily accurate geodesics in maxima is available
-in geodesic.mac (this depends on
- ellint.mac and uses the series computed by
- geod.mac). This solve both the direct and
-inverse geodesic problems and offers the ability to solve the problems
-either using series expansions (similar to GeographicLib::Geodesic) or
-in terms of elliptic integrals (similar to
-GeographicLib::GeodesicExact).
-
-\section geodseries Expansions for geodesics
-
-We give here the series expansions for the various geodesic integrals
-valid to order f10. In this release of the code, we
-use a 6th-order expansions. This is sufficient to maintain accuracy
-for doubles for the SRMmax ellipsoid (\e a = 6400 km, \e f = 1/150).
-However, the preprocessor macro GEOGRAPHICLIB_GEODESIC_ORDER can be
-used to select any order up to 8. (If using long doubles, with a
-64-bit fraction, the default order is 7.) The series expanded to
-order f30 are given in
-geodseries30.html.
-
-In the formulas below ^ indicates exponentiation (\e f^3 =
-f3) and / indicates real division (3/5 = 0.6). The
-equations need to be converted to Horner form, but are here left in
-expanded form so that they can be easily truncated to lower order.
-These expansions were obtained using the Maxima code,
-geod.mac.
-
-In the expansions below, we have
- - \f$ \alpha \f$ is the azimuth
- - \f$ \alpha_0 \f$ is the azimuth at the equator crossing
- - \f$ \lambda \f$ is the longitude measured from the equator crossing
- - \f$ \sigma \f$ is the spherical arc length
- - \f$ \omega = \tan^{-1}(\sin\alpha_0\tan\sigma) \f$ is the spherical longitude
- - \f$ a \f$ is the equatorial radius
- - \f$ b \f$ is the polar semi-axis
- - \f$ f \f$ is the flattening
- - \f$ e^2 = f(2 - f) \f$
- - \f$ e'^2 = e^2/(1-e^2) \f$
- - \f$ k^2 = e'^2 \cos^2\alpha_0 = 4 \epsilon / (1 - \epsilon)^2 \f$
- - \f$ n = f / (2 - f) \f$
- - \f$ c^2 = a^2/2 + b^2/2 (\tanh^{-1}e)/e \f$
- - \e ep2 = \f$ e'^2 \f$
- - \e k2 = \f$ k^2 \f$
- - \e eps = \f$ \epsilon \f$
-
-The formula for distance is
-\f[
- \frac sb = I_1(\sigma)
-\f]
-where
-\f[
-\begin{aligned}
- I_1(\sigma) &= A_1\bigl(\sigma + B_1(\sigma)\bigr) \\
- B_1(\sigma) &= \sum_{j=1} C_{1j} \sin 2j\sigma
-\end{aligned}
-\f]
-and
-\verbatim
-A1 = (1 + 1/4 * eps^2
- + 1/64 * eps^4
- + 1/256 * eps^6
- + 25/16384 * eps^8
- + 49/65536 * eps^10) / (1 - eps);
-\endverbatim
-\verbatim
-C1[1] = - 1/2 * eps
- + 3/16 * eps^3
- - 1/32 * eps^5
- + 19/2048 * eps^7
- - 3/4096 * eps^9;
-C1[2] = - 1/16 * eps^2
- + 1/32 * eps^4
- - 9/2048 * eps^6
- + 7/4096 * eps^8
- + 1/65536 * eps^10;
-C1[3] = - 1/48 * eps^3
- + 3/256 * eps^5
- - 3/2048 * eps^7
- + 17/24576 * eps^9;
-C1[4] = - 5/512 * eps^4
- + 3/512 * eps^6
- - 11/16384 * eps^8
- + 3/8192 * eps^10;
-C1[5] = - 7/1280 * eps^5
- + 7/2048 * eps^7
- - 3/8192 * eps^9;
-C1[6] = - 7/2048 * eps^6
- + 9/4096 * eps^8
- - 117/524288 * eps^10;
-C1[7] = - 33/14336 * eps^7
- + 99/65536 * eps^9;
-C1[8] = - 429/262144 * eps^8
- + 143/131072 * eps^10;
-C1[9] = - 715/589824 * eps^9;
-C1[10] = - 2431/2621440 * eps^10;
-\endverbatim
-
-The function \f$ \tau(\sigma) = s/(b A_1) = \sigma + B_1(\sigma) \f$
-may be inverted by series reversion giving
-\f[
- \sigma(\tau) = \tau + \sum_{j=1} C'_{1j} \sin 2j\sigma
-\f]
-where
-\verbatim
-C1'[1] = + 1/2 * eps
- - 9/32 * eps^3
- + 205/1536 * eps^5
- - 4879/73728 * eps^7
- + 9039/327680 * eps^9;
-C1'[2] = + 5/16 * eps^2
- - 37/96 * eps^4
- + 1335/4096 * eps^6
- - 86171/368640 * eps^8
- + 4119073/28311552 * eps^10;
-C1'[3] = + 29/96 * eps^3
- - 75/128 * eps^5
- + 2901/4096 * eps^7
- - 443327/655360 * eps^9;
-C1'[4] = + 539/1536 * eps^4
- - 2391/2560 * eps^6
- + 1082857/737280 * eps^8
- - 2722891/1548288 * eps^10;
-C1'[5] = + 3467/7680 * eps^5
- - 28223/18432 * eps^7
- + 1361343/458752 * eps^9;
-C1'[6] = + 38081/61440 * eps^6
- - 733437/286720 * eps^8
- + 10820079/1835008 * eps^10;
-C1'[7] = + 459485/516096 * eps^7
- - 709743/163840 * eps^9;
-C1'[8] = + 109167851/82575360 * eps^8
- - 550835669/74317824 * eps^10;
-C1'[9] = + 83141299/41287680 * eps^9;
-C1'[10] = + 9303339907/2972712960 * eps^10;
-\endverbatim
-
-The reduced length is given by
-\f[
-\begin{aligned}
- \frac mb &= \sqrt{1 + k^2 \sin^2\sigma_2} \cos\sigma_1 \sin\sigma_2 \\
- &\quad {}-\sqrt{1 + k^2 \sin^2\sigma_1} \sin\sigma_1 \cos\sigma_2 \\
- &\quad {}-\cos\sigma_1 \cos\sigma_2 \bigl(J(\sigma_2) - J(\sigma_1)\bigr)
-\end{aligned}
-\f]
-where
-\f[
-\begin{aligned}
- J(\sigma) &= I_1(\sigma) - I_2(\sigma) \\
- I_2(\sigma) &= A_2\bigl(\sigma + B_2(\sigma)\bigr) \\
- B_2(\sigma) &= \sum_{j=1} C_{2j} \sin 2j\sigma
-\end{aligned}
-\f]
-\verbatim
-A2 = (1 + 1/4 * eps^2
- + 9/64 * eps^4
- + 25/256 * eps^6
- + 1225/16384 * eps^8
- + 3969/65536 * eps^10) * (1 - eps);
-\endverbatim
-\verbatim
-C2[1] = + 1/2 * eps
- + 1/16 * eps^3
- + 1/32 * eps^5
- + 41/2048 * eps^7
- + 59/4096 * eps^9;
-C2[2] = + 3/16 * eps^2
- + 1/32 * eps^4
- + 35/2048 * eps^6
- + 47/4096 * eps^8
- + 557/65536 * eps^10;
-C2[3] = + 5/48 * eps^3
- + 5/256 * eps^5
- + 23/2048 * eps^7
- + 191/24576 * eps^9;
-C2[4] = + 35/512 * eps^4
- + 7/512 * eps^6
- + 133/16384 * eps^8
- + 47/8192 * eps^10;
-C2[5] = + 63/1280 * eps^5
- + 21/2048 * eps^7
- + 51/8192 * eps^9;
-C2[6] = + 77/2048 * eps^6
- + 33/4096 * eps^8
- + 2607/524288 * eps^10;
-C2[7] = + 429/14336 * eps^7
- + 429/65536 * eps^9;
-C2[8] = + 6435/262144 * eps^8
- + 715/131072 * eps^10;
-C2[9] = + 12155/589824 * eps^9;
-C2[10] = + 46189/2621440 * eps^10;
-\endverbatim
-
-The longitude is given in terms of the spherical longitude by
-\f[
-\lambda = \omega - f \sin\alpha_0 I_3(\sigma)
-\f]
-where
-\f[
-\begin{aligned}
- I_3(\sigma) &= A_3\bigl(\sigma + B_3(\sigma)\bigr) \\
- B_3(\sigma) &= \sum_{j=1} C_{3j} \sin 2j\sigma
-\end{aligned}
-\f]
-and
-\verbatim
-A3 = 1 - (1/2 - 1/2*n) * eps
- - (1/4 + 1/8*n - 3/8*n^2) * eps^2
- - (1/16 + 3/16*n + 1/16*n^2 - 5/16*n^3) * eps^3
- - (3/64 + 1/32*n + 5/32*n^2 + 5/128*n^3 - 35/128*n^4) * eps^4
- - (3/128 + 5/128*n + 5/256*n^2 + 35/256*n^3 + 7/256*n^4) * eps^5
- - (5/256 + 15/1024*n + 35/1024*n^2 + 7/512*n^3) * eps^6
- - (25/2048 + 35/2048*n + 21/2048*n^2) * eps^7
- - (175/16384 + 35/4096*n) * eps^8
- - 245/32768 * eps^9;
-\endverbatim
-\verbatim
-C3[1] = + (1/4 - 1/4*n) * eps
- + (1/8 - 1/8*n^2) * eps^2
- + (3/64 + 3/64*n - 1/64*n^2 - 5/64*n^3) * eps^3
- + (5/128 + 1/64*n + 1/64*n^2 - 1/64*n^3 - 7/128*n^4) * eps^4
- + (3/128 + 11/512*n + 3/512*n^2 + 1/256*n^3 - 7/512*n^4) * eps^5
- + (21/1024 + 5/512*n + 13/1024*n^2 + 1/512*n^3) * eps^6
- + (243/16384 + 189/16384*n + 83/16384*n^2) * eps^7
- + (435/32768 + 109/16384*n) * eps^8
- + 345/32768 * eps^9;
-C3[2] = + (1/16 - 3/32*n + 1/32*n^2) * eps^2
- + (3/64 - 1/32*n - 3/64*n^2 + 1/32*n^3) * eps^3
- + (3/128 + 1/128*n - 9/256*n^2 - 3/128*n^3 + 7/256*n^4) * eps^4
- + (5/256 + 1/256*n - 1/128*n^2 - 7/256*n^3 - 3/256*n^4) * eps^5
- + (27/2048 + 69/8192*n - 39/8192*n^2 - 47/4096*n^3) * eps^6
- + (187/16384 + 39/8192*n + 31/16384*n^2) * eps^7
- + (287/32768 + 47/8192*n) * eps^8
- + 255/32768 * eps^9;
-C3[3] = + (5/192 - 3/64*n + 5/192*n^2 - 1/192*n^3) * eps^3
- + (3/128 - 5/192*n - 1/64*n^2 + 5/192*n^3 - 1/128*n^4) * eps^4
- + (7/512 - 1/384*n - 77/3072*n^2 + 5/3072*n^3 + 65/3072*n^4) * eps^5
- + (3/256 - 1/1024*n - 71/6144*n^2 - 47/3072*n^3) * eps^6
- + (139/16384 + 143/49152*n - 383/49152*n^2) * eps^7
- + (243/32768 + 95/49152*n) * eps^8
- + 581/98304 * eps^9;
-C3[4] = + (7/512 - 7/256*n + 5/256*n^2 - 7/1024*n^3 + 1/1024*n^4) * eps^4
- + (7/512 - 5/256*n - 7/2048*n^2 + 9/512*n^3 - 21/2048*n^4) * eps^5
- + (9/1024 - 43/8192*n - 129/8192*n^2 + 39/4096*n^3) * eps^6
- + (127/16384 - 23/8192*n - 165/16384*n^2) * eps^7
- + (193/32768 + 3/8192*n) * eps^8
- + 171/32768 * eps^9;
-C3[5] = + (21/2560 - 9/512*n + 15/1024*n^2 - 7/1024*n^3 + 9/5120*n^4) * eps^5
- + (9/1024 - 15/1024*n + 3/2048*n^2 + 57/5120*n^3) * eps^6
- + (99/16384 - 91/16384*n - 781/81920*n^2) * eps^7
- + (179/32768 - 55/16384*n) * eps^8
- + 141/32768 * eps^9;
-C3[6] = + (11/2048 - 99/8192*n + 275/24576*n^2 - 77/12288*n^3) * eps^6
- + (99/16384 - 275/24576*n + 55/16384*n^2) * eps^7
- + (143/32768 - 253/49152*n) * eps^8
- + 33/8192 * eps^9;
-C3[7] = + (429/114688 - 143/16384*n + 143/16384*n^2) * eps^7
- + (143/32768 - 143/16384*n) * eps^8
- + 429/131072 * eps^9;
-C3[8] = + (715/262144 - 429/65536*n) * eps^8
- + 429/131072 * eps^9;
-C3[9] = + 2431/1179648 * eps^9;
-\endverbatim
-
-The formula for area between the geodesic and the equator is given in
-Sec. 6 of
-Algorithms for geodesics in terms of \e S,
-\f[
-S = c^2 \alpha + e^2 a^2 \cos\alpha_0 \sin\alpha_0 I_4(\sigma)
-\f]
-where
-\f[
-I_4(\sigma) = \sum_{j=0} C_{4j} \cos(2j+1)\sigma
-\f]
-In the paper, this was expanded in \f$ e'^2 \f$ and \f$ k^2 \f$.
-However, the series converges faster for eccentric ellipsoids if the
-expansion is in \f$ n \f$ and \f$ \epsilon \f$. The series to order
-\f$ f^{10} \f$ becomes
-\verbatim
-C4[0] = + (2/3 - 4/15*n + 8/105*n^2 + 4/315*n^3 + 16/3465*n^4 + 20/9009*n^5 + 8/6435*n^6 + 28/36465*n^7 + 32/62985*n^8 + 4/11305*n^9)
- - (1/5 - 16/35*n + 32/105*n^2 - 16/385*n^3 - 64/15015*n^4 - 16/15015*n^5 - 32/85085*n^6 - 112/692835*n^7 - 128/1616615*n^8) * eps
- - (2/105 + 32/315*n - 1088/3465*n^2 + 1184/5005*n^3 - 128/3465*n^4 - 3232/765765*n^5 - 1856/1616615*n^6 - 6304/14549535*n^7) * eps^2
- + (11/315 - 368/3465*n - 32/6435*n^2 + 976/4095*n^3 - 154048/765765*n^4 + 368/11115*n^5 + 5216/1322685*n^6) * eps^3
- + (4/1155 + 1088/45045*n - 128/1287*n^2 + 64/3927*n^3 + 2877184/14549535*n^4 - 370112/2078505*n^5) * eps^4
- + (97/15015 - 464/45045*n + 4192/153153*n^2 - 88240/969969*n^3 + 31168/1322685*n^4) * eps^5
- + (10/9009 + 4192/765765*n - 188096/14549535*n^2 + 23392/855855*n^3) * eps^6
- + (193/85085 - 6832/2078505*n + 106976/14549535*n^2) * eps^7
- + (632/1322685 + 3456/1616615*n) * eps^8
- + 107/101745 * eps^9;
-C4[1] = + (1/45 - 16/315*n + 32/945*n^2 - 16/3465*n^3 - 64/135135*n^4 - 16/135135*n^5 - 32/765765*n^6 - 112/6235515*n^7 - 128/14549535*n^8) * eps
- - (2/105 - 64/945*n + 128/1485*n^2 - 1984/45045*n^3 + 256/45045*n^4 + 64/109395*n^5 + 128/855855*n^6 + 2368/43648605*n^7) * eps^2
- - (1/105 - 16/2079*n - 5792/135135*n^2 + 3568/45045*n^3 - 103744/2297295*n^4 + 264464/43648605*n^5 + 544/855855*n^6) * eps^3
- + (4/1155 - 2944/135135*n + 256/9009*n^2 + 17536/765765*n^3 - 3053056/43648605*n^4 + 1923968/43648605*n^5) * eps^4
- + (1/9009 + 16/19305*n - 2656/153153*n^2 + 65072/2078505*n^3 + 526912/43648605*n^4) * eps^5
- + (10/9009 - 1472/459459*n + 106112/43648605*n^2 - 204352/14549535*n^3) * eps^6
- + (349/2297295 + 28144/43648605*n - 32288/8729721*n^2) * eps^7
- + (632/1322685 - 44288/43648605*n) * eps^8
- + 43/479655 * eps^9;
-C4[2] = + (4/525 - 32/1575*n + 64/3465*n^2 - 32/5005*n^3 + 128/225225*n^4 + 32/765765*n^5 + 64/8083075*n^6 + 32/14549535*n^7) * eps^2
- - (8/1575 - 128/5775*n + 256/6825*n^2 - 6784/225225*n^3 + 4608/425425*n^4 - 128/124355*n^5 - 5888/72747675*n^6) * eps^3
- - (8/1925 - 1856/225225*n - 128/17325*n^2 + 42176/1276275*n^3 - 2434816/72747675*n^4 + 195136/14549535*n^5) * eps^4
- + (8/10725 - 128/17325*n + 64256/3828825*n^2 - 128/25935*n^3 - 266752/10392525*n^4) * eps^5
- - (4/25025 + 928/3828825*n + 292288/72747675*n^2 - 106528/6613425*n^3) * eps^6
- + (464/1276275 - 17152/10392525*n + 83456/72747675*n^2) * eps^7
- + (1168/72747675 + 128/1865325*n) * eps^8
- + 208/1119195 * eps^9;
-C4[3] = + (8/2205 - 256/24255*n + 512/45045*n^2 - 256/45045*n^3 + 1024/765765*n^4 - 256/2909907*n^5 - 512/101846745*n^6) * eps^3
- - (16/8085 - 1024/105105*n + 2048/105105*n^2 - 1024/51051*n^3 + 4096/373065*n^4 - 1024/357357*n^5) * eps^4
- - (136/63063 - 256/45045*n + 512/1072071*n^2 + 494336/33948915*n^3 - 44032/1996995*n^4) * eps^5
- + (64/315315 - 16384/5360355*n + 966656/101846745*n^2 - 868352/101846745*n^3) * eps^6
- - (16/97461 + 14848/101846745*n + 74752/101846745*n^2) * eps^7
- + (5024/33948915 - 96256/101846745*n) * eps^8
- - 1744/101846745 * eps^9;
-C4[4] = + (64/31185 - 512/81081*n + 1024/135135*n^2 - 512/109395*n^3 + 2048/1247103*n^4 - 2560/8729721*n^5) * eps^4
- - (128/135135 - 2048/405405*n + 77824/6891885*n^2 - 198656/14549535*n^3 + 8192/855855*n^4) * eps^5
- - (512/405405 - 2048/530145*n + 299008/130945815*n^2 + 280576/43648605*n^3) * eps^6
- + (128/2297295 - 2048/1438965*n + 241664/43648605*n^2) * eps^7
- - (17536/130945815 + 1024/43648605*n) * eps^8
- + 2944/43648605 * eps^9;
-C4[5] = + (128/99099 - 2048/495495*n + 4096/765765*n^2 - 6144/1616615*n^3 + 8192/4849845*n^4) * eps^5
- - (256/495495 - 8192/2807805*n + 376832/53348295*n^2 - 8192/855855*n^3) * eps^6
- - (6784/8423415 - 432128/160044885*n + 397312/160044885*n^2) * eps^7
- + (512/53348295 - 16384/22863555*n) * eps^8
- - 16768/160044885 * eps^9;
-C4[6] = + (512/585585 - 4096/1422135*n + 8192/2078505*n^2 - 4096/1322685*n^3) * eps^6
- - (1024/3318315 - 16384/9006855*n + 98304/21015995*n^2) * eps^7
- - (103424/189143955 - 8192/4203199*n) * eps^8
- - 1024/189143955 * eps^9;
-C4[7] = + (1024/1640925 - 65536/31177575*n + 131072/43648605*n^2) * eps^7
- - (2048/10392525 - 262144/218243025*n) * eps^8
- - 84992/218243025 * eps^9;
-C4[8] = + (16384/35334585 - 131072/82447365*n) * eps^8
- - 32768/247342095 * eps^9;
-C4[9] = + 32768/92147055 * eps^9;
-\endverbatim
-
-\section geodellip Geodesics in terms of elliptic integrals
-
-GeographicLib::GeodesicExact and GeographicLib::GeodesicLineExact solve
-the geodesic problem using elliptic integrals. The formulation of
-geodesic in terms of incomplete elliptic integrals is given in
- - C. F. F. Karney,
- Geodesics
- on an ellipsoid of revolution,
- Feb. 2011; preprint
- arxiv:1102.1215v1.
- .
-It is most convenient to use the form derived for a prolate ellipsoid in
-Appendix D. For an oblate ellipsoid this results in elliptic integrals
-with an imaginary modulus. However, the integrals themselves are real
-and the algorithms used to compute the elliptic integrals handles the
-case of an imaginary modulus using real arithmetic.
-
-The key relations used by %GeographicLib are
-\f[
- \begin{aligned}
- \frac sb &= E(\sigma, ik), \\
- \lambda &= (1 - f) \sin\alpha_0 G(\sigma, \cos^2\alpha_0, ik) \\
- &= \chi
- - \frac{e'^2}{\sqrt{1+e'^2}}\sin\alpha_0 H(\sigma, -e'^2, ik), \\
- J(\sigma) &= k^2 D(\sigma, ik),
- \end{aligned}
-\f]
-where \f$ \chi \f$ is a modified spherical longitude given by
-\f[
-\tan\chi = \sqrt{\frac{1+e'^2}{1+k^2\sin^2\sigma}}\tan\omega,
-\f]
-and
-\f[
- \begin{aligned}
- D(\phi,k) &= \int_0^\phi
- \frac{\sin^2\theta}{\sqrt{1 - k^2\sin^2\theta}}\,d\theta\\
- &=\frac{F(\phi, k) - E(\phi, k)}{k^2},\\
- G(\phi,\alpha^2,k) &= \int_0^\phi
- \frac{\sqrt{1 - k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta\\
- &=\frac{k^2}{\alpha^2}F(\phi, k)
- +\biggl(1-\frac{k^2}{\alpha^2}\biggr)\Pi(\phi, \alpha^2, k),\\
- H(\phi, \alpha^2, k)
- &= \int_0^\phi
- \frac{\cos^2\theta}{(1-\alpha^2\sin^2\theta)\sqrt{1-k^2\sin^2\theta}}
- \,d\theta \\
- &=
- \frac1{\alpha^2} F(\phi, k) +
- \biggl(1 - \frac1{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k),
- \end{aligned}
-\f]
-and \f$F(\phi, k)\f$, \f$E(\phi, k)\f$, \f$D(\phi, k)\f$, and
-\f$\Pi(\phi, \alpha^2, k)\f$, are incomplete elliptic integrals (see
-http://dlmf.nist.gov/19.2.ii). The formula for \f$ s \f$ and the
-first expression for \f$ \lambda \f$ are given by Legendre (1811) and
-are the most common representation of geodesics in terms of elliptic
-integrals. The second (equivalent) expression for \f$ \lambda \f$,
-which was given by Cayley (1870), is useful in that the elliptic
-integral is relegated to a small correction term. This form allows
-the longitude to be computed more accurately and is used in
-%GeographicLib. (The equivalence of the two expressions for \f$
-\lambda \f$ follows from http://dlmf.nist.gov/19.7.E8.)
-
-Nominally, GeographicLib::GeodesicExact and
-GeographicLib::GeodesicLineExact will give "exact" results for any value
-of the flattening. However, the geographic latitude is a distorted
-measure of distance from the equator with very eccentric ellipsoids and
-this introducing an irreducible representational error in the algorithms
-in this case. It is therefore recommended to restrict the use of these
-classes to \e b/\e a ∈ [0.01, 100] or \e f ∈ [-99, 0.99].
-Note that GeographicLib::GeodesicExact still uses a series expansion for
-the area \e S12. However the series is taken out to 30th order and
-gives accurate results for \e b/\e a ∈ [1/2, 2]; the accuracy is
-about 8 decimal digits for \e b/\e a ∈ [1/4, 4]. Additional work
-planned for this aspect of the geodesic problem:
-- formulate the area integral \e S12 in terms of elliptic integrals;
-- generate accurate test geodesics for highly eccentric ellipsoids so
- that the roundoff errors can be quantified.
-
-Thomas (1952) and Rollins (2010) use a different independent variable
-for geodesics, \f$\theta\f$ instead of \f$\sigma\f$, where \f$
-\tan\theta = \sqrt{1 + k^2} \tan\sigma \f$. The corresponding
-expressions for \f$ s \f$ and \f$ \lambda \f$ are given here for
-completeness:
-\f[
-\begin{aligned}
-\frac sb &= \sqrt{1-k'^2} \Pi(\theta, k'^2, k'), \\
-\lambda &= (1-f) \sqrt{1-k'^2} \sin\alpha_0 \Pi(\theta, k'^2/e^2, k'),
-\end{aligned}
-\f]
-where \f$ k' = k/\sqrt{1 + k^2} \f$. The expression for \f$ s \f$
-can be written in terms of elliptic integrals of the second kind and
-Cayley's technique can be used to subtract out the leading order
-behavior of \f$ \lambda \f$ to give
-\f[
-\begin{aligned}
-\frac sb &=\frac1{\sqrt{1-k'^2}}
- \biggl( E(\theta, k') -
- \frac{k'^2 \sin\theta \cos\theta}{\sqrt{1-k'^2\sin^2\theta}} \biggr), \\
-\lambda &= \psi + (1-f) \sqrt{1-k'^2} \sin\alpha_0
-\bigl( F(\theta, k') - \Pi(\theta, e^2, k') \bigr),
-\end{aligned}
-\f]
-where
-\f[
-\begin{aligned}
-\tan\psi &= \sqrt{\frac{1+k^2\sin^2\sigma}{1+e'^2}}\tan\omega \\
- &= \sqrt{\frac{1-e^2}{1+k^2\cos^2\theta}}\sin\alpha_0\tan\theta.
-\end{aligned}
-\f]
-The tangents of the three "longitude-like" angles are in geometric
-progression, \f$ \tan\chi/\tan\omega = \tan\omega/\tan\psi \f$.
-
-\section meridian Parameters for the meridian
-
-The formulas for \f$ s \f$ given in the previous section are the same as
-those for the distance along a meridian for an ellipsoid with equatorial
-radius \f$ a \sqrt{1 - e^2 \sin^2\alpha_0} \f$ and polar semi-axis \f$ b
-\f$. Here is a list of possible ways of expressing the meridian
-distance in terms of elliptic integrals using the notation:
-- \f$ a \f$, equatorial axis,
-- \f$ b \f$, polar axis,
-- \f$ e = \sqrt{(a^2 - b^2)/a^2} \f$, eccentricity,
-- \f$ e' = \sqrt{(a^2 - b^2)/b^2} \f$, second eccentricity,
-- \f$ \phi = \mathrm{am}(u, e) \f$, the geographic latitude,
-- \f$ \phi' = \mathrm{am}(v', ie') = \pi/2 - \phi \f$,
- the geographic colatitude,
-- \f$ \beta = \mathrm{am}(v, ie') \f$, the parametric latitude
- (\f$ \tan^2\beta = (1 - e^2) \tan^2\phi \f$),
-- \f$ \beta' = \mathrm{am}(u', e) = \pi/2 - \beta \f$,
- the parametric colatitude,
-- \f$ M \f$, the length of a quarter meridian (equator to pole),
-- \f$ y \f$, the distance along the meridian (measured from the equator).
-- \f$ y' = M -y \f$, the distance along the meridian (measured from the pole).
-.
-The eccentricities \f$ (e, e') \f$ are real (resp. imaginary) for
-oblate (resp. prolate) ellipsoids. The elliptic variables \f$(u,
-u')\f$ and \f$(v, v')\f$ are defined by
-- \f$ u = F(\phi, e) ,\quad u' = F(\beta', e) \f$
-- \f$ v = F(\beta, ie') ,\quad v' = F(\phi', ie') \f$,
-.
-and are linearly related by
-- \f$ u + u' = K(e) ,\quad v + v' = K(ie') \f$
-- \f$ v = \sqrt{1-e^2} u ,\quad u = \sqrt{1+e'^2} v \f$.
-.
-The cartesian coordinates for the meridian \f$ (x, y) \f$ are given by
-\f[
-\begin{aligned}
- x &= a \cos\beta = a \cos\phi / \sqrt{1 - e^2 \sin^2\phi} \\
- &= a \sin\beta' = (a^2/b) \sin\phi' / \sqrt{1 + e'^2 \sin^2\phi'} \\
- &= a \,\mathrm{cn}(v, ie) = a \,\mathrm{cd}(u, e) \\
- &= a \,\mathrm{sn}(u', e) = (a^2/b) \,\mathrm{sd}(v', ie'),
-\end{aligned}
-\f]
-\f[
-\begin{aligned}
- z &= b \sin\beta = (b^2/a) \sin\phi / \sqrt{1 - e^2 \sin^2\phi} \\
- &= b \cos\beta' = b \cos\phi' / \sqrt{1 + e'^2 \sin^2\phi'} \\
- &= b \,\mathrm{sn}(v, ie) = (b^2/a) \,\mathrm{sd}(u, e) \\
- &= b \,\mathrm{cn}(u', e) = b \,\mathrm{cd}(v', ie').
-\end{aligned}
-\f]
-The distance along the meridian can be expressed variously as
-\f[
-\begin{aligned}
- y &= b \int \sqrt{1 + e'^2 \sin^2\beta}\, d\beta
- = b E(\beta, ie') \\
- &= \frac{b^2}a \int \frac1{(1 - e^2 \sin^2\phi)^{3/2}}\, d\phi
- = \frac{b^2}a \Pi(\phi, e^2, e) \\
- &= a \biggl(E(\phi, e) -
- \frac{e^2\sin\phi \cos\phi}{\sqrt{1 - e^2\sin^2\phi}}\biggr) \\
- &= b \int \mathrm{dn}^2(v, ie')\, dv
- = \frac{b^2}a \int \mathrm{nd}^2(u, e)\, du
- = \cal E(v, ie'),
-\end{aligned}
-\f]
-\f[
-\begin{aligned}
- y' &= a \int \sqrt{1 - e^2 \sin^2\beta'}\, d\beta'
- = a E(\beta', e) \\
- &= \frac{a^2}b \int \frac1{(1 + e'^2 \sin^2\phi')^{3/2}}\, d\phi'
- = \frac{a^2}b \Pi(\phi', -e'^2, ie') \\
- &= b \biggl(E(\phi', ie') +
- \frac{e'^2\sin\phi' \cos\phi'}{\sqrt{1 + e'^2\sin^2\phi'}}\biggr) \\
- &= a \int \mathrm{dn}^2(u', e)\, du'
- = \frac{a^2}b \int \mathrm{nd}^2(v', ie')\, dv'
- = \cal E(u', e),
-\end{aligned}
-\f]
-with the quarter meridian distance given by
-\f[
- M = aE(e) = bE(ie') = (b^2/a)\Pi(e^2,e) = (a^2/b)\Pi(-e'^2,ie').
-\f]
-(Here \f$ E, F, \Pi \f$ are elliptic integrals defined in
-http://dlmf.nist.gov/19.2.ii. \f$ \cal E, \mathrm{am}, \mathrm{sn},
-\mathrm{cn}, \mathrm{sd}, \mathrm{cd}, \mathrm{dn}, \mathrm{nd} \f$ are
-Jacobi elliptic functions defined in http://dlmf.nist.gov/22.2 and
-http://dlmf.nist.gov/22.16.)
-
-There are several considerations in the choice of independent variable
-for evaluate the meridian distance
-- The use of an imaginary modulus (namely, \f$ ie' \f$, above) is of no
- practical concern. The integrals are real in this case and modern
- methods (%GeographicLib uses the method given in
- http://dlmf.nist.gov/19.36.i) for computing integrals handles this
- case using just real arithmetic.
-- If the "natural" origin is the equator, choose one of \f$ \phi, \beta,
- u, v \f$ (this might be preferred in geodesy). If it's the pole,
- choose one of the complementary quantities \f$ \phi', \beta', u', v'
- \f$ (this might be preferred by mathematicians).
-- Applying these formulas to the geodesic problems, \f$ \beta \f$
- becomes the arc length, \f$ \sigma \f$, on the auxiliary sphere. This
- is the traditional method of solution used by Legendre (1806), Oriani
- (1806), Bessel (1825), Helmert (1880), Rainsford (1955), Thomas
- (1970), Vincenty (1975), Rapp (1993), and so on. Many of the
- solutions in terms of elliptic functions use one of the elliptic
- variables (\f$ u \f$ or \f$ v \f$), see, for example, Jacobi (1855),
- Halphen (1888), Forsyth (1896). In the context of geodesics \f$
- \phi \f$ becomes Thomas' variable \f$ \theta \f$; this is used by
- Thomas (1952) and Rollins (2010) in their formulation of the
- geodesic problem (see the previous section).
-- For highly eccentric ellipsoids the variation of the meridian with
- respect to \f$ \beta \f$ is considerably "better behaved" than other
- choices (see the figure below). The choice of \f$ \phi \f$ is
- probably a poor one in this case.
-.
-%GeographicLib uses the geodesic generalization of
-\f$ y = b E(\beta, ie') \f$, namely \f$ s = b E(\sigma, ik) \f$. See
-\ref geodellip.
-
-\image html meridian-measures.png "Comparison of meridian measures"
-
-\section geodshort Short geodesics
-
-Here we describe Bowring's method for solving the inverse geodesic
-problem in the limit of short geodesics and contrast it with the great
-circle solution using Bessel's auxiliary sphere. References:
- - B. R. Bowring, The Direct and Inverse Problems for Short Geodesic
- Lines on the Ellipsoid, Surveying and Mapping 41(2), 135--141 (1981).
- - R. H. Rapp,
-
- Geometric Geodesy, Part I, Ohio State Univ. (1991), Sec. 6.5.
-
-Bowring considers the conformal mapping of the ellipsoid to a sphere of
-radius \f$ R \f$ such that circles of latitude and meridians are
-preserved (and hence the azimuth of a line is preserved). Let \f$
-(\phi, \lambda) \f$ and \f$ (\phi', \lambda') \f$ be the latitude and
-longitude on the ellipsoid and sphere respectively. Define isometric
-latitudes for the sphere and the ellipsoid as
-\f[
-\begin{aligned}
- \psi' &= \sinh^{-1} \tan \phi', \\
- \psi &= \sinh^{-1} \tan \phi - e \tanh^{-1}(e \sin\phi).
-\end{aligned}
-\f]
-The most general conformal mapping satisfying Bowring's conditions is
-\f[
-\psi' = A \psi + K, \quad \lambda' = A \lambda,
-\f]
-where \f$ A \f$ and \f$ K \f$ are constants. (In fact a constant can be
-added to the equation for \f$ \lambda' \f$, but this does affect the
-analysis.) The scale of this mapping is
-\f[
-m(\phi) = \frac{AR}{\nu}\frac{\cos\phi'}{\cos\phi},
-\f]
-where \f$ \nu = a/\sqrt{1 - e^2\sin^2\phi} \f$ is the transverse radius
-of curvature. (Note that in Bowring's Eq. (10), \f$ \phi \f$ should be
-replaced by \f$ \phi' \f$.) The mapping from the ellipsoid to the sphere
-depends on three parameters \f$ R, A, K \f$. These will be selected to
-satisfy certain conditions at some representative latitude \f$ \phi_0
-\f$. Two possible choices are given below.
-
-\subsection bowring Bowring's method
-
-Bowring (1981) requires that
-\f[
-m(\phi_0) = 1,\quad
-\left.\frac{dm(\phi)}{d\phi}\right|_{\phi=\phi_0} = 0,\quad
-\left.\frac{d^2m(\phi)}{d\phi^2}\right|_{\phi=\phi_0} = 0,
-\f]
-i.e, \f$m\approx 1\f$ in the vicinity of \f$\phi = \phi_0\f$.
-This gives
-\f[
-\begin{aligned}
-R &= \frac{\sqrt{1 + e'^2}}{B^2} a, \\
-A &= \sqrt{1 + e'^2 \cos^4\phi_0}, \\
-\tan\phi'_0 &= \frac1B \tan\phi_0,
-\end{aligned}
-\f]
-where \f$ e' = e/\sqrt{1-e^2} \f$ is the second eccentricity, \f$ B =
-\sqrt{1+e'^2\cos^2\phi_0} \f$, and \f$ K \f$ is defined implicitly by
-the equation for \f$\phi'_0\f$. The radius \f$ R \f$ is the (Gaussian)
-mean radius of curvature of the ellipsoid at \f$\phi_0\f$ (so near
-\f$\phi_0\f$ the ellipsoid can be deformed to fit the sphere snugly).
-The third derivative of \f$ m \f$ is given by
-\f[
-\left.\frac{d^3m(\phi)}{d\phi^3}\right|_{\phi=\phi_0} =
-\frac{-2e'^2\sin2\phi_0}{B^4}.
-\f]
-
-The method for solving the inverse problem between two nearby points \f$
-(\phi_1, \lambda_1) \f$ and \f$ (\phi_2, \lambda_2) \f$ is as follows:
-Set \f$\phi_0 = (\phi_1 + \phi_2)/2\f$. Compute \f$ R, A, \phi'_0 \f$,
-and hence find \f$ (\phi'_1, \lambda'_1) \f$ and \f$ (\phi'_2,
-\lambda'_2) \f$. Finally, solve for the great circle on a sphere of
-radius \f$ R \f$; the resulting distance and azimuths are good
-approximations for the corresponding quantities for the ellipsoidal
-geodesic.
-
-Consistent with the accuracy of this method, we can compute
-\f$\phi'_1\f$ and \f$\phi'_2\f$ using a Taylor expansion about
-\f$\phi_0\f$. This also avoids numerical errors that arise from
-subtracting nearly equal quantities when using the equation for
-\f$\phi'\f$ directly. Write \f$\Delta \phi = \phi - \phi_0\f$ and
-\f$\Delta \phi' = \phi' - \phi'_0\f$; then we have
-\f[
-\Delta\phi' \approx
-\frac{\Delta\phi}B \biggl[1 +
-\frac{\Delta\phi}{B^2}\frac{e'^2}2
- \biggl(3\sin\phi_0\cos\phi_0 +
- \frac{\Delta\phi}{B^2}
- \bigl(B^2 - \sin^2\phi_0(2 - 3 e'^2 \cos^2\phi_0)\bigr)\biggr)\biggr],
-\f]
-where the error is \f$O(f\Delta\phi^4)\f$.
-This is essentially Bowring's method. Significant differences between
-this result, "Bowring (improved)", compared to Bowring's paper, "Bowring
-(original)", are:
- - Bowring elects to use \f$\phi_0 = \phi_1\f$. This simplifies the
- calculations somewhat but increases the error by about a factor of
- 4.
- - Bowring's expression for \f$ \Delta\phi' \f$ is only accurate in the
- limit \f$ e' \rightarrow 0 \f$.
- .
-In fact, arguably, the highest order \f$O(f\Delta\phi^3)\f$ terms should
-be dropped altogether. Their inclusion does result in a better estimate
-for the distance. However, if your goal is to generate both accurate
-distances \e and accurate azimuths, then \f$\Delta\phi\f$ needs to be
-restricted sufficiently to allow these terms to be dropped to give the
-"Bowring (truncated)" method.
-
-With highly eccentric ellipsoids, the parametric latitude \f$ \beta \f$
-is a better behaved independent variable to use. In this case, \f$
-\phi_0 \f$ is naturally defined using \f$\beta_0 = (\beta_1 +
-\beta_2)/2\f$ and in terms of \f$\Delta\beta = \beta - \beta_0\f$, we
-have
-\f[
-\Delta\phi' \approx
-\frac{\Delta\beta}{B'} \biggl[1 +
-\frac{\Delta\beta}{B'^2}\frac{e'^2}2
- \biggl(\sin\beta_0\cos\beta_0 +
- \frac{\Delta\beta}{3B'^2}
- \bigl( \cos^2\beta_0 - \sin^2\beta_0 B'^2\bigr)
-\biggr)\biggr],
-\f]
-where \f$B' = \sqrt{1+e'^2\sin^2\beta_0} = \sqrt{1+e'^2}/B\f$, and the
-error once again is \f$O(f\Delta\phi^4)\f$. This is the "Bowring
-(using \f$\beta\f$)" method.
-
-\subsection auxsphere Bessel's auxiliary sphere
-
-%GeographicLib's uses the auxiliary sphere method of Legendre, Bessel,
-and Helmert. For short geodesics, this is equivalent to picking
-\f$ R, A, K \f$ so that
-\f[
-m(\phi_0) = 1,\quad
-\left.\frac{dm(\phi)}{d\phi}\right|_{\phi=\phi_0} = 0,\quad
-\tan\phi'_0 = (1 - f) \tan\phi_0.
-\f]
-Bowring's requirement that the second derivative of \f$m\f$ vanish has
-been replaced by the last relation which states that \f$\phi'_0 =
-\beta_0\f$, the parametric latitude corresponding to \f$\phi_0\f$. This
-gives
-\f[
-\begin{aligned}
-R &= B'(1-f)a, \\
-A &= \frac1{B'(1-f)}, \\
-\left.\frac{d^2m(\phi)}{d\phi^2}\right|_{\phi=\phi_0} &=
--e^2B'^2\sin^2\phi_0.
-\end{aligned}
-\f]
-
-Similar to Bowring's method, we can compute \f$\phi'_1\f$ and
-\f$\phi'_2\f$ using a Taylor expansion about \f$\beta_0\f$. This results
-in the simple expression
-\f[
-\Delta\phi' \approx \Delta\beta,
-\f]
-where the error is \f$O(f\Delta\beta^2)\f$.
-
-\subsection shorterr Estimating the accuracy
-
-In assessing the accuracy of these methods we use two metrics:
- - The absolute error in the distance.
- - The consistency of the predicted azimuths. Imagine starting
- ellipsoidal geodesics at \f$ (\phi_1, \lambda_1) \f$ and \f$ (\phi_2,
- \lambda_2) \f$ with the predicted azimuths. What is the distance
- between them when they are extended a distance \f$ a \f$ beyond the
- second point?
- .
-(The second metric is much more stringent.) We may now compare the
-methods by asking for a bound to the length of a geodesic which ensures
-that the one or other of the errors fall below 1 mm (an "engineering"
-definition of accurate) or 1 nm (1 nanometer, about the round-off
-limit).
-
-
-
-
Maximum distance that can be used in various methods for
-computing short geodesics while keeping the errors within prescribed
-bounds
-
-
method
-
distance metric
-
azimuth metric
-
-
1 mm error
-
1 nm error
-
1 mm error
-
1 nm error
-
-
Bowring (original)
-
87 km
-
870 m
-
35 km
-
350 m
-
-
Bowring (improved)
-
180 km
-
1.8 km
-
58 km
-
580 m
-
-
Bowring (truncated)
-
52 km
-
520 m
-
52 km
-
520 m
-
-
Bowring (using \f$\beta\f$)
-
380 km
-
24 km
-
60 km
-
600 m
-
-
Bessel's aux. sphere
-
42 km
-
420 m
-
1.7 km
-
1.7 m
-
-
-
-For example, if you're only interested in measuring distances and an
-accuracy of 1 mm is sufficient, then Bowring's improved method can be
-used for distances up to 180 km. On the other hand, %GeographicLib uses
-Bessel's auxiliary sphere and we require both the distance and the
-azimuth to be accurate, so the great circle approximation can only be
-used for distances less than 1.7 m. The reason that %GeographicLib does
-not use Bowring's method is that the information necessary for auxiliary
-sphere method is already available as part of the general solution and,
-as much as possible, we allow all geodesics to be computed by the
-general method.
-
-
-Back to \ref magnetic. Forward to \ref triaxial. Up to \ref contents.
-
-**********************************************************************/
-/**
-\page triaxial Geodesics on a triaxial ellipsoid
-
-
-Back to \ref geodesic. Forward to \ref transversemercator. Up to
-\ref contents.
-
-
-Jacobi (1839) showed that the problem of geodesics on a triaxial
-ellipsoid (with 3 unequal axes) can be reduced to quadrature. Despite
-this, the detailed behavior of the geodesics is not very well known. In
-this section, I briefly give Jacobi's solution and illustrate the
-behavior of the geodesics and outline an algorithm for the solution of
-the inverse problem.
-
-See also
- - The wikipedia page,
-
- Geodesics on a triaxial ellipsoid.
-
-Go to
- - \ref triaxial-coords
- - \ref triaxial-jacobi
- - \ref triaxial-survey
- - \ref triaxial-stab
- - \ref triaxial-inverse
-
-NOTES
- -# A triaxial ellipsoid approximates the earth only slightly better
- than an ellipsoid of revolution. If you are really considering
- measuring distances on the earth using a triaxial ellipsoid, you
- should also be worrying about the shape of the geoid, which
- essentially makes the geodesic problem a hopeless mess; see, for
- example, Waters
- (2011).
- -# There is nothing new in this section. It is just an exercise in
- exploring Jacobi's solution. My interest here is in generating long
- geodesics with the correct long-time behavior. Arnold gives a
- nice qualitative description of the solution in Mathematical
- Methods of Classical Mechanics (2nd edition, Springer, 1989),
- pp. 264--266.
- -# Possible reasons this problem might, nevertheless, be of interest
- are:
- - It is the first example of a dynamical system which has a
- non-trivial constant of motion. As such, Jacobi's paper generated
- a lot of excitement and was followed by many papers elaborating
- his solution. In particular, the unstable behavior of one of the
- closed geodesics of the ellipsoid, is an early example of a system
- with a positive Lyapunov exponent (one of the essential
- ingredients for chaotic behavior in dynamical systems).
- - Knowledge of ellipsoidal coordinates (used by Jacobi) might be
- useful in other areas of geodesy.
- - Geodesics which pass through the pole on an ellipsoid of revolution
- represent a degenerate class (they are all closed and all pass
- through the opposite pole). It is of interest to see how this
- degeneracy is broken with a surface with a more general shape.
- -# My interest in this problem was piqued by Jean-Marc Baillard. I put
- him onto Jacobi's solution without having looked at it in detail
- myself; and he quickly implemented the solution for an HP-41
- calculator(!) which is posted
- here.
- -# I do not give full citations of the papers here. You can find these
- in the
-
- Online Geodesic Bibliography; this includes links to online
- versions of the papers.
- -# An alternative to exploring geodesics using Jacobi's solution is to
- integrate the equations for the geodesics directly. This is the
- approach taken by
-
- Oliver Knill and Michael Teodorescu. However it is difficult to
- ensure that the long time behavior is correctly modeled with such an
- approach.
- -# At this point, I have no plans to add the solution of triaxial
- geodesic problem to %GeographicLib.
- -# If you only want to learn about geodesics on a biaxial ellipsoid (an
- ellipsoid of revolution), then see \ref geodesic or the paper
- - C. F. F. Karney,
-
- Algorithms for geodesics,
- J. Geodesy 87(1), 43--55 (Jan. 2013);
- DOI:
- 10.1007/s00190-012-0578-z;
- addenda:
- geod-addenda.html.
-
-\section triaxial-coords Triaxial coordinate systems
-
-Consider the ellipsoid defined by
-\f[
- f = \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1,
-\f]
-where, without loss of generality, \f$ a \ge b \ge c \gt 0\f$. A
-point on the surface is specified by a latitude and longitude. The \e
-geographical latitude and longitude \f$(\phi, \lambda)\f$ are defined by
-\f[
- \frac{\nabla f}{\left| \nabla f\right|} = \left(
-\begin{array}{c} \cos\phi \cos\lambda \\ \cos\phi \sin\lambda \\ \sin\phi
-\end{array}\right).
-\f]
-The \e parametric latitude and longitude \f$(\phi', \lambda')\f$ are
-defined by
-\f[
-\begin{aligned}
- x &= a \cos\phi' \cos\lambda', \\
- y &= b \cos\phi' \sin\lambda', \\
- z &= c \sin\phi'.
-\end{aligned}
-\f]
-Jacobi employed the \e ellipsoidal latitude and longitude \f$(\beta,
-\omega)\f$ defined by
-\f[
-\begin{aligned}
- x &= a \cos\omega
- \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}
- {\sqrt{a^2 - c^2}}, \\
- y &= b \cos\beta \sin\omega, \\
- z &= c \sin\beta
- \frac{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}
- {\sqrt{a^2 - c^2}}.
-\end{aligned}
-\f]
-Grid lines of constant \f$\beta\f$ and \f$\omega\f$ are given in Fig. 1.
-
-
-
-Fig. 1
-
\n
-Fig. 1:
-The ellipsoidal grid. The blue (resp. green) lines are lines of constant
-\f$\beta\f$ (resp. \f$\omega\f$); the grid spacing is 10°. Also
-shown in red are two of the principal sections of the ellipsoid, defined
-by \f$x = 0\f$ and \f$z = 0\f$. The third principal section, \f$y =
-0\f$, is covered by the lines \f$\beta = \pm 90^\circ\f$ and \f$\omega =
-90^\circ \pm 90^\circ\f$. These lines meet at four umbilical points (two
-of which are visible in this figure) where the principal radii of
-curvature are equal. The parameters of the ellipsoid are \f$a =
-1.01\f$, \f$b = 1\f$, \f$c = 0.8\f$, and it is viewed in an orthographic
-projection from a point above \f$\phi = 40^\circ\f$, \f$\lambda =
-30^\circ\f$. These parameters were chosen to accentuate the ellipsoidal
-effects on geodesics (relative to those on the earth) while still
-allowing the connection to an ellipsoid of revolution to be made.
-
-The grid lines of the ellipsoid coordinates are "lines of curvature" on
-the ellipsoid, i.e., they are parallel to the direction of principal
-curvature (Monge, 1796). They are also intersections of the ellipsoid
-with confocal systems of hyperboloids of one and two sheets (Dupin,
-1813). Finally they are geodesic ellipses and hyperbolas defined using
-two adjacent umbilical points. For example, the lines of constant
-\f$\beta\f$ in Fig. 1 can be generated with the familiar string
-construction for ellipses with the ends of the string pinned to the two
-umbilical points.
-
-Inter-conversions between these three latitudes and longitudes and the
-cartesian coordinates are simple algebraic exercises.
-
-\section triaxial-jacobi Jacobi's solution
-
-Solving the geodesic problem for an ellipsoid of revolution is, from the
-mathematical point of view, trivial; because of symmetry, geodesics have
-a constant of the motion (analogous to the angular momentum) which was
-found by Clairaut (1733). By 1806 (with the work of Legendre, Oriani,
-et al.), there was a complete understanding of the qualitative behavior
-of geodesics on an ellipsoid of revolution.
-
-On the other hand, geodesics on a triaxial ellipsoid have no obvious
-constant of the motion and thus represented a challenging "unsolved"
-problem in the first half of the nineteenth century. Jacobi discovered
-that the geodesic equations are separable if they are expressed in
-ellipsoidal coordinates. You can get an idea of the importance Jacobi
-attached to his discovery from the
-
-letter he wrote to his friend and neighbor Bessel:
-
The day before yesterday, I reduced to quadrature the
-problem of geodesic lines on an ellipsoid with three unequal
-axes. They are the simplest formulas in the world, Abelian
-integrals, which become the well known elliptic integrals if 2 axes are
-set equal.\n
-Königsberg, 28th Dec. '38.
-
-
-On the same day he wrote a similar letter to the editor of Compte Rendus
-and his result was published in J. Crelle in (1839) with a French
-translation (from German) appearing in J. Liouville in (1841).
-
-Here is the solution, exactly as given by Jacobi
- here
-(with minor changes in notation):
-\f[
-\begin{aligned}
-\delta &= \int \frac
-{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}\,d\beta}
-{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}
- \sqrt{(b^2-c^2)\cos^2\beta - \gamma}}\\
-&\quad -
-\int \frac
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}\,d\omega}
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}
- \sqrt{(a^2-b^2)\sin^2\omega + \gamma}}
-\end{aligned}
-\f]
-As Jacobi notes "a function of the angle \f$\beta\f$ equals a
-function of the angle \f$\omega\f$. These two functions are just
-Abelian integrals..." Two constants \f$\delta\f$ and \f$\gamma\f$
-appear in the solution. Typically \f$\delta\f$ is zero if the lower
-limits of the integrals are taken to be the starting point of the geodesic
-and the direction of the geodesics is determined by \f$\gamma\f$.
-However for geodesics that start at an umbilical points, we have \f$\gamma
-= 0\f$ and \f$\delta\f$ determines the direction at the umbilical point.
-Incidentally the constant \f$\gamma\f$ may be expressed as
-\f[
-\gamma = (b^2-c^2)\cos^2\beta\sin^2\alpha-(a^2-b^2)\sin^2\omega\cos^2\alpha
-\f]
-where \f$\alpha\f$ is the angle the geodesic makes with lines of
-constant \f$\omega\f$. In the limit \f$a\rightarrow b\f$, this reduces
-to \f$\cos\beta\sin\alpha = \text{const.}\f$, the familiar Clairaut
-relation. A nice derivation of Jacobi's result is given by Darboux
-(1894)
-§§583--584 where he gives the solution found by Liouville
-(1846) for general quadratic surfaces. In this formulation, the
-distance along the geodesic, \f$s\f$, is also found using
-\f[
-\begin{aligned}
-\frac{ds}{(b^2-c^2)\cos^2\beta + (a^2-b^2)\sin^2\omega}
-&= \frac
-{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}\,d\beta}
-{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}
- \sqrt{(b^2-c^2)\cos^2\beta - \gamma}}\\
-&= \frac
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}\,d\omega}
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}
- \sqrt{(a^2-b^2)\sin^2\omega + \gamma}}
-\end{aligned}
-\f]
-An alternative expression for the distance is
-\f[
-\begin{aligned}
-ds
-&= \frac
-{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}
- \sqrt{(b^2-c^2)\cos^2\beta - \gamma}\,d\beta}
-{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}\\
-&\quad {}+ \frac
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}
- \sqrt{(a^2-b^2)\sin^2\omega + \gamma}\,d\omega}
-{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}
-\end{aligned}
-\f]
-
-Jacobi's solution is a convenient way to compute geodesics on an
-ellipsoid. Care must be taken with the signs of the square roots (which
-are determined by the initial azimuth of the geodesic). Also if
-\f$\gamma \gt 0\f$ (resp. \f$\gamma \lt 0\f$), then the \f$\beta\f$
-(resp. \f$\omega\f$) integrand diverges. The integrand can be
-transformed into a finite one by a change of variable, e.g.,
-\f$\sin\beta = \sin\sigma \sqrt{1 - \gamma/(b^2-c^2)}\f$. The resulting
-integrals are periodic, so the behavior of an arbitrarily long geodesic
-is entirely captured by tabulating the integrals over a single period.
-
-The situation is more complicated if \f$\gamma = 0\f$ (corresponding to
-umbilical geodesics). Both integrands have simple poles at the umbilical
-points. However, this behavior may be subtracted from the integrands to
-yield (for example) the sum of a term involving
-\f$\tanh^{-1}\sin\beta\f$ and a finite integral. Since both integrals
-contain similar logarithmic singularities they can be equated (thus
-fixing the ratio \f$\cos\beta/\sin\omega\f$ at the umbilical point) and
-connection formulas can be found which allow the geodesic to be followed
-through the umbilical point. The study of umbilical geodesics was of
-special interest to a group of Irish mathematicians in the 1840's and
-1850's, including Michael and William Roberts (twins!), Hart, Graves,
-and Salmon.
-
-\section triaxial-survey Survey of triaxial geodesics
-
-Before delving into the nature of geodesics on a triaxial geodesic, it
-is worth reviewing geodesics on an ellipsoid of revolution. There are
-two classes of simple closed geodesics (i.e., geodesics which close on
-themselves without intersection): the equator and all the meridians.
-All other geodesics oscillate between two equal and opposite circles of
-latitude; but after completing a full oscillation in latitude these fall
-slightly short (for an oblate ellipsoid) of completing a full circuit in
-longitude.
-
-Turning to the triaxial case, we find that there are only 3 simple
-closed geodesics, the three principal sections of the ellipsoid given by
-\f$x = 0\f$, \f$y = 0\f$, and \f$z = 0\f$. To survey the other
-geodesics, it is convenient to consider geodesics which intersect the
-middle principal section, \f$y = 0\f$, at right angles. Such geodesics
-are shown in Figs. 2--6, where I use the same ellipsoid parameters as in
-Fig. 1 and the same viewing direction. In addition, the three principal
-ellipses are shown in red in each of these figures.
-
-If the starting point is \f$\beta_1 \in (-90^\circ, 90^\circ)\f$,
-\f$\omega_1 = 0\f$, and \f$\alpha_1 = 90^\circ\f$, then the geodesic
-encircles the ellipsoid in a "circumpolar" sense. The geodesic
-oscillates north and south of the equator; on each oscillation it
-completes slightly less that a full circuit around the ellipsoid
-resulting in the geodesic filling the area bounded by the two latitude
-lines \f$\beta = \pm \beta_1\f$. Two examples are given in
-Figs. 2 and 3. Figure 2 shows practically the same behavior as for an
-oblate ellipsoid of revolution (because \f$a \approx b\f$). However, if
-the starting point is at a higher latitude (Fig. 3) the distortions
-resulting from \f$a \ne b\f$ are evident.
-
-
-
-Fig. 2
-
\n
-Fig. 2:
-Example of a circumpolar geodesic on a triaxial ellipsoid. The starting
-point of this geodesic is \f$\beta_1 = 45.1^\circ\f$, \f$\omega_1 =
-0^\circ\f$, and \f$\alpha_1 = 90^\circ\f$.
-
-
-
-Fig. 3
-
\n
-Fig. 3:
-Another example of a circumpolar geodesic on a triaxial ellipsoid. The
-starting point of this geodesic is \f$\beta_1 = 87.48^\circ\f$, \f$\omega_1 =
-0^\circ\f$, and \f$\alpha_1 = 90^\circ\f$.
-
-If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 \in
-(0^\circ, 180^\circ)\f$, and \f$\alpha_1 = 180^\circ\f$, then the geodesic
-encircles the ellipsoid in a "transpolar" sense. The geodesic
-oscillates east and west of the ellipse \f$x = 0\f$; on each oscillation
-it completes slightly more that a full circuit around the ellipsoid
-resulting in the geodesic filling the area bounded by the two longitude
-lines \f$\omega = \omega_1\f$ and \f$\omega = 180^\circ - \omega_1\f$.
-If \f$a = b\f$, all meridians are geodesics; the effect of \f$a \ne b\f$
-causes such geodesics to oscillate east and west. Two examples are
-given in Figs. 4 and 5.
-
-
-
-Fig. 4
-
\n
-Fig. 4:
-Example of a transpolar geodesic on a triaxial ellipsoid. The
-starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
-39.9^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
-
-
-
-Fig. 5
-
\n
-Fig. 5:
-Another example of a transpolar geodesic on a triaxial ellipsoid. The
-starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
-9.966^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
-
-If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
-0^\circ\f$ (an umbilical point), and \f$\alpha_1 = 135^\circ\f$ (the
-geodesic leaves the ellipse \f$y = 0\f$ at right angles), then the
-geodesic repeatedly intersects the opposite umbilical point and returns to
-its starting point. However on each circuit the angle at which it
-intersects \f$y = 0\f$ becomes closer to \f$0^\circ\f$ or
-\f$180^\circ\f$ so that asymptotically the geodesic lies on the ellipse
-\f$y = 0\f$. This is shown in Fig. 6. Note that a single geodesic does
-not fill an area on the ellipsoid.
-
-
-
-Fig. 6
-
\n
-Fig. 6:
-Example of an umbilical geodesic on a triaxial ellipsoid. The
-starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
-0^\circ\f$, and \f$\alpha_1 = 135^\circ\f$ and the geodesics is followed
-forwards and backwards until it lies close to the plane \f$y = 0\f$ in
-both directions.
-
-Umbilical geodesics enjoy several interesting properties.
- - Through any point on the ellipsoid, there are two umbilical geodesics.
- - The geodesic distance between opposite umbilical points is the same
- regardless of the initial direction of the geodesic.
- - Whereas the closed geodesics on the ellipses \f$x = 0\f$ and \f$z =
- 0\f$ are stable (an geodesic initially close to and nearly parallel to
- the ellipse remains close to the ellipse), the closed geodesic on the
- ellipse \f$y = 0\f$, which goes through all 4 umbilical points, is \e
- unstable. If it is perturbed, it will swing out of the plane \f$y =
- 0\f$ and flip around before returning to close to the plane. (This
- behavior may repeat depending on the nature of the initial
- perturbation.).
-
-\section triaxial-stab The stability of closed geodesics
-
-The stability of the three simple closed geodesics can be determined by
-examining the properties of Jacobi's solution. In particular the
-unstable behavior of umbilical geodesics was shown by Hart (1849).
-However an alternative approach is to use the equations that Gauss
-(1828) gives for a perturbed geodesic
-\f[
-\frac {d^2m}{ds^2} + Km = 0
-\f]
-where \f$m\f$ is the distance of perturbed geodesic from a reference
-geodesic and \f$K\f$ is the Gaussian curvature of the surface. If the
-reference geodesic is closed, then this is a linear homogeneous
-differential equation with periodic coefficients. In fact it's a
-special case of Hill's equation which can be treated using Floquet
-theory, see DLMF, §28.29.
-Using the notation of §3 of
- Algorithms for
-geodesics, the stability is determined by computing the reduced
-length \f$m_{12}\f$ and the geodesic scales \f$M_{12}, M_{21}\f$ over
-half the perimeter of the ellipse and determining the eigenvalues
-\f$\lambda_{1,2}\f$ of
-\f[
-{\cal M} = \left(\begin{array}{cc}
-M_{12} & m_{12}\\
--\frac{1 - M_{12}M_{21}}{m_{12}} & M_{21}
-\end{array}\right).
-\f]
-Because \f$\mathrm{det}\,{\cal M} = 1\f$, the eigenvalues are determined
-by \f$\mathrm{tr}\,{\cal M}\f$. In particular if
-\f$\left|\mathrm{tr}\,{\cal M}\right| < 2\f$, we have
-\f$\left|\lambda_{1,2}\right| = 1\f$ and the solution is stable; if
-\f$\left|\mathrm{tr}\,{\cal M}\right| > 2\f$, one of
-\f$\left|\lambda_{1,2}\right|\f$ is larger than unity and the solution
-is (exponentially) unstable. In the transition case,
-\f$\left|\mathrm{tr}\,{\cal M}\right| = 2\f$, the solution is stable
-provided that the off-diagonal elements of \f${\cal M}\f$ are zero;
-otherwise the solution is linearly unstable.
-
-The exponential instability of the geodesic on the ellipse \f$y = 0\f$
-is confirmed by this analysis and results from the resonance between the
-natural frequency of the equation for \f$m\f$ and the driving frequency
-when \f$b\f$ lies in \f$(c, a)\f$. If \f$b\f$ is equal to either of the
-other axes (and the triaxial ellipsoid degenerates to an ellipsoid of
-revolution), then the solution is linearly unstable. (For example, a
-geodesic is which is close to a meridian on an oblate ellipsoid, slowly
-moves away from that meridian.)
-
-\section triaxial-inverse The inverse problem
-
-In order to solve the inverse geodesic problem, it helps to have an
-understanding of the properties of all the geodesics emanating from a
-single point \f$(\beta_1, \omega_1)\f$.
- - If the point is an umbilical point, all the lines meet at the
- opposite umbilical point.
- - Otherwise, the first envelope of the geodesics is a 4-pointed
- astroid. The cusps of the astroid lie on either \f$\beta = -
- \beta_1\f$ or \f$\omega = \omega_1 + \pi\f$; see
- Sinclair
- (2003).
- - All geodesics intersect (or, in the case of \f$\alpha_1 = 0\f$ or
- \f$\pi\f$, touch) the line \f$\omega = \omega_1 + \pi\f$.
- - All geodesics intersect (or, in the case of \f$\alpha_1 =
- \pm\pi/2\f$, touch) the line \f$\beta = -\beta_1\f$.
- - Two geodesics with azimuths \f$\pm\alpha_1\f$ first intersect on
- \f$\omega = \omega_1 + \pi\f$ and their lengths to the point of
- intersection are equal.
- - Two geodesics with azimuths \f$\alpha_1\f$ and \f$\pi-\alpha_1\f$
- first intersect on \f$\beta = -\beta_1\f$ and their lengths to the
- point of intersection are equal.
- .
-(These assertions follow directly from the equations for the geodesics;
-some of them are somewhat surprising given the asymmetries of the
-ellipsoid.) Consider now terminating the geodesics from \f$(\beta_1,
-\omega_1)\f$ at the point where they first intersect (or touch) the line
-\f$\beta = -\beta_1\f$. To focus the discussion, take \f$\beta_1 \le
-0\f$.
- - The geodesics completely fill the portion of the ellipsoid satisfying
- \f$\beta \le -\beta_1\f$.
- - None of geodesics intersect any other geodesics.
- - Any initial portion of these geodesics is a shortest path.
- - Each geodesic intersects the line \f$\beta = \beta_2\f$, where
- \f$\beta_1 < \beta_2 < -\beta_1\f$, exactly once.
- - For a given \f$\beta_2\f$, this defines a continuous monotonic
- mapping of the circle of azimuths \f$\alpha_1\f$ to the circle of
- longitudes \f$\omega_2\f$.
- - If \f$\beta_2 = \pm \beta_1\f$, then the previous two assertions need
- to be modified similarly to the case for an ellipsoid of revolution.
-
-These properties show that the inverse problem can be solved using
-techniques similar to those employed for an ellipsoid of revolution (see
-§4 of
- Algorithms for
-geodesics).
- - If the points are opposite umbilical points, an arbitrary
- \f$\alpha_1\f$ may be chosen.
- - If the points are neighboring umbilical points, the shortest path
- lies on the ellipse \f$y = 0\f$.
- - If only one point is an umbilicial point, the azimuth at the
- non-umbilical point is found using the generalization of Clairaut's
- equation (given above) with \f$\gamma = 0\f$.
- - Treat the cases where the geodesic might follow a line of constant
- \f$\beta\f$. There are two such cases: (a) the points lie on the
- ellipse \f$z = 0\f$ on a general ellipsoid and (b) the points lie on
- an ellipse whose major axis is the \f$x\f$ axis on a prolate ellipsoid
- (\f$a = b > c\f$). Determine the reduced length \f$m_{12}\f$ for the
- geodesic which is the shorter path along the ellipse. If \f$m_{12}
- \ge 0\f$, then this is the shortest path on the ellipsoid; otherwise
- proceed to the general case (next).
- - Swap the points, if necessary, so that the first point is the one
- closest to a pole. Estimate \f$\alpha_1\f$ (by some means) and solve
- the \e hybrid problem, i.e., determine the longitude \f$\omega_2\f$
- corresponding to the first intersection of the geodesic with \f$\beta
- = \beta_2\f$. Adjust \f$\alpha_1\f$ so that the value of
- \f$\omega_2\f$ matches the given \f$\omega_2\f$ (there is a single
- root). If a sufficiently close solution can be found, Newton's
- method can be employed since the necessary derivative can be
- expressed in terms of the reduced length \f$m_{12}\f$.
-
-The shortest path found by this method is unique unless:
- - The length of the geodesic vanishes \f$s_{12}=0\f$, in which case any
- constant can be added to the azimuths.
- - The points are opposite umbilical points. In this case,
- \f$\alpha_1\f$ can take on any value and \f$\alpha_2\f$ needs to be
- adjusted to maintain the value of \f$\tan\alpha_1 / \tan\alpha_2\f$.
- Note that \f$\alpha\f$ increases by \f$\pm 90^\circ\f$ as the
- geodesic passes through an umbilical point, depending on whether the
- geodesic is considered as passing to the right or left of the point.
- Here \f$\alpha_2\f$ is the \e forward azimuth at the second umbilical
- point, i.e., its azimuth immediately \e after passage through the
- umbilical point.
- - \f$\beta_1 + \beta_2 = 0\f$ and \f$\cos\alpha_1\f$ and
- \f$\cos\alpha_2\f$ have opposite signs. In this case, there another
- shortest geodesic with azimuths \f$\pi - \alpha_1\f$ and
- \f$\pi - \alpha_2\f$.
-
-
-Back to \ref geodesic. Forward to \ref transversemercator. Up to
-\ref contents.
-
-Back to \ref triaxial. Forward to \ref geocentric. Up to \ref contents.
-
-
-GeographicLib::TransverseMercator and
-GeographicLib::TransverseMercatorExact provide accurate implementations
-of the transverse Mercator projection. The
- TransverseMercatorProj
-utility provides an interface to these classes.
-
-Go to
- - \ref testmerc
- - \ref tmseries
- - \ref tmfigures
-
-References
- - L. Krüger,
- Konforme
- Abbildung des Erdellipsoids in der Ebene (Conformal mapping of
- the ellipsoidal earth to the plane), Royal Prussian Geodetic Institute,
- New Series 52, 172 pp. (1912).
- - L. P. Lee,
- Conformal Projections Based on Elliptic Functions,
- (B. V. Gutsell, Toronto, 1976), 128pp.,
- ISBN: 0919870163
- (Also appeared as:
- Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
- Part V, pp. 67--101,
- Conformal
- Projections Based On Jacobian Elliptic Functions.
- - C. F. F. Karney,
-
- Transverse Mercator with an accuracy of a few nanometers,
- J. Geodesy 85(8), 475--485 (Aug. 2011);
- preprint:
- arXiv:1002.1417;
- resource page:
- tm.html.
- .
-The algorithm for GeographicLib::TransverseMercator is based on
-Krüger (1912); that for GeographicLib::TransverseMercatorExact is
-based on Lee (1976).
-
-See tm-grid.kmz, for an
-illustration of the exact transverse Mercator grid in Google Earth.
-
-\section testmerc Test data for the transverse Mercator projection
-
-A test set for the transverse Mercator projection is available at
- -
- TMcoords.dat.gz
- .
-This is about 17 MB (compressed). This test set consists of a set of
-geographic coordinates together with the corresponding transverse
-Mercator coordinates. The WGS84 ellipsoid is used, with central
-meridian 0°, central scale factor 0.9996 (the UTM value),
-false easting = false northing = 0 m.
-
-Each line of the test set gives 6 space delimited numbers
- - latitude (degrees, exact)
- - longitude (degrees, exact — see below)
- - easting (meters, accurate to 0.1 pm)
- - northing (meters, accurate to 0.1 pm)
- - meridian convergence (degrees, accurate to 10−18 deg)
- - scale (accurate to 10−20)
- .
-The latitude and longitude are all multiples of 10−12
-deg and should be regarded as exact, except that longitude =
-82.63627282416406551 should be interpreted as exactly 90 (1 - \e e)
-degrees. These results are computed using Lee's formulas with
-Maxima's
-bfloats and fpprec set to 80 (so the errors in the data are probably 1/2
-of the values quoted above). The Maxima code,
-tm.mac and ellint.mac,
-was used to prepare this data set is included in the distribution; you
-will need to have Maxima installed to use this code. The comments at
-the top of tm.mac illustrate how to run it.
-
-The contents of the file are as follows:
- - 250000 entries randomly distributed in lat in [0°, 90°], lon
- in [0°, 90°];
- - 1000 entries randomly distributed on lat in [0°, 90°], lon =
- 0°;
- - 1000 entries randomly distributed on lat = 0°, lon in [0°,
- 90°];
- - 1000 entries randomly distributed on lat in [0°, 90°], lon =
- 90°;
- - 1000 entries close to lat = 90° with lon in [0°, 90°];
- - 1000 entries close to lat = 0°, lon = 0° with lat ≥
- 0°, lon ≥ 0°;
- - 1000 entries close to lat = 0°, lon = 90° with lat ≥
- 0°, lon ≤ 90°;
- - 2000 entries close to lat = 0°, lon = 90° (1 − \e e)
- with lat ≥ 0°;
- - 25000 entries randomly distributed in lat in [−89°,
- 0°], lon in [90° (1 − \e e), 90°];
- - 1000 entries randomly distributed on lat in [−89°, 0°],
- lon = 90°;
- - 1000 entries randomly distributed on lat in [−89°, 0°],
- lon = 90° (1 − \e e);
- - 1000 entries close to lat = 0°, lon = 90° (lat < 0°, lon
- ≤ 90°);
- - 1000 entries close to lat = 0°, lon = 90° (1 − \e e)
- (lat < 0°, lon ≤ 90° (1 − \e e));
- .
-(a total of 287000 entries). The entries for lat < 0° and
-lon in [90° (1 − \e e), 90°] use the "extended"
-domain for the transverse Mercator projection explained in Sec. 5 of
-arXiv:1002.1417. The first
-258000 entries have lat ≥ 0° and are suitable for testing
-implementations following the standard convention.
-
-\section tmseries Series approximation for transverse Mercator
-
-Krüger (1912) gives a 4th-order approximation to the transverse
-Mercator projection. This is accurate to about 200 nm (200
-nanometers) within the UTM domain. Here we present the series
-extended to 10th order. By default, GeographicLib::TransverseMercator
-uses the 6th-order approximation. The preprocessor macro
-GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER can be used to select an order
-from 4 thru 8. The series expanded to order n30 are
-given in tmseries30.html.
-
-In the formulas below ^ indicates exponentiation (\e n^3 = \e n*\e n*\e
-n) and / indicates real division (3/5 = 0.6). The equations need to be
-converted to Horner form, but are here left in expanded form so that
-they can be easily truncated to lower order in \e n. Some of the
-integers here are not representable as 32-bit integers and will need to
-be included as double literals.
-
-\e A in Krüger, p. 12, eq. (5)
-\verbatim
- A = a/(n + 1) * (1 + 1/4 * n^2
- + 1/64 * n^4
- + 1/256 * n^6
- + 25/16384 * n^8
- + 49/65536 * n^10);
-\endverbatim
-
-γ in Krüger, p. 21, eq. (41)
-\verbatim
-alpha[1] = 1/2 * n
- - 2/3 * n^2
- + 5/16 * n^3
- + 41/180 * n^4
- - 127/288 * n^5
- + 7891/37800 * n^6
- + 72161/387072 * n^7
- - 18975107/50803200 * n^8
- + 60193001/290304000 * n^9
- + 134592031/1026432000 * n^10;
-alpha[2] = 13/48 * n^2
- - 3/5 * n^3
- + 557/1440 * n^4
- + 281/630 * n^5
- - 1983433/1935360 * n^6
- + 13769/28800 * n^7
- + 148003883/174182400 * n^8
- - 705286231/465696000 * n^9
- + 1703267974087/3218890752000 * n^10;
-alpha[3] = 61/240 * n^3
- - 103/140 * n^4
- + 15061/26880 * n^5
- + 167603/181440 * n^6
- - 67102379/29030400 * n^7
- + 79682431/79833600 * n^8
- + 6304945039/2128896000 * n^9
- - 6601904925257/1307674368000 * n^10;
-alpha[4] = 49561/161280 * n^4
- - 179/168 * n^5
- + 6601661/7257600 * n^6
- + 97445/49896 * n^7
- - 40176129013/7664025600 * n^8
- + 138471097/66528000 * n^9
- + 48087451385201/5230697472000 * n^10;
-alpha[5] = 34729/80640 * n^5
- - 3418889/1995840 * n^6
- + 14644087/9123840 * n^7
- + 2605413599/622702080 * n^8
- - 31015475399/2583060480 * n^9
- + 5820486440369/1307674368000 * n^10;
-alpha[6] = 212378941/319334400 * n^6
- - 30705481/10378368 * n^7
- + 175214326799/58118860800 * n^8
- + 870492877/96096000 * n^9
- - 1328004581729009/47823519744000 * n^10;
-alpha[7] = 1522256789/1383782400 * n^7
- - 16759934899/3113510400 * n^8
- + 1315149374443/221405184000 * n^9
- + 71809987837451/3629463552000 * n^10;
-alpha[8] = 1424729850961/743921418240 * n^8
- - 256783708069/25204608000 * n^9
- + 2468749292989891/203249958912000 * n^10;
-alpha[9] = 21091646195357/6080126976000 * n^9
- - 67196182138355857/3379030566912000 * n^10;
-alpha[10]= 77911515623232821/12014330904576000 * n^10;
-\endverbatim
-
-β in Krüger, p. 18, eq. (26*)
-\verbatim
- beta[1] = 1/2 * n
- - 2/3 * n^2
- + 37/96 * n^3
- - 1/360 * n^4
- - 81/512 * n^5
- + 96199/604800 * n^6
- - 5406467/38707200 * n^7
- + 7944359/67737600 * n^8
- - 7378753979/97542144000 * n^9
- + 25123531261/804722688000 * n^10;
- beta[2] = 1/48 * n^2
- + 1/15 * n^3
- - 437/1440 * n^4
- + 46/105 * n^5
- - 1118711/3870720 * n^6
- + 51841/1209600 * n^7
- + 24749483/348364800 * n^8
- - 115295683/1397088000 * n^9
- + 5487737251099/51502252032000 * n^10;
- beta[3] = 17/480 * n^3
- - 37/840 * n^4
- - 209/4480 * n^5
- + 5569/90720 * n^6
- + 9261899/58060800 * n^7
- - 6457463/17740800 * n^8
- + 2473691167/9289728000 * n^9
- - 852549456029/20922789888000 * n^10;
- beta[4] = 4397/161280 * n^4
- - 11/504 * n^5
- - 830251/7257600 * n^6
- + 466511/2494800 * n^7
- + 324154477/7664025600 * n^8
- - 937932223/3891888000 * n^9
- - 89112264211/5230697472000 * n^10;
- beta[5] = 4583/161280 * n^5
- - 108847/3991680 * n^6
- - 8005831/63866880 * n^7
- + 22894433/124540416 * n^8
- + 112731569449/557941063680 * n^9
- - 5391039814733/10461394944000 * n^10;
- beta[6] = 20648693/638668800 * n^6
- - 16363163/518918400 * n^7
- - 2204645983/12915302400 * n^8
- + 4543317553/18162144000 * n^9
- + 54894890298749/167382319104000 * n^10;
- beta[7] = 219941297/5535129600 * n^7
- - 497323811/12454041600 * n^8
- - 79431132943/332107776000 * n^9
- + 4346429528407/12703122432000 * n^10;
- beta[8] = 191773887257/3719607091200 * n^8
- - 17822319343/336825216000 * n^9
- - 497155444501631/1422749712384000 * n^10;
- beta[9] = 11025641854267/158083301376000 * n^9
- - 492293158444691/6758061133824000 * n^10;
- beta[10]= 7028504530429621/72085985427456000 * n^10;
-\endverbatim
-
-The high-order expansions for α and β were produced by the
-Maxima program tmseries.mac (included in the
-distribution). To run, start Maxima and enter
-\verbatim
- load("tmseries.mac")$
-\endverbatim
-Further instructions are included at the top of the file.
-
-\section tmfigures Figures from paper on transverse Mercator projection
-
-This section gives color versions of the figures in
- - C. F. F. Karney,
-
- Transverse Mercator with an accuracy of a few nanometers,
- J. Geodesy 85(8), 475--485 (Aug. 2011);
- preprint:
- arXiv:1002.1417;
- resource page:
- tm.html.
-
-\b NOTE:
-The numbering of the figures matches that in the paper cited above. The
-figures in this section are relatively small in order to allow them to
-be displayed quickly. Vector versions of these figures are available in
- tm-figs.pdf. This allows you to magnify the
-figures to show the details more clearly.
-
-\image html gauss-schreiber-graticule-a.png "Fig. 1(a)"
-Fig. 1(a):
-The graticule for the spherical transverse Mercator projection.
-The equator lies on \e y = 0.
-Compare this with Lee, Fig. 1 (right), which shows the graticule for
-half a sphere, but note that in his notation \e x and \e y have switched
-meanings. The graticule for the ellipsoid differs from that for a
-sphere only in that the latitude lines have shifted slightly. (The
-conformal transformation from an ellipsoid to a sphere merely relabels
-the lines of latitude.) This projection places the point latitude =
-0°, longitude = 90° at infinity.
-
-\image html gauss-krueger-graticule-a.png "Fig. 1(b)"
-Fig. 1(b):
-The graticule for the Gauss-Krüger transverse Mercator projection.
-The equator lies on \e y = 0 for longitude < 81°; beyond
-this, it arcs up to meet \e y = 1. Compare this with Lee, Fig. 45
-(upper), which shows the graticule for the International Ellipsoid. Lee,
-Fig. 46, shows the graticule for the entire ellipsoid. This projection
-(like the Thompson projection) projects the ellipsoid to a finite area.
-
-\image html thompson-tm-graticule-a.png "Fig. 1(c)"
-Fig. 1(c):
-The graticule for the Thompson transverse Mercator projection. The
-equator lies on \e y = 0 for longitude < 81°; at longitude =
-81°, it turns by 120° and heads for \e y = 1.
-Compare this with Lee, Fig. 43, which shows the graticule for the
-International Ellipsoid. Lee, Fig. 44, shows the graticule for the
-entire ellipsoid. This projection (like the Gauss-Krüger
-projection) projects the ellipsoid to a finite area.
-
-\image html gauss-krueger-error.png "Fig. 2"
-Fig. 2:
-The truncation error for the series for the Gauss-Krüger transverse
-Mercator projection. The blue curves show the truncation error for the
-order of the series \e J = 2 (top) thru \e J = 12 (bottom). The red
-curves show the combined truncation and round-off errors for
- - float and \e J = 4 (top)
- - double and \e J = 6 (middle)
- - long double and \e J = 8 (bottom)
-
-\image html gauss-krueger-graticule.png "Fig. 3(a)"
-Fig. 3(a):
-The graticule for the extended domain. The blue lines show
-latitude and longitude at multiples of 10°. The green lines
-show 1° intervals for longitude in [80°, 90°] and latitude in
-[−5°, 10°].
-
-\image html gauss-krueger-convergence-scale.png "Fig. 3(b)"
-Fig. 3(b):
-The convergence and scale for the Gauss-Krüger
-transverse Mercator projection in the extended domain. The blue lines
-emanating from the top left corner (the north pole) are lines of
-constant convergence. Convergence = 0° is given by the
-dog-legged line joining the points (0,1), (0,0), (1.71,0),
-(1.71,−∞).
-Convergence = 90° is given by the line y = 1. The other
-lines show multiples of 10° between 0° and
-90°. The other blue, the green and the black lines show
-scale = 1 thru 2 at intervals of 0.1, 2 thru 15 at intervals of 1, and
-15 thru 35 at intervals of 5. Multiples of 5 are shown in black,
-multiples of 1 are shown in blue, and the rest are shown in green.
-Scale = 1 is given by the line segment (0,0) to (0,1). The red line
-shows the equator between lon = 81° and 90°. The
-scale and convergence at the branch point are 1/\e e = 10 and
-0°, respectively.
-
-\image html thompson-tm-graticule.png "Fig. 3(c)"
-Fig. 3(c):
-The graticule for the Thompson transverse Mercator
-projection for the extended domain. The range of the projection is the
-rectangular region shown
- - 0 ≤ \e u ≤ K(e2),
- 0 ≤ \e v ≤ K(1 − e2)
- .
-The coloring of the lines is the same as Fig. 3(a), except that latitude
-lines extended down to −10° and a red line has been added
-showing the line \e y = 0 for \e x > 1.71 in the Gauss-Krüger
-projection (Fig. 3(a)). The extended Thompson projection figure has
-reflection symmetry on all the four sides of Fig. 3(c).
-
-
-Back to \ref triaxial. Forward to \ref geocentric. Up to \ref contents.
-
-Back to \ref transversemercator. Forward to \ref old. Up to \ref contents.
-
-
-The implementation of GeographicLib::Geocentric::Reverse is adapted from
- - H. Vermeille,
-
- Direct transformation from geocentric coordinates to geodetic
- coordinates, J. Geodesy 76, 451--454 (2002).
-
-This provides a closed-form solution but can't directly be applied close to
-the center of the earth. Several changes have been made to remove this
-restriction and to improve the numerical accuracy. Now the method is
-accurate for all inputs (even if \e h is infinite). The changes are
-described in Appendix B of
- - C. F. F. Karney,
- Geodesics
- on an ellipsoid of revolution,
- Feb. 2011; preprint
- arxiv:1102.1215v1.
-
-The problems encountered near the center of the ellipsoid are:
- - There's a potential division by zero in the definition of \e s. The
- equations are easily reformulated to avoid this problem.
- - t3 may be negative. This is OK; we just take the
- real root.
- - The solution for \e t may be complex. However this leads to 3 real roots
- for u/\e r. It's then just a matter of picking the one that computes
- the geodetic result which minimizes |\e h| and which avoids large
- round-off errors.
- - Some of the equations result in a large loss of accuracy due to
- subtracting nearly equal quantities. E.g., \e k= sqrt(\e u + \e v +
- w2) − \e w is inaccurate if \e u + \e v is small;
- we can fix this by writing \e k = (\e u + \e v)/(sqrt(\e u + \e v +
- w2) + \e w).
-
-The error is computed as follows. Write a version of
-Geocentric::WGS84.Forward which uses long doubles (including using long
-doubles for the WGS84 parameters). Generate random (long double)
-geodetic coordinates (\e lat0, \e lon0, \e h0) and use the "long double"
-WGS84.Forward to obtain the corresponding (long double) geocentric
-coordinates (\e x0, \e y0, \e z0). [We restrict \e h0 so that
-\e h0 ≥ − \e a (1 − e2) / sqrt(1 −
-e2 sin2\e lat0), which ensures that (\e
-lat0, \e lon0, \e h0) is the principal geodetic inverse of (\e x0, \e
-y0, \e z0).] Because the forward calculation is numerically stable and
-because long doubles (on Linux systems using g++) provide 11 bits
-additional accuracy (about 3.3 decimal digits), we regard this set of
-test data as exact.
-
-Apply the double version of WGS84.Reverse to (\e x0, \e y0, \e z0) to
-compute the approximate geodetic coordinates (\e lat1, \e lon1, \e h1).
-Convert (\e lat1 − \e lat0, \e lon1 − \e lon0) to a
-distance, \e ds, on the surface of the ellipsoid and define \e err =
-hypot(\e ds, \e h1 − \e h0). For |\e h0| < 5000 km, we have \e
-err < 7 nm (7 nanometers).
-
-This methodology is not very useful very far from the globe, because the
-absolute errors in the approximate geodetic height become large, or
-within 50 km of the center of the earth, because of errors in computing
-the approximate geodetic latitude. To illustrate the second issue, the
-maximum value of \e err for \e h0 < 0 is about 80 mm. The error is
-maximum close to the circle given by geocentric coordinates satisfying
-hypot(\e x, \e y) = \e a e2 (= 42.7 km), \e z = 0.
-(This is the center of meridional curvature for \e lat = 0.) The
-geodetic latitude for these points is \e lat = 0. However, if we move 1
-nm towards the center of the earth, the geodetic latitude becomes 0.04",
-a distance of 1.4 m from the equator. If, instead, we move 1 nm up, the
-geodetic latitude becomes 7.45", a distance of 229 m from the equator.
-In light of this, Reverse does quite well in this vicinity.
-
-To obtain a practical measure of the error for the general case we define
-- errh = |\e h1 − \e h0| / max(1, \e h0 / \e a)
-- for \e h0 > 0, errout = \e ds
-- for \e h0 < 0, apply the long double version of WGS84.Forward to (\e
- lat1, \e lon1, \e h1) to give (\e x1, \e y1, \e z1) and compute
- errin = hypot(\e x1 − \e x0, \e y1 − \e
- y0, \e z1 − \e z0).
-.
-We then find errh < 8 nm, errout < 4 nm,
-and errin < 7 nm. (1 nm = 1 nanometer.)
-
-The testing has been confined to the WGS84 ellipsoid. The method will work
-for all ellipsoids used in terrestrial geodesy. However, the central region,
-which leads to multiple real roots for the cubic equation in Reverse, pokes
-outside the ellipsoid (at the poles) for ellipsoids with \e e > 1/sqrt(2).
-Reverse has not been analyzed for this case. Similarly ellipsoids which are
-very nearly spherical near yield inaccurate results due to underflow; in the
-other hand, the case of the sphere, \e f = 0, is treated specially and gives
-accurate results.
-
-Other comparable methods are K. M. Borkowski,
- Transformation
-of geocentric to geodetic coordinates without approximations,
-Astrophys. Space Sci. 139, 1--4 (1987)
-( erratum)
-and T. Fukushima,
- Fast transform from
-geocentric to geodetic coordinates, J. Geodesy 73, 603--610 (1999).
-However the choice of independent variables in these methods leads
-to a loss of accuracy for points near the equatorial plane.
-
-
-Back to \ref transversemercator. Forward to \ref old. Up to \ref contents.
-
-
-**********************************************************************/
-/**
-\page old Old versions
-
-
-Back to \ref geocentric. Up to \ref contents.
-
-
-List of versions in reverse chronological order together with a brief
-list of changes. (Note: Old versions of the library use a year-month
-style of numbering. Now, the library uses a major and minor version
-number.) Recent versions of %GeographicLib are available at
-
-http://sourceforge.net/projects/geographiclib/files/distrib/.
-Older versions are in
-
-http://sourceforge.net/projects/geographiclib/files/distrib/archive/.
-
-The corresponding documentation for these versions is obtained by
-clicking on the “Version m.nn” links below. Some of
-the links in the documentaion of older versions may be out of date (in
-particular the links for the source code will not work if the code has
-been migrated to the archive subdirectory). All the releases are
-available as tags “rm.nn” in the the "release" branch
-of the git repository for %GeographicLib.
-
- - Version 1.35
- (released 2014-03-13)
- - Fix blunder in GeographicLib::UTMUPS::EncodeEPSG (found by Ben
- Adler).
- - Matlab wrapper routines geodesic{direct,inverse,line} switch to
- "exact" routes if |f| > 0.02.
- - GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
- for GeodSolve).
- - Set title in HTML versions of man pages for the \ref utilities.
- - Changes in cmake support:
- - add _d to names of executables in debug mode of Visual Studio;
- - add support for Android (cmake-only), thanks to Pullan Yu;
- - check CPACK version numbers supplied on command line;
- - configured version of project-config.cmake.in is
- project-config.cmake (instead of geographiclib-config.cmake), to
- prevent find_package incorrectly using this file;
- - fix tests with multi-line output;
- - this release includes a file, pom.xml, which is used by an
- experimental build system (based on maven) at SRI.
-
- - Version 1.34
- (released 2013-12-11)
- - Many changes in cmake support:
- - minimum version of cmake needed increased to 2.8.4 (which was
- released in 2011-02);
- - allow building both shared and static librarys with -D
- GEOGRAPHICLIB_LIB_TYPE=BOTH;
- - both shared and static libraries (Release plus Debug) included in
- binary installer;
- - find_package uses COMPONENTS and GeographicLib_USE_STATIC_LIBS to
- select the library to use;
- - find_package version checking allows nmake and Visual Studio
- generators to interoperate on Windows;
- - find_package (%GeographicLib ...) requires that %GeographicLib be
- capitalized correctly;
- - on Unix/Linux, don't include the version number in directory for
- the cmake configuration files;
- - defaults for GEOGRAPHICLIB_DOCUMENTATION and
- BUILD_NETGEOGRAPHICLIB are now OFF;
- - the GEOGRAPHICLIB_EXAMPLES configuration parameter is no longer
- used; cmake always configures to build the examples, but they are
- not built by default (instead build targets: exampleprograms and
- netexamples);
- - matlab-all target renamed to matlabinterface;
- - the configuration parameters PACKAGE_PATH and INSTALL_PATH are
- now deprecated (use CMAKE_INSTALL_PREFIX instead);
- - on Linux, the installed package is relocatable;
- - on MacOSX, the installed utilities can find the shared library.
- - Use a more precise value for GeographicLib::OSGB::CentralScale().
- - Add Arc routines to python interface.
- - The Geod utility has been removed; the same functionality lives on
- with GeodSolve (introduced in
- version 1.30).
-
- - Version 1.33
- (released 2013-10-08)
- - Add NETGeographic .NET wrapper library
- (courtesy of Scott Heiman).
- - Make inspector functions in GeographicLib::Ellipsoid const.
- - Add Accumulator.cpp to instantiate GeographicLib::Accumulator.
- - Defer some of the initialization of GeographicLib::OSGB to when it
- is first called.
- - Fix bug in autoconf builds under MacOS.
-
- - Version 1.32
- (released 2013-07-12)
- - Generalize C interface for polygon areas to allow vertices to be
- specified incrementally.
- - Fix way flags for C++11 support are determined.
-
- - Version 1.31
- (released 2013-07-01)
- - Changes breaking binary compatibility (source compatibility is
- maintained):
- - overloaded versions of GeographicLib::DMS::Encode,
- GeographicLib::EllipticFunction::EllipticFunction, and
- GeographicLib::GeoCoords::DMSRepresentation, have been eliminated
- by the use of optional arguments;
- - correct the declaration of first arg to
- GeographicLib::UTMUPS::DecodeEPSG.
- - FIX BUG in GeographicLib::GravityCircle constructor (found by
- Mathieu Peyréga) which caused bogus results for the gravity
- disturbance and gravity anomaly vectors. (This only affected
- calculations using GravityCircle. GravityModel calculations did
- not suffer from this bug.)
- - Improvements to the build:
- - add macros GEOGRAPHICLIB_VERSION_{MAJOR,MINOR,PATCH} to Config.h;
- - fix documentation for new version of perlpod;
- - improving setting of runtime path for Unix-like systems with cmake;
- - install PDB files when compiling with Visual Studio to aid
- debugging;
- - Windows binary release now uses Matlab R2013a (64-bit) and
- uses the -largeArrayDims option.
- - fixes to the way the Matlab interface routines are built (thanks
- to Phil Miller and Chris F.).
- - Changes to the geodesic routines:
- - add \ref java of the geodesic routines (thanks to Skip Breidbach
- for the maven support);
- - FIX BUG: avoid altering input args in Fortran implementation;
- - more systematic treatment of very short geodesic;
- - fixes to python port so that they work with version 3.x, in
- addition to 2.x (courtesy of Amato);
- - accumulate the perimeter and area of polygons via a double-wide
- accumulator in Fortran, C, and Matlab implementations (this is
- already included in the other implementations);
- - port GeographicLib::PolygonArea::AddEdge and
- GeographicLib::PolygonArea::TestEdge to JavaScript and python
- interfaces;
- - include documentation on \ref geodshort.
- - Unix scripts for downloading datasets,
- geographiclib-get-{geoids,gravity,magnetic}, skip already download
- models by default, unless the -f flag is given.
- - FIX BUGS: meridian convergence and scale returned by
- GeographicLib::TransverseMercatorExact was wrong at a pole.
- - Improve efficiency of GeographicLib::MGRS::Forward by avoiding the
- calculation of the latitude if possible (adapting an idea of Craig
- Rollins).
- - Fixes to the way the Matlab interface routines are built (thanks to
- Phil Miller and Chris F.).
-
- - Version 1.30
- (released 2013-02-27)
- - Changes to geodesic routines:
- - FIX BUG in fail-safe mechanisms in GeographicLib::Geodesic::Inverse;
- - the command line utility Geod is now called
- GeodSolve;
- - allow addition of polygon edges in GeographicLib::PolygonArea;
- - add full Maxima implementation of geodesic algorithms.
-
- - Version 1.29
- (released 2013-01-16)
- - Changes to allow compilation with libc++ (courtesy of Kal Conley).
- - Add description of \ref triaxial to documentation.
- - Update journal reference for "Algorithms for geodesics".
-
- - Version 1.28
- (released 2012-12-11)
- - Changes to geodesic routines:
- - compute longitude difference exactly;
- - hence FIX BUG in area calculations for polygons with vertices very
- close to the prime meridian;
- - FIX BUG is geoddistance.m where the value of m12 was wrong for
- meridional geodesics;
- - add Matlab implementations of the geodesic projections;
- - remove unneeded special code for geodesics which start at a pole;
- - include polygon area routine in C and Fortran implementations;
- - add doxygen documentation for C and Fortran libraries.
-
- - Version 1.27
- (released 2012-11-29)
- - Changes to geodesic routines:
- - add native Matlab implementations: geoddistance.m, geodreckon.m,
- geodarea.m;
- - add C and Fortran implementations;
- - improve the solution of the direct problem so that the series
- solution is accurate to round off for |f| < 1/50;
- - tighten up the convergence criteria for solution of the inverse
- problem;
- - no longer signal failures of convergence with NaNs (a slightly
- less accurate answer is returned instead).
- - Fix GeographicLib::DMS::Decode double rounding BUG.
- - On MacOSX platforms with the cmake configuration, universal
- binaries are built.
-
- - Version 1.26
- (released 2012-10-22)
- - Replace the series used for geodesic areas by one with better
- convergence (this only makes an appreciable difference if
- |f| > 1/150).
-
- - Version 1.25
- (released 2012-10-16)
- - Changes to geodesic calculations:
- - restart Newton's method in Geodesic::Inverse when it goes awry;
- - back up Newton's method with the bisection method;
- - GeographicLib::Geodesic::Inverse now converges for any value of \e f;
- - add GeographicLib::GeodesicExact and
- GeographicLib::GeodesicLineExact which are formulated in terms
- of elliptic integrals and thus yield accurate results even for
- very eccentric ellipsoids.
- - the -E option to Geod invokes these
- exact classes.
- - Add functionality to GeographicLib::EllipticFunction:
- - add all the traditional elliptic integrals;
- - remove restrictions on argument range for incomplete elliptic integrals;
- - allow imaginary modulus for elliptic integrals and elliptic functions;
- - make interface to the symmetric elliptic integrals public.
- - Allow GeographicLib::Ellipsoid to be copied.
- - Changes to the build tools:
- - cmake uses folders in Visual Studio to reduce clutter;
- - allow precision of reals to be set in cmake;
- - fail gracefully in the absence of pod documentation tools;
- - remove support for maintainer tasks in Makefile.mk.
-
- - Version 1.24
- (released 2012-09-22)
- - Allow the specification of the hemisphere in UTM coordinates in
- order to provide continuity across the equator:
- - add GeographicLib::UTMUPS::Transfer;
- - add GeographicLib::GeoCoords::UTMUPSRepresentation(bool, int) and
- GeographicLib::GeoCoords::AltUTMUPSRepresentation(bool, int);
- - use the hemisphere letter in, e.g.,
- GeoConvert -u -z 31N.
- - Add GeographicLib::UTMUPS::DecodeEPSG and
- GeographicLib::UTMUPS::EncodeEPSG.
- - cmake changes:
- - restore support for cmake 2.4.x;
- - explicitly check version of doxygen.
- - Fix building under cygwin.
- - Document restrictions on \e f in \ref intro.
- - Fix python interface to work with version 2.6.x.
-
- - Version 1.23
- (released 2012-07-17)
- - Documentation changes:
- - remove html documentation from distribution and use web links if
- doxygen is not available;
- - use doxygen tags to document exceptions;
- - begin migrating the documentation to using Greek letters where
- appropriate (requires doxygen 1.8.1.2 or later).
- - Add GeographicLib::Math::AngNormalize and
- GeographicLib::Math::AngNormalize2; the allowed range for longitudes
- and azimuths widened to [−540°, 540°).
- - GeographicLib::DMS::Decode understands more unicode symbols.
- - GeographicLib::Geohash uses geohash code "nan" to stand for not a
- number.
- - Add GeographicLib::Ellipsoid::NormalCurvatureRadius.
- - Various fixes in GeographicLib::LambertConformalConic,
- GeographicLib::TransverseMercator,
- GeographicLib::PolarStereographic, and GeographicLib::Ellipsoid to
- handle reverse projections of points near infinity.
- - Fix programming blunder in GeographicLib::LambertConformalConic::Forward
- (incorrect results were returned if the tangent latitude was
- negative).
-
- - Version 1.22
- (released 2012-05-27)
- - Add GeographicLib::Geohash and GeographicLib::Ellipsoid classes.
- - FIX BUG in GeographicLib::AlbersEqualArea for very prolate
- ellipsoids (b2 > 2 a2).
- - cmake changes:
- - optionally use PACKAGE_PATH and INSTALL_PATH to determine
- CMAKE_INSTALL_PREFIX;
- - use COMMON_INSTALL_PATH to determine layout of installation
- directories;
- - as a consequence, the installation paths for the documentation,
- and python and matlab interfaces are shortened for Windows;
- - zip source distribution now uses DOS line endings;
- - the tests work in debug mode for Windows;
- - default setting of GEOGRAPHICLIB_DATA does not depend on
- CMAKE_INSTALL_PREFIX;
- - add a cmake configuration for build tree.
-
- - Version 1.21
- (released 2012-04-25)
- - Support colon-separated DMS output:
- - GeographicLib::DMS::Encode and
- GeographicLib::GeoCoords::DMSRepresentation generalized;
- - GeoConvert and
- Geod now accept a -: option.
- - GeoidEval does not print the gradient
- of the geoid height by default (because it's subject to large
- errors); give the -g option to get the gradient printed.
- - Work around optimization BUG in GeographicLib::Geodesic::Inverse
- with tdm mingw g++ version 4.6.1.
- - autoconf fixed to ensure that that out-of-sources builds work;
- document this as the preferred method of using autoconf.
- - cmake tweaks:
- - simplify the configuration of doxygen;
- - allow the Matlab compiler to be specified with the
- MATLAB_COMPILER option.
-
- - Version 1.20
- (released 2012-03-23)
- - cmake tweaks:
- - improve find_package's matching of compiler versions;
- - CMAKE_INSTALL_PREFIX set from CMAKE_PREFIX_PATH if available;
- - add "x64" to the package name for the 64-bit binary installer;
- - fix cmake warning with Visual Studio Express.
- - Fix GeographicLib::SphericalEngine to deal with aggessive iterator
- checking by Visual Studio.
- - Fix transcription BUG is Geodesic.js.
-
- - Version 1.19
- (released 2012-03-13)
- - Slight improvement in GeographicLib::Geodesic::Inverse for very
- short lines.
- - Fix argument checking tests in GeographicLib::MGRS::Forward.
- - Add --comment-delimiter and --line-separator options to the \ref
- utilities.
- - Add installer for 64-bit Windows; the compiled Matlab interface is
- supplied with the Windows 64-bit installer only.
-
- - Version 1.18
- (released 2012-02-18)
- - Improve documentation on configuration with cmake.
- - cmake's find_package ensures that the compiler versions match on Windows.
- - Improve documentation on compiling Matlab interface.
- - Binary installer for Windows installs under C:/pkg-vc10 by default.
-
- - Version 1.17
- (released 2012-01-21)
- - Work around optimization BUG in GeographicLib::Geodesic::Inverse
- with g++ version 4.4.0 (mingw).
- - Fix BUG in argument checking with GeographicLib::OSGB::GridReference.
- - Fix missing include file in GeographicLib::SphericalHarmonic2.
- - Add simple examples of usage for each class.
- - Add internal documentation to the cmake configuration files.
-
- - Version 1.16
- (released 2011-12-07)
- - Add calculation of the earth's gravitational field:
- - add GeographicLib::NormalGravity GeographicLib::GravityModel and
- GeographicLib::GravityCircle classes;
- - add command line utility
- Gravity;
- - add \ref gravity;
- - add GeographicLib::Constants::WGS84_GM(),
- GeographicLib::Constants::WGS84_omega(), and similarly for GRS80.
- - Build uses GEOGRAPHICLIB_DATA to specify a common parent directory
- for geoid, gravity, and magnetic data (instead of
- GEOGRAPHICLIB_GEOID_PATH, etc.); similarly,
- GeoidEval,
- Gravity, and
- MagneticField, look at the
- environment variable GEOGRAPHICLIB_DATA to locate the data.
- - Spherical harmonic software changes:
- - capitalize enums GeographicLib::SphericalHarmonic::FULL and
- GeographicLib::SphericalHarmonic::SCHMIDT (the lower case names
- are retained but deprecated);
- - optimize the sum by using a static table of square roots which is
- updated by GeographicLib::SphericalEngine::RootTable;
- - avoid overflow for high degree models.
- - Magnetic software fixes:
- - fix documentation BUG in GeographicLib::MagneticModel::Circle;
- - make GeographicLib::MagneticModel constructor explicit;
- - provide default GeographicLib::MagneticCircle constructor;
- - add additional inspector functions to
- GeographicLib::MagneticCircle;
- - add -c option to MagneticField;
- - default height to zero in
- MagneticField.
-
- - Version 1.15
- (released 2011-11-08)
- - Add calculation of the earth's magnetic field:
- - add GeographicLib::MagneticModel and GeographicLib::MagneticCircle
- classes;
- - add command line utility
- MagneticField;
- - add \ref magnetic;
- - add \ref magneticinst;
- - add \ref magneticformat;
- - add classes GeographicLib::SphericalEngine,
- GeographicLib::CircularEngine, GeographicLib::SphericalHarmonic,
- GeographicLib::SphericalHarmonic1, and
- GeographicLib::SphericalHarmonic2. which sum spherical harmonic
- series.
- - Add GeographicLib::Utility class to support I/O and date
- manipulation.
- - Cmake configuration includes a _d suffix on the library built in
- debug mode.
- - For the Python package, include manifest and readme files; don't
- install setup.py for non-Windows systems.
- - Include Doxygen tag file in distribution as doc/html/Geographic.tag.
-
- - Version 1.14
- (released 2011-09-30)
- - Ensure that geographiclib-config.cmake is relocatable.
- - Allow more unicode symbols to be used in GeographicLib::DMS::Decode.
- - Modify GeoidEval so that it can be
- used to convert the height datum for LIDAR data.
- - Modest speed-up of Geodesic::Inverse.
- - Changes in python interface:
- - FIX BUG in transcription of Geodesic::Inverse;
- - include setup.py for easy installation;
- - python only distribution is available at
- http://pypi.python.org/pypi/geographiclib
- - Supply a minimal Qt qmake project file for library
- src/Geographic.pro.
-
- - Version 1.13
- (released 2011-08-13)
- - Changes to I/O:
- - allow : (colon) to be used as a DMS separator in
- GeographicLib::DMS::Decode(const std::string&, flag&);
- - also accept Unicode symbols for degrees, minutes, and seconds
- (coded as UTF-8);
- - provide optional \e swaplatlong argument to various
- GeographicLib::DMS and GeographicLib::GeoCoords functions to make
- longitude precede latitude;
- - GeoConvert now has a -w option to
- make longitude precede latitude on input and output;
- - include a JavaScript version of GeographicLib::DMS.
- - Slight improvement in starting guess for solution of geographic
- latitude in terms of conformal latitude in TransverseMercator,
- TransverseMercatorExact, and LambertConformalConic.
- - For most classes, get rid of const member variables so that the
- default copy assignment works.
- - Put GeographicLib::Math and GeographicLib::Accumulator in their own
- header files.
- - Remove unused "fast" GeographicLib::Accumulator method.
- - Reorganize the \ref python.
- - Withdraw some deprecated routines.
- - cmake changes:
- - include FindGeographic.cmake in distribution;
- - building with cmake creates and installs
- geographiclib-config.cmake;
- - better support for building a shared library under Windows.
-
- - Version 1.12
- (released 2011-07-21)
- - Change license to MIT/X11.
- - Add GeographicLib::PolygonArea class and equivalent Matlab function.
- - Provide JavaScript and Python implementations of geodesic routines.
- - Fix Windows installer to include runtime dlls for Matlab.
- - Fix (innocuous) unassigned variable in Geodesic::GenInverse.
- - Geodesic routines in Matlab return a12 as first column of aux return
- value (incompatible change).
- - A couple of code changes to enable compilation with Visual
- Studio 2003.
-
- - Version 1.11
- (released 2011-06-27)
- - Changes to Planimeter:
- - add -l flag to Planimeter for polyline
- calculations;
- - trim precision of area to 3 decimal places;
- - FIX BUG with pole crossing edges (due to compiler optimization).
- - Geod no longer reports the reduced
- length by default; however the -f flag still reports this and in
- addition gives the geodesic scales and the geodesic area.
- - FIX BUGS (compiler-specific) in inverse geodesic calculations.
- - FIX BUG: accommodate tellg() returning −1 at end of string.
- - Change way flattening of the ellipsoid is specified:
- - constructors take \e f argument which is taken to be the
- flattening if \e f < 1 and the inverse flattening otherwise
- (this is a compatible change for spheres and oblate ellipsoids, but it
- is an INCOMPATIBLE change for prolate ellipsoids);
- - the -e arguments to the \ref utilities are handled similarly; in
- addition, simple fractions, e.g., 1/297, can be used for the
- flattening;
- - introduce GeographicLib::Constants::WGS84_f() for the WGS84
- flattening (and deprecate Constants::WGS84_r() for the inverse
- flattening);
- - most classes have a Flattening() member function;
- - InverseFlattening() has been deprecated (and now returns inf for a
- sphere, instead of 0).
-
- - Version 1.10
- (released 2011-06-11)
- - Improvements to Matlab/Octave interface:
- - add {geocentric,localcartesian}{forward,reverse};
- - make geographiclibinterface more general;
- - install the source for the interface;
- - cmake compiles the interface if ENABLE_MATLAB=ON;
- - include compiled interface with Windows binary installer.
- - Fix various configuration issues
- - autoconf did not install Config.h;
- - cmake installed in man/man1 instead of share/man/man1;
- - cmake did not set the rpath on the tools.
-
- - Version 1.9
- (released 2011-05-28)
- - FIX BUG in area returned by
- Planimeter for pole encircling polygons.
- - FIX BUG in error message reported when DMS::Decode reads the string
- "5d.".
- - FIX BUG in AlbersEqualArea::Reverse (lon0 not being used).
- - Ensure that all exceptions thrown in the \ref utilities are caught.
- - Avoid using catch within GeographicLib::DMS.
- - Move GeographicLib::Accumulator class from Planimeter.cpp to
- Constants.hpp.
- - Add GeographicLib::Math::sq.
- - Simplify \ref geoidinst
- - add geographiclib-get-geoids for Unix-like systems;
- - add installers for Windows.
- - Provide cmake support:
- - build binary installer for Windows;
- - include regression tests;
- - add --input-string, --input-file, --output-file options to the
- \ref utilities to support tests.
- - Rename utility EquidistantTest as
- GeodesicProj and TransverseMercatorTest as
- TransverseMercatorProj.
- - Add ConicProj.
- - Reverse the initial sense of the -s option for
- Planimeter.
- - Migrate source from subversion to
-
- git.
-
- - Version 1.8
- (released 2011-02-22)
- - Optionally return rotation matrix from GeographicLib::Geocentric and
- GeographicLib::LocalCartesian.
- - For the \ref utilities, supply man pages, -h prints the synopsis,
- --help prints the man page, --version prints the version.
- - Use accurate summation in Planimeter.
- - Add 64-bit targets for Visual Studio 2010.
- - Use templates for defining math functions and some constants.
- - GeographicLib::Geoid updates
- - Add GeographicLib::Geoid::DefaultGeoidPath and
- GeographicLib::Geoid::DefaultGeoidName;
- - GeoidEval uses environment variable
- GEOID_NAME as the default geoid;
- - Add --msltohae and --haetomsl as
- GeoidEval options (and don't
- document the single hyphen versions).
- - Remove documentation that duplicates papers on transverse Mercator
- and geodesics.
-
- - Version 1.7
- (released 2010-12-21)
- - FIX BUG in scale returned by GeographicLib::LambertConformalConic::Reverse.
- - Add GeographicLib::AlbersEqualArea projection.
- - Library created by Visual Studio is Geographic.lib instead of
- GeographicLib.lib (compatible with makefiles).
- - Make classes NaN aware.
- - Use cell arrays for MGRS strings in Matlab.
- - Add solution/project files for Visual Studio 2010 (32-bit only).
- - Use C++11 static_assert and math functions, if available.
-
- - Version 1.6
- (released 2010-11-23)
- - FIX BUG introduced in GeographicLib::Geoid in version 1.5 (found by
- Dave Edwards).
-
- - Version 1.5
- (released 2010-11-19)
- - Improve area calculations for small polygons.
- - Add -s and -r flags to Planimeter.
- - Improve the accuracy of GeographicLib::LambertConformalConic using
- divided differences.
- - FIX BUG in meridian convergence returned by
- LambertConformalConic::Forward.
- - Add optional threadsafe parameter to GeographicLib::Geoid
- constructor. WARNING: This changes may break binary compatibility
- with previous versions of %GeographicLib. However, the library is
- source compatible.
- - Add GeographicLib::OSGB.
- - Matlab and Octave interfaces to GeographicLib::UTMUPS,
- GeographicLib::MGRS, GeographicLib::Geoid, GeographicLib::Geodesic
- provided.
- - Minor changes
- - explicitly turn on optimization in Visual Studio 2008 projects;
- - add missing dependencies in some Makefiles;
- - move pi() and degree() from GeographicLib::Constants to
- GeographicLib::Math;
- - introduce GeographicLib::Math::extended type to aid testing;
- - add GeographicLib::Math::epi() and GeographicLib::Math::edegree().
- - fixes to compile under cygwin;
- - tweak expression used to find latitude from conformal latitude.
-
- - Version 1.4
- (released 2010-09-12)
- - Changes to GeographicLib::Geodesic and GeographicLib::GeodesicLine:
- - FIX BUG in Geodesic::Inverse with prolate ellipsoids;
- - add area computations to Geodesic::Direct and Geodesic::Inverse;
- - add geodesic areas to geodesic test set;
- - make GeodesicLine constructor public;
- - change longitude series in Geodesic into Helmert-like form;
- - ensure that equatorial geodesics have cos(alpha0) = 0 identically;
- - generalize interface for Geodesic and GeodesicLine;
- - split GeodesicLine and Geodesic into different files;
- - signal convergence failure in Geodesic::Inverse with NaNs;
- - deprecate one function in Geodesic and two functions in
- GeodesicLine;
- - deprecate -n option for Geod.
- .
- WARNING: These changes may break binary compatibility with previous
- versions of %GeographicLib. However, the library is source
- compatible (with the proviso that GeographicLib/GeodesicLine.hpp may
- now need to be included).
- - Add the Planimeter utility for
- computing the areas of geodesic polygons.
- - Improve iterative solution of GeographicLib::Gnomonic::Reverse.
- - Add GeographicLib::Geoid::ConvertHeight.
- - Add -msltohae, -haetomsl, and -z options to
- GeoidEval.
- - Constructors check that minor radius is positive.
- - Add overloaded Forward and Reverse functions to the projection
- classes which don't return the convergence (or azimuth) and scale.
- - Document function parameters and return values consistently.
-
- - Version 1.3
- (released 2010-07-21)
- - Add GeographicLib::Gnomonic, the ellipsoid generalization of the
- gnomonic projection.
- - Add -g and -e options to
- EquidistantTest.
- - Use fixed-point notation for output from
- CartConvert,
- EquidistantTest,
- TransverseMercatorTest.
- - PolarStereographic:
- - Improved conversion to conformal coordinates;
- - Fix bug with scale at opposite pole;
- - Complain if latitude out of range in SetScale.
- - Add GeographicLib::Math::NaN().
- - Add long double version of hypot for Windows.
- - Add EllipticFunction::E(real).
- - Update references to Geotrans in MGRS documentation.
- - Speed up tmseries.mac.
-
- - Version 1.2
- (released 2010-05-21)
- - FIX BUGS in GeographicLib::Geodesic,
- - wrong azimuth returned by Direct if point 2 is on a pole;
- - Inverse sometimes fails with very close points.
- - Improve calculation of scale in GeographicLib::CassiniSoldner,
- - add GeographicLib::GeodesicLine::Scale,
- GeographicLib::GeodesicLine::EquatorialAzimuth, and
- GeographicLib::GeodesicLine::EquatorialArc;
- - break friend connection between CassiniSoldner and Geodesic.
- - Add GeographicLib::DMS::DecodeAngle and
- GeographicLib::DMS::DecodeAzimuth. Extend
- GeographicLib::DMS::Decode and GeographicLib::DMS::Encode to deal
- with distances.
- - Code and documentation changes in GeographicLib::Geodesic and
- GeographicLib::Geocentric for consistency with
- the forthcoming paper on geodesics.
- - Increase order of series using in GeographicLib::Geodesic to 6 (full
- accuracy maintained for ellipsoid flattening < 0.01).
- - Macro __NO_LONG_DOUBLE_MATH to disable use of long double.
- - Correct declaration of GeographicLib::Math::isfinite to return a bool.
- - Changes in the \ref utilities,
- - improve error reporting when parsing command line arguments;
- - accept latitudes and longitudes in decimal degrees or degrees,
- minutes, and seconds, with optional hemisphere designators;
- - GeoConvert -z accepts zone or
- zone+hemisphere;
- - GeoidEval accepts any of the input
- formats used by GeoConvert;
- - CartConvert allows the ellipsoid
- to be specified with -e.
-
- - Version 1.1
- (released 2010-02-09)
- - FIX BUG (introduced in 2009-03) in EllipticFunction::E(sn,cn,dn).
- - Increase accuracy of scale calculation in TransverseMercator and
- TransverseMercatorExact.
- - Code and documentation changes for consistency with
- arXiv:1002.1417
-
- - Version 1.0
- (released 2010-01-07)
- - Add autoconf configuration files.
- - BUG FIX: Improve initial guess for Newton's method in
- PolarStereographic::Reverse. (Previously this failed to converge
- when the co-latitude exceeded about 130 deg.)
- - Constructors for TransverseMercator, TransverseMercatorExact,
- PolarStereographic, Geocentric, and Geodesic now check for obvious
- problems with their arguments and throw an exception if necessary.
- - Most classes now include inspector functions such as MajorRadius()
- so that you can determine how instances were constructed.
- - Add GeographicLib::LambertConformalConic class.
- - Add GeographicLib::PolarStereographic::SetScale to allow the
- latitude of true scale to be specified.
- - Add solution and project files for Visual Studio 2008.
- - Add GeographicLib::GeographicErr for exceptions.
- - GeographicLib::Geoid changes:
- - BUG FIX: fix typo in GeographicLib::Geoid::Cache which could cause
- a segmentation fault in some cases when the cached area spanned
- the prime meridian.
- - Include sufficient edge data to allow heights to be returned for
- cached area without disk reads;
- - Add inspector functions to query the extent of the cache.
-
- - Version 2009-11
- (released 2009-11-03)
- - Allow specification of "closest UTM zone" in GeographicLib::UTMUPS
- and GeoConvert (via -t option).
- - Utilities now complain is there are too many tokens on input lines.
- - Include real-to-real versions of GeographicLib::DMS::Decode and
- GeographicLib::DMS::Encode.
- - More house-cleaning changes:
- - Ensure that functions which return results through reference
- arguments do not alter the arguments when an exception is thrown.
- - Improve accuracy of GeographicLib::MGRS::Forward.
- - Include more information in some error messages.
- - Improve accuracy of inverse hyperbolic functions.
- - Fix the way GeographicLib::Math functions handle different precisions.
-
- - Version 2009-10
- (released 2009-10-18)
- - Change web site to http://geographiclib.sourceforge.net
- - Several house-cleaning changes:
- - Change from the a flat directory structure to a more easily
- maintained one.
- - Introduce Math class for common mathematical functions (in
- Constants.hpp).
- - Use Math::real as the type for all real quantities. By default this
- is typedef'ed to double; and the library should be installed this
- way.
- - Eliminate const reference members of AzimuthalEquidistant,
- CassiniSoldner and LocalCartesian so that they may be copied.
- - Make several constructors explicit. Disallow some constructors.
- Disallow copy constructor/assignment for Geoid.
- - Document least squares formulas in Geoid.cpp.
- - Use unsigned long long for files positions of geoid files in Geoid.
- - Introduce optional mgrslimits argument in UTMUPS::Forward and
- UTMUPS::Reverse to enforce stricter MGRS limits on eastings and
- northings.
- - Add 64-bit targets in Visual Studio project files.
-
- - Version 2009-09
- (released 2009-09-01)
- - Add GeographicLib::Geoid and
- GeoidEval utility.
-
- - Version 2009-08
- (released 2009-08-14)
- - Add GeographicLib::CassiniSoldner class and
- EquidistantTest utility.
- - Fix bug in GeographicLib::Geodesic::Inverse where NaNs were
- sometimes returned.
- - INCOMPATIBLE CHANGE: AzimuthalEquidistant now returns the reciprocal
- of the azimuthal scale instead of the reduced length.
- - Add -n option to GeoConvert.
-
- - Version 2009-07
- (released 2009-07-16)
- - Speed up the series inversion code in tmseries.mac and geod.mac.
- - Reference Borkowski in section on \ref geocentric.
-
- - Version 2009-06
- (released 2009-06-01)
- - Add routines to decode and encode zone+hemisphere to GeographicLib::UTMUPS.
- - Clean up code in GeographicLib::Geodesic.
-
- - Version 2009-05
- (released 2009-05-01)
- - Improvements to GeographicLib::Geodesic:
- - more economical series expansions,
- - return reduced length (as does the
- Geod utility),
- - improved calculation of starting point for inverse method,
- - use reduced length to give derivative for Newton's method.
- - Add GeographicLib::AzimuthalEquidistant class.
- - Make GeographicLib::Geocentric, GeographicLib::TransverseMercator,
- and GeographicLib::PolarStereographic classes work with prolate
- ellipsoids.
- - CartConvert checks its inputs more
- carefully.
- - Remove reference to defunct Constants.cpp from GeographicLib.vcproj.
-
- - Version 2009-04
- (released 2009-04-01)
- - Use compile-time constants to select the order of series in
- GeographicLib::TransverseMercator.
- - 2x unroll of Clenshaw summation to avoid data shuffling.
- - Simplification of GeographicLib::EllipticFunction::E.
- - Use STATIC_ASSERT for compile-time checking of constants.
- - Improvements to GeographicLib::Geodesic:
- - compile-time option to change order of series used,
- - post Maxima code for generating the series,
- - tune the order of series for double,
- - improvements in the selection of starting points for Newton's
- method,
- - accept and return spherical arc lengths,
- - works with both oblate and prolate ellipsoids,
- - add -a, -e, -b options to the Geod
- utility.
-
- - Version 2009-03
- (released 2009-03-01)
- - Add GeographicLib::Geodesic and the
- Geod utility.
- - Declare when no exceptions are thrown by functions.
- - Minor changes to GeographicLib::DMS class.
- - Use invf = 0 to mean a sphere in constructors to some classes.
- - The makefile creates a library and includes an install target.
- - Rename GeographicLib::ECEF to GeographicLib::Geocentric, ECEFConvert
- to CartConvert.
- - Use inline functions to define constant doubles in Constants.hpp.
-
- - Version 2009-02
- (released 2009-01-30)
- - Fix documentation of constructors (flattening -> inverse
- flattening).
- - Use std versions of math functions.
- - Add GeographicLib::ECEF and GeographicLib::LocalCartesian classes
- and the ECEFConvert utility.
- - Gather the documentation on the \ref utilities onto one page.
-
- - Version 2009-01
- (released 2009-01-12)
- - First proper release of library.
- - More robust GeographicLib::TransverseMercatorExact:
- - Introduce \e extendp version of constructor,
- - Test against extended test data,
- - Optimize starting positions for Newton's method,
- - Fix behavior near all singularities,
- - Fix order dependence in C++ start-up code,
- - Improved method of computing scale and convergence.
- - Documentation on transverse Mercator projection.
- - Add GeographicLib::MGRS, GeographicLib::UTMUPS, etc.
-
- - Version 2008-09
- - Ad hoc posting of information on the transverse Mercator projection.
-
-
-Back to \ref geocentric. Up to \ref contents.
-
-**********************************************************************/
diff --git a/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox.in b/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox.in
new file mode 100644
index 000000000..f9ba9975b
--- /dev/null
+++ b/gtsam/3rdparty/GeographicLib/doc/GeographicLib.dox.in
@@ -0,0 +1,9147 @@
+// -*- text -*-
+/**
+ * \file GeographicLib.dox
+ * \brief Documentation for GeographicLib
+ *
+ * Written by Charles Karney and licensed under the
+ * MIT/X11 License. For more information, see
+ * https://geographiclib.sourceforge.io/
+ **********************************************************************/
+namespace GeographicLib {
+/**
+\mainpage GeographicLib library
+\author Charles F. F. Karney (charles@karney.com)
+\version @PROJECT_VERSION@
+\date 2017-10-05
+
+The documentation for other versions is available at
+https://geographiclib.sourceforge.io/m.nn/ for versions numbers
+m.nn ≥ 1.0.
+
+\section abstract Abstract
+
+GeographicLib is a small set of C++
+classes for performing conversions between geographic, UTM, UPS,
+MGRS, geocentric, and local cartesian coordinates, for gravity (e.g.,
+EGM2008), geoid height and geomagnetic field (e.g., WMM2015)
+calculations, and for solving geodesic problems. The emphasis is on
+returning accurate results with errors close to round-off (about 5--15
+nanometers). Accurate algorithms for \ref geodesic and \ref
+transversemercator have been developed for this library. The
+functionality of the library can be accessed from user code, from the
+\ref utilities provided, or via the \ref other. Also included is a .NET
+wrapper library NETGeographicLib
+which exposes the functionality to .NET applications. For a sample of
+the geodesic capabilities in JavaScript, check out the
+online geodesic calculator and
+the script for displaying
+geodesics in Google Maps
+
+This library is not a general purpose projection library nor does
+it perform datum conversions; instead use
+proj.4. On the other
+hand, it does provide the core functionality offered by
+GEOTRANS.
+
+\section download Download
+
+The main project page is at
+- https://sourceforge.net/projects/geographiclib
+.
+The code is available for download at
+-
+ GeographicLib-@PROJECT_VERSION@.tar.gz
+-
+ GeographicLib-@PROJECT_VERSION@.zip
+.
+as either a compressed tar file (tar.gz) or a zip file. (The two
+archives have identical contents, except that the zip file has DOS
+line endings.) Alternatively you can get the latest release using git
+\verbatim
+ git clone git://git.code.sourceforge.net/p/geographiclib/code geographiclib
+\endverbatim
+Each release is tagged, e.g., with r@PROJECT_VERSION@. There are also
+binary installers available for some platforms. See \ref binaryinst.
+
+GeographicLib is licensed under the
+MIT/X11 License;
+see LICENSE.txt for the terms.
+
+For more information on GeographicLib, see
+- https://geographiclib.sourceforge.io/.
+
+\section citint Citing GeographicLib
+
+When citing GeographicLib, use (adjust the version number and date as
+appropriate)
+- C. F. F. Karney, GeographicLib, Version @PROJECT_VERSION@ (2017-mm-dd),
+ https://geographiclib.sourceforge.io/@PROJECT_VERSION@
+
+\section contents Contents
+ - \ref intro
+ - \ref install
+ - \ref start
+ - \ref utilities
+ - \ref organization
+ - \ref other
+ - \ref geoid
+ - \ref gravity
+ - \ref normalgravity
+ - \ref magnetic
+ - \ref geodesic
+ - \ref nearest
+ - \ref triaxial
+ - \ref jacobi
+ - \ref rhumb
+ - \ref greatellipse
+ - \ref transversemercator
+ - \ref geocentric
+ - \ref auxlat
+ - \ref highprec
+ - \ref changes
+
+
+
+GeographicLib offers a C++ interfaces to a small (but important!) set
+of geographic transformations. It grew out of a desire to improve on
+the geotrans
+package for transforming between geographic and MGRS coordinates. At
+present, GeographicLib provides UTM, UPS, MGRS, geocentric, and local
+cartesian projections, gravity and geomagnetic models, and classes for
+geodesic calculations.
+
+The goals of GeographicLib are:
+ - Accuracy. In most applications the accuracy is close to round-off,
+ about 5 nm (5 nanometers). Even though in many geographic
+ applications 1 cm is considered "accurate enough", there is little
+ penalty in providing much better accuracy. In situations where a
+ faster approximate algorithm is necessary, GeographicLib offers an
+ accurate benchmark to guide the development.
+ - Completeness. For each of the projections included, an attempt is
+ made to provide a complete solution. For example,
+ Geodesic::Inverse works for anti-podal points.
+ Similarly, Geocentric.Reverse will return accurate
+ geodetic coordinates even for points close to the center of the
+ earth.
+ - C++ interface. For the projection methods, this allows encapsulation
+ of the ellipsoid parameters.
+ - Emphasis on projections necessary for analyzing military data.
+ - Uniform treatment of UTM/UPS. The UTMUPS class treats
+ UPS as zone 0. This simplifies conversions between UTM and UPS
+ coordinates, etc.
+ - Well defined and stable conventions for the conversion between
+ UTM/UPS to MGRS coordinates.
+ - Detailed internal documentation on the algorithms. For the most part
+ GeographicLib uses published algorithms and references are given. If
+ changes have been made (usually to improve the numerical accuracy),
+ these are described in the code.
+
+Various \ref utilities are provided with the library. These illustrate
+the use of the library and are useful in their own right. This library
+and the utilities have been tested with g++ 5.3.1 under Linux, with
+Apple LLVM 7.0.2 under Mac OS X, and with MS Visual Studio 10 (2010), 11
+(2012), 12 (2013), 14 (2015), and 15 (2017) compiled for 32 bit and 64
+bit on Windows.
+
+MATLAB, JavaScript, and Python interfaces are provided to portions of
+GeographicLib; see \ref other.
+
+The section \ref geodesic documents the method of solving the geodesic
+problem.
+
+The section \ref transversemercator documents various properties of this
+projection.
+
+The bulk of the testing has used geographically relevant values of the
+flattening. Thus, you can expect close to full accuracy for −0.01
+≤ \e f ≤ 0.01 (but note that TransverseMercatorExact is restricted
+to \e f > 0). However, reasonably accurate results can be expected if
+−0.1 ≤ \e f ≤ 0.1. Outside this range, you should attempt
+to verify the accuracy of the routines independently. Two types of
+problems may occur with larger values of f:
+ - Some classes, specifically Geodesic, GeodesicLine, and
+ TransverseMercator, use series expansions using \e f as a small
+ parameter. The accuracy of these routines will degrade as \e f
+ becomes large.
+ - Even when exact formulas are used, many of the classes need to invert
+ the exact formulas (e.g., to invert a projection), typically, using
+ Newton's method. This usually provides an essentially exact
+ inversion. However, the choice of starting guess and the exit
+ conditions have been tuned to cover small values of \e f and the
+ inversion may be incorrect if \e f is large.
+
+Undoubtedly, bugs lurk in this code and in the documentation. Please
+report any you find to charles@karney.com.
+
+
+Back to \ref intro. Forward to \ref start. Up to \ref contents.
+
+
+GeographicLib has been developed under Linux with the g++ compiler
+(versions 4.0 and later), under Mac OS X with Xcode (version 8.2), and
+under Windows with Visual Studio 2010 and later. Earlier versions were
+tested also under Visual Studio 2005 and 2008 and under Solaris. It
+should compile on a wide range of other systems. First download either
+
+GeographicLib-@PROJECT_VERSION@.tar.gz or
+
+GeographicLib-@PROJECT_VERSION@.zip (or
+
+GeographicLib-@PROJECT_VERSION@-win32.exe or
+
+GeographicLib-@PROJECT_VERSION@-win64.exe
+for binary installation under Windows).
+Then pick one of the first five options below:
+- \ref cmake. This is the preferred installation method as it will work
+ on the widest range of platforms. However it requires that you have
+ cmake installed.
+- \ref autoconf. This method works for most Unix-like systems,
+ including Linux and Mac OS X.
+- \ref gnu. This is a simple installation method that works with g++
+ and GNU make on Linux and many Unix platforms.
+- \ref windows. This is a simple installation method that works with
+ Visual Studio 2008 and 2010 under Windows.
+- \ref binaryinst. Use this installation method if you only need to use
+ the \ref utilities supplied with GeographicLib. (This method also
+ installs the header files and the library for use by Visual Studio 14
+ 2015.)
+- \ref qt. How to compile GeographicLib so that it can be used by Qt
+ programs.
+- \ref maintainer. This describes addition tasks of interest only to
+ the maintainers of this code.
+.
+This section documents only how to install the software. If you
+wish to use GeographicLib to evaluate geoid heights or the earth's
+gravitational or magnetic fields, then you must also install the
+relevant data files. See \ref geoidinst, \ref gravityinst, and \ref
+magneticinst for instructions.
+
+The first two installation methods use two important techniques which
+make software maintenance simpler
+- Out-of-source builds: This means that you create a separate
+ directory for compiling the code. In the description here the
+ directories are called BUILD and are located in the top-level of the
+ source tree. You might want to use a suffix to denote the type of
+ build, e.g., BUILD-vc11 for Visual Studio 11, or BUILD-shared for a
+ build which creates a shared library. The advantages of out-of-source
+ builds are:
+ - You don't mess up the source tree, so it's easy to "clean up".
+ Indeed the source tree might be on a read-only file system.
+ - Builds for multiple platforms or compilers don't interfere with each
+ other.
+- The library is installed: After compilation, there is a
+ separate install step which copies the headers, libraries,
+ tools, and documentation to a "central" location. You may at this
+ point delete the source and build directories. If you have
+ administrative privileges, you can install GeographicLib for the use
+ of all users (e.g., in /usr/local). Otherwise, you can install it for
+ your personal use (e.g., in $HOME/packages).
+
+\section cmake Installation with cmake
+
+This is the recommended method of installation; however it requires that
+cmake be installed on your system.
+This permits GeographicLib to be built either as a shared or a static
+library on a wide variety of systems. cmake can also determine the
+capabilities of your system and adjust the compilation of the
+libraries and examples appropriately.
+
+cmake is available for most computer platforms. On Linux systems cmake
+will typically one of the standard packages and can be installed by a
+command like
+ \verbatim
+ yum install cmake \endverbatim
+(executed as root). The minimum version of cmake supported for building
+GeographicLib is 2.8.4 (which was released on 2011-02-16). (Actually,
+a few earlier versions will also work for non-Windows platforms.)
+
+On other systems, download a binary installer from https://www.cmake.org
+click on download, and save and run the appropriate installer. Run the
+cmake command with no arguments to get help. Other useful tools are
+ccmake and cmake-gui which offer curses and graphical interfaces to
+cmake. Building under cmake depends on whether it is targeting an IDE
+(interactive development environment) or generating Unix-style
+makefiles. The instructions below have been tested with makefiles and
+g++ on Linux and with the Visual Studio IDE on Windows. It is known to
+work also for Visual Studio 2017 Build Tools.
+
+Here are the steps to compile and install GeographicLib:
+- Unpack the source, running one of \verbatim
+ tar xfpz GeographicLib-@PROJECT_VERSION@.tar.gz
+ unzip -q GeographicLib-@PROJECT_VERSION@.zip \endverbatim
+ then enter the directory created with \verbatim
+ cd GeographicLib-@PROJECT_VERSION@ \endverbatim
+- Create a separate build directory and enter it, for example, \verbatim
+ mkdir BUILD
+ cd BUILD \endverbatim
+- Run cmake, pointing it to the source directory (..). On Linux, Unix,
+ and MacOSX systems, the command is \verbatim
+ cmake .. \endverbatim
+ For Windows, the command is typically something like \verbatim
+ cmake -G "Visual Studio 11" -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10/GeographicLib-@PROJECT_VERSION@ ..
+ cmake -G "Visual Studio 12" -A x64 -D CMAKE_INSTALL_PREFIX=C:/pkg-vc11-x64/GeographicLib-@PROJECT_VERSION@ ..\endverbatim
+ The definitions of CMAKE_INSTALL_PREFIX are optional (see below). The
+ settings given above are recommended to ensure that packages that use
+ GeographicLib use the version compiled with the right compiler.
+ If you need to rerun cmake, use \verbatim
+ cmake . \endverbatim
+ possibly including some options via -D (see the next step).
+- cmake allows you to configure how GeographicLib is built and installed by
+ supplying options, for example \verbatim
+ cmake -D CMAKE_INSTALL_PREFIX=/tmp/geographic . \endverbatim
+ The options you might need to change are
+ - COMMON_INSTALL_PATH governs the installation
+ convention. If it is on ON (the Linux default), the installation
+ is to a common directory, e.g., /usr/local. If it is OFF (the
+ Windows default), the installation directory contains the package
+ name, e.g., C:/pkg/GeographicLib-@PROJECT_VERSION@. The installation
+ directories for the documentation, cmake configuration, Python and
+ MATLAB interfaces all depend on the variable with deeper paths
+ relative to CMAKE_INSTALL_PREFIX being used when it's ON:
+ - cmake configuration: OFF cmake; ON: lib/cmake/GeographicLib;
+ - documentation: OFF: doc/html; ON: share/doc/GeographicLib/html;
+ - JavaScript interface: OFF: node_modules; ON: lib/node_modules;
+ - Python interface: OFF: python; ON: lib/python/site-packages;
+ - MATLAB interface: OFF: matlab; ON: share/matlab.
+ .
+ - CMAKE_INSTALL_PREFIX (default: /usr/local
+ on non-Windows systems, C:/Program Files/GeographicLib
+ on Windows systems) specifies where the library will be installed.
+ For windows systems, it is recommended to use a prefix which
+ includes the compiler version, as shown above. If you just want to
+ try the library to see if it suits your needs, pick, for example,
+ CMAKE_INSTALL_PREFIX=/tmp/geographic.
+ - GEOGRAPHICLIB_DATA (default:
+ /usr/local/share/GeographicLib for non-Windows systems,
+ C:/ProgramData/GeographicLib for Windows systems) specifies the default
+ location for the various datasets for use by Geoid,
+ GravityModel, and MagneticModel.
+ See \ref geoidinst, \ref gravityinst, and \ref magneticinst for more
+ information.
+ - GEOGRAPHICLIB_LIB_TYPE (allowed values: SHARED, STATIC, or
+ BOTH), specifies the types of libraries build. The default is
+ STATIC for Windows and SHARED otherwise. If building GeographicLib
+ for system-wide use, BOTH is recommended, because this provides users
+ with the choice of which library to use.
+ - CMAKE_BUILD_TYPE (default: Release). This
+ flags only affects non-IDE compile environments (like make + g++).
+ The default is actually blank, but this is treated as
+ Release. Choose one of
+ \verbatim
+ Debug
+ Release
+ RelWithDebInfo
+ MinSizeRel
+\endverbatim
+ (With IDE compile environments, you get to select the build type in
+ the IDE.)
+ - GEOGRAPHICLIB_DOCUMENTATION (default: OFF). If set to
+ ON, then html documentation is created from the source files,
+ provided a sufficiently recent version of doxygen can be found.
+ Otherwise, the html documentation will redirect to the appropriate
+ version of the online documentation.
+ - BUILD_NETGEOGRAPHICLIB (default: OFF). If set to ON,
+ build the managed C++ wrapper library
+ NETGeographicLib. This only makes
+ sense for Windows systems.
+ - GEOGRAPHICLIB_PRECISION specifies the precision to be
+ used for "real" (i.e., floating point) numbers. Here are the
+ possible values
+ -# float (24-bit precision); typically this is far to inaccurate
+ for geodetic applications.
+ -# double precision (53-bit precision, the default).
+ -# long double (64-bit precision); this does not apply for Visual
+ Studio (long double is the same as double with that compiler).
+ -# quad precision (113-bit precision).
+ -# arbitrary precision.
+ .
+ See \ref highprec for addition information about the last two
+ values. Nearly all the testing has been carried out with doubles
+ and that's the recommended configuration. In particular you should
+ avoid "installing" the library with a precision different from
+ double.
+ - USE_BOOST_FOR_EXAMPLES (default: OFF). If set to ON,
+ then the Boost library is searched for in order to build the
+ NearestNeighbor example.
+ - APPLE_MULTIPLE_ARCHITECTURES (default: OFF). If set to
+ ON, build for i386 and x86_64 and Mac OS X systems. Otherwise,
+ build for the default architecture.
+ - CONVERT_WARNINGS_TO_ERRORS (default: OFF). If set to
+ ON, then compiler warnings are treated as errors. (This happens
+ also if you are a "developer", i.e., if the file
+ tests/CMakeLists.txt is present.)
+- Build and install the software. In non-IDE environments, run
+ \verbatim
+ make # compile the library and utilities
+ make test # run some tests
+ make install # as root, if CMAKE_INSTALL_PREFIX is a system directory
+\endverbatim
+ Possible additional targets are \verbatim
+ make dist
+ make exampleprograms
+ make netexamples (supported only for Release configuration) \endverbatim
+ On IDE environments, run your IDE (e.g., Visual Studio), load
+ GeographicLib.sln, pick the build type (e.g., Release), and select
+ "Build Solution". If this succeeds, select "RUN_TESTS" to build;
+ finally, select "INSTALL" to install (RUN_TESTS and INSTALL are in
+ the CMakePredefinedTargets folder). Alternatively (for example, if
+ you are using the Visual Studio 2017 Build Tools), you run the Visual
+ Studio compiler from the command line with \verbatim
+ cmake --build . --config Release --target ALL_BUILD
+ cmake --build . --config Release --target RUN_TESTS
+ cmake --build . --config Release --target INSTALL \endverbatim
+ For maximum flexibility, it's a good idea to build and install both
+ the Debug and Release versions of the library (in that order). The
+ installation directories will then contain the release versions of the
+ tools and both versions (debug and release) of the libraries.
+ If you use cmake to configure and build your programs, then the right
+ version of the library (debug vs. release) will automatically be used.
+- The headers, library, and utilities are installed in the
+ include/GeographicLib, lib, and bin directories under
+ CMAKE_INSTALL_PREFIX. (dll dynamic libraries are
+ installed in bin.) For documentation, open in a web browser
+
+ PREFIX/share/doc/GeographicLib/html/index.html, if
+ COMMON_INSTALL_PATH is ON, or
+ PREFIX/doc/index.html, otherwise.
+
+\section autoconf Installation using the autoconfigure tools
+
+The method works on most Unix-like systems including Linux and Mac OS X.
+Here are the steps to compile and install GeographicLib:
+- Unpack the source, running \verbatim
+ tar xfpz GeographicLib-@PROJECT_VERSION@.tar.gz \endverbatim
+ then enter the directory created \verbatim
+ cd GeographicLib-@PROJECT_VERSION@ \endverbatim
+- Create a separate build directory and enter it, for example, \verbatim
+ mkdir BUILD
+ cd BUILD \endverbatim
+- Configure the software, specifying the path of the source directory,
+ with \verbatim
+ ../configure \endverbatim
+- By default GeographicLib will be installed under /usr/local.
+ You can change this with, for example \verbatim
+ ../configure --prefix=/tmp/geographic \endverbatim
+- Compile and install the software with \verbatim
+ make
+ make install \endverbatim
+- The headers, library, and utilities are installed in the
+ include/GeographicLib, lib, and bin directories under
+ prefix. For documentation, open
+ share/doc/GeographicLib/html/index.html in a web browser.
+
+\section gnu Installation with GNU compiler and Make
+
+This method requires the standard GNU suite of tools, in particular make
+and g++. This builds a static library and the examples.
+
+Here are the steps to compile and install GeographicLib:
+- Unpack the source, running \verbatim
+ tar xfpz GeographicLib-@PROJECT_VERSION@.tar.gz \endverbatim
+ then enter the directory created \verbatim
+ cd GeographicLib-@PROJECT_VERSION@ \endverbatim
+- Edit \verbatim
+ include/GeographicLib/Config.h \endverbatim
+ If your C++ compiler does not recognize the long double type
+ (unlikely), insert \code
+ #undef GEOGRAPHICLIB_HAVE_LONG_DOUBLE \endcode
+ If your machine using big endian ordering, then insert \code
+ #define GEOGRAPHICLIB_WORDS_BIGENDIAN 1 \endcode
+- Build and install the software: \verbatim
+ make # compile the library and the examples
+ make install # as root \endverbatim
+ The installation is in directories under /usr/local. You
+ can specify a different installation directory with, for example,
+ \verbatim
+ make PREFIX=/tmp/geographic install \endverbatim
+- The headers, library, and utilities are installed in the
+ include/GeographicLib, lib, and bin directories under
+ PREFIX. For documentation, open
+ share/doc/GeographicLib/html/index.html in a web browser.
+
+\section windows Installation on Windows
+
+This method requires Visual Studio 2008 or 2010. This builds a static
+library and the utilities. If you have some other version of Visual
+Studio, use cmake to create the necessary solution file, see \ref cmake.
+(cmake is needed to run the tests.)
+- Unpack the source, running \verbatim
+ unzip -q GeographicLib-@PROJECT_VERSION@.zip \endverbatim
+- Open GeographicLib-@PROJECT_VERSION@/windows/GeographicLib-vc10.sln in
+ Visual Studio 2010 (for Visual Studio 2008, replace -vc10 by -vc9; for
+ Visual Studio Express 2010, replace -vc10 by -vc10x).
+- Pick the build type (e.g., Release), and select "Build Solution".
+- The library and the compiled examples are in the windows/Release.
+- Copy the library windows/Release/GeographicLib.lib and the headers in
+ include/GeographicLib somewhere convenient. The headers should remain
+ in a directory named GeographicLib. For documentation, open
+ doc/html/index.html in a web browser.
+
+The Visual Studio 10 solution also contains projects to build
+NETGeographicLib and the C# example project.
+
+\section binaryinst Using a binary installer
+
+Binary installers are available for some platforms
+
+\subsection binaryinstwin Windows
+
+Use this method if you only need to use the GeographicLib utilities.
+The header files and static and shared versions of library are also
+provided; these can only be used by Visual Studio 14 2015 (in either
+release or debug mode). However, if you plan to use the library, it may
+be advisable to build it with the compiler you are using for your own
+code using either \ref cmake or \ref windows.
+
+Download and run
+
+GeographicLib-@PROJECT_VERSION@-win32.exe or
+
+GeographicLib-@PROJECT_VERSION@-win64.exe:
+ - read the MIT/X11 License agreement,
+ - select whether you want your PATH modified,
+ - select the installation folder, by default
+ C:\\pkg-vc12-win32\\GeographicLib-@PROJECT_VERSION@ or
+ C:\\pkg-vc12-x64\\GeographicLib-@PROJECT_VERSION@,
+ - select the start menu folder,
+ - and install.
+ .
+(Note that the default installation folder adheres the the convention
+given in \ref cmake.) The start menu will now include links to the
+documentation for the library and for the utilities (and a link for
+uninstalling the library). If you ask for your PATH to be modified, it
+will include C:/pkg-vc12-{win32,x64}/GeographicLib-@PROJECT_VERSION@/bin
+where the utilities are installed. The headers and library are
+installed in the include/GeographicLib and lib folders. The libraries
+were built using using Visual Studio 14 2015 in release and debug modes.
+The utilities were linked against the release-mode shared library.
+
+NETGeographicLib library dlls (release and
+debug) are included with the binary installers; these are linked against
+the shared library for GeographicLib.
+
+\subsection binaryinstosx MacOSX
+
+You can install using Homebrew. Follow the directions on
+https://brew.sh/ for installing this package manager. Then type
+\verbatim
+brew install geographiclib \endverbatim
+Now links to GeographicLib are installed under /usr/local.
+
+\subsection binaryinstlin Linux
+
+Some Linux distributions, Fedora, Debian, and Ubuntu, offer
+GeographicLib as a standard package. Typically these will be one or two
+versions behind the latest.
+
+\section qt Building the library for use with Qt
+
+If Qt is using a standard compiler, then build GeographicLib with that
+same compiler (and optimization flags) as Qt.
+
+If you are using the mingw compiler on Windows for Qt, then you need to
+build GeographicLib with mingw. You can accomplish this with cmake
+under cygwin with, for example, \verbatim
+ export PATH="`cygpath -m c:/QtSDK/mingw/bin`:$PATH"
+ mkdir BUILD
+ cd BUILD
+ cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=C:/pkg-mingw/GeographicLib ..
+ mingw32-make
+ mingw32-make install \endverbatim
+If cmake complains that sh mustn't be in your path, invoke cmake with
+\verbatim
+ env PATH="$( echo $PATH | tr : '\n' |
+ while read d; do test -f "$d/sh.exe" || echo -n "$d:"; done |
+ sed 's/:$//' )" \
+ cmake -G "MinGW Makefiles" -D CMAKE_INSTALL_PREFIX=C:/pkg-mingw/GeographicLib ..
+\endverbatim
+
+\section maintainer Maintainer tasks
+
+Check the code out of git with \verbatim
+ git clone -b master git://git.code.sourceforge.net/p/geographiclib/code geographiclib
+\endverbatim
+Here the "master" branch is checked out. There are three branches in
+the git repository:
+- master: the main branch for code maintenance. Releases are
+ tagged on this branch as, e.g., v@PROJECT_VERSION@.
+- devel: the development branch; changes made here are merged
+ into master.
+- release: the release branch created by unpacking the source
+ releases (git is \e not used to merge changes from the other
+ branches into this branch). This is the \e default branch of the
+ repository (the branch you get if cloning the repository without
+ specifying a branch). This differs from the master branch in that
+ some administrative files are excluded while some intermediate files
+ are included (in order to aid building on as many platforms as
+ possible). Releases are tagged on this branch as, e.g.,
+ r@PROJECT_VERSION@.
+.
+The autoconf configuration script and the formatted man pages are not
+checked into master branch of the repository. In order to create the
+autoconf configuration script, run \verbatim
+ sh autogen.sh \endverbatim
+in the top level directory. Provided you are running on a system with
+doxygen, pod2man, and pod2html installed, then you can create the
+documentation and the man pages by building the system using cmake or
+configure.
+
+In the case of cmake, you then run \verbatim
+ make dist \endverbatim
+which will copy the man pages from the build directory back into the
+source tree and package the resulting source tree for distribution as
+\verbatim
+ GeographicLib-@PROJECT_VERSION@.tar.gz
+ GeographicLib-@PROJECT_VERSION@.zip \endverbatim
+Finally, \verbatim
+ make package \endverbatim
+or building PACKAGE in Visual Studio will create a binary installer for
+GeographicLib. For Windows, this requires in the installation of
+NSIS. On Windows, you should
+configure GeographicLib with PACKAGE_DEBUG_LIBS=ON, build both
+Release and Debug versions of the library and finally build PACKAGE in
+Release mode. This will get the release and debug versions of the
+library included in the package. For example, the 64-bit binary
+installer is created with \verbatim
+ cmake -G "Visual Studio 12" -A x64 \
+ -D GEOGRAPHICLIB_LIB_TYPE=BOTH \
+ -D PACKAGE_DEBUG_LIBS=ON \
+ -D BUILD_NETGEOGRAPHICLIB=ON \
+ ..
+ cmake --build . --config Debug --target ALL_BUILD
+ cmake --build . --config Release --target ALL_BUILD
+ cmake --build . --config Release --target matlabinterface
+ cmake --build . --config Release --target PACKAGE \endverbatim
+
+With configure, run \verbatim
+ make dist-gzip \endverbatim
+which will create the additional files and packages the results ready
+for distribution as \verbatim
+ geographiclib-@PROJECT_VERSION@.tar.gz \endverbatim
+
+Prior to making a release, the script
+tests/test-distribution.sh is run on a Fedora system. This
+checked that the library compiles correctly is multiple configurations.
+In addition it creates a directory and scripts for checking the
+compilation on Windows.
+
+The following Fedora packages are required by
+tests/test-distribution.sh
+- cmake
+- automake
+- autoconf-archive
+- libtool
+- gcc-c++
+- gcc-gfortran
+- ccache
+- doxygen
+- boost-devel
+- octave
+- python2-sphinx
+- nodejs
+- maven
+.
+The following npm packages need to be installed \verbatim
+ npm install -g mocha jsdoc \endverbatim
+A recent version of mpreal.h needs to be downloaded from
+https://bitbucket.org/advanpix/mpreal and installed
+in the include/ directory. For all the tests to be run,
+the following datasets need to be installed
+- geoid models: egm96-5
+- magnetic models: wmm2010 emm2015
+- gravity models: egm2008 grs80
+
+
+Back to \ref intro. Forward to \ref start. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page start Getting started
+
+
+Back to \ref install. Forward to \ref utilities. Up to \ref contents.
+
+
+Much (but not all!) of the useful functionality of GeographicLib is
+available via simple command line utilities. Interfaces to some of them
+are available via the web. See \ref utilities for documentation on
+these.
+
+In order to use GeographicLib from C++ code, you will need to
+- Include the header files for the GeographicLib classes in your code.
+ E.g., \code
+ #include \endcode
+- Include the GeographicLib:: namespace prefix to the GeographicLib classes,
+ or include \code
+ using namespace GeographicLib; \endcode
+ in your code.
+- Finally compile and link your code. You have two options here.
+ - Use cmake to build your package. If you are familiar with cmake
+ this typically will be far the simplest option.
+ - Set the include paths and linking options "manually".
+- Building your code with cmake. In brief, the necessary steps are:
+ - include in your CMakeLists.txt files \verbatim
+ find_package (GeographicLib 1.34 REQUIRED)
+ include_directories (${GeographicLib_INCLUDE_DIRS})
+ add_definitions (${GeographicLib_DEFINITIONS})
+ add_executable (program source1.cpp source2.cpp)
+ target_link_libraries (program ${GeographicLib_LIBRARIES}) \endverbatim
+ If you're using cmake version 2.8.11 or later, you can omit the
+ include_directories and add_definitions
+ lines.
+ - configure your package, e.g., with \verbatim
+ mkdir BUILD
+ cd BUILD
+ cmake -G "Visual Studio 12" -A x64 \
+ -D CMAKE_PREFIX_PATH=C:/pkg-vc10-x64 \
+ -D CMAKE_INSTALL_PREFIX=C:/pkg-vc10-x64/testgeographic \
+ .. \endverbatim
+ Note that you almost always want to configure and build your code
+ somewhere other than the source directory (in this case, we use the
+ BUILD subdirectory). Also, on Windows, make sure that the version
+ of Visual Sudio (12 in the example above) architecture (x64 in the
+ example above) matches that used to build GeographicLib.
+ - build your package. On Linux and MacOS this usually involves just
+ running make. On Windows, you can load the solution file created by
+ cmake into Visual Studio; alternatively, you can get cmake to run
+ build your code with \verbatim
+ cmake --build . --config Release --target ALL_BUILD \endverbatim
+ You might also want to install your package (using "make install" or
+ build the "INSTALL" target with the command above).
+ .
+ The most import step is the find_package command. The cmake
+ documentation describes the locations searched by find_package (the
+ appropriate rule for GeographicLib are those for "Config" mode lookups).
+ In brief, the locations that are searched are (from least specific to
+ most specific, i.e., in reverse order) are
+ - under the system paths, i.e., locations such as C:/Program
+ Files and /usr/local);
+ - frequently, it's necessary to search within a "package directory"
+ (or set of directories) for external dependencies; this is given by
+ a (semicolon separated) list of directories specified by the cmake
+ variable CMAKE_PREFIX_PATH (illustrated above);
+ - the package directory for GeographicLib can be overridden with the
+ environment variableGeographicLib_DIR (which is the
+ directory under which GeographicLib is installed);
+ - finally, if you need to point to a particular build of GeographicLib,
+ define the cmake variableGeographicLib_DIR, which
+ specifies the absolute path of the directory containing the
+ configuration file geographiclib-config.cmake (for
+ debugging this may be the top-level build directory, as
+ opposed to installation directory, for GeographicLib).
+ .
+ Typically, specifying nothing or CMAKE_PREFIX_PATH
+ suffices. However the two GeographicLib_DIR variables allow
+ for a specific version to be chosen. On Windows systems (with Visual
+ Studio), find_package will only find versions of GeographicLib built with
+ the right version of the compiler. (If you used a non-cmake method of
+ installing GeographicLib, you can try copying cmake/FindGeographicLib.cmake
+ to somewhere in your CMAKE_MODULE_PATH in order for
+ find_package to work. However, this method has not been thoroughly
+ tested.)
+
+ If GeographicLib is not found, check the values of
+ GeographicLib_CONSIDERED_CONFIGS and
+ GeographicLib_CONSIDERED_VERSIONS; these list the
+ configuration files and corresponding versions which were considered
+ by find_package.
+
+ If GeographicLib is found, then the following cmake variables are set:
+ - GeographicLib_FOUND = 1
+ - GeographicLib_VERSION = @PROJECT_VERSION@
+ - GeographicLib_INCLUDE_DIRS
+ - GeographicLib_LIBRARIES = one of the following two:
+ - GeographicLib_SHARED_LIBRARIES = GeographicLib
+ - GeographicLib_STATIC_LIBRARIES = GeographicLib_STATIC
+ - GeographicLib_DEFINITIONS = one of the following two:
+ - GeographicLib_SHARED_DEFINITIONS = -DGEOGRAPHICLIB_SHARED_LIB=1
+ - GeographicLib_STATIC_DEFINITIONS = -DGEOGRAPHICLIB_SHARED_LIB=0
+ - GeographicLib_LIBRARY_DIRS
+ - GeographicLib_BINARY_DIRS
+ - GEOGRAPHICLIB_DATA = value of this compile-time parameter
+ .
+ Either of GeographicLib_SHARED_LIBRARIES or
+ GeographicLib_STATIC_LIBRARIES may be empty, if that version
+ of the library is unavailable. If you require a specific version,
+ SHARED or STATIC, of the library, add a COMPONENTS clause
+ to find_package, e.g.,
+ \verbatim
+ find_package (GeographicLib 1.34 REQUIRED COMPONENTS SHARED) \endverbatim
+ causes only packages which include the shared library to be found. If
+ the package includes both versions of the library, then
+ GeographicLib_LIBRARIES and
+ GeographicLib_DEFINITIONS are set to the shared versions,
+ unless you include \verbatim
+ set (GeographicLib_USE_STATIC_LIBS ON) \endverbatim
+ before the find_package command. You can check whether
+ GeographicLib_LIBRARIES refers to the shared or static
+ library with \verbatim
+ get_target_property(_LIBTYPE ${GeographicLib_LIBRARIES} TYPE) \endverbatim
+ which results in _LIBTYPE being set to
+ SHARED_LIBRARY or STATIC_LIBRARY.
+ On Windows, cmake takes care of linking to the release or debug
+ version of the library as appropriate. (This assumes that the Release
+ and Debug versions of the libraries were built and installed. This is
+ true for the Windows binary installer for GeographicLib version 1.34 and
+ later.)
+- Here are the steps to compile and link your code using GeographicLib
+ "manually".
+ - Tell the compiler where to find the header files. With g++ and with
+ /usr/local specified as the installation directory,
+ this is accomplished with \verbatim
+ g++ -c -g -O3 -I/usr/local/include testprogram.cpp
+ \endverbatim
+ With Visual Studio, specify the include directory in the IDE via,
+ e.g.,
+ \verbatim
+ C/C++ -> General -> Additional Include Directories = C:\pkg-vc10\GeographicLib\include
+ \endverbatim
+ - If using the shared (or static) library with Visual Studio, define
+ the macro GEOGRAPHICLIB_SHARED_LIB=1 (or
+ 0), e.g.,
+ \verbatim
+ C/C++ -> Preprocessor -> Preprocessor Definitions = GEOGRAPHICLIB_SHARED_LIB=1
+ \endverbatim
+ This is only needed for Windows systems when both shared and static
+ libraries have been installed. (If you configure your package with
+ cmake, this definition is added automatically.)
+ - Tell the linker the name, Geographic, and location of the
+ library. Using g++ as the linker, you would use \verbatim
+ g++ -g -o testprogram testprogram.o -L/usr/local/lib -lGeographic
+ \endverbatim
+ With Visual Studio, you supply this information in the IDE via,
+ e.g., \verbatim
+ Linker -> Input -> Additional Dependencies = Geographic-i.lib (for shared library)
+ Linker -> Input -> Additional Dependencies = Geographic.lib (for static library)
+ Linker -> General -> Additional Library Directories = C:\pkg-vc10\Geographic\lib
+ \endverbatim
+ Note that the library name is Geographic and not
+ GeographicLib. For the Debug version of your program on Windows
+ add "_d" to the library, e.g., Geographic_d-i.lib or
+ Geographic_d.lib.
+ - Tell the runtime environment where to find the shared library
+ (assuming you compiled %Geographic as a shared library). With g++,
+ this is accomplished by modifying the link line above to read \verbatim
+ g++ -g -o testprogram testprogram.o -Wl,-rpath=/usr/local/lib \
+ -L/usr/local/lib -lGeographic
+ \endverbatim
+ (There are two other ways to specify the location of shared libraries
+ at runtime: (1) define the environment variable
+ LD_LIBRARY_PATH to be a colon-separated list of
+ directories to search; (2) as root, specify /usr/local/lib as a
+ directory searched by ldconfig(8).) On Windows, you need to ensure
+ that Geographic.dll or Geographic_d.dll is in the same directory as
+ your executable or else include the directory containing the dll in
+ your PATH.
+ - You can also use the pkg-config utility to specify compile and link
+ flags. This requires that pkg-config be installed and that it's
+ configured to search, e.g., /usr/local/lib/pgkconfig; if not, define
+ the environment variable PKG_CONFIG_PATH to include
+ this directory. The compile and link steps under Linux would
+ typically be
+ \verbatim
+ g++ -c -g -O3 `pkg-config --cflags geographiclib` testprogram.cpp
+ g++ -g -o testprogram testprogram.o `pkg-config --libs geographiclib`
+ \endverbatim
+
+Here is a very simple test code, which uses the Geodesic
+class:
+\include example-Geodesic-small.cpp
+This example is examples/example-Geodesic-small.cpp. If you
+compile, link, and run it according to the instructions above, it should
+print out \verbatim
+ 5551.76 km \endverbatim
+Here is a complete CMakeList.txt files you can use to build this test
+code using the installed library: \verbatim
+project (geodesictest)
+cmake_minimum_required (VERSION 2.8.4)
+
+find_package (GeographicLib 1.34 REQUIRED)
+
+if (NOT MSVC)
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif ()
+
+if (CMAKE_VERSION VERSION_LESS 2.8.11)
+ include_directories (${GeographicLib_INCLUDE_DIRS})
+ add_definitions (${GeographicLib_DEFINITIONS})
+endif ()
+add_executable (${PROJECT_NAME} example-Geodesic-small.cpp)
+target_link_libraries (${PROJECT_NAME} ${GeographicLib_LIBRARIES})
+
+if (MSVC)
+ get_target_property (_LIBTYPE ${GeographicLib_LIBRARIES} TYPE)
+ if (_LIBTYPE STREQUAL "SHARED_LIBRARY")
+ # On Windows systems, copy the shared library to build directory
+ add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E
+ copy $ ${CMAKE_CFG_INTDIR}
+ COMMENT "Copying shared library for GeographicLib")
+ endif ()
+endif () \endverbatim
+
+The next steps are:
+ - Learn about and run the \ref utilities.
+ - Read the section, \ref organization, for an overview of the library.
+ - Browse the Class List for full documentation
+ on the classes in the library.
+ - Look at the example code in the examples directory. Each file
+ provides a very simple standalone example of using one GeographicLib
+ class. These are included in the descriptions of the classes.
+ - Look at the source code for the utilities in the tools directory for
+ more examples of using GeographicLib from C++ code, e.g.,
+ GeodesicProj.cpp is a program to performing various geodesic
+ projections.
+
+Here's a list of some of the abbreviations used here with links to the
+corresponding Wikipedia articles:
+ -
+ WGS84, World Geodetic System 1984.
+ -
+ UTM, Universal Transverse Mercator coordinate system.
+ -
+ UPS, Universal Polar Stereographic coordinate system.
+ -
+ MGRS, Military Grid Reference System.
+ -
+ EGM, Earth Gravity Model.
+ -
+ WMM, World Magnetic Model.
+ -
+ IGRF, International Geomagnetic Reference Field.
+
+
+Back to \ref install. Forward to \ref utilities. Up to \ref contents.
+
+Back to \ref start. Forward to \ref organization. Up to \ref contents.
+
+
+Various utility programs are provided with GeographicLib. These should
+be installed in a directory included in your PATH (e.g.,
+/usr/local/bin). These programs are wrapper programs that invoke
+the underlying functionality provided by the library.
+
+The utilities are
+ -
+ GeoConvert: convert geographic coordinates using
+ GeoCoords. See \ref GeoConvert.cpp.
+ -
+ GeodSolve: perform geodesic calculations using
+ Geodesic and GeodesicLine. See \ref GeodSolve.cpp.
+ -
+ Planimeter: compute the area of geodesic polygons using
+ PolygonAreaT. See \ref Planimeter.cpp.
+ -
+ TransverseMercatorProj: convert between geographic
+ and transverse Mercator. This is for testing
+ TransverseMercatorExact and
+ TransverseMercator. See \ref TransverseMercatorProj.cpp.
+ -
+ CartConvert: convert geodetic coordinates to geocentric or
+ local cartesian using Geocentric and
+ LocalCartesian. See \ref CartConvert.cpp.
+ -
+ GeodesicProj: perform projections based on geodesics
+ using AzimuthalEquidistant, Gnomonic,
+ and CassiniSoldner. See \ref GeodesicProj.cpp.
+ -
+ ConicProj: perform conic projections using
+ LambertConformalConic and
+ AlbersEqualArea. See \ref ConicProj.cpp.
+ -
+ GeoidEval: look up geoid heights using
+ Geoid. See \ref GeoidEval.cpp.
+ -
+ Gravity: compute the earth's gravitational field using
+ GravityModel and GravityCircle. See \ref Gravity.cpp.
+ -
+ MagneticField: compute the earth's magnetic field using
+ MagneticModel and MagneticCircle. See \ref MagneticField.cpp.
+ -
+ RhumbSolve: perform rhumb line calculations using Rhumb
+ and RhumbLine. See \ref RhumbSolve.cpp.
+ .
+The documentation for these utilities is in the form of man pages. This
+documentation can be accessed by clicking on the utility name in the
+list above, running the man command on Unix-like systems, or by invoking
+the utility with the \--help option. A brief summary of
+usage is given by invoking the utility with the -h option.
+The version of the utility is given by the \--version
+option.
+
+The utilities all accept data on standard input, transform it in some
+way, and print the results on standard output. This makes the utilities
+easy to use within scripts to transform tabular data; however they can
+also be used interactively, often with the input supplied via a pipe,
+e.g.,
+ - echo 38SMB4488 | GeoConvert -d
+
+Online versions of four of these utilities are provided:
+ - GeoConvert
+ - GeodSolve
+ - Planimeter
+ - GeoidEval
+ - RhumbSolve
+
+
+Back to \ref start. Forward to \ref organization. Up to \ref contents.
+
+Back to \ref utilities. Forward to \ref other. Up to \ref contents.
+
+
+Here is a brief description of the relationship between the various
+components of GeographicLib. All of these are defined in the
+GeographicLib namespace.
+
+TransverseMercator, PolarStereographic, LambertConformalConic, and
+AlbersEqualArea provide the basic projections. The constructors for
+these classes specify the ellipsoid and the forward and reverse
+projections are implemented as const member functions.
+TransverseMercator uses Krüger's series which have been extended to
+sixth order in the square of the eccentricity. PolarStereographic,
+LambertConformalConic, and AlbersEqualArea use the exact formulas for
+the projections (e.g., from Snyder).
+
+TransverseMercator::UTM and PolarStereographic::UPS are const static
+instantiations specific for the WGS84 ellipsoid with the UTM and UPS
+scale factors. (These do \e not add the standard false eastings or
+false northings for UTM and UPS.) Similarly
+LambertConformalConic::Mercator is a const static instantiation of this
+projection for a WGS84 ellipsoid and a standard parallel of 0 (which
+gives the Mercator projection). AlbersEqualArea::CylindricalEqualArea,
+AzimuthalEqualAreaNorth, and AzimuthalEqualAreaSouth, likewise provide
+special cases of the equal area projection.
+
+UTMUPS uses TransverseMercator::UTM and PolarStereographic::UPS to
+perform the UTM and UPS projections. The class offers a uniform
+interface to UTM and UPS by treating UPS as UTM zone 0. This class
+stores no internal state and the forward and reverse projections are
+provided via static member functions. The forward projection offers the
+ability to override the standard UTM/UPS choice and the UTM zone.
+
+MGRS transforms between UTM/UPS coordinates and MGRS.
+UPS coordinates are handled as UTM zone 0. This class stores no
+internal state and the forward (UTM/UPS to MGRS) and reverse (MGRS to
+UTM/UPS) conversions are provided via static member functions.
+
+GeoCoords holds a single geographic location which may be
+specified as latitude and longitude, UTM or UPS, or MGRS. Member
+functions are provided to convert between coordinate systems and to
+provide formatted representations of them.
+GeoConvert is a simple command line
+utility to provide access to the GeoCoords class.
+
+TransverseMercatorExact is a drop in replacement for TransverseMercator
+which uses the exact formulas, based on elliptic functions, for the
+projection as given by Lee.
+TransverseMercatorProj is a
+simple command line utility to test to the TransverseMercator and
+TransverseMercatorExact.
+
+Geodesic and GeodesicLine perform geodesic calculations. The
+constructor for Geodesic specifies the ellipsoid and the direct and
+inverse calculations are implemented as const member functions.
+Geocentric::WGS84 is a const static instantiation of Geodesic specific
+for the WGS84 ellipsoid. In order to perform a series of direct
+geodesic calculations on a single line, the GeodesicLine class can be
+used. This packages all the information needed to specify a geodesic.
+A const member function returns the coordinates a specified distance
+from the starting point. GeodSolve is a
+simple command line utility to perform geodesic calculations.
+PolygonAreaT is a class which compute the area of geodesic polygons
+using the Geodesic class and Planimeter
+is a command line utility for the same purpose. AzimuthalEquidistant,
+CassiniSoldner, and Gnomonic are projections based on the Geodesic
+class. GeodesicProj is a command line
+utility to exercise these projections.
+
+GeodesicExact and GeodesicLineExact are drop in replacements for
+Geodesic and GeodesicLine in which the solution is given in terms of
+elliptic integrals (computed by EllipticFunction). These classes should
+be used if the absolute value of the flattening exceeds 0.02. The -E
+option to GeodSolve uses these classes.
+
+NearestNeighbor is a header-only class for efficiently \ref nearest of a
+collection of points where the distance function obeys the triangle
+inequality. The geodesic distance obeys this condition.
+
+Geocentric and LocalCartesian convert between
+geodetic and geocentric or a local cartesian system. The constructor for
+specifies the ellipsoid and the forward and reverse projections are
+implemented as const member functions. Geocentric::WGS84 is a
+const static instantiation of Geocentric specific for the WGS84 ellipsoid.
+CartConvert is a simple command line
+utility to provide access to these classes.
+
+Geoid evaluates geoid heights by interpolation. This is
+provided by the operator() member function.
+GeoidEval is a simple command line
+utility to provide access to this class. This class requires
+installation of data files for the various geoid models; see \ref
+geoidinst for details.
+
+Ellipsoid is a class which performs latitude
+conversions and returns various properties of the ellipsoid.
+
+GravityModel evaluates the earth's gravitational field using a
+particular gravity model. Various member functions return the
+gravitational field, the gravity disturbance, the gravity anomaly, and
+the geoid height Gravity is a simple
+command line utility to provide access to this class. If the field
+several points on a circle of latitude are sought then use
+GravityModel::Circle to return a GravityCircle object whose member
+functions performs the calculations efficiently. (This is particularly
+important for high degree models such as EGM2008.) These classes
+requires installation of data files for the various gravity models; see
+\ref gravityinst for details. NormalGravity computes the gravity of the
+so-called level ellipsoid.
+
+MagneticModel evaluates the earth's magnetic field using a particular
+magnetic model. The field is provided by the operator() member
+function. MagneticField is a simple
+command line utility to provide access to this class. If the field
+several points on a circle of latitude are sought then use
+MagneticModel::Circle to return a MagneticCircle object whose operator()
+member function performs the calculation efficiently. (This is
+particularly important for high degree models such as emm2010.) These
+classes requires installation of data files for the various magnetic
+models; see \ref magneticinst for details.
+
+Constants, Math, Utility, DMS, are general utility class which are used
+internally by the library; in addition EllipticFunction is used by
+TransverseMercatorExact, Ellipsoid, and GeodesicExact, and
+GeodesicLineExact; Accumulator is used by PolygonAreaT, and
+SphericalEngine, CircularEngine, SphericalHarmonic, SphericalHarmonic1,
+and SphericalHarmonic2 facilitate the summation of spherical harmonic
+series which is needed by and MagneticModel and MagneticCircle. One
+important definition is Math::real which is the type used for real
+numbers. This allows the library to be easily switched to using floats,
+doubles, or long doubles. However all the testing has been with real
+set to double and the library should be installed in this way.
+
+GeographicLib uniformly represents all angle-like variables (latitude,
+longitude, azimuth) in terms of degrees. To convert from degrees to
+radians, multiple the quantity by Math::degree(). To convert from
+radians to degrees , divide the quantity by Math::degree().
+
+In general, the constructors for the classes in GeographicLib check
+their arguments and throw GeographicErr exceptions with a
+explanatory message if these are illegal. The member functions, e.g.,
+the projections implemented by TransverseMercator and
+PolarStereographic, the solutions to the geodesic problem, etc.,
+typically do not check their arguments; the calling program
+should ensure that the arguments are legitimate. However, the functions
+implemented by UTMUPS, MGRS, and GeoCoords do check their arguments and
+may throw GeographicErr exceptions. Similarly Geoid may
+throw exceptions on file errors. If a function does throw an exception,
+then the function arguments used for return values will not have been
+altered.
+
+GeographicLib attempts to act sensibly with NaNs. NaNs in constructors
+typically throw errors (an exception is GeodesicLine). However, calling
+the class functions with NaNs as arguments is not an error; NaNs are
+returned as appropriate. "INV" is treated as an invalid zone
+designation by UTMUPS. "INVALID" is the corresponding invalid MGRS
+string (and similarly for GARS, Geohash, and Georef strings). NaNs
+allow the projection of polylines which are separated by NaNs; in this
+format they can be easily plotted in MATLAB.
+
+A note about portability. For the most part, the code uses standard C++
+and should be able to be deployed on any system with a modern C++
+compiler. System dependencies come into
+ - Math -- GeographicLib needs to define functions such
+ as atanh for systems that lack them. The system dependence will
+ disappear with the adoption of C++11 because the needed functions are
+ part of that standard.
+ - use of long double -- the type is used only for testing. On systems
+ which lack this data type the cmake and autoconf configuration
+ methods should detect its absence and omit the code that depends on
+ it.
+ - Geoid, GravityModel, and
+ MagneticModel -- these class uses system-dependent
+ default paths for looking up the respective datasets. It also relies
+ on getenv to find the value of the environment variables.
+ - Utility::readarray reads numerical data from binary
+ files. This assumes that floating point numbers are in IEEE format.
+ It attempts to handled the "endianness" of the target platform using
+ the GEOGRAPHICLIB_WORDS_BIGENDIAN macro (which sets the compile-time
+ constant Math::bigendian).
+
+An attempt is made to maintain backward compatibility with GeographicLib
+(especially at the level of your source code). Sometimes it's necessary
+to take actions that depend on what version of GeographicLib is being
+used; for example, you may want to use a new feature of GeographicLib,
+but want your code still to work with older versions. In that case, you
+can test the values of the macros GEOGRAPHICLIB_VERSION_MAJOR,
+GEOGRAPHICLIB_VERSION_MINOR, and GEOGRAPHICLIB_VERSION_PATCH; these
+expand to numbers (and the last one is usually 0); these macros appeared
+starting in version 1.31. There's also a macro
+GEOGRAPHICLIB_VERSION_STRING which expands to, e.g.,
+"@PROJECT_VERSION@"; this macro has been defined since version 1.9.
+Since version 1.37, there's also been a macro GEOGRAPHICLIB_VERSION
+which encodes the version as a single number, e.g, 1003900. Do not rely
+on this particular packing; instead use the macro
+GEOGRAPHICLIB_VERSION_NUM(a,b,c) which allows you to compare versions
+with, e.g.,
+\code
+#if GEOGRAPHICLIB_VERSION >= GEOGRAPHICLIB_VERSION_NUM(1,37,0)
+...
+#endif \endcode
+
+
+Back to \ref utilities. Forward to \ref other. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page other Implementations in other languages
+
+
+Back to \ref organization. Forward to \ref geoid. Up to \ref contents.
+
+
+Various subsets of GeographicLib have been implemented in other
+languages. In some cases, these are available as independent packages.
+Here is a summary:
+- C (geodesic routines):
+
+ documentation, also included with recent versions of
+
+ proj.4;
+- Fortran (geodesic routines):
+
+ documentation;
+- Java (geodesic routines):
+
+ Maven Central package,
+
+ documentation;
+- JavaScript (geodesic routines):
+
+ npm package,
+
+ documentation;
+- Python (geodesic routines):
+
+ PyPI package,
+
+ documentation;
+- MATLAB/Octave (geodesic and some other routines):
+
+ MATLAB Central package,
+
+ documentation;
+- C# (.NET wrapper for C++ library):
+
+ documentation.
+
+Some more details are available in the following sections
+- \ref c-fortran
+- \ref java.
+- \ref javascript.
+- \ref python.
+- \ref matlab.
+- \ref dotnet.
+- \ref maxima.
+
+\section c-fortran C and Fortran implementation
+
+This includes the geodesic capabilities of GeographicLib. The source
+code is in the directories legacy/C and
+legacy/Fortran. These are intended for use in old codes
+written in these languages and should work any reasonably modern
+compiler. These implementations are entirely self-contained and do not
+depend on the rest of GeographicLib. Sample main programs to solve the
+direct and inverse geodesic problems and to compute polygonal areas are
+provided.
+
+The C library is also included as part of
+proj.4 starting with
+version 4.9.0, where it is used as the computational backend for
+geod(1).
+
+For documentation, see
+ - C library for geodesics,
+ - Fortran library for geodesics.
+
+It is also possible to call the C++ version of GeographicLib directly
+from C and the directory wrapper/C contains a small
+example, which converts heights above the geoid to heights above the
+ellipsoid.
+
+\section java Java implementation
+
+This includes the geodesic capabilities of GeographicLib. The source
+code is in the directory java. This implementation is
+entirely self-contained and does not depend on the rest of
+GeographicLib. Sample main programs to solve the direct and inverse
+geodesic problems and to compute polygonal areas are provided.
+
+This package is available on Maven Central; so if you're using Apache
+Maven as your build system, you can use this package by including the
+dependency \verbatim
+
+ net.sf.geographiclib
+ GeographicLib-Java
+ 1.46
+
+ \endverbatim
+in your pom.xml.
+
+For documentation, see
+ - Java library for geodesics.
+
+\section javascript JavaScript implementation
+
+This includes the geodesic capabilities of GeographicLib. The source
+code is in the directory js. This implementation is
+entirely self-contained and does not depend on the rest of
+GeographicLib.
+
+The library is available as an
+
+ npm package.
+To install this package, use \verbatim
+ npm install geographiclib \endverbatim
+
+For documentation, see
+ - JavaScript library for geodesics.
+
+Examples of using this interface are
+- a geodesic calculator showing
+ the solution of direct and inverse geodesic problem, finding
+ intermediate points on a geodesic line, and computing the area of a
+ geodesic polygon;
+- displaying geodesics in Google
+ Maps which shows the geodesic, the geodesic circle, and various
+ geodesic envelopes.
+
+\section python Python implementation
+
+This includes the geodesic capabilities of GeographicLib. The source
+code is in the directory python. This implementation is
+entirely self-contained and does not depend on the rest of
+GeographicLib.
+
+The library is available as an
+
+ PyPI package.
+To install this package, use \verbatim
+ pip install geographiclib \endverbatim
+
+For documentation, see
+ - Python library for geodesics.
+
+It is also possible to call the C++ version of GeographicLib directly
+from Python and the directory wrapper/python contains a
+small example, which converts heights above the geoid to heights above
+the ellipsoid.
+
+\section matlab MATLAB and Octave implementations
+
+The includes the geodesic capabilities of GeographicLib and
+implementations of the TransverseMercator, PolarStereographic,
+AzimuthalEquidistant, CassiniSoldner, Gnomonic, UTMUPS, MGRS, Geocentric,
+and LocalCartesian classes. In addition, it includes solutions of the
+direct, inverse, and area problems for \ref greatellipse. Because these
+functions are all vectorized, their performance is comparable to the C++
+routines. The minimum version numbers required are
+ - MATLAB, version 7.9, 2009b,
+ - Octave, version 3.4, Feb. 2011.
+ .
+In addition, in order to use the geoid routines, Octave needs to have
+been built with a version of GraphicsMagick which supports 16-bit
+images. The source code is in the directory
+matlab/geographiclib. This implementation is entirely
+self-contained and does not depend on the rest of GeographicLib.
+
+The library is available as an MATLAB Central package,
+
+ GeographicLib toolbox.
+
+A summary of the routines is obtained by \verbatim
+ help geographiclib \endverbatim
+
+Prior to version 1.42, GeographicLib was distributed with some MATLAB
+functionality offered via compiled interface code. This has now been
+replaced by native MATLAB wrapper functions in
+matlab/geographiclib-legacy; these depend on the
+
+GeographicLib toolbox.
+A summary of the routines is obtained by \verbatim
+ help geographiclib-legacy \endverbatim
+
+It is also possible to call the C++ version of GeographicLib directly
+from MATLAB or Octave and the directory wrapper/matlab
+contains a small example, which solves the inverse geodesic problem for
+ellipsoids with arbitrary flattening. (This example is taken from the
+MATLAB interface code which was provided prior to version 1.42.)
+
+\section dotnet .NET wrapper
+
+This is a comprehensive wrapper library, written and maintained by Scott
+Heiman, which exposes all of the functionality of GeographicLib to the
+.NET family of languages. For documentation, see
+ - NETGeographicLib .NET wrapper library.
+
+\section maxima Maxima routines
+
+Maxima is a free computer algebra system which can be downloaded from
+http://maxima.sourceforge.net. Maxima was used to generate the series used by
+TransverseMercator ( tmseries.mac), Geodesic
+( geod.mac), Rhumb (
+rhumbarea.mac), \ref gearea ( gearea.mac),
+the relation between \ref auxlat ( auxlat.mac),
+and to generate accurate data for testing ( tm.mac
+and geodesic.mac). The latter uses Maxima's
+bigfloat arithmetic together with series extended to high order or
+solutions in terms of elliptic integrals (
+ellint.mac). These files contain brief instructions on how to use
+them.
+
+
+Back to \ref organization. Forward to \ref geoid. Up to \ref contents.
+
+Back to \ref other. Forward to \ref gravity. Up to \ref contents.
+
+
+The gravitational equipotential surface approximately coinciding with
+mean sea level is called the geoid. The Geoid class and
+the GeoidEval utility evaluate the height
+of the geoid above the WGS84 ellipsoid. This can be used to convert
+heights above mean sea level to heights above the WGS84 ellipsoid.
+Because the normal to the ellipsoid differs from the normal to the geoid
+(the direction of a plumb line) there is a slight ambiguity in the
+measurement of heights; however for heights up to 10 km this ambiguity
+is only 1 mm.
+
+The geoid is usually approximated by an "earth gravity model" (EGM).
+The models published by the NGA are:
+- EGM84:
+ http://earth-info.nga.mil/GandG/wgs84/gravitymod/wgs84_180/wgs84_180.html
+- EGM96:
+ http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html
+- EGM2008:
+ http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
+.
+Geoid offers a uniform way to handle all 3 geoids at a variety of grid
+resolutions. (In contrast, the software tools that NGA offers are
+different for each geoid, and the interpolation programs are different
+for each grid resolution. In addition these tools are written in
+Fortran with is nowadays difficult to integrate with other software.)
+
+The height of the geoid above the ellipsoid, \e N, is sometimes called
+the geoid undulation. It can be used to convert a height above the
+ellipsoid, \e h, to the corresponding height above the geoid (the
+orthometric height, roughly the height above mean sea level), \e H,
+using the relations
+
+ \e h = \e N + \e H; \e H = −\e N + \e h.
+
+Unlike other components of GeographicLib, there is a appreciable error
+in the results obtained (at best, the RMS error is 1 mm). However the
+class provides methods to report the maximum and RMS errors in the
+results. The class also returns the gradient of the geoid. This can be
+used to estimate the direction of a plumb line relative to the WGS84
+ellipsoid.
+
+The GravityModel class calculates geoid heights using the
+underlying gravity model. This is slower then Geoid but
+considerably more accurate. This class also can accurately compute all
+the components of the acceleration due to gravity (and hence the
+direction of plumb line).
+
+Go to
+ - \ref geoidinst
+ - \ref geoidformat
+ - \ref geoidinterp
+ - \ref geoidcache
+ - \ref testgeoid
+
+\section geoidinst Installing the geoid datasets
+
+The geoid heights are computed using interpolation into a rectangular
+grid. The grids are read from data files which have been are computed
+using the NGA synthesis programs in the case of the EGM84 and EGM96
+models and using the NGA binary gridded data files in the case of
+EGM2008. These data files are available for download:
+
+The "size" column is the size of the uncompressed data and it also
+gives the memory requirements for caching the entire dataset using the
+Geoid::CacheAll method.
+At a minimum you should install egm96-5 and either egm2008-1 or
+egm2008-2_5. Many applications use the EGM96 geoid, however the use of
+EGM2008 is growing. (EGM84 is rarely used now.)
+
+For Linux and Unix systems, GeographicLib provides a shell script
+geographiclib-get-geoids (typically installed in /usr/local/sbin) which
+automates the process of downloading and installing the geoid data. For
+example
+\verbatim
+ geographiclib-get-geoids best # to install egm84-15, egm96-5, egm2008-1
+ geographiclib-get-geoids -h # for help
+\endverbatim
+This script should be run as a user with write access to the
+installation directory, which is typically
+/usr/local/share/GeographicLib (this can be overridden with the -p
+flag), and the data will then be placed in the "geoids" subdirectory.
+
+Windows users should download and run the Windows installers. These
+will prompt for an installation directory with the default being
+\verbatim
+ C:/ProgramData/GeographicLib
+\endverbatim
+(which you probably should not change) and the data is installed in the
+"geoids" sub-directory. (The second directory name is an alternate name
+that Windows 7 uses for the "Application Data" directory.)
+
+Otherwise download \e either the tar.bz2 file \e or the zip file (they
+have the same contents). If possible use the tar.bz2 files, since these
+are compressed about 2 times better than the zip file. To unpack these,
+run, for example
+\verbatim
+ mkdir -p /usr/local/share/GeographicLib
+ tar xofjC egm96-5.tar.bz2 /usr/local/share/GeographicLib
+ tar xofjC egm2008-2_5.tar.bz2 /usr/local/share/GeographicLib
+ etc.
+\endverbatim
+and, again, the data will be placed in the "geoids" subdirectory.
+
+However you install the geoid data, all the datasets should
+be installed in the same directory. Geoid and
+GeoidEval uses a compile time default to
+locate the datasets. This is
+- /usr/local/share/GeographicLib/geoids, for non-Windows systems
+- C:/ProgramData/GeographicLib/geoids, for Windows systems
+.
+consistent with the examples above. This may be overridden at run-time
+by defining the GEOGRAPHICLIB_GEOID_PATH or the GEOGRAPHICLIB_DATA
+environment variables; see Geoid::DefaultGeoidPath() for
+details. Finally, the path may be set using the optional second
+argument to the Geoid constructor or with the "-d" flag
+to GeoidEval. Supplying the "-h" flag to
+GeoidEval reports the default geoid path
+for that utility. The "-v" flag causes GeoidEval to report the full
+path name of the data file it uses.
+
+\section geoidformat The format of the geoid data files
+
+The gridded data used by the Geoid class is stored in
+16-bit PGM files. Thus the data for egm96-5 might be stored in the file
+- /usr/local/share/GeographicLib/geoids/egm96-5.pgm
+.
+PGM simple graphic format with the following properties
+- it is well documented
+ here;
+- there are no separate "little-endian" and "big-endian" versions;
+- it uses 1 or 2 bytes per pixel;
+- pixels can be randomly accessed;
+- comments can be added to the file header;
+- it is sufficiently simple that it can be easily read without using the
+ libnetpbm
+ library (and thus we avoid adding a software dependency to
+ GeographicLib).
+.
+The major drawback of this format is that since there are only 65535
+possible pixel values, the height must be quantized to 3 mm. However,
+the resulting quantization error (up to 1.5 mm) is typically smaller
+than the linear interpolation errors. The comments in the header for
+egm96-5 are
+\verbatim
+ # Geoid file in PGM format for the GeographicLib::Geoid class
+ # Description WGS84 EGM96, 5-minute grid
+ # URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/egm96.html
+ # DateTime 2009-08-29 18:45:03
+ # MaxBilinearError 0.140
+ # RMSBilinearError 0.005
+ # MaxCubicError 0.003
+ # RMSCubicError 0.001
+ # Offset -108
+ # Scale 0.003
+ # Origin 90N 0E
+ # AREA_OR_POINT Point
+ # Vertical_Datum WGS84
+\endverbatim
+Of these lines, the Scale and Offset lines are required and define the
+conversion from pixel value to height (in meters) using \e height =
+\e offset + \e scale \e pixel. The Geoid constructor also reads the
+Description, DateTime, and error lines (if present) and stores the
+resulting data so that it can be returned by
+Geoid::Description, Geoid::DateTime,
+Geoid::MaxError, and Geoid::RMSError
+methods. The other lines serve as additional documentation but are not
+used by this class. Accompanying egm96-5.pgm (and similarly with the
+other geoid data files) are two files egm96-5.wld and
+egm96-5.pgm.aux.xml. The first is an ESRI "world" file and the second
+supplies complete projection metadata for use by
+GDAL. Neither of these files is read
+by Geoid.
+
+You can use gdal_translate to convert the data files to a standard
+GeoTiff, e.g., with
+\verbatim
+ gdal_translate -ot Float32 -scale 0 65000 -108 87 egm96-5.pgm egm96-5.tif
+\endverbatim
+The arguments to -scale here are specific to the Offset and Scale
+parameters used in the pgm file (note 65000 * 0.003 − 108 = 87).
+You can check these by running GeoidEval
+with the "-v" option.
+
+Here is a sample script which uses GDAL to create a 1-degree
+squared grid of geoid heights at 3" resolution (matching DTED1) by
+bilinear interpolation.
+\verbatim
+ #! /bin/sh
+ lat=37
+ lon=067
+ res=3 # resolution in seconds
+ TEMP=`mktemp junkXXXXXXXXXX` # temporary file for GDAL
+ gdalwarp -q -te `echo $lon $lat $res | awk '{
+ lon = $1; lat = $2; res = $3;
+ printf "%.14f %.14f %.14f %.14f",
+ lon -0.5*res/3600, lat -0.5*res/3600,
+ lon+1+0.5*res/3600, lat+1+0.5*res/3600;
+ }'` -ts $((3600/res+1)) $((3600/res+1)) -r bilinear egm96-5.tif $TEMP
+ gdal_translate -quiet \
+ -mo AREA_OR_POINT=Point \
+ -mo Description="WGS84 EGM96, $res-second grid" \
+ -mo Vertical_Datum=WGS84 \
+ -mo Tie_Point_Location=pixel_corner \
+ $TEMP e$lon-n$lat.tif
+ rm -f $TEMP
+\endverbatim
+
+Because the pgm files are uncompressed, they can take up a lot of disk
+space. Some compressed formats compress in tiles and so might be
+compatible with the requirement that the data can be randomly accessed.
+In particular gdal_translate can be used to convert the pgm files to
+compressed tiff files with
+\verbatim
+gdal_translate -co COMPRESS=LZW -co PREDICTOR=2 \
+ -co TILED=YES -co BLOCKXSIZE=256 -co BLOCKYSIZE=256 \
+ egmyy-g.pgm egmyy-g.tif
+\endverbatim
+The resulting files sizes are
+\verbatim
+ pgm tif
+ egm84-30 0.6 MB 0.5 MB
+ egm84-15 2.1 MB 1.4 MB
+ egm96-15 2.1 MB 1.5 MB
+ egm96-5 19 MB 8.5 MB
+ egm2008-5 19 MB 9.8 MB
+ egm2008-2_5 75 MB 28 MB
+ egm2008-1 470 MB 97 MB
+\endverbatim
+Currently, there are no plans for GeographicLib to support this
+compressed format.
+
+The Geoid class only handles world-wide geoid models. The pgm provides
+geoid height postings on grid of points with uniform spacing in latitude
+(row) and longitude (column). If the dimensions of the pgm file are
+\e h × \e w, then latitude (resp. longitude) spacing is
+180°/(\e h − 1) (resp. 360°/\e w), with the (0,0) pixel
+given the value at φ = 90°, λ = 0°. Models covering a
+restricted area will need to be "inserted" into a world-wide grid before
+being accessible to the Geoid class.
+
+\section geoidinterp Interpolating the geoid data
+
+Geoid evaluates the geoid height using bilinear or cubic
+interpolation. The gradient of the geoid height is obtained by
+differentiating the interpolated height and referencing the result to
+distance on the WGS84 ellipsoid.
+
+WARNING: Although Geoid computes the gradient of
+the geoid height, this is subject to large quantization errors as a
+result of the way that the geoid data is stored. This is particularly
+acute for fine grids, at high latitudes, and for the easterly gradient.
+If you need to compute the direction of the acceleration due to gravity
+accurately, you should use GravityModel::Gravity.
+
+The bilinear interpolation is based on the values at the 4 corners of
+the enclosing cell. The interpolated height is a continuous function of
+position; however the gradient has discontinuities are cell boundaries.
+The quantization of the data files exacerbates the errors in the
+gradients.
+
+The cubic interpolation is a least-squares fit to the values on a
+12-point stencil with weights as follows:
+\verbatim
+ . 1 1 .
+ 1 2 2 1
+ 1 2 2 1
+ . 1 1 .
+\endverbatim
+The cubic is constrained to be independent of longitude when evaluating
+the height at one of the poles. Cubic interpolation is considerably
+more accurate than bilinear interpolation; however, in this
+implementation there are small discontinuities in the heights are cell
+boundaries. The over-constrained cubic fit slightly reduces the
+quantization errors on average.
+
+The algorithm for the least squares fit is taken from, F. H. Lesh,
+Multi-dimensional least-squares polynomial curve fitting, CACM 2, 29--30
+(1959). This algorithm is not part of Geoid; instead it is implemented
+as
+Maxima
+code which is used to precompute the matrices to convert the function
+values on the stencil into the coefficients from the cubic polynomial.
+This code is included as a comment in Geoid.cpp.
+
+The interpolation methods are quick and give good accuracy. Here is a
+summary of the combined quantization and interpolation errors for the
+heights.
+
+
Interpolation and quantization errors for geoid heights
+
+
name
+
geoid
+
grid
+
bilinear error
+
cubic error
+
+
max
rms
+
max
rms
+
+
egm84-30
EGM84
30'
+
1.546 m
70 mm
+
0.274 m
14 mm
+
+
egm84-15
EGM84
15'
+
0.413 m
18 mm
+
0.021 m
1.2 mm
+
+
egm96-15
EGM96
15'
+
1.152 m
40 mm
+
0.169 m
7.0 mm
+
+
egm96-5
EGM96
5'
+
0.140 m
4.6 mm
+
0.0032 m
0.7 mm
+
+
egm2008-5
EGM2008
5'
+
0.478 m
12 mm
+
0.294 m
4.5 mm
+
+
egm2008-2_5
EGM2008
2.5'
+
0.135 m
3.2 mm
+
0.031 m
0.8 mm
+
+
egm2008-1
EGM2008
1'
+
0.025 m
0.8 mm
+
0.0022 m
0.7 mm
+
+The errors are with respect to the specific NGA earth gravity model
+(not to any "real" geoid). The RMS values are obtained using 5 million
+uniformly distributed random points. The maximum values are obtained by
+evaluating the errors using a different grid with points at the
+centers of the original grid. (The RMS difference between EGM96 and
+EGM2008 is about 0.5 m. The RMS difference between EGM84 and EGM96 is
+about 1.5 m.)
+
+The errors in the table above include the quantization errors that arise
+because the height data that Geoid uses are quantized to
+3 mm. If, instead, Geoid were to use data files without
+such quantization artifacts, the overall error would be reduced but
+only modestly as shown in the following table, where only the
+changed rows are included and where the changed entries are given in
+bold:
+
+
Interpolation (only!) errors for geoid heights
+
+
name
+
geoid
+
grid
+
bilinear error
+
cubic error
+
+
max
rms
+
max
rms
+
+
egm96-5
EGM96
5'
+
0.140 m
4.6 mm
+
0.0026 m
0.1 mm
+
+
egm2008-2_5
EGM2008
2.5'
+
0.135 m
3.2 mm
+
0.031 m
0.4 mm
+
+
egm2008-1
EGM2008
1'
+
0.025 m
0.6 mm
+
0.0010 m
0.011 mm
+
+
+\section geoidcache Caching the geoid data
+
+A simple way of calling Geoid is as follows
+\code
+ #include
+ #include
+ ...
+ GeographicLib::Geoid g("egm96-5");
+ double lat, lon;
+ while (std::cin >> lat >> lon)
+ std::cout << g(lat, lon) << "\n";
+ ...
+\endcode
+
+The first call to g(lat, lon) causes the data for the stencil points (4
+points for bilinear interpolation and 12 for cubic interpolation) to be
+read and the interpolated value returned. A simple 0th-order caching
+scheme is provided by default, so that, if the second and subsequent
+points falls within the same grid cell, the data values are not reread
+from the file. This is adequate for most interactive use and also
+minimizes disk accesses for the case when a continuous track is being
+followed.
+
+If a large quantity of geoid calculations are needed, the calculation
+can be sped up by preloading the data for a rectangular block with
+Geoid::CacheArea or the entire dataset with
+Geoid::CacheAll. If the requested points lie within the
+cached area, the cached data values are used; otherwise the data is read
+from disk as before. Caching all the data is a reasonable choice for
+the 5' grids and coarser. Caching all the data for the 1' grid will
+require 0.5 GB of RAM and should only be used on systems with sufficient
+memory.
+
+The use of caching does not affect the values returned. Because of the
+caching and the random file access, this class is \e not normally thread
+safe; i.e., a single instantiation cannot be safely used by multiple
+threads. If multiple threads need to calculate geoid heights, there are
+two alternatives:
+ - they should all construct thread-local instantiations.
+ - Geoid should be constructed with \e threadsafe = true.
+ This causes all the data to be read at the time of construction (and
+ if this fails, an exception is thrown), the data file to be closed
+ and the single-cell caching to be turned off. The resulting object
+ may then be shared safely between threads.
+
+\section testgeoid Test data for geoids
+
+A test set for the geoid models is available at
+ -
+ GeoidHeights.dat.gz
+ .
+This is about 11 MB (compressed). This test set consists of a set of
+500000 geographic coordinates together with the corresponding geoid
+heights according to various earth gravity models.
+
+Each line of the test set gives 6 space delimited numbers
+ - latitude (degrees, exact)
+ - longitude (degrees, exact)
+ - EGM84 height (meters, accurate to 1 μm)
+ - EGM96 height (meters, accurate to 1 μm)
+ - EGM2008 height (meters, accurate to 1 μm)
+ .
+The latitude and longitude are all multiples of 10−6
+deg and should be regarded as exact. The geoid heights are computed
+using the harmonic NGA synthesis programs, where the programs were
+compiled (with gfortran) and run under Linux. In the case of the
+EGM2008 program, a SAVE statement needed to be added to
+subroutine latf, in order for the program to compile
+correctly with a stack-based compiler. Similarly the EGM96 code
+requires a SAVE statement in subroutine
+legfdn.
+
+
+Back to \ref other. Forward to \ref gravity. Up to \ref contents.
+
+Back to \ref geoid. Forward to \ref normalgravity. Up to \ref contents.
+
+
+GeographicLib can compute the earth's gravitational field with an earth
+gravity model using the GravityModel and GravityCircle classes and with
+the Gravity utility. These models expand
+the gravitational potential of the earth as sum of spherical harmonics.
+The models also specify a reference ellipsoid, relative to which geoid
+heights and gravity disturbances are measured. Underlying all these
+models is normal gravity which is the exact solution for an
+idealized rotating ellipsoidal body. This is implemented with the
+NormalGravity class and some notes on are provided in section \ref
+normalgravity
+
+Go to
+ - \ref gravityinst
+ - \ref gravityformat
+ - \ref gravitynga
+ - \ref gravitygeoid
+ - \ref gravityatmos
+ - \ref gravityparallel
+ - \ref normalgravity (now on its own page)
+
+The supported models are
+ - egm84, the
+
+ Earth Gravity Model 1984, which includes terms up to degree 180.
+ - egm96, the
+
+ Earth Gravity Model 1996, which includes terms up to degree 360.
+ - egm2008, the
+
+ Earth Gravity Model 2008, which includes terms up to degree 2190.
+ - wgs84, the
+
+ WGS84 Reference Ellipsoid. This is just reproduces the normal
+ gravitational field for the reference ellipsoid. This includes the
+ zonal coefficients up to order 20. Usually NormalGravity::WGS84()
+ should be used instead.
+ - grs80, the
+ GRS80 Reference Ellipsoid. This is just reproduces the normal
+ gravitational field for the GRS80 ellipsoid. This includes the
+ zonal coefficients up to order 20. Usually NormalGravity::GRS80()
+ should be used instead.
+
+See
+ - W. A. Heiskanen and H. Moritz, Physical Geodesy (Freeman, San
+ Francisco, 1967).
+ .
+for more information.
+
+Acknowledgment: I would like to thank Mathieu Peyréga for
+sharing EGM_Geoid_CalculatorClass from his Geo library with me. His
+implementation was the first I could easily understand and he and I
+together worked through some of the issues with overflow and underflow
+the occur while performing high-degree spherical harmonic sums.
+
+\section gravityinst Installing the gravity models
+
+These gravity models are available for download:
+
+The "size" column is the size of the uncompressed data.
+
+For Linux and Unix systems, GeographicLib provides a shell script
+geographiclib-get-gravity (typically installed in /usr/local/sbin)
+which automates the process of downloading and installing the gravity
+models. For example
+\verbatim
+ geographiclib-get-gravity all # to install egm84, egm96, egm2008, wgs84
+ geographiclib-get-gravity -h # for help
+\endverbatim
+This script should be run as a user with write access to the
+installation directory, which is typically
+/usr/local/share/GeographicLib (this can be overridden with the -p
+flag), and the data will then be placed in the "gravity" subdirectory.
+
+Windows users should download and run the Windows installers. These
+will prompt for an installation directory with the default being
+\verbatim
+ C:/ProgramData/GeographicLib
+\endverbatim
+(which you probably should not change) and the data is installed in the
+"gravity" sub-directory. (The second directory name is an alternate name
+that Windows 7 uses for the "Application Data" directory.)
+
+Otherwise download \e either the tar.bz2 file \e or the zip file (they
+have the same contents). To unpack these, run, for example
+\verbatim
+ mkdir -p /usr/local/share/GeographicLib
+ tar xofjC egm96.tar.bz2 /usr/local/share/GeographicLib
+ tar xofjC egm2008.tar.bz2 /usr/local/share/GeographicLib
+ etc.
+\endverbatim
+and, again, the data will be placed in the "gravity" subdirectory.
+
+However you install the gravity models, all the datasets should be
+installed in the same directory. GravityModel and
+Gravity uses a compile time default to
+locate the datasets. This is
+- /usr/local/share/GeographicLib/gravity, for non-Windows systems
+- C:/ProgramData/GeographicLib/gravity, for Windows systems
+.
+consistent with the examples above. This may be overridden at run-time
+by defining the GEOGRAPHICLIB_GRAVITY_PATH or the GEOGRAPHICLIB_DATA
+environment variables; see
+GravityModel::DefaultGravityPath() for details. Finally,
+the path may be set using the optional second argument to the
+GravityModel constructor or with the "-d" flag to
+Gravity. Supplying the "-h" flag to
+Gravity reports the default path for
+gravity models for that utility. The "-v" flag causes Gravity to report
+the full path name of the data file it uses.
+
+\section gravityformat The format of the gravity model files
+
+The constructor for GravityModel reads a file called
+NAME.egm which specifies various properties for the gravity model. It
+then opens a binary file NAME.egm.cof to obtain the coefficients of the
+spherical harmonic sum.
+
+The first line of the .egm file must consist of "EGMF-v" where EGMF
+stands for "Earth Gravity Model Format" and v is the version number of
+the format (currently "1").
+
+The rest of the File is read a line at a time. A # character and
+everything after it are discarded. If the result is just white space it
+is discarded. The remaining lines are of the form "KEY WHITESPACE
+VALUE". In general, the KEY and the VALUE are case-sensitive.
+
+GravityModel only pays attention to the following
+keywords
+ - keywords that affect the field calculation, namely:
+ - ModelRadius (required), the normalizing radius for the model
+ in meters.
+ - ReferenceRadius (required), the equatorial radius \e a for
+ the reference ellipsoid meters.
+ - ModelMass (required), the mass constant \e GM for the model
+ in meters3/seconds2.
+ - ReferenceMass (required), the mass constant \e GM for the
+ reference ellipsoid in meters3/seconds2.
+ - AngularVelocity (required), the angular velocity ω for
+ the model \e and the reference ellipsoid in rad
+ seconds−1.
+ - Flattening, the flattening of the reference ellipsoid; this
+ can be given a fraction, e.g., 1/298.257223563. One of
+ Flattening and DynamicalFormFactor is required.
+ - DynamicalFormFactor, the dynamical form factor
+ J2 for the reference ellipsoid. One of
+ Flattening and DynamicalFormFactor is required.
+ - HeightOffset (default 0), the constant height offset
+ (meters) added to obtain the geoid height.
+ - CorrectionMultiplier (default 1), the multiplier for the
+ "zeta-to-N" correction terms for the geoid height to convert them
+ to meters.
+ - Normalization (default full), the normalization used for the
+ associated Legendre functions (full or schmidt).
+ - ID (required), 8 printable characters which serve as a
+ signature for the .egm.cof file (they must appear as the first 8
+ bytes of this file).
+ .
+ The parameters ModelRadius, ModelMass, and
+ AngularVelocity apply to the gravity model, while
+ ReferenceRadius, ReferenceMass, AngularVelocity,
+ and either Flattening or DynamicalFormFactor
+ characterize the reference ellipsoid. AngularVelocity
+ (because it can be measured precisely) is the same for the gravity
+ model and the reference ellipsoid. ModelRadius is merely a
+ scaling parameter for the gravity model and there's no requirement
+ that it be close to the equatorial radius of the earth (although
+ that's typically how it is chosen). ModelMass and
+ ReferenceMass need not be the same and, indeed, they are
+ slightly difference for egm2008. As a result the disturbing
+ potential \e T has a 1/\e r dependence at large distances.
+ - keywords that store data that the user can query:
+ - Name, the name of the model.
+ - Description, a more descriptive name of the model.
+ - ReleaseDate, when the model was created.
+ - keywords that are examined to verify that their values are valid:
+ - ByteOrder (default little), the order of bytes in the
+ .egm.cof file. Only little endian is supported at present.
+ .
+Other keywords are ignored.
+
+The coefficient file NAME.egm.cof is a binary file in little endian
+order. The first 8 bytes of this file must match the ID given in
+NAME.egm. This is followed by 2 sets of spherical harmonic
+coefficients. The first of these gives the gravity potential and the
+second gives the zeta-to-N corrections to the geoid height. The format
+for each set of coefficients is:
+ - \e N, the maximum degree of the sum stored as a 4-byte signed integer.
+ This must satisfy \e N ≥ −1.
+ - \e M, the maximum order of the sum stored as a 4-byte signed integer.
+ This must satisfy \e N ≥ \e M ≥ −1.
+ - Cnm, the coefficients of the cosine
+ coefficients of the sum in column (i.e., \e m) major order. There
+ are (\e M + 1) (2\e N - \e M + 2) / 2 elements which are stored as
+ IEEE doubles (8 bytes). For example for \e N = \e M = 3, there are
+ 10 coefficients arranged as
+ C00,
+ C10,
+ C20,
+ C30,
+ C11,
+ C21,
+ C31,
+ C22,
+ C32,
+ C33.
+ - Snm, the coefficients of the sine
+ coefficients of the sum in column (i.e., \e m) major order starting
+ at \e m = 1. There are \e M (2\e N - \e M + 1) / 2 elements which
+ are stored as IEEE doubles (8 bytes). For example for \e N = \e M =
+ 3, there are 6 coefficients arranged as
+ S11,
+ S21,
+ S31,
+ S22,
+ S32,
+ S33.
+ .
+Although the coefficient file is in little endian order, GeographicLib
+can read it on big endian machines. It can only be read on machines
+which store doubles in IEEE format.
+
+As an illustration, here is egm2008.egm:
+\verbatim
+EGMF-1
+# An Earth Gravity Model (Format 1) file. For documentation on the
+# format of this file see
+# https://geographiclib.sourceforge.io/html/gravity.html#gravityformat
+Name egm2008
+Publisher National Geospatial Intelligence Agency
+Description Earth Gravity Model 2008
+URL http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm2008
+ReleaseDate 2008-06-01
+ConversionDate 2011-11-19
+DataVersion 1
+ModelRadius 6378136.3
+ModelMass 3986004.415e8
+AngularVelocity 7292115e-11
+ReferenceRadius 6378137
+ReferenceMass 3986004.418e8
+Flattening 1/298.257223563
+HeightOffset -0.41
+
+# Gravitational and correction coefficients taken from
+# EGM2008_to2190_TideFree and Zeta-to-N_to2160_egm2008 from
+# the egm2008 distribution.
+ID EGM2008A
+\endverbatim
+
+The code to produce the coefficient files for the wgs84 and grs80 models
+is
+\include make-egmcof.cpp
+
+\section gravitynga Comments on the NGA harmonic synthesis code
+
+GravityModel attempts to reproduce the results of NGA's
+harmonic synthesis code for EGM2008, hsynth_WGS84.f. Listed here are
+issues that I encountered using the NGA code:
+ -# A compiler which allocates local variables on the stack produces an
+ executable with just returns NaNs. The problem here is a missing
+ SAVE statement in subroutine latf.
+ -# Because the model and references masses for egm2008 differ (by about
+ 1 part in 109), there should be a 1/\e r contribution to
+ the disturbing potential \e T. However, this term is set to zero in
+ hsynth_WGS84 (effectively altering the normal potential). This
+ shifts the surface \e W = U0 outward by about
+ 5 mm. Note too that the reference ellipsoid is no longer a
+ level surface of the effective normal potential.
+ -# Subroutine radgrav computes the ellipsoidal coordinate
+ β incorrectly. This leads to small errors in the deflection
+ of the vertical, ξ and η, when the height above the
+ ellipsoid, \e h, is non-zero (about 10−7 arcsec at
+ \e h = 400 km).
+ -# There are several expressions which will return inaccurate results
+ due to cancellation. For example, subroutine grs
+ computes the flattening using \e f = 1 − sqrt(1 −
+ e2). Much better is to use \e f =
+ e2/(1 + sqrt(1 − e2)). The
+ expressions for \e q and \e q' in grs and
+ radgrav suffer from similar problems. The resulting
+ errors are tiny (about 50 pm in the geoid height); however, given
+ that's there's essentially no cost to using more accurate
+ expressions, it's preferable to do so.
+ -# hsynth_WGS84 returns an "undefined" value for \e xi and \e eta at the
+ poles. Better would be to return the value obtained by taking the
+ limit \e lat → ± 90°.
+ .
+Issues 1--4 have been reported to the authors of hsynth_WGS84.
+Issue 1 is peculiar to Fortran and is not encountered in C++ code and
+GravityModel corrects issues 3--5. On issue 2,
+GravityModel neglects the 1/\e r term in \e T in
+GravityModel::GeoidHeight and
+GravityModel::SphericalAnomaly in order to produce
+results which match NGA's for these quantities. On the other hand,
+GravityModel::Disturbance and
+GravityModel::T do include this term.
+
+\section gravitygeoid Details of the geoid height and anomaly calculations
+
+Ideally, the geoid represents a surface of constant gravitational
+potential which approximates mean sea level. In reality some
+approximations are taken in determining this surface. The steps taking
+by GravityModel in computing the geoid height are
+described here (in the context of EGM2008). This mimics NGA's code
+hsynth_WGS84 closely because most users of EGM2008 use the gridded data
+generated by this code (e.g., Geoid) and it is desirable
+to use a consistent definition of the geoid height.
+ - The model potential is band limited; the minimum wavelength that is
+ represented is 360°/2160 = 10' (i.e., about 10NM or
+ 18.5km). The maximum degree for the spherical harmonic sum is 2190;
+ however the model was derived using ellipsoidal harmonics of degree
+ and order 2160 and the degree was increased to 2190 in order to
+ capture the ellipsoidal harmonics faithfully with spherical
+ harmonics.
+ - The 1/\e r term is omitted from the \e T (this is issue 2 in \ref
+ gravitynga). This moves the equipotential surface by about 5mm.
+ - The surface \e W = U0 is determined by Bruns'
+ formula, which is roughly equivalent to a single iteration of
+ Newton's method. The RMS error in this approximation is about 1.5mm
+ with a maximum error of about 10 mm.
+ - The model potential is only valid above the earth's surface. A
+ correction therefore needs to be included where the geoid lies
+ beneath the terrain. This is NGA's "zeta-to-N" correction, which is
+ represented by a spherical harmonic sum of degree and order 2160 (and
+ so it misses short wavelength terrain variations). In addition, it
+ entails estimating the isostatic equilibrium of the earth's crust.
+ The correction lies in the range [−5.05 m, 0.05 m],
+ however for 99.9% of the earth's surface the correction is less than
+ 10 mm in magnitude.
+ - The resulting surface lies above the observed mean sea level,
+ so −0.41m is added to the geoid height. (Better would be to change
+ the potential used to define the geoid; but this would only change
+ the result by about 2mm.)
+ .
+A useful discussion of the problems with defining a geoid is given by
+Dru A. Smith in
+
+There is no such thing as "The" EGM96 geoid: Subtle points on the use of
+a global geopotential model, IGeS Bulletin No. 8, International
+Geoid Service, Milan, Italy, pp. 17--28 (1998).
+
+GravityModel::GeoidHeight reproduces the results of the
+several NGA codes for harmonic synthesis with the following maximum
+discrepancies:
+ - egm84 = 1.1mm. This is probably due to inconsistent parameters for the
+ reference ellipsoid in the NGA code. (In particular, the value of
+ mass constant excludes the atmosphere; however, it's not clear
+ whether the other parameters have been correspondingly adjusted.)
+ Note that geoid heights predicted by egm84 differ from those of more
+ recent gravity models by about 1 meter.
+ - egm96 = 23nm.
+ - egm2008 = 78pm. After addressing some of the issues alluded to in
+ issue 4 in \ref gravitynga, the maximum discrepancy becomes 23pm.
+
+The formula for the gravity anomaly vector involves computing gravity
+and normal gravity at two different points (with the displacement
+between the points unknown ab initio). Since the gravity anomaly
+is already a small quantity it is sometimes acceptable to employ
+approximations that change the quantities by \e O(\e f). The NGA code
+uses the spherical approximation described by Heiskanen and Moritz,
+Sec. 2-14 and GravityModel::SphericalAnomaly uses the
+same approximation for compatibility. In this approximation, the
+gravity disturbance delta = grad \e T is calculated.
+Here, \e T once again excludes the 1/\e r term (this is issue 2 in \ref
+gravitynga and is consistent with the computation of the geoid height).
+Note that delta compares the gravity and the normal gravity at
+the \e same point; the gravity anomaly vector is then found by
+estimating the gradient of the normal gravity in the limit that the
+earth is spherically symmetric. delta is expressed in \e
+spherical coordinates as \e deltax, \e deltay, \e deltaz where, for
+example, \e deltaz is the \e radial component of delta (not the
+component perpendicular to the ellipsoid) and \e deltay is similarly
+slightly different from the usual northerly component. The components
+of the anomaly are then given by
+ - gravity anomaly, \e Dg01 = \e deltaz − 2T/\e R, where \e R
+ distance to the center of the earth;
+ - northerly component of the deflection of the vertical, \e xi = −
+ deltay/\e gamma, where \e gamma is the magnitude of the normal
+ gravity;
+ - easterly component of the deflection of the vertical, \e eta = −
+ deltax/\e gamma.
+ .
+NormalGravity computes the normal gravity accurately and
+avoids issue 3 of \ref gravitynga. Thus while
+GravityModel::SphericalAnomaly reproduces the results for
+\e xi and \e eta at \e h = 0, there is a slight discrepancy if \e h is
+non-zero.
+
+\section gravityatmos The effect of the mass of the atmosphere
+
+All of the supported models use WGS84 for the reference ellipsoid. This
+has (see
+
+TR8350.2, table 3.1)
+ - \e a = 6378137 m
+ - \e f = 1/298.257223563
+ - ω = 7292115 × 10−11 rad
+ s−1
+ - \e GM = 3986004.418 × 108 m3
+ s−2.
+ .
+The value of \e GM includes the mass of the atmosphere and so strictly
+only applies above the earth's atmosphere. Near the surface of the
+earth, the value of \e g will be less (in absolute value) than the value
+predicted by these models by about δ\e g = (4πG/\e
+g) \e A = 8.552 × 10−11 \e
+A m2/kg, where \e G is the gravitational constant, \e g
+is the earth's gravity, and \e A is the pressure of the atmosphere. At
+sea level we have \e A = 101.3 kPa, and δ\e g =
+8.7−×−10−6 m s−2,
+approximately. (In other words the effect is about 1 part in a
+million; by way of comparison, buoyancy effects are about 100 times
+larger.)
+
+\section gravityparallel Geoid heights on a multi-processor system
+
+The egm2008 model includes many terms (over 2 million spherical
+harmonics). For that reason computations using this model may be slow;
+for example it takes about 78 ms to compute the geoid height at a single
+point. There are two ways to speed up this computation:
+ - Use a GravityCircle to compute the geoid height at
+ several points on a circle of latitude. This reduces the cost per
+ point to about 92 μs (a reduction by a factor of over 800).
+ - Compute the values on several circles of latitude in parallel. One
+ of the simplest ways of doing this is with
+ OpenMP; on an 8-processor system,
+ this can speed up the computation by another factor of 8.
+ .
+Both of these techniques are illustrated by the following code,
+which computes a table of geoid heights on
+a regular grid and writes on the result in a
+.gtx
+file. On an 8-processor Intel 2.66 GHz machine using OpenMP
+(-DHAVE_OPENMP=1), it takes about 40 minutes of elapsed time to compute
+the geoid height for EGM2008 on a 1' grid. (Without these
+optimizations, the computation would have taken about 200 days!)
+\include GeoidToGTX.cpp
+
+cmake will add in support for OpenMP for
+examples/GeoidToGTX.cpp, if it is available.
+
+
+Back to \ref geoid. Forward to \ref normalgravity. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page normalgravity Normal gravity
+
+
+Back to \ref gravity. Forward to \ref magnetic. Up to \ref contents.
+
+
+The NormalGravity class computes "normal gravity" which refers to the
+exact (classical) solution of an idealised system consisting of an
+ellipsoid of revolution with the following properties:
+ - \e M the mass interior to the ellipsoid,
+ - \e a the equatorial radius,
+ - \e b the polar semi-axis,
+ - ω the rotation rate about the polar axis.
+ .
+(N.B. The mass always appears in the combination \e GM, with units
+m3/s2, where \e G is the gravtitational constant.)
+The distribution of the mass \e M within the ellipsoid is such that the
+surface of the ellipsoid is at a constant normal potential where the
+normal potential is the sum of the gravitational potential (due to the
+gravitational attraction) and the centrifugal potential (due to the
+rotation). The resulting field exterior to the ellipsoid is called
+normal gravity and was found by Somigliana (1929). Because the
+potential is constant on the ellipsoid it is sometimes referred to as
+the level ellipsoid.
+
+Go to
+ - \ref normalgravcoords
+ - \ref normalgravpot
+ - \ref normalgravmass
+ - \ref normalgravsurf
+ - \ref normalgravmean
+ - \ref normalgravj2
+
+References:
+ - C. Somigliana, Teoria generale del campo gravitazionale dell'ellissoide
+ di rotazione, Mem. Soc. Astron. Ital, 4, 541--599 (1929).
+ - W. A. Heiskanen and H. Moritz, Physical Geodesy (Freeman, San
+ Francisco, 1967), Secs. 1-19, 2-7, 2-8 (2-9, 2-10), 6-2 (6-3).
+ - B. Hofmann-Wellenhof, H. Moritz, Physical Geodesy (Second edition,
+ Springer, 2006). https://doi.org/10.1007/978-3-211-33545-1
+ - H. Moritz, Geodetic Reference System 1980, J. Geodesy 54(3), 395--405
+ (1980). https://doi.org/10.1007/BF02521480
+ - H. Moritz, The Figure of the Earth (Wichmann, 1990).
+ - M. Chasles, Solution nouvelle du problème de l’attraction d’un
+ ellipsoïde hétérogène sur un point
+ exterieur, Jour. Liouville 5, 465--488 (1840), Note 2.
+ http://sites.mathdoc.fr/JMPA/PDF/JMPA_1840_1_5_A41_0.pdf
+
+\section normalgravcoords Ellipsoidal coordinates
+
+Two set of formulas are presented: those of Heiskanen and Moritz (1967)
+which are applicable to an oblate ellipsoid and a second set where the
+variables are distinguished with primes which apply to a prolate
+ellipsoid. The primes are omitted from those variables which are the
+same in the two cases. In the text, the parenthetical "alt." clauses
+apply to prolate ellipsoids.
+
+Cylindrical coordinates \f$ R,Z \f$ are expressed in terms of
+ellipsoidal coordinates
+\f[
+\begin{align}
+ R &= \sqrt{u^2 + E^2} \cos\beta = u' \cos\beta,\\
+ Z &= u \sin\beta = \sqrt{u'^2 + E'^2} \sin\beta,
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+ E^2 = a^2 - b^2,&{} \qquad u^2 = u'^2 + E'^2,\\
+ E'^2 = b^2 - a^2,&{} \qquad u'^2 = u^2 + E^2.
+\end{align}
+\f]
+Surfaces of constant \f$ u \f$ (or \f$ u' \f$) are confocal ellipsoids.
+The surface \f$ u = 0 \f$ (alt. \f$ u' = 0 \f$) corresponds to the
+focal disc of diameter \f$ 2E \f$ (alt. focal rod of length
+\f$ 2E' \f$). The level ellipsoid is given by \f$ u = b \f$
+(alt. \f$ u' = a \f$). On the level ellipsoid, \f$ \beta \f$ is the
+familiar parametric latitude.
+
+In writing the potential and the gravity, it is useful to introduce the
+functions
+\f[
+\begin{align}
+ Q(z) &= \frac1{2z^3}
+ \biggl[\biggl(1 + \frac3{z^2}\biggr)\tan^{-1}z - \frac3z\biggr],\\
+ Q'(z') &= \frac{(1+z'^2)^{3/2}}{2z'^3}
+ \biggl[\biggl(2 + \frac3{z'^2}\biggr)\sinh^{-1}z' -
+ \frac{3\sqrt{1+z'^2}}{z'}\biggr],\\
+ H(z) &= \biggl(3Q(z)+z\frac{dQ(z)}{dz}\biggr)(1+z^2)\\
+ &= \frac1{z^4}\biggl[3(1+z^2)
+ \biggl(1-\frac{\tan^{-1}z}z\biggr)-z^2\biggr],\\
+ H'(z') &= \frac{3Q'(z')}{1+z'^2}+z'\frac{dQ'(z')}{dz'}\\
+ &= \frac{1+z'^2}{z'^4}
+ \biggl[3\biggl(1-\frac{\sqrt{1+z'^2}\sinh^{-1}z'}{z'}\biggr)
+ +z'^2\biggr].
+\end{align}
+\f]
+The function arguments are \f$ z = E/u \f$
+(alt. \f$ z' = E'/u' \f$) and the unprimed and primed quantities are
+related by
+\f[
+\begin{align}
+Q'(z') = Q(z),&{} \qquad H'(z') = H(z),\\
+z'^2 = -\frac{z^2}{1 + z^2},&{} \qquad z^2 = -\frac{z'^2}{1 + z'^2}.
+\end{align}
+\f]
+The functions \f$ q(u) \f$ and \f$ q'(u) \f$ used by Heiskanen and
+Moritz are given by
+\f[
+ q(u) = \frac{E^3}{u^3}Q\biggl(\frac Eu\biggr),\qquad
+ q'(u) = \frac{E^2}{u^2}H\biggl(\frac Eu\biggr).
+\f]
+The functions \f$ Q(z) \f$, \f$ Q'(z') \f$, \f$ H(z) \f$, and
+\f$ H'(z') \f$ are more convenient for use in numerical codes because
+they are finite in the spherical limit \f$ E \rightarrow 0 \f$, i.e.,
+\f$ Q(0) = Q'(0) = \frac2{15} \f$, and \f$ H(0) = H'(0) = \frac25 \f$.
+
+\section normalgravpot The normal potential
+
+The normal potential is the sum of three components, a mass term, a
+quadrupole term and a centrifugal term,
+\f[ U = U_m + U_q + U_r. \f]
+The mass term is
+\f[ U_m = \frac {GM}E \tan^{-1}\frac Eu
+ = \frac {GM}{E'} \sinh^{-1}\frac{E'}{u'}; \f]
+the quadrupole term is
+\f[
+\begin{align}
+ U_q &= \frac{\omega^2}2 \frac{a^2 b^3}{u^3} \frac{Q(E/u)}{Q(E/b)}
+ \biggl(\sin^2\beta-\frac13\biggr)\\
+ &= \frac{\omega^2}2 \frac{a^2 b^3}{(u'^2+E'^2)^{3/2}}
+ \frac{Q'(E'/u')}{Q'(E'/a)}
+ \biggl(\sin^2\beta-\frac13\biggr);
+\end{align}
+\f]
+finally, the rotational term is
+\f[
+U_r = \frac{\omega^2}2 R^2
+ = \frac{\omega^2}2 (u^2 + E^2) \cos^2\beta
+ = \frac{\omega^2}2 u'^2 \cos^2\beta.
+\f]
+
+\f$ U_m \f$ and \f$ U_q \f$ are both gravitational potentials (due to
+mass within the ellipsoid). The total mass contributing to \f$ U_m \f$
+is \f$ M \f$; the total mass contributing to \f$ U_q \f$ vanishes (far
+from the ellipsoid, the \f$ U_q \f$ decays inversely as the cube of the
+distance).
+
+\f$ U_m \f$ and \f$ U_q + U_r \f$ are separately both constant on the
+level ellipsoid. \f$ U_m \f$ is the normal potential for a massive
+non-rotating ellipsoid. \f$ U_q + U_r \f$ is the potential for a
+massless rotating ellipsoid. Combining all the terms, \f$ U \f$ is the
+normal potential for a massive rotating ellipsoid.
+
+The figure shows normal gravity for the case \f$ GM = 1 \f$,
+\f$ a = 1 \f$, \f$ b = 0.8 \f$, \f$ \omega = 0.3 \f$. The level
+ellipsoid is shown in red. Contours of constant gravity potential are
+shown in blue; the contour spacing is constant outside the ellipsoid and
+equal to 1/20 of the difference between the potentials on the ellipsoid
+and at the geostationary point (\f$ R = 2.2536 \f$, \f$ Z = 0 \f$);
+inside the ellipsoid the contour spacing is 5 times greater. The green
+lines are stream lines for the gravity; these are spaced at intervals of
+10° in parametric latitude on the surface of the ellipsoid. The
+normal gravity is continued into the level ellipsoid under the
+assumption that the mass is concentrated on the focal disc, shown in
+black.
+
+\image html normal-gravity-potential-1.svg "Normal gravity"
+
+\section normalgravmass The mass distribution
+
+Typically, the normal potential, \f$ U \f$, is only of interest for
+outside the ellipsoid \f$ u \ge b \f$ (alt. \f$ u' \ge a \f$). In
+planetary applications, an open problem is finding a mass distribution
+which is in hydrostatic equilibrium (the mass density is non-negative
+and a non-decreasing function of the potential interior to the
+ellipsoid).
+
+However it is possible to give singular mass distributions consistent
+with the normal potential.
+
+For a non-rotating body, the potential \f$ U = U_m \f$ is generated by a
+sandwiching the mass \f$ M \f$ uniformly between the level ellipsoid
+with semi-axes \f$ a \f$ and \f$ b \f$ and a close similar
+ellipsoid with semi-axes \f$ (1-\epsilon)a \f$ and
+\f$ (1-\epsilon)b \f$. Chasles (1840) extends a theorem of Newton to
+show that the field interior to such an ellipsoidal shell vanishes.
+Thus the potential on the ellipsoid is constant, i.e., it is indeed a
+level ellipsoid. This result also holds for a non-rotating triaxial
+ellipsoid.
+
+Observing that \f$ U_m \f$ and \f$ U_q \f$ as defined above obey
+\f$ \nabla^2 U_m = \nabla^2 U_q = 0 \f$ everywhere for \f$ u > 0 \f$
+(alt. \f$ u' > 0 \f$), we see that these potentials correspond to
+masses concentrated at \f$ u = 0 \f$ (alt. \f$ u' = 0 \f$).
+
+In the oblate case, \f$ U_m \f$ is generated by a massive disc at
+\f$ Z = 0 \f$, \f$ R < E \f$, with mass density (mass per unit area) \f$
+\rho_m \f$ and moments of inertia about the equatorial (resp. polar)
+axis of \f$ A_m \f$ (resp. \f$ C_m \f$) given by
+\f[
+\begin{align}
+\rho_m &= \frac M{2\pi E\sqrt{E^2 - R^2}},\\
+A_m &= \frac {ME^2}3, \\
+C_m &= \frac {2ME^2}3, \\
+C_m-A_m &= \frac {ME^2}3.
+\end{align}
+\f]
+This mass distribution is the same as that produced by projecting a
+uniform spheric shell of mass \f$ M \f$ and radius \f$ E \f$ onto the
+equatorial plane.
+
+In the prolate case, \f$ U_m \f$ is generated by a massive rod at \f$ R
+= 0 \f$, \f$ Z < E' \f$ and now the mass density \f$ \rho'_m \f$ has
+units mass per unit length,
+\f[
+\begin{align}
+\rho'_m &= \frac M{2E'},\\
+A_m &= \frac {ME'^2}3, \\
+C_m &= 0, \\
+C_m-A_m &= -\frac {ME'^2}3.
+\end{align}
+\f]
+This mass distribution is the same as that produced by projecting a
+uniform spheric shell of mass \f$ M \f$ and radius \f$ E' \f$ onto the
+polar axis.
+
+Similarly, \f$ U_q \f$ is generated in the oblate case by
+\f[
+\begin{align}
+\rho_q &= \frac{a^2 b^3 \omega^2}G
+ \frac{2E^2 - 3R^2}{6\pi E^5 \sqrt{E^2 - R^2} Q(E/b)}, \\
+A_q &= -\frac{a^2 b^3 \omega^2}G \frac2{45 Q(E/b)}, \\
+C_q &= -\frac{a^2 b^3 \omega^2}G \frac4{45 Q(E/b)}, \\
+C_q-A_q &= -\frac{a^2 b^3 \omega^2}G \frac2{45 Q(E/b)}.
+\end{align}
+\f]
+The corresponding results for a prolate ellipsoid are
+\f[
+\begin{align}
+\rho_q' &= \frac{a^2 b^3 \omega^2}G
+ \frac{3Z^2 - E'^2}{12 E'^5 Q'(E'/a)}, \\
+A_q &= \frac{a^2 b^3 \omega^2}G \frac2{45 Q'(E'/a)}, \\
+C_q &= 0, \\
+C_q-A_q &= -\frac{a^2 b^3 \omega^2}G \frac2{45 Q'(E'/a)}.
+\end{align}
+\f]
+
+Summing up the mass and quadrupole terms, we have
+\f[
+\begin{align}
+A &= A_m + A_q, \\
+C &= C_m + C_q, \\
+J_2 & = \frac{C - A}{Ma^2},
+\end{align}
+\f]
+where \f$ J_2 \f$ is the dynamical form factor.
+
+\section normalgravsurf The surface gravity
+
+Each term in the potential contributes to the gravity on the surface of
+the ellipsoid
+\f[
+\gamma = \gamma_m + \gamma_q + \gamma_r;
+\f]
+These are the components of gravity normal to the ellipsoid and, by
+convention, \f$ \gamma \f$ is positive downwards. The tangential
+components of the total gravity and that due to \f$ U_m \f$ vanish.
+Those tangential components of the gravity due to \f$ U_q \f$ and \f$
+U_r \f$ cancel one another.
+
+The gravity \f$ \gamma \f$ has the following dependence on latitude
+\f[
+\begin{align}
+\gamma &= \frac{b\gamma_a\cos^2\beta + a\gamma_b\sin^2\beta}
+ {\sqrt{b^2\cos^2\beta + a^2\sin^2\beta}}\\
+ &= \frac{a\gamma_a\cos^2\phi + b\gamma_b\sin^2\phi}
+ {\sqrt{a^2\cos^2\phi + b^2\sin^2\phi}},
+\end{align}
+\f]
+and the individual components, \f$ \gamma_m \f$, \f$ \gamma_q \f$, and
+\f$ \gamma_r \f$, have the same dependence on latitude. The equatorial
+and polar gravities are
+\f[
+\begin{align}
+\gamma_a &= \gamma_{ma} + \gamma_{qa} + \gamma_{ra},\\
+\gamma_b &= \gamma_{mb} + \gamma_{qb} + \gamma_{rb},
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+\gamma_{ma} &= \frac{GM}{ab},\qquad \gamma_{mb} = \frac{GM}{a^2},\\
+\gamma_{qa} &= -\frac{\omega^2 a}6 \frac{H(E/b)}{Q(E/b)}
+ = -\frac{\omega^2 a}6 \frac{H'(E'/a)}{Q'(E'/a)},\\
+\gamma_{qb} &= -\frac{\omega^2 b}3 \frac{H(E/b)}{Q(E/b)}
+ = -\frac{\omega^2 b}3 \frac{H'(E'/a)}{Q'(E'/a)},\\
+\gamma_{ra} &= -\omega^2 a,\qquad \gamma_{rb} = 0.
+\end{align}
+\f]
+
+\section normalgravmean The mean gravity
+
+Performing an average of the surface gravity over the area of the
+ellipsoid gives
+\f[
+\langle \gamma \rangle = \frac {4\pi a^2 b}A
+ \biggl(\frac{2\gamma_a}{3a} + \frac{\gamma_b}{3b}\biggr),
+\f]
+where \f$ A \f$ is the area of the ellipsoid
+\f[
+\begin{align}
+ A &= 2\pi\biggl( a^2 + ab\frac{\sinh^{-1}(E/b)}{E/b} \biggr)\\
+ &= 2\pi\biggl( a^2 + b^2\frac{\tan^{-1}(E'/a)}{E'/a} \biggr).
+\end{align}
+\f]
+
+The contributions to the mean gravity are
+\f[
+\begin{align}
+\langle \gamma_m \rangle &= \frac{4\pi}A GM, \\
+\langle \gamma_q \rangle &= 0 \quad \text{(as expected)}, \\
+\langle \gamma_r \rangle &= -\frac{4\pi}A \frac{2\omega^2 a^2b}3,\\
+\end{align}
+\f]
+resulting in
+\f[
+\langle \gamma \rangle = \frac{4\pi}A
+ \biggl(GM - \frac{2\omega^2 a^2b}3\biggr).
+\f]
+
+\section normalgravj2 Possible values of the dynamical form factor
+
+The solution for the normal gravity is well defined for arbitrary
+\f$ M \f$, \f$ \omega \f$, \f$ a > 0\f$, and \f$ f < 1 \f$. (Note that
+arbitrary oblate and prolate ellipsoids are possible, although
+hydrostatic equilibrium would not result in a prolate ellipsoid.)
+However, if is much easier to measure the dynamical form factor
+\f$ J_2 \f$ (from the motion of artificial satellites) than the
+flattening \f$ f \f$. (Note too that \f$ GM \f$ is also typically
+measured from from satellite or astronomical observations and so it
+includes the mass of the atmosphere.)
+
+So a question for the software developer is: given values of \f$ M > 0\f$,
+\f$ \omega \f$, and \f$ a > 0 \f$, what are the allowed values of
+\f$ J_2 \f$? We restrict the question to \f$ M > 0 \f$. The
+(unphysical) case \f$ M = 0 \f$ is problematic because \f$ M \f$ appears
+in the denominator in the definition of \f$ J_2 \f$. In the (also
+unphysical) case \f$ M < 0 \f$, a given \f$ J_2 \f$ can result from two
+distinct values of \f$ f \f$.
+
+Holding \f$ M > 0\f$, \f$ \omega \f$, and \f$ a > 0 \f$ fixed and
+varying \f$ f \f$ from \f$ -\infty \f$ to \f$ 1 \f$, we find that
+\f$ J_2 \f$ monotonically increases from \f$ -\infty \f$ to
+\f[
+\frac13 - \frac8{45\pi} \frac{\omega^2 a^3}{GM}.
+\f]
+Thus any value of \f$ J_2 \f$ less that this value is permissible (but
+some of these values may be unphysical). In obtaining this limiting
+value, we used the result
+\f$ Q(z \rightarrow \infty) \rightarrow \pi/(4 z^3) \f$. The value
+\f[
+J_2 = -\frac13 \frac{\omega^2 a^3}{GM}
+\f]
+results in a sphere (\f$ f = 0 \f$).
+
+
+Back to \ref gravity. Forward to \ref magnetic. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page magnetic Magnetic models
+
+
+Back to \ref normalgravity. Forward to \ref geodesic. Up to \ref contents.
+
+
+GeographicLib can compute the earth's magnetic field by a magnetic
+model using the MagneticModel and
+MagneticCircle classes and with the
+MagneticField utility. These models
+expand the internal magnetic potential of the earth as sum of spherical
+harmonics. They neglect magnetic fields due to the ionosphere, the
+magnetosphere, nearby magnetized materials, electric machinery, etc.
+Users of MagneticModel are advised to read the
+"Health
+Warning" this is provided with igrf11. Although the advice is
+specific to igrf11, many of the comments apply to all magnetic field
+models.
+
+The supported models are
+ - wmm2010, the
+ World
+ Magnetic Model 2010, which approximates the main magnetic field
+ for the period 2010--2015.
+ - wmm2015, the
+ World
+ Magnetic Model 2015, which approximates the main magnetic field
+ for the period 2015--2020.
+ - igrf11, the
+ International
+ Geomagnetic Reference Field (11th generation), which approximates
+ the main magnetic field for the period 1900--2015.
+ - igrf12, the
+ International
+ Geomagnetic Reference Field (12th generation), which approximates
+ the main magnetic field for the period 1900--2020.
+ - emm2010, the
+ Enhanced
+ Magnetic Model 2010, which approximates the main and crustal
+ magnetic fields for the period 2010--2015.
+ - emm2015, the
+ Enhanced
+ Magnetic Model 2015, which approximates the main and crustal
+ magnetic fields for the period 2000--2020.
+ - emm2017, the
+ Enhanced
+ Magnetic Model 2017, which approximates the main and crustal
+ magnetic fields for the period 2000--2022.
+
+Go to
+ - \ref magneticinst
+ - \ref magneticformat
+
+\section magneticinst Installing the magnetic field models
+
+These magnetic models are available for download:
+
+The "size" column is the size of the uncompressed data.
+
+For Linux and Unix systems, GeographicLib provides a shell script
+geographiclib-get-magnetic (typically installed in /usr/local/sbin)
+which automates the process of downloading and installing the magnetic
+models. For example
+\verbatim
+ geographiclib-get-magnetic all # install wmm2010, wmm2015, igrf11, igrf12, emm2010, emm2015, emm2017
+ geographiclib-get-magnetic -h # for help
+\endverbatim
+This script should be run as a user with write access to the
+installation directory, which is typically
+/usr/local/share/GeographicLib (this can be overridden with the -p
+flag), and the data will then be placed in the "magnetic" subdirectory.
+
+Windows users should download and run the Windows installers. These
+will prompt for an installation directory with the default being
+\verbatim
+ C:/ProgramData/GeographicLib
+\endverbatim
+(which you probably should not change) and the data is installed in the
+"magnetic" sub-directory. (The second directory name is an alternate name
+that Windows 7 uses for the "Application Data" directory.)
+
+Otherwise download \e either the tar.bz2 file \e or the zip file (they
+have the same contents). To unpack these, run, for example
+\verbatim
+ mkdir -p /usr/local/share/GeographicLib
+ tar xofjC wmm2015.tar.bz2 /usr/local/share/GeographicLib
+ tar xofjC emm2010.tar.bz2 /usr/local/share/GeographicLib
+ etc.
+\endverbatim
+and, again, the data will be placed in the "magnetic" subdirectory.
+
+However you install the magnetic models, all the datasets should be
+installed in the same directory. MagneticModel and
+MagneticField uses a compile time
+default to locate the datasets. This is
+- /usr/local/share/GeographicLib/magnetic, for non-Windows systems
+- C:/ProgramData/GeographicLib/magnetic, for Windows systems
+.
+consistent with the examples above. This may be overridden at run-time
+by defining the GEOGRAPHICLIB_MAGNETIC_PATH or the GEOGRAPHIC_DATA
+environment variables; see
+MagneticModel::DefaultMagneticPath() for details.
+Finally, the path may be set using the optional second argument to the
+MagneticModel constructor or with the "-d" flag to
+MagneticField. Supplying the "-h"
+flag to
+MagneticField reports the default
+path for magnetic models for that utility. The "-v" flag causes
+MagneticField to report the full path name of the data file it uses.
+
+\section magneticformat The format of the magnetic model files
+
+The constructor for MagneticModel reads a file called
+NAME.wmm which specifies various properties for the magnetic model. It
+then opens a binary file NAME.wmm.cof to obtain the coefficients of the
+spherical harmonic sum.
+
+The first line of the .wmm file must consist of "WMMF-v" where WMMF
+stands for "World Magnetic Model Format" and v is the version number of
+the format (currently "2").
+
+The rest of the File is read a line at a time. A # character and
+everything after it are discarded. If the result is just white space it
+is discarded. The remaining lines are of the form "KEY WHITESPACE
+VALUE". In general, the KEY and the VALUE are case-sensitive.
+
+MagneticModel only pays attention to the following
+keywords
+ - keywords that affect the field calculation, namely:
+ - Radius (required), the normalizing radius of the model in
+ meters.
+ - NumModels (default 1), the number of models. WMM2015
+ consists of a single model giving the magnetic field and its time
+ variation at 2015. IGRF12 consists of 24 models for 1900 thru 2015
+ at 5 year intervals. The time variation is given only for the last
+ model to allow extrapolation beyond 2015. For dates prior to 2015,
+ linear interpolation is used.
+ - NumConstants (default 0), the number of time-independent
+ terms; this can be 0 or 1. This keyword was introduced in format
+ version 2 (GeographicLib version 1.43) to support the EMM2015 and
+ later models. This model includes long wavelength time-varying
+ components of degree 15. This is supplemented by a short
+ wavelength time-independent component with much higher degree.
+ - Epoch (required), the time origin (in fractional years) for
+ the first model.
+ - DeltaEpoch (default 1), the interval between models in years
+ (only relevant for NumModels > 1).
+ - Normalization (default schmidt), the normalization used for
+ the associated Legendre functions (schmidt or full).
+ - ID (required), 8 printable characters which serve as a
+ signature for the .wmm.cof file (they must appear as the first 8
+ bytes of this file).
+ - keywords that store data that the user can query:
+ - Name, the name of the model.
+ - Description, a more descriptive name of the model.
+ - ReleaseDate, when the model was created.
+ - MinTime, the minimum date at which the model should be used.
+ - MaxTime, the maximum date at which the model should be used.
+ - MinHeight, the minimum height above the ellipsoid for which
+ the model should be used.
+ - MaxHeight, the maximum height above the ellipsoid for which
+ the model should be used.
+ .
+ MagneticModel does not enforce the restrictions
+ implied by last four quantities. However,
+ MagneticField issues a warning if
+ these limits are exceeded.
+ - keywords that are examined to verify that their values are valid:
+ - Type (default linear), the type of the model. "linear"
+ means that the time variation is piece-wise linear (either using
+ interpolation between the field at two dates or using the field and
+ its first derivative with respect to time). This is the only type
+ of model supported at present.
+ - ByteOrder (default little), the order of bytes in the
+ .wmm.cof file. Only little endian is supported at present.
+ .
+Other keywords are ignored.
+
+The coefficient file NAME.wmm.cof is a binary file in little endian
+order. The first 8 bytes of this file must match the ID given in
+NAME.wmm. This is followed by NumModels + 1 sets of spherical harmonic
+coefficients. The first NumModels of these model the magnetic field at
+Epoch + \e i * DeltaEpoch for 0 ≤ \e i < NumModels. The last set of
+coefficients model the rate of change of the magnetic field at Epoch +
+(NumModels − 1) * DeltaEpoch. The format for each set of coefficients
+is:
+ - \e N, the maximum degree of the sum stored as a 4-byte signed integer.
+ This must satisfy \e N ≥ −1.
+ - \e M, the maximum order of the sum stored as a 4-byte signed integer.
+ This must satisfy \e N ≥ \e M ≥ −1.
+ - Cnm, the coefficients of the cosine
+ coefficients of the sum in column (i.e., \e m) major order. There
+ are (\e M + 1) (2\e N − \e M + 2) / 2 elements which are stored
+ as IEEE doubles (8 bytes). For example for \e N = \e M = 3, there
+ are 10 coefficients arranged as
+ C00,
+ C10,
+ C20,
+ C30,
+ C11,
+ C21,
+ C31,
+ C22,
+ C32,
+ C33.
+ - Snm, the coefficients of the sine
+ coefficients of the sum in column (i.e., \e m) major order starting
+ at \e m = 1. There are \e M (2\e N − \e M + 1) / 2 elements
+ which are stored as IEEE doubles (8 bytes). For example for \e N =
+ \e M = 3, there are 6 coefficients arranged as
+ S11,
+ S21,
+ S31,
+ S22,
+ S32,
+ S33.
+ .
+Although the coefficient file is in little endian order, GeographicLib
+can read it on big endian machines. It can only be read on machines
+which store doubles in IEEE format.
+
+As an illustration, here is igrf11.wmm:
+\verbatim
+WMMF-1
+# A World Magnetic Model (Format 1) file. For documentation on the
+# format of this file see
+# https://geographiclib.sourceforge.io/html/magnetic.html#magneticformat
+Name igrf11
+Description International Geomagnetic Reference Field 11th Generation
+URL https://ngdc.noaa.gov/IAGA/vmod/igrf.html
+Publisher National Oceanic and Atmospheric Administration
+ReleaseDate 2009-12-15
+DataCutOff 2009-10-01
+ConversionDate 2011-11-04
+DataVersion 1
+Radius 6371200
+NumModels 23
+Epoch 1900
+DeltaEpoch 5
+MinTime 1900
+MaxTime 2015
+MinHeight -1000
+MaxHeight 600000
+
+# The coefficients are stored in a file obtained by appending ".cof" to
+# the name of this file. The coefficients were obtained from IGRF11.COF
+# in the geomag70 distribution.
+ID IGRF11-A
+\endverbatim
+
+
+Back to \ref normalgravity. Forward to \ref geodesic. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page geodesic Geodesics on an ellipsoid of revolution
+
+
+Back to \ref magnetic. Forward to \ref nearest. Up to \ref contents.
+
+
+Geodesic and GeodesicLine provide accurate
+solutions to the direct and inverse geodesic problems. The
+GeodSolve utility provides an interface
+to these classes. AzimuthalEquidistant implements the
+azimuthal equidistant projection in terms of geodesics.
+CassiniSoldner implements a transverse cylindrical
+equidistant projection in terms of geodesics. The
+GeodesicProj utility provides an
+interface to these projections.
+
+The algorithms used by Geodesic and GeodesicLine are based on a Taylor
+expansion of the geodesic integrals valid when the flattening \e f is
+small. GeodesicExact and GeodesicLineExact evaluate the integrals
+exactly (in terms of incomplete elliptic integrals). For the WGS84
+ellipsoid, the series solutions are about 2--3 times faster and 2--3
+times more accurate (because it's easier to control round-off errors
+with series solutions); thus Geodesic and GeodesicLine are recommended
+for most geodetic applications. However, in applications where the
+absolute value of \e f is greater than about 0.02, the exact classes
+should be used.
+
+Go to
+ - \ref testgeod
+ - \ref geodseries
+ - \ref geodellip
+ - \ref meridian
+ - \ref geodshort
+ .
+For some background information on geodesics on triaxial ellipsoids, see
+\ref triaxial.
+
+References:
+ - F. W. Bessel,
+ The calculation
+ of longitude and latitude from geodesic measurements (1825),
+ Astron. Nachr. 331(8), 852--861 (2010);
+ translated by C. F. F. Karney and R. E. Deakin; preprint:
+ arXiv:0908.1824.
+ - F. R. Helmert,
+
+ Mathematical and Physical Theories of Higher Geodesy, Part 1 (1880),
+ Aeronautical Chart and Information Center (St. Louis, 1964),
+ Chaps. 5--7.
+ - J. Danielsen,
+ The area under the geodesic,
+ Survey Review 30(232), 61--66 (1989).
+ DOI:
+ 10.1179/003962689791474267
+ - C. F. F. Karney,
+
+ Algorithms for geodesics,
+ J. Geodesy 87(1), 43--55 (2013);
+ DOI:
+ 10.1007/s00190-012-0578-z;
+ addenda:
+ geod-addenda.html;
+ resource page:
+ geod.html.
+ - A collection of some papers on geodesics is available at
+ https://geographiclib.sourceforge.io/geodesic-papers/biblio.html
+ - The wikipedia page,
+
+ Geodesics on an ellipsoid.
+
+\section testgeod Test data for geodesics
+
+A test set a geodesics is available at
+ -
+ GeodTest.dat.gz
+ - C. F. F. Karney, Test set for geodesics (2010),
+ DOI:
+ 10.5281/zenodo.32156.
+ .
+This is about 39 MB (compressed). This consists of a set of geodesics
+for the WGS84 ellipsoid. A subset of this (consisting of 1/50 of the
+members — about 690 kB, compressed) is available at
+ -
+ GeodTest-short.dat.gz
+
+Each line of the test set gives 10 space delimited numbers
+ - latitude at point 1, \e lat1 (degrees, exact)
+ - longitude at point 1, \e lon1 (degrees, always 0)
+ - azimuth at point 1, \e azi1 (clockwise from north in degrees, exact)
+ - latitude at point 2, \e lat2 (degrees, accurate to
+ 10−18 deg)
+ - longitude at point 2, \e lon2 (degrees, accurate to
+ 10−18 deg)
+ - azimuth at point 2, \e azi2 (degrees, accurate to
+ 10−18 deg)
+ - geodesic distance from point 1 to point 2, \e s12 (meters, exact)
+ - arc distance on the auxiliary sphere, \e a12 (degrees, accurate to
+ 10−18 deg)
+ - reduced length of the geodesic, \e m12 (meters, accurate to 0.1 pm)
+ - the area under the geodesic, \e S12 (m2, accurate to
+ 1 mm2)
+ .
+These are computed using as direct geodesic calculations with the given
+\e lat1, \e lon1, \e azi1, and \e s12. The distance \e s12 always
+corresponds to an arc length \e a12 ≤ 180°, so the given
+geodesics give the shortest paths from point 1 to point 2. For
+simplicity and without loss of generality, \e lat1 is chosen in
+[0°, 90°], \e lon1 is taken to be zero, \e azi1 is
+chosen in [0°, 180°]. Furthermore, \e lat1 and \e
+azi1 are taken to be multiples of 10−12 deg and \e s12
+is a multiple of 0.1 μm in [0 m, 20003931.4586254 m].
+This results in \e lon2 in [0°, 180°] and \e azi2 in [0°,
+180°].
+
+The direct calculation uses an expansion of the geodesic equations
+accurate to f30 (approximately 1 part in 1050)
+and is computed with with
+Maxima's
+bfloats and fpprec set to 100 (so the errors in the data are probably
+1/2 of the values quoted above).
+
+The contents of the file are as follows:
+ - 100000 entries randomly distributed
+ - 50000 entries which are nearly antipodal
+ - 50000 entries with short distances
+ - 50000 entries with one end near a pole
+ - 50000 entries with both ends near opposite poles
+ - 50000 entries which are nearly meridional
+ - 50000 entries which are nearly equatorial
+ - 50000 entries running between vertices (\e azi1 = \e azi2 = 90°)
+ - 50000 entries ending close to vertices
+ .
+(a total of 500000 entries). The values for \e s12 for the geodesics
+running between vertices are truncated to a multiple of 0.1 pm and this
+is used to determine point 2.
+
+This data can be fed to the GeodSolve
+utility as follows
+ - Direct from point 1:
+\verbatim
+ gunzip -c GeodTest.dat.gz | cut -d' ' -f1,2,3,7 | ./GeodSolve
+\endverbatim
+ This should yield columns 4, 5, 6, and 9 of the test set.
+ - Direct from point 2:
+\verbatim
+ gunzip -c GeodTest.dat.gz | cut -d' ' -f4,5,6,7 |
+ sed "s/ \([^ ]*$\)/ -\1/" | ./GeodSolve
+\endverbatim
+ (The sed command negates the distance.) This should yield columns 1,
+ 2, and 3, and the negative of column 9 of the test set.
+ - Inverse between points 1 and 2:
+\verbatim
+ gunzip -c GeodTest.dat.gz | cut -d' ' -f1,2,4,5 | ./GeodSolve -i
+\endverbatim
+ This should yield columns 3, 6, 7, and 9 of the test set.
+ .
+Add, e.g., "-p 6", to the call to GeodSolve to change the precision of
+the output. Adding "-f" causes GeodSolve to print 12 fields specifying
+the geodesic; these include the 10 fields in the test set plus the
+geodesic scales \e M12 and \e M21 which are inserted between \e m12 and
+\e S12.
+
+Code for computing arbitrarily accurate geodesics in maxima is available
+in geodesic.mac (this depends on
+ ellint.mac and uses the series computed by
+ geod.mac). This solve both the direct and
+inverse geodesic problems and offers the ability to solve the problems
+either using series expansions (similar to Geodesic) or in terms of
+elliptic integrals (similar to GeodesicExact).
+
+\section geodseries Expansions for geodesics
+
+We give here the series expansions for the various geodesic integrals
+valid to order f10. In this release of the code, we
+use a 6th-order expansions. This is sufficient to maintain accuracy for
+doubles for the SRMmax ellipsoid (\e a = 6400 km, \e f = 1/150).
+However, the preprocessor macro GEOGRAPHICLIB_GEODESIC_ORDER can be used
+to select an order from 3 thru 8. (If using long doubles, with a 64-bit
+fraction, the default order is 7.) The series expanded to order
+f30 are given in
+geodseries30.html.
+
+In the formulas below ^ indicates exponentiation (f^3 =
+f3) and / indicates real division (3/5 = 0.6). The
+equations need to be converted to Horner form, but are here left in
+expanded form so that they can be easily truncated to lower order.
+These expansions were obtained using the Maxima code,
+geod.mac.
+
+In the expansions below, we have
+ - \f$ \alpha \f$ is the azimuth
+ - \f$ \alpha_0 \f$ is the azimuth at the equator crossing
+ - \f$ \lambda \f$ is the longitude measured from the equator crossing
+ - \f$ \sigma \f$ is the spherical arc length
+ - \f$ \omega = \tan^{-1}(\sin\alpha_0\tan\sigma) \f$ is the spherical longitude
+ - \f$ a \f$ is the equatorial radius
+ - \f$ b \f$ is the polar semi-axis
+ - \f$ f \f$ is the flattening
+ - \f$ e^2 = f(2 - f) \f$
+ - \f$ e'^2 = e^2/(1-e^2) \f$
+ - \f$ k^2 = e'^2 \cos^2\alpha_0 = 4 \epsilon / (1 - \epsilon)^2 \f$
+ - \f$ n = f / (2 - f) \f$
+ - \f$ c^2 = a^2/2 + b^2/2 (\tanh^{-1}e)/e \f$
+ - \e ep2 = \f$ e'^2 \f$
+ - \e k2 = \f$ k^2 \f$
+ - \e eps = \f$ \epsilon = k^2 / (\sqrt{1 + k^2} + 1)^2\f$
+
+The formula for distance is
+\f[
+ \frac sb = I_1(\sigma)
+\f]
+where
+\f[
+\begin{align}
+ I_1(\sigma) &= A_1\bigl(\sigma + B_1(\sigma)\bigr) \\
+ B_1(\sigma) &= \sum_{j=1} C_{1j} \sin 2j\sigma
+\end{align}
+\f]
+and
+\verbatim
+A1 = (1 + 1/4 * eps^2
+ + 1/64 * eps^4
+ + 1/256 * eps^6
+ + 25/16384 * eps^8
+ + 49/65536 * eps^10) / (1 - eps);
+\endverbatim
+\verbatim
+C1[1] = - 1/2 * eps
+ + 3/16 * eps^3
+ - 1/32 * eps^5
+ + 19/2048 * eps^7
+ - 3/4096 * eps^9;
+C1[2] = - 1/16 * eps^2
+ + 1/32 * eps^4
+ - 9/2048 * eps^6
+ + 7/4096 * eps^8
+ + 1/65536 * eps^10;
+C1[3] = - 1/48 * eps^3
+ + 3/256 * eps^5
+ - 3/2048 * eps^7
+ + 17/24576 * eps^9;
+C1[4] = - 5/512 * eps^4
+ + 3/512 * eps^6
+ - 11/16384 * eps^8
+ + 3/8192 * eps^10;
+C1[5] = - 7/1280 * eps^5
+ + 7/2048 * eps^7
+ - 3/8192 * eps^9;
+C1[6] = - 7/2048 * eps^6
+ + 9/4096 * eps^8
+ - 117/524288 * eps^10;
+C1[7] = - 33/14336 * eps^7
+ + 99/65536 * eps^9;
+C1[8] = - 429/262144 * eps^8
+ + 143/131072 * eps^10;
+C1[9] = - 715/589824 * eps^9;
+C1[10] = - 2431/2621440 * eps^10;
+\endverbatim
+
+The function \f$ \tau(\sigma) = s/(b A_1) = \sigma + B_1(\sigma) \f$
+may be inverted by series reversion giving
+\f[
+ \sigma(\tau) = \tau + \sum_{j=1} C'_{1j} \sin 2j\sigma
+\f]
+where
+\verbatim
+C1'[1] = + 1/2 * eps
+ - 9/32 * eps^3
+ + 205/1536 * eps^5
+ - 4879/73728 * eps^7
+ + 9039/327680 * eps^9;
+C1'[2] = + 5/16 * eps^2
+ - 37/96 * eps^4
+ + 1335/4096 * eps^6
+ - 86171/368640 * eps^8
+ + 4119073/28311552 * eps^10;
+C1'[3] = + 29/96 * eps^3
+ - 75/128 * eps^5
+ + 2901/4096 * eps^7
+ - 443327/655360 * eps^9;
+C1'[4] = + 539/1536 * eps^4
+ - 2391/2560 * eps^6
+ + 1082857/737280 * eps^8
+ - 2722891/1548288 * eps^10;
+C1'[5] = + 3467/7680 * eps^5
+ - 28223/18432 * eps^7
+ + 1361343/458752 * eps^9;
+C1'[6] = + 38081/61440 * eps^6
+ - 733437/286720 * eps^8
+ + 10820079/1835008 * eps^10;
+C1'[7] = + 459485/516096 * eps^7
+ - 709743/163840 * eps^9;
+C1'[8] = + 109167851/82575360 * eps^8
+ - 550835669/74317824 * eps^10;
+C1'[9] = + 83141299/41287680 * eps^9;
+C1'[10] = + 9303339907/2972712960 * eps^10;
+\endverbatim
+
+The reduced length is given by
+\f[
+\begin{align}
+ \frac mb &= \sqrt{1 + k^2 \sin^2\sigma_2} \cos\sigma_1 \sin\sigma_2 \\
+ &\quad {}-\sqrt{1 + k^2 \sin^2\sigma_1} \sin\sigma_1 \cos\sigma_2 \\
+ &\quad {}-\cos\sigma_1 \cos\sigma_2 \bigl(J(\sigma_2) - J(\sigma_1)\bigr)
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+ J(\sigma) &= I_1(\sigma) - I_2(\sigma) \\
+ I_2(\sigma) &= A_2\bigl(\sigma + B_2(\sigma)\bigr) \\
+ B_2(\sigma) &= \sum_{j=1} C_{2j} \sin 2j\sigma
+\end{align}
+\f]
+\verbatim
+A2 = (1 - 3/4 * eps^2
+ - 7/64 * eps^4
+ - 11/256 * eps^6
+ - 375/16384 * eps^8
+ - 931/65536 * eps^10) / (1 + eps);
+\endverbatim
+\verbatim
+C2[1] = + 1/2 * eps
+ + 1/16 * eps^3
+ + 1/32 * eps^5
+ + 41/2048 * eps^7
+ + 59/4096 * eps^9;
+C2[2] = + 3/16 * eps^2
+ + 1/32 * eps^4
+ + 35/2048 * eps^6
+ + 47/4096 * eps^8
+ + 557/65536 * eps^10;
+C2[3] = + 5/48 * eps^3
+ + 5/256 * eps^5
+ + 23/2048 * eps^7
+ + 191/24576 * eps^9;
+C2[4] = + 35/512 * eps^4
+ + 7/512 * eps^6
+ + 133/16384 * eps^8
+ + 47/8192 * eps^10;
+C2[5] = + 63/1280 * eps^5
+ + 21/2048 * eps^7
+ + 51/8192 * eps^9;
+C2[6] = + 77/2048 * eps^6
+ + 33/4096 * eps^8
+ + 2607/524288 * eps^10;
+C2[7] = + 429/14336 * eps^7
+ + 429/65536 * eps^9;
+C2[8] = + 6435/262144 * eps^8
+ + 715/131072 * eps^10;
+C2[9] = + 12155/589824 * eps^9;
+C2[10] = + 46189/2621440 * eps^10;
+\endverbatim
+
+The longitude is given in terms of the spherical longitude by
+\f[
+\lambda = \omega - f \sin\alpha_0 I_3(\sigma)
+\f]
+where
+\f[
+\begin{align}
+ I_3(\sigma) &= A_3\bigl(\sigma + B_3(\sigma)\bigr) \\
+ B_3(\sigma) &= \sum_{j=1} C_{3j} \sin 2j\sigma
+\end{align}
+\f]
+and
+\verbatim
+A3 = 1 - (1/2 - 1/2*n) * eps
+ - (1/4 + 1/8*n - 3/8*n^2) * eps^2
+ - (1/16 + 3/16*n + 1/16*n^2 - 5/16*n^3) * eps^3
+ - (3/64 + 1/32*n + 5/32*n^2 + 5/128*n^3 - 35/128*n^4) * eps^4
+ - (3/128 + 5/128*n + 5/256*n^2 + 35/256*n^3 + 7/256*n^4) * eps^5
+ - (5/256 + 15/1024*n + 35/1024*n^2 + 7/512*n^3) * eps^6
+ - (25/2048 + 35/2048*n + 21/2048*n^2) * eps^7
+ - (175/16384 + 35/4096*n) * eps^8
+ - 245/32768 * eps^9;
+\endverbatim
+\verbatim
+C3[1] = + (1/4 - 1/4*n) * eps
+ + (1/8 - 1/8*n^2) * eps^2
+ + (3/64 + 3/64*n - 1/64*n^2 - 5/64*n^3) * eps^3
+ + (5/128 + 1/64*n + 1/64*n^2 - 1/64*n^3 - 7/128*n^4) * eps^4
+ + (3/128 + 11/512*n + 3/512*n^2 + 1/256*n^3 - 7/512*n^4) * eps^5
+ + (21/1024 + 5/512*n + 13/1024*n^2 + 1/512*n^3) * eps^6
+ + (243/16384 + 189/16384*n + 83/16384*n^2) * eps^7
+ + (435/32768 + 109/16384*n) * eps^8
+ + 345/32768 * eps^9;
+C3[2] = + (1/16 - 3/32*n + 1/32*n^2) * eps^2
+ + (3/64 - 1/32*n - 3/64*n^2 + 1/32*n^3) * eps^3
+ + (3/128 + 1/128*n - 9/256*n^2 - 3/128*n^3 + 7/256*n^4) * eps^4
+ + (5/256 + 1/256*n - 1/128*n^2 - 7/256*n^3 - 3/256*n^4) * eps^5
+ + (27/2048 + 69/8192*n - 39/8192*n^2 - 47/4096*n^3) * eps^6
+ + (187/16384 + 39/8192*n + 31/16384*n^2) * eps^7
+ + (287/32768 + 47/8192*n) * eps^8
+ + 255/32768 * eps^9;
+C3[3] = + (5/192 - 3/64*n + 5/192*n^2 - 1/192*n^3) * eps^3
+ + (3/128 - 5/192*n - 1/64*n^2 + 5/192*n^3 - 1/128*n^4) * eps^4
+ + (7/512 - 1/384*n - 77/3072*n^2 + 5/3072*n^3 + 65/3072*n^4) * eps^5
+ + (3/256 - 1/1024*n - 71/6144*n^2 - 47/3072*n^3) * eps^6
+ + (139/16384 + 143/49152*n - 383/49152*n^2) * eps^7
+ + (243/32768 + 95/49152*n) * eps^8
+ + 581/98304 * eps^9;
+C3[4] = + (7/512 - 7/256*n + 5/256*n^2 - 7/1024*n^3 + 1/1024*n^4) * eps^4
+ + (7/512 - 5/256*n - 7/2048*n^2 + 9/512*n^3 - 21/2048*n^4) * eps^5
+ + (9/1024 - 43/8192*n - 129/8192*n^2 + 39/4096*n^3) * eps^6
+ + (127/16384 - 23/8192*n - 165/16384*n^2) * eps^7
+ + (193/32768 + 3/8192*n) * eps^8
+ + 171/32768 * eps^9;
+C3[5] = + (21/2560 - 9/512*n + 15/1024*n^2 - 7/1024*n^3 + 9/5120*n^4) * eps^5
+ + (9/1024 - 15/1024*n + 3/2048*n^2 + 57/5120*n^3) * eps^6
+ + (99/16384 - 91/16384*n - 781/81920*n^2) * eps^7
+ + (179/32768 - 55/16384*n) * eps^8
+ + 141/32768 * eps^9;
+C3[6] = + (11/2048 - 99/8192*n + 275/24576*n^2 - 77/12288*n^3) * eps^6
+ + (99/16384 - 275/24576*n + 55/16384*n^2) * eps^7
+ + (143/32768 - 253/49152*n) * eps^8
+ + 33/8192 * eps^9;
+C3[7] = + (429/114688 - 143/16384*n + 143/16384*n^2) * eps^7
+ + (143/32768 - 143/16384*n) * eps^8
+ + 429/131072 * eps^9;
+C3[8] = + (715/262144 - 429/65536*n) * eps^8
+ + 429/131072 * eps^9;
+C3[9] = + 2431/1179648 * eps^9;
+\endverbatim
+
+The formula for area between the geodesic and the equator is given in
+Sec. 6 of
+Algorithms for geodesics in terms of \e S,
+\f[
+S = c^2 \alpha + e^2 a^2 \cos\alpha_0 \sin\alpha_0 I_4(\sigma)
+\f]
+where
+\f[
+I_4(\sigma) = \sum_{j=0} C_{4j} \cos(2j+1)\sigma
+\f]
+In the paper, this was expanded in \f$ e'^2 \f$ and \f$ k^2 \f$.
+However, the series converges faster for eccentric ellipsoids if the
+expansion is in \f$ n \f$ and \f$ \epsilon \f$. The series to order
+\f$ f^{10} \f$ becomes
+\verbatim
+C4[0] = + (2/3 - 4/15*n + 8/105*n^2 + 4/315*n^3 + 16/3465*n^4 + 20/9009*n^5 + 8/6435*n^6 + 28/36465*n^7 + 32/62985*n^8 + 4/11305*n^9)
+ - (1/5 - 16/35*n + 32/105*n^2 - 16/385*n^3 - 64/15015*n^4 - 16/15015*n^5 - 32/85085*n^6 - 112/692835*n^7 - 128/1616615*n^8) * eps
+ - (2/105 + 32/315*n - 1088/3465*n^2 + 1184/5005*n^3 - 128/3465*n^4 - 3232/765765*n^5 - 1856/1616615*n^6 - 6304/14549535*n^7) * eps^2
+ + (11/315 - 368/3465*n - 32/6435*n^2 + 976/4095*n^3 - 154048/765765*n^4 + 368/11115*n^5 + 5216/1322685*n^6) * eps^3
+ + (4/1155 + 1088/45045*n - 128/1287*n^2 + 64/3927*n^3 + 2877184/14549535*n^4 - 370112/2078505*n^5) * eps^4
+ + (97/15015 - 464/45045*n + 4192/153153*n^2 - 88240/969969*n^3 + 31168/1322685*n^4) * eps^5
+ + (10/9009 + 4192/765765*n - 188096/14549535*n^2 + 23392/855855*n^3) * eps^6
+ + (193/85085 - 6832/2078505*n + 106976/14549535*n^2) * eps^7
+ + (632/1322685 + 3456/1616615*n) * eps^8
+ + 107/101745 * eps^9;
+C4[1] = + (1/45 - 16/315*n + 32/945*n^2 - 16/3465*n^3 - 64/135135*n^4 - 16/135135*n^5 - 32/765765*n^6 - 112/6235515*n^7 - 128/14549535*n^8) * eps
+ - (2/105 - 64/945*n + 128/1485*n^2 - 1984/45045*n^3 + 256/45045*n^4 + 64/109395*n^5 + 128/855855*n^6 + 2368/43648605*n^7) * eps^2
+ - (1/105 - 16/2079*n - 5792/135135*n^2 + 3568/45045*n^3 - 103744/2297295*n^4 + 264464/43648605*n^5 + 544/855855*n^6) * eps^3
+ + (4/1155 - 2944/135135*n + 256/9009*n^2 + 17536/765765*n^3 - 3053056/43648605*n^4 + 1923968/43648605*n^5) * eps^4
+ + (1/9009 + 16/19305*n - 2656/153153*n^2 + 65072/2078505*n^3 + 526912/43648605*n^4) * eps^5
+ + (10/9009 - 1472/459459*n + 106112/43648605*n^2 - 204352/14549535*n^3) * eps^6
+ + (349/2297295 + 28144/43648605*n - 32288/8729721*n^2) * eps^7
+ + (632/1322685 - 44288/43648605*n) * eps^8
+ + 43/479655 * eps^9;
+C4[2] = + (4/525 - 32/1575*n + 64/3465*n^2 - 32/5005*n^3 + 128/225225*n^4 + 32/765765*n^5 + 64/8083075*n^6 + 32/14549535*n^7) * eps^2
+ - (8/1575 - 128/5775*n + 256/6825*n^2 - 6784/225225*n^3 + 4608/425425*n^4 - 128/124355*n^5 - 5888/72747675*n^6) * eps^3
+ - (8/1925 - 1856/225225*n - 128/17325*n^2 + 42176/1276275*n^3 - 2434816/72747675*n^4 + 195136/14549535*n^5) * eps^4
+ + (8/10725 - 128/17325*n + 64256/3828825*n^2 - 128/25935*n^3 - 266752/10392525*n^4) * eps^5
+ - (4/25025 + 928/3828825*n + 292288/72747675*n^2 - 106528/6613425*n^3) * eps^6
+ + (464/1276275 - 17152/10392525*n + 83456/72747675*n^2) * eps^7
+ + (1168/72747675 + 128/1865325*n) * eps^8
+ + 208/1119195 * eps^9;
+C4[3] = + (8/2205 - 256/24255*n + 512/45045*n^2 - 256/45045*n^3 + 1024/765765*n^4 - 256/2909907*n^5 - 512/101846745*n^6) * eps^3
+ - (16/8085 - 1024/105105*n + 2048/105105*n^2 - 1024/51051*n^3 + 4096/373065*n^4 - 1024/357357*n^5) * eps^4
+ - (136/63063 - 256/45045*n + 512/1072071*n^2 + 494336/33948915*n^3 - 44032/1996995*n^4) * eps^5
+ + (64/315315 - 16384/5360355*n + 966656/101846745*n^2 - 868352/101846745*n^3) * eps^6
+ - (16/97461 + 14848/101846745*n + 74752/101846745*n^2) * eps^7
+ + (5024/33948915 - 96256/101846745*n) * eps^8
+ - 1744/101846745 * eps^9;
+C4[4] = + (64/31185 - 512/81081*n + 1024/135135*n^2 - 512/109395*n^3 + 2048/1247103*n^4 - 2560/8729721*n^5) * eps^4
+ - (128/135135 - 2048/405405*n + 77824/6891885*n^2 - 198656/14549535*n^3 + 8192/855855*n^4) * eps^5
+ - (512/405405 - 2048/530145*n + 299008/130945815*n^2 + 280576/43648605*n^3) * eps^6
+ + (128/2297295 - 2048/1438965*n + 241664/43648605*n^2) * eps^7
+ - (17536/130945815 + 1024/43648605*n) * eps^8
+ + 2944/43648605 * eps^9;
+C4[5] = + (128/99099 - 2048/495495*n + 4096/765765*n^2 - 6144/1616615*n^3 + 8192/4849845*n^4) * eps^5
+ - (256/495495 - 8192/2807805*n + 376832/53348295*n^2 - 8192/855855*n^3) * eps^6
+ - (6784/8423415 - 432128/160044885*n + 397312/160044885*n^2) * eps^7
+ + (512/53348295 - 16384/22863555*n) * eps^8
+ - 16768/160044885 * eps^9;
+C4[6] = + (512/585585 - 4096/1422135*n + 8192/2078505*n^2 - 4096/1322685*n^3) * eps^6
+ - (1024/3318315 - 16384/9006855*n + 98304/21015995*n^2) * eps^7
+ - (103424/189143955 - 8192/4203199*n) * eps^8
+ - 1024/189143955 * eps^9;
+C4[7] = + (1024/1640925 - 65536/31177575*n + 131072/43648605*n^2) * eps^7
+ - (2048/10392525 - 262144/218243025*n) * eps^8
+ - 84992/218243025 * eps^9;
+C4[8] = + (16384/35334585 - 131072/82447365*n) * eps^8
+ - 32768/247342095 * eps^9;
+C4[9] = + 32768/92147055 * eps^9;
+\endverbatim
+
+\section geodellip Geodesics in terms of elliptic integrals
+
+GeodesicExact and GeodesicLineExact solve the geodesic problem using
+elliptic integrals. The formulation of geodesic in terms of incomplete
+elliptic integrals is given in
+ - C. F. F. Karney,
+ Geodesics
+ on an ellipsoid of revolution,
+ Feb. 2011; preprint
+ arxiv:1102.1215v1.
+ .
+It is most convenient to use the form derived for a prolate ellipsoid in
+Appendix D. For an oblate ellipsoid this results in elliptic integrals
+with an imaginary modulus. However, the integrals themselves are real
+and the algorithms used to compute the elliptic integrals handles the
+case of an imaginary modulus using real arithmetic.
+
+The key relations used by GeographicLib are
+\f[
+ \begin{align}
+ \frac sb &= E(\sigma, ik), \\
+ \lambda &= (1 - f) \sin\alpha_0 G(\sigma, \cos^2\alpha_0, ik) \\
+ &= \chi
+ - \frac{e'^2}{\sqrt{1+e'^2}}\sin\alpha_0 H(\sigma, -e'^2, ik), \\
+ J(\sigma) &= k^2 D(\sigma, ik),
+ \end{align}
+\f]
+where \f$ \chi \f$ is a modified spherical longitude given by
+\f[
+\tan\chi = \sqrt{\frac{1+e'^2}{1+k^2\sin^2\sigma}}\tan\omega,
+\f]
+and
+\f[
+ \begin{align}
+ D(\phi,k) &= \int_0^\phi
+ \frac{\sin^2\theta}{\sqrt{1 - k^2\sin^2\theta}}\,d\theta\\
+ &=\frac{F(\phi, k) - E(\phi, k)}{k^2},\\
+ G(\phi,\alpha^2,k) &= \int_0^\phi
+ \frac{\sqrt{1 - k^2\sin^2\theta}}{1 - \alpha^2\sin^2\theta}\,d\theta\\
+ &=\frac{k^2}{\alpha^2}F(\phi, k)
+ +\biggl(1-\frac{k^2}{\alpha^2}\biggr)\Pi(\phi, \alpha^2, k),\\
+ H(\phi, \alpha^2, k)
+ &= \int_0^\phi
+ \frac{\cos^2\theta}{(1-\alpha^2\sin^2\theta)\sqrt{1-k^2\sin^2\theta}}
+ \,d\theta \\
+ &=
+ \frac1{\alpha^2} F(\phi, k) +
+ \biggl(1 - \frac1{\alpha^2}\biggr) \Pi(\phi, \alpha^2, k),
+ \end{align}
+\f]
+and \f$F(\phi, k)\f$, \f$E(\phi, k)\f$, \f$D(\phi, k)\f$, and
+\f$\Pi(\phi, \alpha^2, k)\f$, are incomplete elliptic integrals (see
+http://dlmf.nist.gov/19.2.ii). The formula for \f$ s \f$ and the
+first expression for \f$ \lambda \f$ are given by Legendre (1811) and
+are the most common representation of geodesics in terms of elliptic
+integrals. The second (equivalent) expression for \f$ \lambda \f$,
+which was given by Cayley (1870), is useful in that the elliptic
+integral is relegated to a small correction term. This form allows
+the longitude to be computed more accurately and is used in
+GeographicLib. (The equivalence of the two expressions for \f$
+\lambda \f$ follows from http://dlmf.nist.gov/19.7.E8.)
+
+Nominally, GeodesicExact and GeodesicLineExact will give "exact" results
+for any value of the flattening. However, the geographic latitude is a
+distorted measure of distance from the equator with very eccentric
+ellipsoids and this introducing an irreducible representational error in
+the algorithms in this case. It is therefore recommended to restrict
+the use of these classes to b/\e a ∈ [0.01, 100] or \e f
+∈ [−99, 0.99]. Note that GeodesicExact still uses a series
+expansion for the area \e S12. However the series is taken out to 30th
+order and gives accurate results for b/\e a ∈ [1/2, 2]; the
+accuracy is about 8 decimal digits for b/\e a ∈ [1/4, 4].
+Additional work planned for this aspect of the geodesic problem:
+- formulate the area integral \e S12 in terms of elliptic integrals;
+- generate accurate test geodesics for highly eccentric ellipsoids so
+ that the roundoff errors can be quantified.
+
+Thomas (1952) and Rollins (2010) use a different independent variable
+for geodesics, \f$\theta\f$ instead of \f$\sigma\f$, where \f$
+\tan\theta = \sqrt{1 + k^2} \tan\sigma \f$. The corresponding
+expressions for \f$ s \f$ and \f$ \lambda \f$ are given here for
+completeness:
+\f[
+\begin{align}
+\frac sb &= \sqrt{1-k'^2} \Pi(\theta, k'^2, k'), \\
+\lambda &= (1-f) \sqrt{1-k'^2} \sin\alpha_0 \Pi(\theta, k'^2/e^2, k'),
+\end{align}
+\f]
+where \f$ k' = k/\sqrt{1 + k^2} \f$. The expression for \f$ s \f$
+can be written in terms of elliptic integrals of the second kind and
+Cayley's technique can be used to subtract out the leading order
+behavior of \f$ \lambda \f$ to give
+\f[
+\begin{align}
+\frac sb &=\frac1{\sqrt{1-k'^2}}
+ \biggl( E(\theta, k') -
+ \frac{k'^2 \sin\theta \cos\theta}{\sqrt{1-k'^2\sin^2\theta}} \biggr), \\
+\lambda &= \psi + (1-f) \sqrt{1-k'^2} \sin\alpha_0
+\bigl( F(\theta, k') - \Pi(\theta, e^2, k') \bigr),
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+\tan\psi &= \sqrt{\frac{1+k^2\sin^2\sigma}{1+e'^2}}\tan\omega \\
+ &= \sqrt{\frac{1-e^2}{1+k^2\cos^2\theta}}\sin\alpha_0\tan\theta.
+\end{align}
+\f]
+The tangents of the three "longitude-like" angles are in geometric
+progression, \f$ \tan\chi/\tan\omega = \tan\omega/\tan\psi \f$.
+
+\section meridian Parameters for the meridian
+
+The formulas for \f$ s \f$ given in the previous section are the same as
+those for the distance along a meridian for an ellipsoid with equatorial
+radius \f$ a \sqrt{1 - e^2 \sin^2\alpha_0} \f$ and polar semi-axis \f$ b
+\f$. Here is a list of possible ways of expressing the meridian
+distance in terms of elliptic integrals using the notation:
+- \f$ a \f$, equatorial axis,
+- \f$ b \f$, polar axis,
+- \f$ e = \sqrt{(a^2 - b^2)/a^2} \f$, eccentricity,
+- \f$ e' = \sqrt{(a^2 - b^2)/b^2} \f$, second eccentricity,
+- \f$ \phi = \mathrm{am}(u, e) \f$, the geographic latitude,
+- \f$ \phi' = \mathrm{am}(v', ie') = \pi/2 - \phi \f$,
+ the geographic colatitude,
+- \f$ \beta = \mathrm{am}(v, ie') \f$, the parametric latitude
+ (\f$ \tan^2\beta = (1 - e^2) \tan^2\phi \f$),
+- \f$ \beta' = \mathrm{am}(u', e) = \pi/2 - \beta \f$,
+ the parametric colatitude,
+- \f$ M \f$, the length of a quarter meridian (equator to pole),
+- \f$ y \f$, the distance along the meridian (measured from the equator).
+- \f$ y' = M -y \f$, the distance along the meridian (measured from the pole).
+.
+The eccentricities \f$ (e, e') \f$ are real (resp. imaginary) for
+oblate (resp. prolate) ellipsoids. The elliptic variables \f$(u,
+u')\f$ and \f$(v, v')\f$ are defined by
+- \f$ u = F(\phi, e) ,\quad u' = F(\beta', e) \f$
+- \f$ v = F(\beta, ie') ,\quad v' = F(\phi', ie') \f$,
+.
+and are linearly related by
+- \f$ u + u' = K(e) ,\quad v + v' = K(ie') \f$
+- \f$ v = \sqrt{1-e^2} u ,\quad u = \sqrt{1+e'^2} v \f$.
+.
+The cartesian coordinates for the meridian \f$ (x, z) \f$ are given by
+\f[
+\begin{align}
+ x &= a \cos\beta = a \cos\phi / \sqrt{1 - e^2 \sin^2\phi} \\
+ &= a \sin\beta' = (a^2/b) \sin\phi' / \sqrt{1 + e'^2 \sin^2\phi'} \\
+ &= a \,\mathrm{cn}(v, ie) = a \,\mathrm{cd}(u, e) \\
+ &= a \,\mathrm{sn}(u', e) = (a^2/b) \,\mathrm{sd}(v', ie'),
+\end{align}
+\f]
+\f[
+\begin{align}
+ z &= b \sin\beta = (b^2/a) \sin\phi / \sqrt{1 - e^2 \sin^2\phi} \\
+ &= b \cos\beta' = b \cos\phi' / \sqrt{1 + e'^2 \sin^2\phi'} \\
+ &= b \,\mathrm{sn}(v, ie) = (b^2/a) \,\mathrm{sd}(u, e) \\
+ &= b \,\mathrm{cn}(u', e) = b \,\mathrm{cd}(v', ie').
+\end{align}
+\f]
+The distance along the meridian can be expressed variously as
+\f[
+\begin{align}
+ y &= b \int \sqrt{1 + e'^2 \sin^2\beta}\, d\beta
+ = b E(\beta, ie') \\
+ &= \frac{b^2}a \int \frac1{(1 - e^2 \sin^2\phi)^{3/2}}\, d\phi
+ = \frac{b^2}a \Pi(\phi, e^2, e) \\
+ &= a \biggl(E(\phi, e) -
+ \frac{e^2\sin\phi \cos\phi}{\sqrt{1 - e^2\sin^2\phi}}\biggr) \\
+ &= b \int \mathrm{dn}^2(v, ie')\, dv
+ = \frac{b^2}a \int \mathrm{nd}^2(u, e)\, du
+ = \cal E(v, ie'),
+\end{align}
+\f]
+\f[
+\begin{align}
+ y' &= a \int \sqrt{1 - e^2 \sin^2\beta'}\, d\beta'
+ = a E(\beta', e) \\
+ &= \frac{a^2}b \int \frac1{(1 + e'^2 \sin^2\phi')^{3/2}}\, d\phi'
+ = \frac{a^2}b \Pi(\phi', -e'^2, ie') \\
+ &= b \biggl(E(\phi', ie') +
+ \frac{e'^2\sin\phi' \cos\phi'}{\sqrt{1 + e'^2\sin^2\phi'}}\biggr) \\
+ &= a \int \mathrm{dn}^2(u', e)\, du'
+ = \frac{a^2}b \int \mathrm{nd}^2(v', ie')\, dv'
+ = \cal E(u', e),
+\end{align}
+\f]
+with the quarter meridian distance given by
+\f[
+ M = aE(e) = bE(ie') = (b^2/a)\Pi(e^2,e) = (a^2/b)\Pi(-e'^2,ie').
+\f]
+(Here \f$ E, F, \Pi \f$ are elliptic integrals defined in
+http://dlmf.nist.gov/19.2.ii. \f$ \cal E, \mathrm{am}, \mathrm{sn},
+\mathrm{cn}, \mathrm{sd}, \mathrm{cd}, \mathrm{dn}, \mathrm{nd} \f$ are
+Jacobi elliptic functions defined in http://dlmf.nist.gov/22.2 and
+http://dlmf.nist.gov/22.16.)
+
+There are several considerations in the choice of independent variable
+for evaluate the meridian distance
+- The use of an imaginary modulus (namely, \f$ ie' \f$, above) is of no
+ practical concern. The integrals are real in this case and modern
+ methods (GeographicLib uses the method given in
+ http://dlmf.nist.gov/19.36.i) for computing integrals handles this
+ case using just real arithmetic.
+- If the "natural" origin is the equator, choose one of \f$ \phi, \beta,
+ u, v \f$ (this might be preferred in geodesy). If it's the pole,
+ choose one of the complementary quantities \f$ \phi', \beta', u', v'
+ \f$ (this might be preferred by mathematicians).
+- Applying these formulas to the geodesic problems, \f$ \beta \f$
+ becomes the arc length, \f$ \sigma \f$, on the auxiliary sphere. This
+ is the traditional method of solution used by Legendre (1806), Oriani
+ (1806), Bessel (1825), Helmert (1880), Rainsford (1955), Thomas
+ (1970), Vincenty (1975), Rapp (1993), and so on. Many of the
+ solutions in terms of elliptic functions use one of the elliptic
+ variables (\f$ u \f$ or \f$ v \f$), see, for example, Jacobi (1855),
+ Halphen (1888), Forsyth (1896). In the context of geodesics \f$
+ \phi \f$ becomes Thomas' variable \f$ \theta \f$; this is used by
+ Thomas (1952) and Rollins (2010) in their formulation of the
+ geodesic problem (see the previous section).
+- For highly eccentric ellipsoids the variation of the meridian with
+ respect to \f$ \beta \f$ is considerably "better behaved" than other
+ choices (see the figure below). The choice of \f$ \phi \f$ is
+ probably a poor one in this case.
+.
+GeographicLib uses the geodesic generalization of
+\f$ y = b E(\beta, ie') \f$, namely \f$ s = b E(\sigma, ik) \f$. See
+\ref geodellip.
+
+\image html meridian-measures.png "Comparison of meridian measures"
+
+\section geodshort Short geodesics
+
+Here we describe Bowring's method for solving the inverse geodesic
+problem in the limit of short geodesics and contrast it with the great
+circle solution using Bessel's auxiliary sphere. References:
+ - B. R. Bowring, The Direct and Inverse Problems for Short Geodesic
+ Lines on the Ellipsoid, Surveying and Mapping 41(2), 135--141 (1981).
+ - R. H. Rapp,
+
+ Geometric Geodesy, Part I, Ohio State Univ. (1991), Sec. 6.5.
+
+Bowring considers the conformal mapping of the ellipsoid to a sphere of
+radius \f$ R \f$ such that circles of latitude and meridians are
+preserved (and hence the azimuth of a line is preserved). Let \f$
+(\phi, \lambda) \f$ and \f$ (\phi', \lambda') \f$ be the latitude and
+longitude on the ellipsoid and sphere respectively. Define isometric
+latitudes for the sphere and the ellipsoid as
+\f[
+\begin{align}
+ \psi' &= \sinh^{-1} \tan \phi', \\
+ \psi &= \sinh^{-1} \tan \phi - e \tanh^{-1}(e \sin\phi).
+\end{align}
+\f]
+The most general conformal mapping satisfying Bowring's conditions is
+\f[
+\psi' = A \psi + K, \quad \lambda' = A \lambda,
+\f]
+where \f$ A \f$ and \f$ K \f$ are constants. (In fact a constant can be
+added to the equation for \f$ \lambda' \f$, but this does affect the
+analysis.) The scale of this mapping is
+\f[
+m(\phi) = \frac{AR}{\nu}\frac{\cos\phi'}{\cos\phi},
+\f]
+where \f$ \nu = a/\sqrt{1 - e^2\sin^2\phi} \f$ is the transverse radius
+of curvature. (Note that in Bowring's Eq. (10), \f$ \phi \f$ should be
+replaced by \f$ \phi' \f$.) The mapping from the ellipsoid to the sphere
+depends on three parameters \f$ R, A, K \f$. These will be selected to
+satisfy certain conditions at some representative latitude \f$ \phi_0
+\f$. Two possible choices are given below.
+
+\subsection bowring Bowring's method
+
+Bowring (1981) requires that
+\f[
+m(\phi_0) = 1,\quad
+\left.\frac{dm(\phi)}{d\phi}\right|_{\phi=\phi_0} = 0,\quad
+\left.\frac{d^2m(\phi)}{d\phi^2}\right|_{\phi=\phi_0} = 0,
+\f]
+i.e, \f$m\approx 1\f$ in the vicinity of \f$\phi = \phi_0\f$.
+This gives
+\f[
+\begin{align}
+R &= \frac{\sqrt{1 + e'^2}}{B^2} a, \\
+A &= \sqrt{1 + e'^2 \cos^4\phi_0}, \\
+\tan\phi'_0 &= \frac1B \tan\phi_0,
+\end{align}
+\f]
+where \f$ e' = e/\sqrt{1-e^2} \f$ is the second eccentricity, \f$ B =
+\sqrt{1+e'^2\cos^2\phi_0} \f$, and \f$ K \f$ is defined implicitly by
+the equation for \f$\phi'_0\f$. The radius \f$ R \f$ is the (Gaussian)
+mean radius of curvature of the ellipsoid at \f$\phi_0\f$ (so near
+\f$\phi_0\f$ the ellipsoid can be deformed to fit the sphere snugly).
+The third derivative of \f$ m \f$ is given by
+\f[
+\left.\frac{d^3m(\phi)}{d\phi^3}\right|_{\phi=\phi_0} =
+\frac{-2e'^2\sin2\phi_0}{B^4}.
+\f]
+
+The method for solving the inverse problem between two nearby points \f$
+(\phi_1, \lambda_1) \f$ and \f$ (\phi_2, \lambda_2) \f$ is as follows:
+Set \f$\phi_0 = (\phi_1 + \phi_2)/2\f$. Compute \f$ R, A, \phi'_0 \f$,
+and hence find \f$ (\phi'_1, \lambda'_1) \f$ and \f$ (\phi'_2,
+\lambda'_2) \f$. Finally, solve for the great circle on a sphere of
+radius \f$ R \f$; the resulting distance and azimuths are good
+approximations for the corresponding quantities for the ellipsoidal
+geodesic.
+
+Consistent with the accuracy of this method, we can compute
+\f$\phi'_1\f$ and \f$\phi'_2\f$ using a Taylor expansion about
+\f$\phi_0\f$. This also avoids numerical errors that arise from
+subtracting nearly equal quantities when using the equation for
+\f$\phi'\f$ directly. Write \f$\Delta \phi = \phi - \phi_0\f$ and
+\f$\Delta \phi' = \phi' - \phi'_0\f$; then we have
+\f[
+\Delta\phi' \approx
+\frac{\Delta\phi}B \biggl[1 +
+\frac{\Delta\phi}{B^2}\frac{e'^2}2
+ \biggl(3\sin\phi_0\cos\phi_0 +
+ \frac{\Delta\phi}{B^2}
+ \bigl(B^2 - \sin^2\phi_0(2 - 3 e'^2 \cos^2\phi_0)\bigr)\biggr)\biggr],
+\f]
+where the error is \f$O(f\Delta\phi^4)\f$.
+This is essentially Bowring's method. Significant differences between
+this result, "Bowring (improved)", compared to Bowring's paper, "Bowring
+(original)", are:
+ - Bowring elects to use \f$\phi_0 = \phi_1\f$. This simplifies the
+ calculations somewhat but increases the error by about a factor of
+ 4.
+ - Bowring's expression for \f$ \Delta\phi' \f$ is only accurate in the
+ limit \f$ e' \rightarrow 0 \f$.
+ .
+In fact, arguably, the highest order \f$O(f\Delta\phi^3)\f$ terms should
+be dropped altogether. Their inclusion does result in a better estimate
+for the distance. However, if your goal is to generate both accurate
+distances \e and accurate azimuths, then \f$\Delta\phi\f$ needs to be
+restricted sufficiently to allow these terms to be dropped to give the
+"Bowring (truncated)" method.
+
+With highly eccentric ellipsoids, the parametric latitude \f$ \beta \f$
+is a better behaved independent variable to use. In this case, \f$
+\phi_0 \f$ is naturally defined using \f$\beta_0 = (\beta_1 +
+\beta_2)/2\f$ and in terms of \f$\Delta\beta = \beta - \beta_0\f$, we
+have
+\f[
+\Delta\phi' \approx
+\frac{\Delta\beta}{B'} \biggl[1 +
+\frac{\Delta\beta}{B'^2}\frac{e'^2}2
+ \biggl(\sin\beta_0\cos\beta_0 +
+ \frac{\Delta\beta}{3B'^2}
+ \bigl( \cos^2\beta_0 - \sin^2\beta_0 B'^2\bigr)
+\biggr)\biggr],
+\f]
+where \f$B' = \sqrt{1+e'^2\sin^2\beta_0} = \sqrt{1+e'^2}/B\f$, and the
+error once again is \f$O(f\Delta\phi^4)\f$. This is the "Bowring
+(using \f$\beta\f$)" method.
+
+\subsection auxsphere Bessel's auxiliary sphere
+
+GeographicLib's uses the auxiliary sphere method of Legendre, Bessel,
+and Helmert. For short geodesics, this is equivalent to picking
+\f$ R, A, K \f$ so that
+\f[
+m(\phi_0) = 1,\quad
+\left.\frac{dm(\phi)}{d\phi}\right|_{\phi=\phi_0} = 0,\quad
+\tan\phi'_0 = (1 - f) \tan\phi_0.
+\f]
+Bowring's requirement that the second derivative of \f$m\f$ vanish has
+been replaced by the last relation which states that \f$\phi'_0 =
+\beta_0\f$, the parametric latitude corresponding to \f$\phi_0\f$. This
+gives
+\f[
+\begin{align}
+R &= B'(1-f)a, \\
+A &= \frac1{B'(1-f)}, \\
+\left.\frac{d^2m(\phi)}{d\phi^2}\right|_{\phi=\phi_0} &=
+-e^2B'^2\sin^2\phi_0.
+\end{align}
+\f]
+
+Similar to Bowring's method, we can compute \f$\phi'_1\f$ and
+\f$\phi'_2\f$ using a Taylor expansion about \f$\beta_0\f$. This results
+in the simple expression
+\f[
+\Delta\phi' \approx \Delta\beta,
+\f]
+where the error is \f$O(f\Delta\beta^2)\f$.
+
+\subsection shorterr Estimating the accuracy
+
+In assessing the accuracy of these methods we use two metrics:
+ - The absolute error in the distance.
+ - The consistency of the predicted azimuths. Imagine starting
+ ellipsoidal geodesics at \f$ (\phi_1, \lambda_1) \f$ and \f$ (\phi_2,
+ \lambda_2) \f$ with the predicted azimuths. What is the distance
+ between them when they are extended a distance \f$ a \f$ beyond the
+ second point?
+ .
+(The second metric is much more stringent.) We may now compare the
+methods by asking for a bound to the length of a geodesic which ensures
+that the one or other of the errors fall below 1 mm (an "engineering"
+definition of accurate) or 1 nm (1 nanometer, about the round-off
+limit).
+
+
+
+
Maximum distance that can be used in various methods for
+computing short geodesics while keeping the errors within prescribed
+bounds
+
+
method
+
distance metric
+
azimuth metric
+
+
1 mm error
+
1 nm error
+
1 mm error
+
1 nm error
+
+
Bowring (original)
+
87 km
+
870 m
+
35 km
+
350 m
+
+
Bowring (improved)
+
180 km
+
1.8 km
+
58 km
+
580 m
+
+
Bowring (truncated)
+
52 km
+
520 m
+
52 km
+
520 m
+
+
Bowring (using \f$\beta\f$)
+
380 km
+
24 km
+
60 km
+
600 m
+
+
Bessel's aux. sphere
+
42 km
+
420 m
+
1.7 km
+
1.7 m
+
+
+
+For example, if you're only interested in measuring distances and an
+accuracy of 1 mm is sufficient, then Bowring's improved method can
+be used for distances up to 180 km. On the other hand,
+GeographicLib uses Bessel's auxiliary sphere and we require both the
+distance and the azimuth to be accurate, so the great circle
+approximation can only be used for distances less than 1.7 m. The
+reason that GeographicLib does not use Bowring's method is that the
+information necessary for auxiliary sphere method is already available
+as part of the general solution and, as much as possible, we allow all
+geodesics to be computed by the general method.
+
+
+Back to \ref magnetic. Forward to \ref nearest. Up to \ref contents.
+
+Back to \ref geodesic. Forward to \ref triaxial. Up to \ref contents.
+
+
+The problem of finding the maritime boundary defined by the "median
+line" is discussed in Section 14 of
+ - C. F. F. Karney,
+ Geodesics
+ on an ellipsoid of revolution,
+ Feb. 2011; preprint
+ arxiv:1102.1215v1.
+ .
+Figure 14 shows the median line which is equidistant from Britain and
+mainland Europe. Determining the median line involves finding, for any
+given \e P, the closest points on the coast of Britain and on the coast
+of mainland Europe. The operation of finding the closest in a set of
+points is usually referred to as the nearest neighbor problem and
+the NearestNeighbor class implements an efficient algorithm for solving
+it.
+
+The NearestNeighbor class implements nearest-neighbor calculations using
+the vantage-point tree described by
+- J. K. Uhlmann,
+
+ Satisfying general proximity/similarity queries with metric trees,
+ Information Processing Letters 40 175–179 (1991).
+- P. N. Yianilos,
+
+ Data structures and algorithms for nearest neighbor search in general
+ metric spaces, Proc. 4th ACM-SIAM Symposium on Discrete Algorithms,
+ (SIAM, 1993). pp. 311–321.
+
+Given a set of points \e x, \e y, \e z, …, in some space and a
+distance function \e d satisfying the metric conditions,
+\f[
+\begin{align}
+ d(x,y) &\ge 0,\\
+ d(x,y) &= 0, \ \text{iff $x = y$},\\
+ d(x,y) &= d(y,x),\\
+ d(x,z) &\le d(x,y) + d(y,z),
+\end{align}
+\f]
+the vantage-point (VP) tree provides an efficient way of determining
+nearest neighbors. The geodesic distance (implemented by the Geodesic
+class) satisfies these metric conditions, while the great ellipse
+distance and the rhumb line distance do not (they do not satisfy
+the last condition, the triangle inequality). Typically the cost of
+constructing a VP tree of \e N points is \e N log \e N, while the cost
+of a query is log \e N. Thus a VP tree should be used in situations
+where \e N is large and at least log \e N queries are to be made. The
+condition, \e N is large, means that \f$ N \gg 2^D \f$, where \e D is
+the dimensionality of the space.
+
+- This implementation includes Yianilos' upper and lower bounds for the
+ inside and outside sets. This helps limit the number of searches
+ (compared to just using the median distance).
+- Rather than do a depth-first or breath-first search on the tree, the
+ nodes to be processed are put on a priority queue with the nodes most
+ likely to contain close points processed first. Frequently, this allows
+ nodes lower down on the priority queue to be skipped.
+- This technique also allows non-exhaustive searchs to be performed (to
+ answer questions such as "are there any points within 1km of the query
+ point?).
+- When building the tree, the first vantage point is (arbitrarily)
+ chosen as the middle element of the set. Thereafter, the points
+ furthest from the parent vantage point in both the inside and outside
+ sets are selected as the children's vantage points. This information
+ is already available from the computation of the upper and lower
+ bounds of the children. This choice seems to lead to a reasonably
+ optimized tree.
+- The leaf nodes can contain a bucket of points (instead of just a vantage
+ point).
+- Coincident points are allowed in the set; these are treated as distinct
+ points.
+
+The figure below shows the construction of the VP tree for the points
+making up the coastlines of Britain and Ireland (about 5000 points shown
+in blue). The set of points is recursively split into 2 equal "inside"
+and "outside" subsets based on the distance from a "vantage point". The
+boundaries between the inside and outside sets are shown as green
+circular arcs (arcs of geodesic circles). At each stage, the newly
+added vantage points are shown as red dots and the vantage points for
+the next stage are shown as red plus signs. The data is shown in the
+Cassini-Soldner projection with a central meridian of 5°W.
+
+\image html vptree.gif "Vantage-point tree"
+
+
+Back to \ref geodesic. Forward to \ref triaxial. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page triaxial Geodesics on a triaxial ellipsoid
+
+
+Back to \ref nearest. Forward to \ref jacobi. Up to \ref contents.
+
+
+Jacobi (1839) showed that the problem of geodesics on a triaxial
+ellipsoid (with 3 unequal axes) can be reduced to quadrature. Despite
+this, the detailed behavior of the geodesics is not very well known. In
+this section, I briefly give Jacobi's solution and illustrate the
+behavior of the geodesics and outline an algorithm for the solution of
+the inverse problem.
+
+See also
+ - The wikipedia page,
+
+ Geodesics on a triaxial ellipsoid.
+
+Go to
+ - \ref triaxial-coords
+ - \ref triaxial-jacobi
+ - \ref triaxial-survey
+ - \ref triaxial-stab
+ - \ref triaxial-inverse
+
+NOTES
+ -# A triaxial ellipsoid approximates the earth only slightly better
+ than an ellipsoid of revolution. If you are really considering
+ measuring distances on the earth using a triaxial ellipsoid, you
+ should also be worrying about the shape of the geoid, which
+ essentially makes the geodesic problem a hopeless mess; see, for
+ example, Waters
+ (2011).
+ -# There is nothing new in this section. It is just an exercise in
+ exploring Jacobi's solution. My interest here is in generating long
+ geodesics with the correct long-time behavior. Arnold gives a
+ nice qualitative description of the solution in Mathematical
+ Methods of Classical Mechanics (2nd edition, Springer, 1989),
+ pp. 264--266.
+ -# Possible reasons this problem might, nevertheless, be of interest
+ are:
+ - It is the first example of a dynamical system which has a
+ non-trivial constant of motion. As such, Jacobi's paper generated
+ a lot of excitement and was followed by many papers elaborating
+ his solution. In particular, the unstable behavior of one of the
+ closed geodesics of the ellipsoid, is an early example of a system
+ with a positive Lyapunov exponent (one of the essential
+ ingredients for chaotic behavior in dynamical systems).
+ - Knowledge of ellipsoidal coordinates (used by Jacobi) might be
+ useful in other areas of geodesy.
+ - Geodesics which pass through the pole on an ellipsoid of revolution
+ represent a degenerate class (they are all closed and all pass
+ through the opposite pole). It is of interest to see how this
+ degeneracy is broken with a surface with a more general shape.
+ - Similarly, it is of interest to see how the Mercator projection of
+ the ellipsoid generalizes; this is another problem addressed by
+ Jacobi.
+ -# My interest in this problem was piqued by Jean-Marc Baillard. I put
+ him onto Jacobi's solution without having looked at it in detail
+ myself; and he quickly implemented the solution for an HP-41
+ calculator(!) which is posted
+ here.
+ -# I do not give full citations of the papers here. You can find these
+ in the
+
+ Geodesic Bibliography; this includes links to online
+ versions of the papers.
+ -# An alternative to exploring geodesics using Jacobi's solution is to
+ integrate the equations for the geodesics directly. This is the
+ approach taken by
+
+ Oliver Knill and Michael Teodorescu. However it is difficult to
+ ensure that the long time behavior is correctly modeled with such an
+ approach.
+ -# At this point, I have no plans to add the solution of triaxial
+ geodesic problem to GeographicLib.
+ -# If you only want to learn about geodesics on a biaxial ellipsoid (an
+ ellipsoid of revolution), then see \ref geodesic or the paper
+ - C. F. F. Karney,
+
+ Algorithms for geodesics,
+ J. Geodesy 87(1), 43--55 (2013);
+ DOI:
+ 10.1007/s00190-012-0578-z;
+ addenda:
+ geod-addenda.html.
+
+\section triaxial-coords Triaxial coordinate systems
+
+Consider the ellipsoid defined by
+\f[
+ f = \frac{X^2}{a^2} + \frac{Y^2}{b^2} + \frac{Z^2}{c^2} = 1,
+\f]
+where, without loss of generality, \f$ a \ge b \ge c \gt 0\f$. A
+point on the surface is specified by a latitude and longitude. The \e
+geographical latitude and longitude \f$(\phi, \lambda)\f$ are defined by
+\f[
+ \frac{\nabla f}{\left| \nabla f\right|} = \left(
+\begin{array}{c} \cos\phi \cos\lambda \\ \cos\phi \sin\lambda \\ \sin\phi
+\end{array}\right).
+\f]
+The \e parametric latitude and longitude \f$(\phi', \lambda')\f$ are
+defined by
+\f[
+\begin{align}
+ X &= a \cos\phi' \cos\lambda', \\
+ Y &= b \cos\phi' \sin\lambda', \\
+ Z &= c \sin\phi'.
+\end{align}
+\f]
+Jacobi employed the \e ellipsoidal latitude and longitude \f$(\beta,
+\omega)\f$ defined by
+\f[
+\begin{align}
+ X &= a \cos\omega
+ \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}
+ {\sqrt{a^2 - c^2}}, \\
+ Y &= b \cos\beta \sin\omega, \\
+ Z &= c \sin\beta
+ \frac{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}
+ {\sqrt{a^2 - c^2}}.
+\end{align}
+\f]
+Grid lines of constant \f$\beta\f$ and \f$\omega\f$ are given in Fig. 1.
+
+
+
+Fig. 1
+
\n
+Fig. 1:
+The ellipsoidal grid. The blue (resp. green) lines are lines of constant
+\f$\beta\f$ (resp. \f$\omega\f$); the grid spacing is 10°. Also
+shown in red are two of the principal sections of the ellipsoid, defined
+by \f$x = 0\f$ and \f$z = 0\f$. The third principal section, \f$y =
+0\f$, is covered by the lines \f$\beta = \pm 90^\circ\f$ and \f$\omega =
+90^\circ \pm 90^\circ\f$. These lines meet at four umbilical points (two
+of which are visible in this figure) where the principal radii of
+curvature are equal. The parameters of the ellipsoid are \f$a =
+1.01\f$, \f$b = 1\f$, \f$c = 0.8\f$, and it is viewed in an orthographic
+projection from a point above \f$\phi = 40^\circ\f$, \f$\lambda =
+30^\circ\f$. These parameters were chosen to accentuate the ellipsoidal
+effects on geodesics (relative to those on the earth) while still
+allowing the connection to an ellipsoid of revolution to be made.
+
+The grid lines of the ellipsoid coordinates are "lines of curvature" on
+the ellipsoid, i.e., they are parallel to the direction of principal
+curvature (Monge, 1796). They are also intersections of the ellipsoid
+with confocal systems of hyperboloids of one and two sheets (Dupin,
+1813). Finally they are geodesic ellipses and hyperbolas defined using
+two adjacent umbilical points. For example, the lines of constant
+\f$\beta\f$ in Fig. 1 can be generated with the familiar string
+construction for ellipses with the ends of the string pinned to the two
+umbilical points.
+
+The element of length on the ellipsoid in ellipsoidal coordinates is
+given by
+\f[
+\begin{align}
+\frac{ds^2}{(a^2-b^2)\sin^2\omega+(b^2-c^2)\cos^2\beta} &=
+\frac{b^2\sin^2\beta+c^2\cos^2\beta}
+ {a^2-b^2\sin^2\beta-c^2\cos^2\beta}
+ d\beta^2 \\
+&\qquad+
+\frac{a^2\sin^2\omega+b^2\cos^2\omega}
+ {a^2\sin^2\omega+b^2\cos^2\omega-c^2}
+ d\omega^2.
+\end{align}
+\f]
+
+The torus \f$(\omega, \beta) \in [-\pi,\pi] \times [-\pi,\pi]\f$ covers
+the ellipsoid twice. In order to facilitate passing to the limit of an
+oblate ellipsoid, we may regard as the principal sheet \f$[-\pi,\pi]
+\times [-\frac12\pi,\frac12\pi]\f$ and insert branch cuts at
+\f$\beta=\pm\frac12\pi\f$. The rule for switching sheets is
+\f[
+\begin{align}
+\omega & \rightarrow -\omega,\\
+\beta & \rightarrow \pi-\beta,\\
+\alpha & \rightarrow \pi+\alpha,
+\end{align}
+\f]
+where \f$\alpha\f$ is the heading of a path, relative to a line of
+constant \f$\omega\f$.
+
+In the limit \f$b\rightarrow a\f$ (resp. \f$b\rightarrow c\f$), the
+umbilic points converge on the \f$z\f$ (resp. \f$x\f$) axis and an
+oblate (resp. prolate) ellipsoid is obtained with \f$\beta\f$
+(resp. \f$\omega\f$) becoming the standard parametric latitude and
+\f$\omega\f$ (resp. \f$\beta\f$) becoming the standard longitude. The
+sphere is a non-uniform limit, with the position of the umbilic points
+depending on the ratio \f$(a-b)/(b-c)\f$.
+
+Inter-conversions between the three different latitudes and longitudes
+and the cartesian coordinates are simple algebraic exercises.
+
+\section triaxial-jacobi Jacobi's solution
+
+Solving the geodesic problem for an ellipsoid of revolution is, from the
+mathematical point of view, trivial; because of symmetry, geodesics have
+a constant of the motion (analogous to the angular momentum) which was
+found by Clairaut (1733). By 1806 (with the work of Legendre, Oriani,
+et al.), there was a complete understanding of the qualitative behavior
+of geodesics on an ellipsoid of revolution.
+
+On the other hand, geodesics on a triaxial ellipsoid have no obvious
+constant of the motion and thus represented a challenging "unsolved"
+problem in the first half of the nineteenth century. Jacobi discovered
+that the geodesic equations are separable if they are expressed in
+ellipsoidal coordinates. You can get an idea of the importance Jacobi
+attached to his discovery from the
+
+letter he wrote to his friend and neighbor Bessel:
+
The day before yesterday, I reduced to quadrature the
+problem of geodesic lines on an ellipsoid with three unequal
+axes. They are the simplest formulas in the world, Abelian
+integrals, which become the well known elliptic integrals if 2 axes are
+set equal.\n
+Königsberg, 28th Dec. '38.
+
+
+On the same day he wrote a similar letter to the editor of Compte Rendus
+and his result was published in J. Crelle in (1839) with a French
+translation (from German) appearing in J. Liouville in (1841).
+
+Here is the solution, exactly as given by Jacobi
+ here
+(with minor changes in notation):
+\f[
+\begin{align}
+\delta &= \int \frac
+{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}\,d\beta}
+{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}
+ \sqrt{(b^2-c^2)\cos^2\beta - \gamma}}\\
+&\quad -
+\int \frac
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}\,d\omega}
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}
+ \sqrt{(a^2-b^2)\sin^2\omega + \gamma}}
+\end{align}
+\f]
+As Jacobi notes "a function of the angle \f$\beta\f$ equals a
+function of the angle \f$\omega\f$. These two functions are just
+Abelian integrals…" Two constants \f$\delta\f$ and \f$\gamma\f$
+appear in the solution. Typically \f$\delta\f$ is zero if the lower
+limits of the integrals are taken to be the starting point of the geodesic
+and the direction of the geodesics is determined by \f$\gamma\f$.
+However for geodesics that start at an umbilical points, we have \f$\gamma
+= 0\f$ and \f$\delta\f$ determines the direction at the umbilical point.
+Incidentally the constant \f$\gamma\f$ may be expressed as
+\f[
+\gamma = (b^2-c^2)\cos^2\beta\sin^2\alpha-(a^2-b^2)\sin^2\omega\cos^2\alpha
+\f]
+where \f$\alpha\f$ is the angle the geodesic makes with lines of
+constant \f$\omega\f$. In the limit \f$b\rightarrow a\f$, this reduces
+to \f$\cos\beta\sin\alpha = \text{const.}\f$, the familiar Clairaut
+relation. A nice derivation of Jacobi's result is given by Darboux
+(1894)
+§§583--584 where he gives the solution found by Liouville
+(1846) for general quadratic surfaces. In this formulation, the
+distance along the geodesic, \f$s\f$, is also found using
+\f[
+\begin{align}
+\frac{ds}{(b^2-c^2)\cos^2\beta + (a^2-b^2)\sin^2\omega}
+&= \frac
+{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}\,d\beta}
+{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}
+ \sqrt{(b^2-c^2)\cos^2\beta - \gamma}}\\
+&= \frac
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}\,d\omega}
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}
+ \sqrt{(a^2-b^2)\sin^2\omega + \gamma}}
+\end{align}
+\f]
+An alternative expression for the distance is
+\f[
+\begin{align}
+ds
+&= \frac
+{\sqrt{b^2\sin^2\beta + c^2\cos^2\beta}
+ \sqrt{(b^2-c^2)\cos^2\beta - \gamma}\,d\beta}
+{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}\\
+&\quad {}+ \frac
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega}
+ \sqrt{(a^2-b^2)\sin^2\omega + \gamma}\,d\omega}
+{\sqrt{a^2\sin^2\omega + b^2\cos^2\omega - c^2}}
+\end{align}
+\f]
+
+Jacobi's solution is a convenient way to compute geodesics on an
+ellipsoid. Care must be taken with the signs of the square roots (which
+are determined by the initial azimuth of the geodesic). Also if
+\f$\gamma \gt 0\f$ (resp. \f$\gamma \lt 0\f$), then the \f$\beta\f$
+(resp. \f$\omega\f$) integrand diverges. The integrand can be
+transformed into a finite one by a change of variable, e.g.,
+\f$\sin\beta = \sin\sigma \sqrt{1 - \gamma/(b^2-c^2)}\f$. The resulting
+integrals are periodic, so the behavior of an arbitrarily long geodesic
+is entirely captured by tabulating the integrals over a single period.
+
+The situation is more complicated if \f$\gamma = 0\f$ (corresponding to
+umbilical geodesics). Both integrands have simple poles at the umbilical
+points. However, this behavior may be subtracted from the integrands to
+yield (for example) the sum of a term involving
+\f$\tanh^{-1}\sin\beta\f$ and a finite integral. Since both integrals
+contain similar logarithmic singularities they can be equated (thus
+fixing the ratio \f$\cos\beta/\sin\omega\f$ at the umbilical point) and
+connection formulas can be found which allow the geodesic to be followed
+through the umbilical point. The study of umbilical geodesics was of
+special interest to a group of Irish mathematicians in the 1840's and
+1850's, including Michael and William Roberts (twins!), Hart, Graves,
+and Salmon.
+
+\section triaxial-survey Survey of triaxial geodesics
+
+Before delving into the nature of geodesics on a triaxial geodesic, it
+is worth reviewing geodesics on an ellipsoid of revolution. There are
+two classes of simple closed geodesics (i.e., geodesics which close on
+themselves without intersection): the equator and all the meridians.
+All other geodesics oscillate between two equal and opposite circles of
+latitude; but after completing a full oscillation in latitude these fall
+slightly short (for an oblate ellipsoid) of completing a full circuit in
+longitude.
+
+Turning to the triaxial case, we find that there are only 3 simple
+closed geodesics, the three principal sections of the ellipsoid given by
+\f$x = 0\f$, \f$y = 0\f$, and \f$z = 0\f$. To survey the other
+geodesics, it is convenient to consider geodesics which intersect the
+middle principal section, \f$y = 0\f$, at right angles. Such geodesics
+are shown in Figs. 2--6, where I use the same ellipsoid parameters as in
+Fig. 1 and the same viewing direction. In addition, the three principal
+ellipses are shown in red in each of these figures.
+
+If the starting point is \f$\beta_1 \in (-90^\circ, 90^\circ)\f$,
+\f$\omega_1 = 0\f$, and \f$\alpha_1 = 90^\circ\f$, then the geodesic
+encircles the ellipsoid in a "circumpolar" sense. The geodesic
+oscillates north and south of the equator; on each oscillation it
+completes slightly less that a full circuit around the ellipsoid
+resulting in the geodesic filling the area bounded by the two latitude
+lines \f$\beta = \pm \beta_1\f$. Two examples are given in
+Figs. 2 and 3. Figure 2 shows practically the same behavior as for an
+oblate ellipsoid of revolution (because \f$a \approx b\f$). However, if
+the starting point is at a higher latitude (Fig. 3) the distortions
+resulting from \f$a \ne b\f$ are evident.
+
+
+
+Fig. 2
+
\n
+Fig. 2:
+Example of a circumpolar geodesic on a triaxial ellipsoid. The starting
+point of this geodesic is \f$\beta_1 = 45.1^\circ\f$, \f$\omega_1 =
+0^\circ\f$, and \f$\alpha_1 = 90^\circ\f$.
+
+
+
+Fig. 3
+
\n
+Fig. 3:
+Another example of a circumpolar geodesic on a triaxial ellipsoid. The
+starting point of this geodesic is \f$\beta_1 = 87.48^\circ\f$, \f$\omega_1 =
+0^\circ\f$, and \f$\alpha_1 = 90^\circ\f$.
+
+If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 \in
+(0^\circ, 180^\circ)\f$, and \f$\alpha_1 = 180^\circ\f$, then the geodesic
+encircles the ellipsoid in a "transpolar" sense. The geodesic
+oscillates east and west of the ellipse \f$x = 0\f$; on each oscillation
+it completes slightly more that a full circuit around the ellipsoid
+resulting in the geodesic filling the area bounded by the two longitude
+lines \f$\omega = \omega_1\f$ and \f$\omega = 180^\circ - \omega_1\f$.
+If \f$a = b\f$, all meridians are geodesics; the effect of \f$a \ne b\f$
+causes such geodesics to oscillate east and west. Two examples are
+given in Figs. 4 and 5.
+
+
+
+Fig. 4
+
\n
+Fig. 4:
+Example of a transpolar geodesic on a triaxial ellipsoid. The
+starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
+39.9^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
+
+
+
+Fig. 5
+
\n
+Fig. 5:
+Another example of a transpolar geodesic on a triaxial ellipsoid. The
+starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
+9.966^\circ\f$, and \f$\alpha_1 = 180^\circ\f$.
+
+If the starting point is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
+0^\circ\f$ (an umbilical point), and \f$\alpha_1 = 135^\circ\f$ (the
+geodesic leaves the ellipse \f$y = 0\f$ at right angles), then the
+geodesic repeatedly intersects the opposite umbilical point and returns to
+its starting point. However on each circuit the angle at which it
+intersects \f$y = 0\f$ becomes closer to \f$0^\circ\f$ or
+\f$180^\circ\f$ so that asymptotically the geodesic lies on the ellipse
+\f$y = 0\f$. This is shown in Fig. 6. Note that a single geodesic does
+not fill an area on the ellipsoid.
+
+
+
+Fig. 6
+
\n
+Fig. 6:
+Example of an umbilical geodesic on a triaxial ellipsoid. The
+starting point of this geodesic is \f$\beta_1 = 90^\circ\f$, \f$\omega_1 =
+0^\circ\f$, and \f$\alpha_1 = 135^\circ\f$ and the geodesics is followed
+forwards and backwards until it lies close to the plane \f$y = 0\f$ in
+both directions.
+
+Umbilical geodesics enjoy several interesting properties.
+ - Through any point on the ellipsoid, there are two umbilical geodesics.
+ - The geodesic distance between opposite umbilical points is the same
+ regardless of the initial direction of the geodesic.
+ - Whereas the closed geodesics on the ellipses \f$x = 0\f$ and \f$z =
+ 0\f$ are stable (an geodesic initially close to and nearly parallel to
+ the ellipse remains close to the ellipse), the closed geodesic on the
+ ellipse \f$y = 0\f$, which goes through all 4 umbilical points, is \e
+ unstable. If it is perturbed, it will swing out of the plane \f$y =
+ 0\f$ and flip around before returning to close to the plane. (This
+ behavior may repeat depending on the nature of the initial
+ perturbation.).
+
+\section triaxial-stab The stability of closed geodesics
+
+The stability of the three simple closed geodesics can be determined by
+examining the properties of Jacobi's solution. In particular the
+unstable behavior of umbilical geodesics was shown by Hart (1849).
+However an alternative approach is to use the equations that Gauss
+(1828) gives for a perturbed geodesic
+\f[
+\frac {d^2m}{ds^2} + Km = 0
+\f]
+where \f$m\f$ is the distance of perturbed geodesic from a reference
+geodesic and \f$K\f$ is the Gaussian curvature of the surface. If the
+reference geodesic is closed, then this is a linear homogeneous
+differential equation with periodic coefficients. In fact it's a
+special case of Hill's equation which can be treated using Floquet
+theory, see DLMF, §28.29.
+Using the notation of §3 of
+ Algorithms for
+geodesics, the stability is determined by computing the reduced
+length \f$m_{12}\f$ and the geodesic scales \f$M_{12}, M_{21}\f$ over
+half the perimeter of the ellipse and determining the eigenvalues
+\f$\lambda_{1,2}\f$ of
+\f[
+{\cal M} = \left(\begin{array}{cc}
+M_{12} & m_{12}\\
+-\frac{1 - M_{12}M_{21}}{m_{12}} & M_{21}
+\end{array}\right).
+\f]
+Because \f$\mathrm{det}\,{\cal M} = 1\f$, the eigenvalues are determined
+by \f$\mathrm{tr}\,{\cal M}\f$. In particular if
+\f$\left|\mathrm{tr}\,{\cal M}\right| < 2\f$, we have
+\f$\left|\lambda_{1,2}\right| = 1\f$ and the solution is stable; if
+\f$\left|\mathrm{tr}\,{\cal M}\right| > 2\f$, one of
+\f$\left|\lambda_{1,2}\right|\f$ is larger than unity and the solution
+is (exponentially) unstable. In the transition case,
+\f$\left|\mathrm{tr}\,{\cal M}\right| = 2\f$, the solution is stable
+provided that the off-diagonal elements of \f${\cal M}\f$ are zero;
+otherwise the solution is linearly unstable.
+
+The exponential instability of the geodesic on the ellipse \f$y = 0\f$
+is confirmed by this analysis and results from the resonance between the
+natural frequency of the equation for \f$m\f$ and the driving frequency
+when \f$b\f$ lies in \f$(c, a)\f$. If \f$b\f$ is equal to either of the
+other axes (and the triaxial ellipsoid degenerates to an ellipsoid of
+revolution), then the solution is linearly unstable. (For example, a
+geodesic is which is close to a meridian on an oblate ellipsoid, slowly
+moves away from that meridian.)
+
+\section triaxial-inverse The inverse problem
+
+In order to solve the inverse geodesic problem, it helps to have an
+understanding of the properties of all the geodesics emanating from a
+single point \f$(\beta_1, \omega_1)\f$.
+ - If the point is an umbilical point, all the lines meet at the
+ opposite umbilical point.
+ - Otherwise, the first envelope of the geodesics is a 4-pointed
+ astroid. The cusps of the astroid lie on either \f$\beta = -
+ \beta_1\f$ or \f$\omega = \omega_1 + \pi\f$; see
+ Sinclair
+ (2003).
+ - All geodesics intersect (or, in the case of \f$\alpha_1 = 0\f$ or
+ \f$\pi\f$, touch) the line \f$\omega = \omega_1 + \pi\f$.
+ - All geodesics intersect (or, in the case of \f$\alpha_1 =
+ \pm\pi/2\f$, touch) the line \f$\beta = -\beta_1\f$.
+ - Two geodesics with azimuths \f$\pm\alpha_1\f$ first intersect on
+ \f$\omega = \omega_1 + \pi\f$ and their lengths to the point of
+ intersection are equal.
+ - Two geodesics with azimuths \f$\alpha_1\f$ and \f$\pi-\alpha_1\f$
+ first intersect on \f$\beta = -\beta_1\f$ and their lengths to the
+ point of intersection are equal.
+ .
+(These assertions follow directly from the equations for the geodesics;
+some of them are somewhat surprising given the asymmetries of the
+ellipsoid.) Consider now terminating the geodesics from \f$(\beta_1,
+\omega_1)\f$ at the point where they first intersect (or touch) the line
+\f$\beta = -\beta_1\f$. To focus the discussion, take \f$\beta_1 \le
+0\f$.
+ - The geodesics completely fill the portion of the ellipsoid satisfying
+ \f$\beta \le -\beta_1\f$.
+ - None of geodesics intersect any other geodesics.
+ - Any initial portion of these geodesics is a shortest path.
+ - Each geodesic intersects the line \f$\beta = \beta_2\f$, where
+ \f$\beta_1 < \beta_2 < -\beta_1\f$, exactly once.
+ - For a given \f$\beta_2\f$, this defines a continuous monotonic
+ mapping of the circle of azimuths \f$\alpha_1\f$ to the circle of
+ longitudes \f$\omega_2\f$.
+ - If \f$\beta_2 = \pm \beta_1\f$, then the previous two assertions need
+ to be modified similarly to the case for an ellipsoid of revolution.
+
+These properties show that the inverse problem can be solved using
+techniques similar to those employed for an ellipsoid of revolution (see
+§4 of
+ Algorithms for
+geodesics).
+ - If the points are opposite umbilical points, an arbitrary
+ \f$\alpha_1\f$ may be chosen.
+ - If the points are neighboring umbilical points, the shortest path
+ lies on the ellipse \f$y = 0\f$.
+ - If only one point is an umbilicial point, the azimuth at the
+ non-umbilical point is found using the generalization of Clairaut's
+ equation (given above) with \f$\gamma = 0\f$.
+ - Treat the cases where the geodesic might follow a line of constant
+ \f$\beta\f$. There are two such cases: (a) the points lie on
+ the ellipse \f$z = 0\f$ on a general ellipsoid and (b) the
+ points lie on an ellipse whose major axis is the \f$x\f$ axis on a
+ prolate ellipsoid (\f$a = b > c\f$). Determine the reduced length
+ \f$m_{12}\f$ for the geodesic which is the shorter path along the
+ ellipse. If \f$m_{12} \ge 0\f$, then this is the shortest path on
+ the ellipsoid; otherwise proceed to the general case (next).
+ - Swap the points, if necessary, so that the first point is the one
+ closest to a pole. Estimate \f$\alpha_1\f$ (by some means) and solve
+ the \e hybrid problem, i.e., determine the longitude \f$\omega_2\f$
+ corresponding to the first intersection of the geodesic with \f$\beta
+ = \beta_2\f$. Adjust \f$\alpha_1\f$ so that the value of
+ \f$\omega_2\f$ matches the given \f$\omega_2\f$ (there is a single
+ root). If a sufficiently close solution can be found, Newton's
+ method can be employed since the necessary derivative can be
+ expressed in terms of the reduced length \f$m_{12}\f$.
+
+The shortest path found by this method is unique unless:
+ - The length of the geodesic vanishes \f$s_{12}=0\f$, in which case any
+ constant can be added to the azimuths.
+ - The points are opposite umbilical points. In this case,
+ \f$\alpha_1\f$ can take on any value and \f$\alpha_2\f$ needs to be
+ adjusted to maintain the value of \f$\tan\alpha_1 / \tan\alpha_2\f$.
+ Note that \f$\alpha\f$ increases by \f$\pm 90^\circ\f$ as the
+ geodesic passes through an umbilical point, depending on whether the
+ geodesic is considered as passing to the right or left of the point.
+ Here \f$\alpha_2\f$ is the \e forward azimuth at the second umbilical
+ point, i.e., its azimuth immediately \e after passage through the
+ umbilical point.
+ - \f$\beta_1 + \beta_2 = 0\f$ and \f$\cos\alpha_1\f$ and
+ \f$\cos\alpha_2\f$ have opposite signs. In this case, there another
+ shortest geodesic with azimuths \f$\pi - \alpha_1\f$ and
+ \f$\pi - \alpha_2\f$.
+
+\section triaxial-conformal Jacobi's conformal projection
+
+This material is now on its own page; see \ref jacobi.
+
+
+Back to \ref nearest. Forward to \ref jacobi. Up to \ref contents.
+
+Back to \ref triaxial. Forward to \ref rhumb. Up to \ref contents.
+
+
+In addition to solving the geodesic problem for the triaxial ellipsoid,
+Jacobi (1839) briefly mentions the problem of the conformal projection
+of ellipsoid. He covers this in greater detail in
+
+Vorlesungen über Dynamik, §28, which is now
+available in an
+English translation: Lectures on Dynamics
+(
+errata).
+
+\section jacobi-conformal Conformal projection
+
+It is convenient to rotate Jacobi's ellipsoidal coordinate system so
+that \f$(X,Y,Z)\f$ are respectively the middle, large, and small axes of
+the ellipsoid. The longitude \f$\omega\f$ is shifted so that
+\f$(\beta=0,\omega=0)\f$ is the point \f$(b,0,0)\f$. The coordinates
+are thus defined by
+\f[
+\begin{align}
+ X &= b \cos\beta \cos\omega, \\
+ Y &= a \sin\omega
+ \frac{\sqrt{a^2 - b^2\sin^2\beta - c^2\cos^2\beta}}
+ {\sqrt{a^2 - c^2}}, \\
+ Z &= c \sin\beta
+ \frac{\sqrt{a^2\cos^2\omega + b^2\sin^2\omega - c^2}}
+ {\sqrt{a^2 - c^2}}.
+\end{align}
+\f]
+After this change, the large principal ellipse is the equator,
+\f$\beta=0\f$, while the small principal ellipse is the prime meridian,
+\f$\omega=0\f$. The four umbilic points, \f$\left|\omega\right| =
+\left|\beta\right| = \frac12\pi\f$, lie on middle principal ellipse in
+the plane \f$X=0\f$.
+
+Jacobi gives the following conformal mapping of the triaxial ellipsoid
+onto a plane
+\f[
+\begin{align}
+x &= \frac{\sqrt{a^2-c^2}}b \int \frac
+{\sqrt{a^2 \cos^2\omega + b^2 \sin^2\omega}}
+{\sqrt{a^2 \cos^2\omega + b^2 \sin^2\omega - c^2}}\, d\omega, \\
+y &= \frac{\sqrt{a^2-c^2}}b \int \frac
+{\sqrt{b^2 \sin^2\beta + c^2 \cos^2\beta}}
+{\sqrt{a^2 - b^2 \sin^2\beta - c^2 \cos^2\beta}}\, d\beta.
+\end{align}
+\f]
+The scale of the projection is
+\f[
+k = \frac{\sqrt{a^2-c^2}}
+{b\sqrt{a^2 \cos^2\omega + b^2 (\sin^2\omega-\sin^2\beta) - c^2 \cos^2\beta}}.
+\f]
+I have scaled the Jacobi's projection by a constant factor,
+\f[
+\frac{\sqrt{a^2-c^2}}{2b},
+\f]
+so that it reduces to the familiar formulas in the case of an oblate ellipsoid.
+
+\section jacobi-elliptic The projection in terms of elliptic integrals
+
+The projection may be expressed in terms of elliptic integrals,
+\f[
+\begin{align}
+x&=(1+e_a^2)\,\Pi(\omega',-e_a^2, \cos\nu),\\
+y&=(1-e_c^2)\,\Pi(\beta' , e_c^2, \sin\nu),\\
+k&=\frac{\sqrt{e_a^2+e_c^2}}{b\sqrt{e_a^2\cos^2\omega+e_c^2\cos^2\beta}},
+\end{align}
+\f]
+where
+\f[
+\begin{align}
+e_a &= \frac{\sqrt{a^2-b^2}}b, \qquad
+e_c = \frac{\sqrt{b^2-c^2}}b, \\
+\tan\omega' &= \frac ba \tan\omega = \frac 1{\sqrt{1+e_a^2}} \tan\omega, \\
+\tan\beta' &= \frac bc \tan\beta = \frac 1{\sqrt{1-e_c^2}} \tan\beta, \\
+\tan\nu &= \frac ac \frac{\sqrt{b^2-c^2}}{\sqrt{a^2-b^2}}
+=\frac{e_c}{e_a}\frac{\sqrt{1+e_a^2}}{\sqrt{1-e_c^2}},
+\end{align}
+\f]
+\f$\nu\f$ is the geographic latitude of the umbilic point at \f$\beta =
+\omega = \frac12\pi\f$ (the angle a normal at the umbilic point makes
+with the equatorial plane), and \f$\Pi(\phi,\alpha^2,k)\f$ is the
+elliptic integral of the third kind, http://dlmf.nist.gov/19.2.E7. This
+allows the projection to be numerically computed using
+EllipticFunction::Pi(real phi) const.
+
+Nyrtsov, et al.,
+ - M. V. Nyrtsov, M. E. Flies, M. M. Borisov, P. J. Stooke,
+
+ Jacobi conformal projection of the triaxial ellipsoid: new projection
+ for mapping of small celestial bodies, in
+ Cartography from Pole to Pole
+ (Springer, 2014), pp. 235--246.
+ .
+also expressed the projection in terms of elliptic integrals.
+However, their expressions don't allow the limits of ellipsoids of
+revolution to be readily recovered. The relations
+http://dlmf.nist.gov/19.7.E5 can be used to put their results in the
+form given here.
+
+\section jacobi-properties Properties of the projection
+
+\f$x\f$ (resp. \f$y\f$) depends on \f$\omega\f$ (resp. \f$\beta\f$)
+alone, so that latitude-longitude grid maps to straight lines in the
+projection. In this sense, the Jacobi projection is the natural
+generalization of the Mercator projection for the triaxial ellipsoid.
+(See below for the limit \f$a\rightarrow b\f$, which makes this
+connection explicit.)
+
+In the general case (all the axes are different), the scale diverges
+only at the umbilic points. The behavior of these singularities is
+illustrated by the complex function
+\f[
+f(z;e) = \cosh^{-1}(z/e) - \log(2/e).
+\f]
+For \f$e > 0\f$, this function has two square root singularities at
+\f$\pm e\f$, corresponding to the two northern umbilic points.
+Plotting contours of its real (resp. imaginary) part gives the
+behavior of the lines of constant latitude (resp. longitude) near the
+north pole in Fig. 1. If we pass to the limit \f$e\rightarrow 0\f$,
+then \f$ f(z;e)\rightarrow\log z\f$, and the two branch points merge
+yielding a stronger (logarithmic) singularity at \f$z = 0\f$,
+concentric circles of latitude, and radial lines of longitude.
+
+Again in the general case, the extents of \f$x\f$ and \f$y\f$ are
+finite,
+\f[
+\begin{align}
+x\bigl(\tfrac12\pi\bigr) &=(1+e_a^2)\,\Pi(-e_a^2, \cos\nu),\\
+y\bigl(\tfrac12\pi\bigr) &=(1-e_c^2)\,\Pi(e_c^2, \sin\nu),
+\end{align}
+\f]
+where \f$\Pi(\alpha^2,k)\f$ is the complete elliptic integral of the
+third kind, http://dlmf.nist.gov/19.2.E8.
+
+In particular, if we substitute values appropriate for the earth,
+\f[
+\begin{align}
+a&=(6378137+35)\,\mathrm m,\\
+b&=(6378137-35)\,\mathrm m,\\
+c&=6356752\,\mathrm m,\\
+\end{align}
+\f]
+we have
+\f[
+\begin{align}
+x\bigl({\textstyle\frac12}\pi\bigr) &= 1.5720928 = \hphantom{0}90.07428^\circ,\\
+y\bigl({\textstyle\frac12}\pi\bigr) &= 4.2465810 = 243.31117^\circ.\\
+\end{align}
+\f]
+
+The projection may be inverted (to give \f$\omega\f$ in terms of \f$x\f$
+and \f$\beta\f$ in terms of \f$y\f$) by using Newton's method to find
+the root of, for example, \f$x(\omega) - x_0 = 0\f$. The derivative of
+the elliptic integral is, of course, just given by its defining
+relation.
+
+If rhumb lines are defined as curves with a constant bearing relative
+to the ellipsoid coordinates, then these are straight lines in the
+Jacobi projection. A rhumb line which passes over an umbilic point
+immediately retraces its path. A rhumb line which crosses the line
+joining the two northerly umbilic points starts traveling south with
+a reversed heading (e.g., a NE heading becomes a SW heading). This
+behavior is preserved in the limit \f$a\rightarrow b\f$ (although the
+longitude becomes indeterminate in this limit).
+
+\section jacobi-limiting Limiting cases
+
+Oblate ellipsoid, \f$a\rightarrow b\f$. The coordinate system
+is
+\f[
+\begin{align}
+ X &= b \cos\beta \cos\omega, \\
+ Y &= b \cos\beta \sin\omega, \\
+ Z &= c \sin\beta.
+\end{align}
+\f]
+Thus \f$\beta\f$ (resp. \f$\beta'\f$) is the parametric
+(resp. geographic) latitude and \f$\omega=\omega'\f$ is the longitude;
+the quantity \f$e_c\f$ is the eccentricity of the ellipsoid.
+Using http://dlmf.nist.gov/19.6.E12 and http://dlmf.nist.gov/19.2.E19
+the projection reduces to the normal Mercator projection for an oblate
+ellipsoid,
+\f[
+\begin{align}
+x &= \omega,\\
+y &= \sinh^{-1}\tan\beta'
+- e_c \tanh^{-1}(e_c\sin\beta'),\\
+k &= \frac1{b\cos\beta}.
+\end{align}
+\f]
+
+Prolate ellipsoid, \f$c\rightarrow b\f$. The coordinate system
+is
+\f[
+\begin{align}
+ X &= b \cos\omega \cos\beta, \\
+ Y &= a \sin\omega, \\
+ Z &= b \cos\omega \sin\beta.
+\end{align}
+\f]
+Thus \f$\omega\f$ (resp. \f$\omega'\f$) now plays the role of the
+parametric (resp. geographic) latitude and while \f$\beta=\beta'\f$ is
+the longitude. Using http://dlmf.nist.gov/19.6.E12
+http://dlmf.nist.gov/19.2.E19 and http://dlmf.nist.gov/19.2.E18 the
+projection reduces to similar expressions with the roles of \f$\beta\f$
+and \f$\omega\f$ switched,
+\f[
+\begin{align}
+x &= \sinh^{-1}\tan\omega'
++ e_a
+ \tan^{-1}(e_a\sin\omega'),\\
+y &= \beta,\\
+k &= \frac1{b\cos\omega}.
+\end{align}
+\f]
+
+Sphere, \f$a\rightarrow b\f$ and \f$c\rightarrow b\f$. This is a
+non-uniform limit depending on the parameter \f$\nu\f$,
+\f[
+\begin{align}
+ X &= b \cos\omega \cos\beta, \\
+ Y &= b \sin\omega \sqrt{1 - \sin^2\nu\sin^2\beta}, \\
+ Z &= b \sin\beta \sqrt{1 - \cos^2\nu\sin^2\omega}.
+\end{align}
+\f]
+Using http://dlmf.nist.gov/19.6.E13 the projection can be put in terms
+of the elliptic integral of the first kind, http://dlmf.nist.gov/19.2.E4
+\f[
+\begin{align}
+x &= F(\omega, \cos\nu), \\
+y &= F(\beta, \sin\nu), \\
+k &= \frac1{b \sqrt{\cos^2\nu\cos^2\omega + \sin^2\nu\cos^2\beta}},
+\end{align}
+\f]
+Obtaining the limit of a sphere via an oblate (resp. prolate) ellipsoid
+corresponds to setting \f$\nu = \frac12\pi\f$ (resp. \f$\nu
+=0\f$). In these limits, the elliptic integral reduces to elementary
+functions http://dlmf.nist.gov/19.6.E7 and http://dlmf.nist.gov/19.6.E8
+\f[
+\begin{align}
+F(\phi, 0) &= \phi, \\
+F(\phi, 1) &= \mathop{\mathrm{gd}}\nolimits^{-1}\phi = \sinh^{-1}\tan\phi.
+\end{align}
+\f]
+The spherical limit gives the projection found by É. Guyou in
+ -
+ Sur un nouveau système de projection de la sphère,
+ Comptes Rendus 102(6), 308--310 (1886).
+ -
+ Nouveau système de projection de la sphère:
+ généralisation de la projection de Mercator,
+ Annales Hydrographiques (2nd series) 9, 16--35 (1887).
+ .
+who apparently derived it without realizing that it is just a special
+case of the projection Jacobi had given some 40 years earlier. Guyou's
+name is usually associated with the particular choice,
+\f$\nu=\frac14\pi\f$, in which case the hemisphere
+\f$\left|\omega\right|\le\frac12\pi\f$ is mapped into a square.
+However, by varying \f$\nu\in[0,\frac12\pi]\f$ the hemisphere can be
+mapped into a rectangle with any aspect ratio, \f$K(\cos\nu) :
+K(\sin\nu)\f$, where \f$K(k)\f$ is the complete elliptic integral of
+the first find, http://dlmf.nist.gov/19.2.E8.
+
+\section jacobi-sphere Conformal mapping of an ellipsoid to a sphere
+
+An essential tool in deriving conformal projections of an ellipsoid of
+revolution is the conformal mapping of the ellipsoid onto a sphere.
+This allows conformal projections of the sphere to be generalized to the
+case of an ellipsoid of revolution. This conformal mapping is obtained
+by using the ellipsoidal Mercator projection to map the ellipsoid to
+the plane and then using the spherical Mercator projection to map the
+plane onto the sphere.
+
+A similar construction is possible for a triaxial ellipsoid. Map each
+octant of the ellipsoid onto a rectangle using the Jacobi projection.
+The aspect ratio of this rectangle is
+\f[
+(1+e_a^2)\,\Pi(-e_a^2, \cos\nu) :
+(1-e_c^2)\,\Pi( e_c^2, \sin\nu).
+\f]
+Find the value of \f$\nu'\f$ such that this ratio equals
+\f[
+K(\cos\nu') : K(\sin\nu').
+\f]
+Map the rectangle onto the equivalent octant of the sphere using Guyou's
+projection with parameter \f$\nu = \nu'\f$. This reduces to the
+standard construction in the limit of an ellipsoid of revolution.
+
+\section jacobi-implementation An implementation of the projection
+
+The JacobiConformal class provides an implementation of the Jacobi
+conformal projection is given here. NOTE: This is just sample
+code. It is not part of GeographicLib itself.
+
+
+Back to \ref triaxial. Forward to \ref rhumb. Up to \ref contents.
+
+Back to \ref jacobi. Forward to \ref greatellipse. Up to \ref contents.
+
+
+The Rhumb and RhumbLine classes together with the
+RhumbSolve utility perform rhumb line
+calculations. A rhumb line (also called a loxodrome) is a line of
+constant azimuth on the surface of the ellipsoid. It is important for
+historical reasons because sailing with a constant compass heading is
+simpler than sailing the shorter geodesic course; see Osborne (2013).
+The formulation of the problem on an ellipsoid is covered by Smart
+(1946) and Carlton-Wippern (1992). Computational approaches are given
+by Williams (1950) and Bennett (1996). My interest in this problem was
+piqued by Botnev and Ustinov (2014) who discuss various techniques to
+improve the accuracy of rhumb line calculations. The items of interest
+here are:
+ - Review of accurate formulas for the auxiliary latitudes.
+ - The calculation of the area under a rhumb line.
+ - Using divided differences to compute \f$\mu_{12}/\psi_{12}\f$
+ maintaining full accuracy. Two cases are treated:
+ - If \f$f\f$ is small, Krüger's series for the transverse
+ Mercator projection relate \f$\chi\f$ and \f$\mu\f$.
+ - For arbitrary \f$f\f$, the divided difference formula for
+ incomplete elliptic integrals of the second relates \f$\beta\f$ and
+ \f$\mu\f$.
+ .
+ - Extending Clenshaw summation to compute the divided difference of a
+ trigonometric sum.
+
+Go to
+ - \ref rhumbform
+ - \ref rhumblat
+ - \ref rhumbarea
+ - \ref divideddiffs
+ - \ref dividedclenshaw
+
+References:
+ - G. G. Bennett,
+
+ Practical Rhumb Line Calculations on the Spheroid
+ J. Navigation 49(1), 112--119 (1996).
+ - F. W. Bessel,
+ The calculation
+ of longitude and latitude from geodesic measurements (1825),
+ Astron. Nachr. 331(8), 852--861 (2010);
+ translated by C. F. F. Karney and R. E. Deakin; preprint:
+ arXiv:0908.1824.
+ - V.A. Botnev, S.M. Ustinov,
+
+ Metody resheniya pryamoy i obratnoy geodezicheskikh zadach s vysokoy
+ tochnost'yu
+ (Methods for direct and inverse geodesic problems
+ solving with high precision), St. Petersburg State Polytechnical
+ University Journal 3(198), 49--58 (2014).
+ - K. C. Carlton-Wippern
+
+ On Loxodromic Navigation,
+ J. Navigation 45(2), 292--297 (1992).
+ - K. E. Engsager and K. Poder,
+
+ A highly accurate world wide algorithm for the
+ transverse Mercator mapping (almost),
+ Proc. XXIII Intl. Cartographic Conf. (ICC2007), Moscow (2007).
+ - F. R. Helmert,
+
+ Mathematical and Physical Theories of Higher Geodesy, Part 1 (1880),
+ Aeronautical Chart and Information Center (St. Louis, 1964),
+ Chaps. 5--7.
+ - W. M. Kahan and R. J. Fateman,
+
+ Symbolic computation of divided differences,
+ SIGSAM Bull. 33(3), 7--28 (1999)
+ DOI:
+ 10.1145/334714.334716.
+ - C. F. F. Karney,
+
+ Transverse Mercator with an accuracy of a few nanometers,
+ J. Geodesy 85(8), 475--485 (Aug. 2011);
+ addenda:
+ tm-addenda.html;
+ preprint:
+ arXiv:1002.1417;
+ resource page:
+ tm.html.
+ - C. F. F. Karney,
+
+ Algorithms for geodesics,
+ J. Geodesy 87(1), 43--55 (2013);
+ DOI:
+ 10.1007/s00190-012-0578-z;
+ addenda:
+ geod-addenda.html;
+ resource page:
+ geod.html.
+ - L. Krüger,
+ Konforme
+ Abbildung des Erdellipsoids in der Ebene (Conformal mapping of
+ the ellipsoidal earth to the plane), Royal Prussian Geodetic Institute,
+ New Series 52, 172 pp. (1912).
+ - P. Osborne,
+
+ The Mercator Projections (2013), §2.5 and §6.5;
+ DOI:
+ 10.5281/zenodo.35392.
+ - W. M. Smart
+
+ On a Problem in Navigation
+ MNRAS 106(2), 124--127 (1946).
+ - J. E. D. Williams
+
+ Loxodromic Distances on the Terrestrial Spheroid Journal,
+ J. Navigation 3(2), 133--140 (1950)
+
+\section rhumbform Formulation of the rhumb line problem
+
+The rhumb line can formulated in terms of three types of latitude, the
+isometric latitude \f$\psi\f$ (this serves to define the course of rhumb
+lines), the rectifying latitude \f$\mu\f$ (needed for computing
+distances along rhumb lines), and the parametric latitude \f$\beta\f$
+(needed for dealing with rhumb lines that run along a parallel). These
+are defined in terms of the geographical latitude \f$\phi\f$ by
+\f[
+\begin{align}
+ \frac{d\psi}{d\phi} &= \frac{\rho}R, \\
+ \frac{d\mu}{d\phi} &= \frac{\pi}{2M}\rho, \\
+\end{align}
+\f]
+where \f$\rho\f$ is the meridional radius of curvature, \f$R =
+a\cos\beta\f$ is the radius of a circle of latitude, and \f$M\f$ is the
+length of a quarter meridian (from the equator to the pole).
+
+Rhumb lines are straight in the Mercator projection, which maps a point
+with geographical coordinates \f$ (\phi,\lambda) \f$ on the ellipsoid to
+a point \f$ (\psi,\lambda) \f$. The azimuth \f$\alpha_{12}\f$ of a
+rhumb line from \f$ (\phi_1,\lambda_1) \f$ to \f$ (\phi_2,\lambda_2) \f$
+is thus given by
+\f[
+\tan\alpha_{12} = \frac{\lambda_{12}}{\psi_{12}},
+\f]
+where the quadrant of \f$\alpha_{12}\f$ is determined by the signs of
+the numerator and denominator of the right-hand side, \f$\lambda_{12} =
+\lambda_2 - \lambda_1\f$, \f$\psi_{12} = \psi_2 - \psi_1\f$, and,
+typically, \f$\lambda_{12}\f$ is reduced to the range \f$[-\pi,\pi]\f$
+(thus giving the course of the shortest rhumb line).
+
+The distance is given by
+\f[
+\begin{align}
+s_{12} &= \frac {2M}{\pi} \mu_{12} \sec\alpha_{12} \\
+ &= \frac {2M}{\pi}
+\frac{\mu_{12}}{\psi_{12}} \sqrt{\lambda_{12}^2 + \psi_{12}^2},
+\end{align}
+\f]
+where \f$\mu_{12} = \mu_2 - \mu_1\f$. This relation is indeterminate if
+\f$\phi_1 = \phi_2\f$, so we take the limits
+\f$\psi_{12}\rightarrow0\f$ and \f$\mu_{12}\rightarrow0\f$ and apply
+L'Hôpital's rule to yield
+\f[
+\begin{align}
+ s_{12} &= \frac {2M}{\pi} \frac{d\mu}{d\psi} \left|\lambda_{12}\right|\\
+&=a \cos\beta \left|\lambda_{12}\right|,
+\end{align}
+\f]
+where the last relation is given by the defining equations for
+\f$\psi\f$ and \f$\mu\f$.
+
+This provides a complete solution for rhumb lines. This formulation
+entirely encapsulates the ellipsoidal shape of the earth via the
+auxiliary latitudes; thus in the Rhumb class, the ellipsoidal
+generalization is handled by the Ellipsoid class where the auxiliary
+latitudes are defined.
+
+\section rhumblat Determining the auxiliary latitudes
+
+Here we brief develop the necessary formulas for the auxiliary
+latitudes.
+
+Isometric latitude: The equation for \f$\psi\f$ can be integrated
+to give
+\f[
+\psi = \sinh^{-1}\tan\phi - e\tanh^{-1}(e \sin\phi),
+\f]
+where \f$e = \sqrt{f(2-f)}\f$ is the eccentricity of the ellipsoid. To
+invert this equation (to give \f$\phi\f$ in terms of \f$\psi\f$), it is
+convenient to introduce the variables \f$\tau=\tan\phi\f$ and \f$\tau' =
+\tan\chi = \sinh\psi\f$ (\f$\chi\f$ is the conformal latitude) which are
+related by (Karney, 2011)
+\f[
+\begin{align}
+\tau' &= \tau \sqrt{1 + \sigma^2} - \sigma \sqrt{1 + \tau^2}, \\
+\sigma &= \sinh\bigl(e \tanh^{-1}(e \tau/\sqrt{1 + \tau^2}) \bigr).
+\end{align}
+\f]
+The equation for \f$\tau'\f$ can be inverted to give \f$\tau\f$ in terms
+of \f$\tau'\f$ using Newton's method with \f$\tau_0 = \tau'/(1-e^2)\f$
+as a starting guess; and, of course, \f$\phi\f$ and \f$\psi\f$ are then
+given by
+\f[
+\begin{align}
+\phi &= \tan^{-1}\tau,\\
+\psi &= \sinh^{-1}\tau'.
+\end{align}
+\f]
+This allows conversions to and from \f$\psi\f$ to be carried out for any
+value of the flattening \f$f\f$; these conversions are implemented by
+Ellipsoid::IsometricLatitude and Ellipsoid::InverseIsometricLatitude.
+(For prolate ellipsoids, \f$f\f$ is negative and \f$e\f$ is imaginary,
+and the equation for \f$\sigma\f$ needs to be recast in terms of the
+tangent function.)
+
+For small values of \f$f\f$, Engsager and Poder (2007) express
+\f$\chi\f$ as a trigonometric series in \f$\phi\f$. This series can be
+reverted to give a series for \f$\phi\f$ in terms of \f$\chi\f$. Both
+series can be efficiently evaluated using Clenshaw summation and this
+provides a fast non-iterative way of making the conversions.
+
+Parametric latitude: This is given by
+\f[
+\tan\beta = (1-f)\tan\phi,
+\f]
+which allows rapid and accurate conversions; these conversions are
+implemented by Ellipsoid::ParametricLatitude and
+Ellipsoid::InverseParametricLatitude.
+
+Rectifying latitude: Solving for distances on the meridian is
+naturally carried out in terms of the parametric latitude instead of the
+geographical latitude. This leads to a simpler elliptic integral which
+is easier to evaluate and to invert. Helmert (1880, §5.11) notes
+that the series for meridian distance in terms of \f$\beta\f$ converge
+faster than the corresponding ones in terms of \f$\phi\f$.
+
+In terms of \f$\beta\f$, the rectifying latitude is given by
+\f[
+\mu = \frac{\pi}{2E(ie')} E(\beta,ie'),
+\f]
+where \f$e'=e/\sqrt{1-e^2}\f$ is the second eccentricity and \f$E(k)\f$
+and \f$E(\phi,k)\f$ are the complete and incomplete elliptic integrals
+of the second kind; see http://dlmf.nist.gov/19.2.ii. These can be
+evaluated accurately for arbitrary flattening using the method given in
+http://dlmf.nist.gov/19.36.i. To find \f$\beta\f$ in terms of
+\f$\mu\f$, Newton's method can be used (noting that \f$dE(\phi,k)/d\phi
+= \sqrt{1 - k^2\sin^2\phi}\f$); for a starting guess use \f$\beta_0 =
+\mu\f$ (or use the first terms in the reverted series; see below).
+These conversions are implemented by Ellipsoid::RectifyingLatitude and
+Ellipsoid::InverseRectifyingLatitude.
+
+If the flattening is small, \f$\mu\f$ can be expressed as a series in
+various ways. The most economical series is in terms of the third
+flattening \f$ n = f/(2-f)\f$ and was found by Bessel (1825); see
+Eq. 5.5.7 of Helmert (1880). Helmert (1880, Eq. 5.6.8) also gives the
+reverted series (finding \f$\beta\f$ given \f$\mu\f$). These series are
+used by the Geodesic class where the coefficients are \f$C_{1j}\f$ and
+\f$C_{1j}'\f$; see Eqs. (18) and (21) of Karney (2013) and \ref
+geodseries. (Make the replacements, \f$\sigma\rightarrow\beta\f$,
+\f$\tau\rightarrow\mu\f$, \f$\epsilon\rightarrow n\f$, to convert the
+notation of the geodesic problem to the problem at hand.) The series
+are evaluated by Clenshaw summation.
+
+These relations allow inter-conversions between the various latitudes
+\f$\phi\f$, \f$\psi\f$, \f$\chi\f$, \f$\beta\f$, \f$\mu\f$ to be carried
+out simply and accurately. The approaches using series apply only if
+\f$f\f$ is small. The others apply for arbitrary values of \f$f\f$.
+
+\section rhumbarea The area under a rhumb line
+
+The area between a rhumb line and the equator is given by
+\f[
+S_{12} = \int_{\lambda_1}^{\lambda_2} c^2 \sin\xi \,d\lambda,
+\f]
+where \f$c\f$ is the authalic radius and \f$\xi\f$ is the authalic
+latitude. Express \f$\sin\xi\f$ in terms of the conformal latitude
+\f$\chi\f$ and expand as a series in the third flattening \f$n\f$. This
+can be expressed in terms of powers of \f$\sin\chi\f$. Substitute
+\f$\sin\chi=\tanh\psi\f$, where \f$\psi\f$ is the isometric latitude.
+For a rhumb line we have
+\f[
+\begin{align}
+\psi &= m(\lambda-\lambda_0),\\
+m &= \frac{\psi_2 - \psi_1}{\lambda_2 - \lambda_1}.
+\end{align}
+\f]
+Performing the integral over \f$\lambda\f$ gives
+\f[
+S_{12} = c^2 \lambda_{12} \left<\sin\xi\right>_{12},
+\f]
+where \f$\left<\sin\xi\right>_{12}\f$ is the mean value of \f$\sin\xi\f$
+given by
+\f[
+\begin{align}
+\left<\sin\xi\right>_{12} &= \frac{S(\chi_2) - S(\chi_1)}{\psi_2 - \psi_1},\\
+S(\chi) &= \log\sec\chi + \sum_{l=1} R_l\cos(2l\chi),
+\end{align}
+\f]
+\f$\log\f$ is the natural logarithm, and \f$R_l = O(n^l)\f$ is given as
+a series in \f$n\f$ below. In the spherical limit, the sum vanishes.
+
+Note the simple way that longitude enters into the expression for the
+area. In the limit \f$\chi_2 \rightarrow \chi_1\f$, we can apply
+l'Hôpital's rule
+\f[
+\left<\sin\xi\right>_{12}
+\rightarrow \frac{dS(\chi_1)/d\chi_1}{\sec\chi_1}
+=\sin\xi_1,
+\f]
+as expected.
+
+In order to maintain accuracy, particularly for rhumb lines which nearly
+follow a parallel, evaluate \f$\left<\sin\xi\right>_{12}\f$ using
+divided differences (see the \ref divideddiffs "next section") and use
+Clenshaw summation to evaluate the sum (see the \ref dividedclenshaw
+"last section").
+
+Here is the series expansion accurate to 10th order, found by the Maxima
+script rhumbarea.mac:
+
+\verbatim
+R[1] = - 1/3 * n
+ + 22/45 * n^2
+ - 356/945 * n^3
+ + 1772/14175 * n^4
+ + 41662/467775 * n^5
+ - 114456994/638512875 * n^6
+ + 258618446/1915538625 * n^7
+ - 1053168268/37574026875 * n^8
+ - 9127715873002/194896477400625 * n^9
+ + 33380126058386/656284056553125 * n^10;
+R[2] = - 2/15 * n^2
+ + 106/315 * n^3
+ - 1747/4725 * n^4
+ + 18118/155925 * n^5
+ + 51304574/212837625 * n^6
+ - 248174686/638512875 * n^7
+ + 2800191349/14801889375 * n^8
+ + 10890707749202/64965492466875 * n^9
+ - 3594078400868794/10719306257034375 * n^10;
+R[3] = - 31/315 * n^3
+ + 104/315 * n^4
+ - 23011/51975 * n^5
+ + 1554472/14189175 * n^6
+ + 114450437/212837625 * n^7
+ - 8934064508/10854718875 * n^8
+ + 4913033737121/21655164155625 * n^9
+ + 591251098891888/714620417135625 * n^10;
+R[4] = - 41/420 * n^4
+ + 274/693 * n^5
+ - 1228489/2027025 * n^6
+ + 3861434/42567525 * n^7
+ + 1788295991/1550674125 * n^8
+ - 215233237178/123743795175 * n^9
+ + 95577582133463/714620417135625 * n^10;
+R[5] = - 668/5775 * n^5
+ + 1092376/2027025 * n^6
+ - 3966679/4343625 * n^7
+ + 359094172/10854718875 * n^8
+ + 7597613999411/3093594879375 * n^9
+ - 378396252233936/102088631019375 * n^10;
+R[6] = - 313076/2027025 * n^6
+ + 4892722/6081075 * n^7
+ - 1234918799/834978375 * n^8
+ - 74958999806/618718975875 * n^9
+ + 48696857431916/9280784638125 * n^10;
+R[7] = - 3189007/14189175 * n^7
+ + 930092876/723647925 * n^8
+ - 522477774212/206239658625 * n^9
+ - 2163049830386/4331032831125 * n^10;
+R[8] = - 673429061/1929727800 * n^8
+ + 16523158892/7638505875 * n^9
+ - 85076917909/18749059875 * n^10;
+R[9] = - 39191022457/68746552875 * n^9
+ + 260863656866/68746552875 * n^10;
+R[10] = - 22228737368/22915517625 * n^10;
+\endverbatim
+
+\section divideddiffs Use of divided differences
+
+Despite our ability to compute latitudes accurately, the way that
+distances enter into the solution involves the ratio
+\f$\mu_{12}/\psi_{12}\f$; the numerical calculation of this term is
+subject to catastrophic round-off errors when \f$\phi_1\f$ and
+\f$\phi_2\f$ are close. A simple solution, suggested by Bennett (1996),
+is to extend the treatment of rhumb lines along parallels to this case,
+i.e., to replace the ratio by the derivative evaluated at the midpoint.
+However this is not entirely satisfactory: you have to pick the
+transition point where the derivative takes over from the ratio of
+differences; and, near this transition point, many bits of accuracy will
+be lost (I estimate that about 1/3 of bits are lost, leading to errors
+on the order of 0.1 mm for double precision). Note too that this
+problem crops up even in the spherical limit.
+
+It turns out that we can do substantially better than this and maintain
+full double precision accuracy. Indeed Botnev and Ustinov provide
+formulas which allow \f$\mu_{12}/\psi_{12}\f$ to be computed accurately
+(but the formula for \f$\mu_{12}\f$ applies only for small flattening).
+
+Here I give a more systematic treatment using the algebra of divided
+differences. Many readers will be already using this technique,
+e.g., when writing, for example,
+\f[
+ \frac{\sin(2x) - \sin(2y)}{x-y} = 2\frac{\sin(x-y)}{x-y}\cos(x+y).
+\f]
+However, Kahan and Fateman (1999) provide an extensive set of rules
+which allow the technique to be applied to a wide range of problems.
+(The classes LambertConformalConic and AlbersEqualArea use this
+technique to improve the accuracy.)
+
+To illustrate the technique, consider the relation between \f$\psi\f$
+and \f$\chi\f$,
+\f[
+ \psi = \sinh^{-1}\tan\chi.
+\f]
+The divided difference operator is defined by
+\f[
+ \Delta[f](x,y) =
+\begin{cases}
+df(x)/dx, & \text{if $x=y$,} \\
+\displaystyle\frac{f(x)-f(y)}{x-y}, & \text{otherwise.}
+\end{cases}
+\f]
+Many of the rules for differentiation apply to divided differences; in
+particular, we can use the chain rule to write
+\f[
+\frac{\psi_1 - \psi_2}{\chi_1 - \chi_2}
+= \Delta[\sinh^{-1}](\tan\chi_1,\tan\chi_2) \times
+ \Delta[\tan](\chi_1,\chi_2).
+\f]
+
+Kahan and Fateman catalog the divided difference formulas for all the
+elementary functions. In this case, we need
+\f[
+\begin{align}
+\Delta[\tan](x,y) &= \frac{\tan(x-y)}{x-y} (1 + \tan x\tan y),\\
+\Delta[\sinh^{-1}](x,y) &= \frac1{x-y}
+\sinh^{-1}\biggl(\frac{(x-y)(x+y)}{x\sqrt{1+y^2}+y\sqrt{1+x^2}}\biggr).
+\end{align}
+\f]
+The crucial point in these formulas is that the right hand sides can be
+evaluated accurately even if \f$x-y\f$ is small. (I've only included
+the basic results here; Kahan and Fateman supplement these with the
+derivatives if \f$x-y\f$ vanishes or the direct ratios if \f$x-y\f$ is
+not small.)
+
+To complete the computation of \f$\mu_{12}/\psi_{12}\f$, we now need
+\f$(\mu_1 - \mu_2)/(\chi_1 - \chi_2)\f$, i.e., we need the divided
+difference of the function that converts the conformal latitude to
+rectifying latitude. We could go through the chain of relations between
+these quantities. However, we can take a short cut and recognize that
+this function was given as a trigonometric series by Krüger (1912)
+in his development of the transverse Mercator projection. This is also
+given by Eqs. (5) and (35) of Karney (2011) with the replacements
+\f$\zeta \rightarrow \mu\f$ and \f$\zeta' \rightarrow \chi\f$. The
+coefficients appearing in this series and the reverted series Eqs. (6)
+and (36) are already computed by the TransverseMercator class. The
+series can be readily converted to divided difference form (see the
+example at the beginning of this section) and Clenshaw summation can be
+used to evaluate it (see below).
+
+The approach of using the series for the transverse Mercator projection
+limits the applicability of the method to \f$\left|f\right|\lt 0.01\f$.
+If we want to extend the method to arbitrary flattening we need to
+compute \f$\Delta[E](x,y;k)\f$. The necessary relation is the "addition
+theorem" for the incomplete elliptic integral of the second kind given
+in http://dlmf.nist.gov/19.11.E2. This can be converted in the
+following divided difference formula
+\f[
+\Delta[E](x,y;k)
+=\begin{cases}
+\sqrt{1 - k^2\sin^2x}, & \text{if $x=y$,} \\
+\displaystyle \frac{E(x,k)-E(y,k)}{x-y}, & \text{if $xy \le0$,}\\
+\displaystyle
+\biggl(\frac{E(z,k)}{\sin z} - k^2 \sin x \sin y\biggr)\frac{\sin z}{x-y},
+&\text{otherwise,}
+\end{cases}
+\f]
+where the angle \f$z\f$ is given by
+\f[
+\begin{align}
+\sin z &= \frac{2t}{1 + t^2},\quad\cos z = \frac{(1-t)(1+t)}{1 + t^2},\\
+t &=
+\frac{(x-y)\Delta[\sin](x,y)}
+{\sin x\sqrt{1 - k^2\sin^2y} + \sin y\sqrt{1 - k^2\sin^2x}}
+\frac{\sin x + \sin y}{\cos x + \cos y}.
+\end{align}
+\f]
+We also need to apply the divided difference formulas to the conversions
+from \f$\phi\f$ to \f$\beta\f$ and \f$\phi\f$ to \f$\psi\f$; but these
+all involve elementary functions and the techniques given in Kahan and
+Fateman can be used.
+
+The end result is that the Rhumb class allows the computation of all
+rhumb lines for any flattening with full double precision accuracy (the
+maximum error is about 10 nanometers). I've kept the implementation
+simple, which results in rather a lot of repeated evaluations of
+quantities. However, in this case, the need for clarity trumps the
+desire for speed.
+
+\section dividedclenshaw Clenshaw evaluation of differenced sums
+
+The use of
+
+Clenshaw summation for summing series of the form,
+\f[
+g(x) = \sum_{k=1}^N c_k \sin kx,
+\f]
+is well established. However when computing divided differences, we are
+interested in evaluating
+\f[
+g(x)-g(y) = \sum_{k=1}^N 2 c_k
+\sin\bigl({\textstyle\frac12}k(x-y)\bigr)
+\cos\bigl({\textstyle\frac12}k(x+y)\bigr).
+\f]
+Clenshaw summation can be used in this case if we simultaneously compute
+\f$g(x)+g(y)\f$ and perform a matrix summation,
+\f[
+\mathsf G(x,y) = \begin{bmatrix}
+(g(x) + g(y)) / 2\\
+(g(x) - g(y)) / (x - y)
+\end{bmatrix} = \sum_{k=1}^N c_k \mathsf F_k(x,y),
+\f]
+where
+\f[
+\mathsf F_k(x,y)=
+\begin{bmatrix}
+ \cos kd \sin kp\\
+ {\displaystyle\frac{\sin kd}d} \cos kp
+\end{bmatrix},
+\f]
+\f$d=\frac12(x-y)\f$, \f$p=\frac12(x+y)\f$, and, in the limit
+\f$d\rightarrow0\f$, \f$(\sin kd)/d \rightarrow k\f$. The first element
+of \f$\mathsf G(x,y)\f$ is the average value of \f$g\f$ and the second
+element, the divided difference, is the average slope. \f$\mathsf
+F_k(x,y)\f$ satisfies the recurrence relation
+\f[
+ \mathsf F_{k+1}(x,y) =
+ \mathsf A(x,y) \mathsf F_k(x,y) - \mathsf F_{k-1}(x,y),
+\f]
+where
+\f[
+ \mathsf A(x,y) = 2\begin{bmatrix}
+ \cos d \cos p & -d\sin d \sin p \\
+- {\displaystyle\frac{\sin d}d} \sin p & \cos d \cos p
+\end{bmatrix},
+\f]
+and \f$\lim_{d\rightarrow0}(\sin d)/d = 1\f$. The standard Clenshaw
+algorithm can now be applied to yield
+\f[
+\begin{align}
+\mathsf B_{N+1} &= \mathsf B_{N+2} = \mathsf 0, \\
+\mathsf B_k &= \mathsf A \mathsf B_{k+1} - \mathsf B_{k+2} +
+c_k \mathsf I, \qquad\text{for $N\ge k \ge 1$},\\
+\mathsf G(x,y) &= \mathsf B_1 \mathsf F_1(x,y),
+\end{align}
+\f]
+where \f$\mathsf B_k\f$ are \f$2\times2\f$ matrices. The divided
+difference \f$\Delta[g](x,y)\f$ is given by the second element of
+\f$\mathsf G(x,y)\f$.
+
+The same basic recursion applies to the more general case,
+\f[
+g(x) = \sum_{k=0}^N c_k \sin\bigl( (k+k_0)x + x_0\bigr).
+\f]
+For example, the sum area arising in the computation of geodesic areas,
+\f[
+\sum_{k=0}^N c_k\cos\bigl((2k+1)\sigma)
+\f]
+is given by \f$x=2\sigma\f$, \f$x_0=\frac12\pi\f$, \f$k_0=\frac12\f$.
+Again we consider the matrix sum,
+\f[
+\mathsf G(x,y) = \begin{bmatrix}
+(g(x) + g(y)) / 2\\
+(g(x) - g(y)) / (x - y)
+\end{bmatrix} = \sum_{k=0}^N c_k \mathsf F_k(x,y),
+\f]
+where
+\f[
+\mathsf F_k(x,y)=
+\begin{bmatrix}
+ \cos\bigl( (k+k_0)d \bigr) \sin \bigl( (k+k_0)p + x_0 \bigr)\\
+ {\displaystyle\frac{\sin\bigl( (k+k_0)d \bigr)}d}
+ \cos \bigl( (k+k_0)p + x_0 \bigr)
+\end{bmatrix}.
+\f]
+The recursion for \f$\mathsf B_k\f$ is identical to the previous case;
+in particular, the expression for \f$\mathsf A(x,y)\f$ remains
+unchanged. The result for the sum is
+\f[
+\mathsf G(x,y) =
+ (c_0\mathsf I - \mathsf B_2) \mathsf F_0(x,y)
+ + \mathsf B_1 \mathsf F_1(x,y).
+\f]
+
+
+Back to \ref jacobi. Forward to \ref greatellipse. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page greatellipse Great Ellipses
+
+
+Back to \ref rhumb. Forward to \ref transversemercator. Up to \ref contents.
+
+
+Great ellipses are sometimes proposed (Williams, 1996; Pallikaris &
+Latsas, 2009) as alternatives to geodesics for the purposes of
+navigation. This is predicated on the assumption that solving the
+geodesic problems is complex and costly. These assumptions are no
+longer true, and geodesics should normally be used in place of great
+ellipses. This is discussed in more detail in \ref gevsgeodesic.
+
+Solutions of the great ellipse problems implemented for MATLAB and
+Octave are provided by
+ - gedoc: briefly describe the routines
+ - gereckon: solve the direct great ellipse problem
+ - gedistance: solve the inverse great ellipse problem
+ .
+At this time, there is C++ support in GeographicLib for great
+ellipses.
+
+References:
+ - P. D. Thomas,
+
+ Mathematical Models for Navigation Systems,
+ TR-182 (U.S. Naval Oceanographic Office, 1965).
+ - B. R. Bowring,
+
+ The direct and inverse solutions for the great elliptic line on the
+ reference ellipsoid, Bull. Geod. 58, 101--108 (1984).
+ - M. A. Earle,
+ A vector solution for navigation on a great ellipse,
+ J. Navigation 53(3), 473--481 (2000).
+ - M. A. Earle,
+
+ Vector solutions for azimuth,
+ J. Navigation 61(3), 537--545 (2008).
+ - C. F. F. Karney,
+
+ Algorithms for geodesics, J. Geodesy 87(1), 43--55 (2013);
+ addenda:
+ geod-addenda.html.
+ - A. Pallikaris & G. Latsas,
+
+ New algorithm for great elliptic sailing (GES),
+ J. Navigation 62(3), 493--507 (2009).
+ - A. Pallikaris, L. Tsoulos, & D. Paradissis,
+ New meridian arc formulas for sailing calculations in navigational
+ GIS, International Hydrographic Review, 24--34 (May 2009).
+ - L. E. Sjöberg,
+
+ Solutions to the direct and inverse navigation problems on the great
+ ellipse, J. Geodetic Science 2(3), 200--205 (2012).
+ - R. Williams,
+
+ The Great Ellipse on the Surface of the Spheroid,
+ J. Navigation 49(2), 229--234 (1996).
+ - T. Vincenty,
+
+ Direct and Inverse Solutions of Geodesics on the Ellipsoid with
+ Application of Nested Equations,
+ Survey Review 23(176), 88--93 (1975).
+ - Wikipedia page,
+ Great ellipse.
+
+Go to
+ - \ref geformulation
+ - \ref gearea
+ - \ref gevsgeodesic
+
+\section geformulation Solution of great ellipse problems
+
+Adopt the usual notation for the ellipsoid: equatorial semi-axis
+\f$a\f$, polar semi-axis \f$b\f$, flattening \f$f = (a-b)/a\f$,
+eccentricity \f$e = \sqrt{f(2-f)}\f$, second eccentricity \f$e' =
+e/(1-f)\f$, and third flattening \f$n=(a-b)/(a+b)=f/(2-f)\f$.
+
+There are several ways in which an ellipsoid can be mapped into a sphere
+converting the great ellipse into a great circle. The simplest ones
+entail scaling the ellipsoid in the \f$\hat z\f$ direction, the
+direction of the axis of rotation, scaling the ellipsoid radially, or a
+combination of the two.
+
+One such combination (scaling by \f$a^2/b\f$ in the \f$\hat z\f$
+direction, following by a radial scaling to the sphere) preserves the
+geographical latitude \f$\phi\f$. This enables a great ellipse to be
+plotted on a chart merely by determining way points on the corresponding
+great circle and transferring them directly on the chart. In this
+exercise the flattening of the ellipsoid can be ignored!
+
+Bowring (1984), Williams (1996), Earle (2000, 2008) and Pallikaris &
+Latsas (2009), scale the ellipsoid radially onto a sphere preserving the
+geocentric latitude \f$\theta\f$. More convenient than this is to scale
+the ellipsoid along \f$\hat z\f$ onto the sphere, as is done by
+Thomas (1965) and Sjöberg (2012), thus preserving the parametric
+latitude \f$\beta\f$. The advantage of this "parametric" mapping is
+that Bessel's rapidly converging series for meridian arc in terms of
+parametric latitude can be used (a possibility that is overlooked by
+Sjöberg).
+
+The full parametric mapping is:
+ - The geographic latitude \f$\phi\f$ on the ellipsoid maps to the
+ parametric latitude \f$\beta\f$ on the sphere,
+ where
+ \f[a\tan\beta = b\tan\phi.\f]
+ - The longitude \f$\lambda\f$ is unchanged.
+ - The azimuth \f$\alpha\f$ on the ellipsoid maps to an azimuth
+ \f$\gamma\f$ on the sphere where
+ \f[
+ \begin{align}
+ \tan\alpha &= \frac{\tan\gamma}{\sqrt{1-e^2\cos^2\beta}}, \\
+ \tan\gamma &= \frac{\tan\alpha}{\sqrt{1+e'^2\cos^2\phi}},
+ \end{align}
+ \f]
+ and the quadrants of \f$\alpha\f$ and \f$\gamma\f$ are the same.
+ - Positions on the great circle of radius \f$a\f$ are parametrized by
+ arc length \f$\sigma\f$ measured from the northward crossing of the
+ equator. The great ellipse has semi-axes \f$a\f$ and
+ \f$b'=a\sqrt{1-e^2\cos^2\gamma_0}\f$, where \f$\gamma_0\f$ is the
+ great-circle azimuth at the northward equator crossing, and
+ \f$\sigma\f$ is the parametric angle on the ellipse. [In contrast,
+ the ellipse giving distances on a geodesic has semi-axes
+ \f$b\sqrt{1+e'^2\cos^2\alpha_0}\f$ and \f$b\f$.]
+ .
+To determine the distance along the ellipse in terms of \f$\sigma\f$ and
+vice versa, the series for distance \f$s\f$ and for \f$\tau\f$ given in
+\ref geodseries can be used. The direct and inverse great ellipse
+problems are now simply solved by mapping the problem to the sphere,
+solving the resulting great circle problem, and mapping this back onto
+the ellipsoid.
+
+\section gearea The area under a great ellipse
+
+The area between the segment of a great ellipse and the equator can be
+found by very similar methods to those used for geodesic areas; see
+ Danielsen
+(1989). The notation here is similar to that employed by
+ Karney
+(2013).
+\f[
+\begin{align}
+S_{12} &= S(\sigma_2) - S(\sigma_1) \\
+S(\sigma) &= c^2\gamma + e^2 a^2 \cos\gamma_0 \sin\gamma_0 I_4(\sigma)\\
+c^2 &= {\textstyle\frac12}\bigl(a^2 + b^2 (\tanh^{-1}e)/e\bigr)
+\end{align}
+\f]
+\f[
+I_4(\sigma) = - \sqrt{1+e'^2}\int
+\frac{r(e'^2) - r(k^2\sin^2\sigma)}{e'^2 - k^2\sin^2\sigma}
+\frac{\sin\sigma}2 \,d\sigma
+\f]
+\f[
+\begin{align}
+k &= e' \cos\gamma_0,\\
+r(x) &= \sqrt{1+x} + (\sinh^{-1}\sqrt x)/\sqrt x.
+\end{align}
+\f]
+Expand in terms of the third flattening of the ellipsoid, \f$n\f$, and the
+third flattening of the great ellipse, \f$\epsilon=(a-b')/(a+b')\f$, by
+substituting
+\f[
+\begin{align}
+e'&=\frac{2\sqrt n}{1-n},\\
+k&=\frac{1+n}{1-n} \frac{2\sqrt{\epsilon}}{1+\epsilon},
+\end{align}
+\f]
+to give
+\f[
+I_4(\sigma) = \sum_{l = 0}^\infty G_{4l}\cos \bigl((2l+1)\sigma\bigr).
+\f]
+Compared to the area under a geodesic, we have
+- \f$\gamma\f$ and \f$\gamma_0\f$ instead of \f$\alpha\f$ and
+ \f$\alpha_0\f$. In both cases, these are azimuths on the auxiliary
+ sphere; however, for the geodesic, they are also the azimuths on the
+ ellipsoid.
+- \f$r(x) = \bigl(1+t(x)\bigr)/\sqrt{1+x}\f$ instead of \f$t(x)\f$ with
+ a balancing factor of \f$\sqrt{1+e'^2}\f$ appearing in front of the
+ integral. These changes are because expressing
+ \f$\sin\phi\,d\lambda\f$ in terms of \f$\sigma\f$ is a little more
+ complicated with great ellipses. (Don't worry about the addition of
+ \f$1\f$ to \f$t(x)\f$; that's immaterial.)
+- the factors involving \f$n\f$ in the expression for \f$k\f$ in terms
+ of \f$\epsilon\f$. This is because \f$k\f$ is defined in terms of
+ \f$e'\f$, whereas it is \f$e\cos\gamma_0\f$ that plays the role of the
+ eccentricity for the great ellipse.
+
+Here is the series expansion accurate to 10th order, found by
+gearea.mac:
+
+\verbatim
+G4[0] = + (1/6 + 7/30 * n + 8/105 * n^2 + 4/315 * n^3 + 16/3465 * n^4 + 20/9009 * n^5 + 8/6435 * n^6 + 28/36465 * n^7 + 32/62985 * n^8 + 4/11305 * n^9)
+ - (3/40 + 12/35 * n + 589/840 * n^2 + 1063/1155 * n^3 + 14743/15015 * n^4 + 14899/15015 * n^5 + 254207/255255 * n^6 + 691127/692835 * n^7 + 1614023/1616615 * n^8) * eps
+ + (67/280 + 7081/5040 * n + 5519/1320 * n^2 + 6417449/720720 * n^3 + 708713/45045 * n^4 + 2700154/109395 * n^5 + 519037063/14549535 * n^6 + 78681626/1616615 * n^7) * eps^2
+ - (29597/40320 + 30013/5280 * n + 33759497/1441440 * n^2 + 100611307/1441440 * n^3 + 16639623457/98017920 * n^4 + 3789780779/10581480 * n^5 + 1027832503/1511640 * n^6) * eps^3
+ + (357407/147840 + 19833349/823680 * n + 61890679/480480 * n^2 + 97030756063/196035840 * n^3 + 2853930388817/1862340480 * n^4 + 15123282583393/3724680960 * n^5) * eps^4
+ - (13200233/1537536 + 306285589/2882880 * n + 26279482199/37340160 * n^2 + 3091446335399/931170240 * n^3 + 93089556575647/7449361920 * n^4) * eps^5
+ + (107042267/3294720 + 253176989449/522762240 * n + 57210830762263/14898723840 * n^2 + 641067300459403/29797447680 * n^3) * eps^6
+ - (51544067373/398295040 + 38586720036247/17027112960 * n + 104152290127363/4966241280 * n^2) * eps^7
+ + (369575321823/687964160 + 1721481081751393/158919720960 * n) * eps^8
+ - 10251814360817/4445306880 * eps^9;
+G4[1] = + (1/120 + 4/105 * n + 589/7560 * n^2 + 1063/10395 * n^3 + 14743/135135 * n^4 + 14899/135135 * n^5 + 254207/2297295 * n^6 + 691127/6235515 * n^7 + 1614023/14549535 * n^8) * eps
+ - (53/1680 + 847/4320 * n + 102941/166320 * n^2 + 1991747/1441440 * n^3 + 226409/90090 * n^4 + 3065752/765765 * n^5 + 24256057/4157010 * n^6 + 349229428/43648605 * n^7) * eps^2
+ + (4633/40320 + 315851/332640 * n + 5948333/1441440 * n^2 + 11046565/864864 * n^3 + 9366910279/294053760 * n^4 + 23863367599/349188840 * n^5 + 45824943037/349188840 * n^6) * eps^3
+ - (8021/18480 + 39452953/8648640 * n + 3433618/135135 * n^2 + 29548772933/294053760 * n^3 + 44355142973/139675536 * n^4 + 4771229132843/5587021440 * n^5) * eps^4
+ + (2625577/1537536 + 5439457/247104 * n + 353552588953/2352430080 * n^2 + 405002114215/558702144 * n^3 + 61996934629789/22348085760 * n^4) * eps^5
+ - (91909777/13178880 + 2017395395921/18819440640 * n + 51831652526149/59594895360 * n^2 + 1773086701957889/357569372160 * n^3) * eps^6
+ + (35166639971/1194885120 + 26948019211109/51081338880 * n + 7934238355871/1596291840 * n^2) * eps^7
+ - (131854991623/1031946240 + 312710596037369/119189790720 * n) * eps^8
+ + 842282436291/1481768960 * eps^9;
+G4[2] = + (1/560 + 29/2016 * n + 1027/18480 * n^2 + 203633/1441440 * n^3 + 124051/450450 * n^4 + 1738138/3828825 * n^5 + 98011493/145495350 * n^6 + 4527382/4849845 * n^7) * eps^2
+ - (533/40320 + 14269/110880 * n + 908669/1441440 * n^2 + 15253627/7207200 * n^3 + 910103119/163363200 * n^4 + 2403810527/193993800 * n^5 + 746888717/30630600 * n^6) * eps^3
+ + (2669/36960 + 2443153/2882880 * n + 1024791/200200 * n^2 + 10517570057/490089600 * n^3 + 164668999127/2327925600 * n^4 + 1826633124599/9311702400 * n^5) * eps^4
+ - (5512967/15375360 + 28823749/5765760 * n + 31539382001/871270400 * n^2 + 1699098121381/9311702400 * n^3 + 287618085731/398361600 * n^4) * eps^5
+ + (22684703/13178880 + 25126873327/896163840 * n + 10124249914577/42567782400 * n^2 + 836412216748957/595948953600 * n^3) * eps^6
+ - (3259030001/398295040 + 2610375232847/17027112960 * n + 2121882247763/1418926080 * n^2) * eps^7
+ + (13387413913/343982080 + 939097138279/1135140864 * n) * eps^8
+ - 82722916855/444530688 * eps^9;
+G4[3] = + (5/8064 + 23/3168 * n + 1715/41184 * n^2 + 76061/480480 * n^3 + 812779/1782144 * n^4 + 9661921/8953560 * n^5 + 40072069/18106088 * n^6) * eps^3
+ - (409/59136 + 10211/109824 * n + 46381/73920 * n^2 + 124922951/43563520 * n^3 + 12524132449/1241560320 * n^4 + 30022391821/1022461440 * n^5) * eps^4
+ + (22397/439296 + 302399/384384 * n + 461624513/74680320 * n^2 + 1375058687/41385344 * n^3 + 4805085120841/34763688960 * n^4) * eps^5
+ - (14650421/46126080 + 17533571183/3136573440 * n + 1503945368767/29797447680 * n^2 + 43536234862451/139054755840 * n^3) * eps^6
+ + (5074867067/2788065280 + 479752611137/13243310080 * n + 1228808683449/3310827520 * n^2) * eps^7
+ - (12004715823/1203937280 + 17671119291563/79459860480 * n) * eps^8
+ + 118372499107/2222653440 * eps^9;
+G4[4] = + (7/25344 + 469/109824 * n + 13439/411840 * n^2 + 9282863/56010240 * n^3 + 37558503/59121920 * n^4 + 44204289461/22348085760 * n^5) * eps^4
+ - (5453/1317888 + 58753/823680 * n + 138158857/224040960 * n^2 + 191056103/53209728 * n^3 + 712704605341/44696171520 * n^4) * eps^5
+ + (28213/732160 + 331920271/448081920 * n + 2046013913/283785216 * n^2 + 11489035343/241274880 * n^3) * eps^6
+ - (346326947/1194885120 + 11716182499/1891901440 * n + 860494893431/12770334720 * n^2) * eps^7
+ + (750128501/386979840 + 425425087409/9287516160 * n) * eps^8
+ - 80510858479/6667960320 * eps^9;
+G4[5] = + (21/146432 + 23/8320 * n + 59859/2263040 * n^2 + 452691/2687360 * n^3 + 21458911/26557440 * n^4) * eps^5
+ - (3959/1464320 + 516077/9052160 * n + 51814927/85995520 * n^2 + 15444083489/3611811840 * n^3) * eps^6
+ + (1103391/36208640 + 120920041/171991040 * n + 18522863/2263040 * n^2) * eps^7
+ - (92526613/343982080 + 24477436759/3611811840 * n) * eps^8
+ + 1526273559/740884480 * eps^9;
+G4[6] = + (11/133120 + 1331/696320 * n + 145541/6615040 * n^2 + 46863487/277831680 * n^3) * eps^6
+ - (68079/36208640 + 621093/13230080 * n + 399883/680960 * n^2) * eps^7
+ + (658669/26460160 + 186416197/277831680 * n) * eps^8
+ - 748030679/2963537920 * eps^9;
+G4[7] = + (143/2785280 + 11011/7938048 * n + 972829/52093440 * n^2) * eps^7
+ - (434863/317521920 + 263678129/6667960320 * n) * eps^8
+ + 185257501/8890613760 * eps^9;
+G4[8] = + (715/21168128 + 27313/26148864 * n) * eps^8
+ - 1838551/1778122752 * eps^9;
+G4[9] = + 2431/104595456 * eps^9;
+\endverbatim
+
+\section gevsgeodesic Great ellipses vs geodesics
+
+Some papers advocating the use of great ellipses for navigation exhibit
+a prejudice against the use of geodesics. These excerpts from
+Pallikaris, Tsoulos, & Paradissis (2009) give the flavor
+ - … it is required to adopt realistic accuracy standards in order not
+ only to eliminate the significant errors of the spherical model but
+ also to avoid the exaggerated and unrealistic requirements of sub
+ meter accuracy.
+ - Calculation of shortest sailings paths on the ellipsoid by a geodetic
+ inverse method involve formulas that are much too complex.
+ - Despite the fact that contemporary computers are fast enough to
+ handle more complete geodetic formulas of sub meter accuracy, a basic
+ principle for the design of navigational systems is the avoidance of
+ unnecessary consumption of computing power.
+ .
+This prejudice was probably due to the fact that the most well-known
+algorithms for geodesics, by Vincenty (1975), come with some
+"asterisks":
+ - no derivation was given (although they follow in a straightforward
+ fashion from classic 19th century methods);
+ - the accuracy is "only" 0.5 mm or so, surely good enough for most
+ applications, but still a reason for a user to worry and a spur to
+ numerous studies "validating" the algorithms;
+ - no indication is given for how to extend the series to improve the
+ accuracy;
+ - there was a belief in some quarters (erroneous!) that the Vincenty
+ algorithms could not be used to compute waypoints;
+ - the algorithm for the inverse problem fails to converge for some
+ inputs.
+ .
+These problems meant that users were reluctant to bundle the algorithms
+into a library and treat them as a part of the software infrastructure
+(much as you might regard the computation of \f$\sin x\f$ as a given).
+In particular, I regard the last issue, lack of convergence of the
+inverse solution, as fatal. Even though the problem only arises for
+nearly antipodal points, it means all users of the library must have
+some way to handle this problem.
+
+For these reasons, substitution of a great ellipse for the geodesic
+makes some sense. The solution of the great ellipse is, in principle,
+no more difficult than solving for the great circle and, for paths of
+less then 10000 km, the error in the distance is less than
+13.5 m.
+
+Now (2014), however, the situation has reversed. The algorithms given
+by Karney (2013)—and used in GeographicLib since
+2009—explicitly resolve the issues with Vincenty's algorithm. The
+geodesic problem is conveniently bundled into a library. Users can call
+this with an assurance of an accurate result much as they would when
+evaluating \f$\sin x\f$. On the other hand, great ellipses come with
+their own set of asterisks:
+ - To the extent that they are regarded as approximations to geodesics,
+ the errors need to be quantified, the limits of allowable use
+ documented, etc.
+ - The user is now left with decisions on when to trust the results and
+ to find alternative solutions if necessary.
+ - Even though the great ellipse is no more that 13.5 m longer than
+ a 10000 km geodesic, the path of the great ellipse can deviate
+ from the geodesic by as much as 8.3 km. This disqualifies great
+ ellipses from use in congested air corridors where the
+
+ strategic lateral offset procedure is in effect and in any
+ situation which demands coordination in the routes of vessels.
+ - Because geodesics obey the triangle inequality, while great ellipses
+ do not, the solutions for realistic navigational problems, e.g.,
+ determining the time of closest approach of two vessels, are often
+ simpler in terms of geodesics.
+
+To address some other of the objections in the quotes from Pallikaris et
+al. given above:
+ - "exaggerated and unrealistic requirements of sub meter accuracy": The
+ geodesic algorithms allow full double precision accuracy at
+ essentially no cost. This is because Clenshaw summation allows
+ additional terms to be added to the series without the need for
+ addition trigonometric evaluations. Full accuracy is important to
+ maintain because it allows the results to be used reliably in more
+ complex problems (e.g., in the determination of maritime boundaries).
+ - "unnecessary consumption of computing power": The solution of the
+ inverse geodesic problem takes 2.3 μs; multiple points on a
+ geodesic can be computed at a rate of one point per 0.4 μs.
+ The actual power consumed in these calculations is minuscule compared
+ to the power needed to drive the display of a navigational computer.
+ - "formulas that are much too complex": There's no question that the
+ solution of the geodesic problem is more complex than for great
+ ellipses. However this complexity is only an issue when
+ implementing the algorithms. For the end user,
+ navigational software employing geodesics is less complex
+ compared with that employing great ellipses. Here is what the user
+ needs to know about the geodesic solution:
+
"The shortest path is found."
+ And here is the corresponding documentation for great ellipses:
+
"A path which closely approximates the shortest path is
+ found. Provided that the distance is less than 10000 km, the
+ error in distance is no more than 14 m and the deviation the
+ route from that of the shortest path is no more than 9 km.
+ These bounds apply to the WGS84 ellipsoid. The deviation of the path
+ means that it should be used with caution when planning routes. In
+ addition, great ellipses do not obey the triangle inequality; this
+ disqualifies them from use in some applications."
+
+Having all the geodesic functions bundled up into a reliable "black box"
+enables users to concentrate on how to solve problems using geodesics
+(instead of figuring out how to solve for the geodesics). A wide range
+of problems (intersection of paths, the path for an interception, the
+time of closest approach, median lines, tri-points, etc.) are all
+amenable to simple and fast solutions in terms of geodesics.
+
+
+Back to \ref rhumb. Forward to \ref transversemercator. Up to \ref contents.
+
+Back to \ref greatellipse. Forward to \ref geocentric. Up to \ref contents.
+
+
+TransverseMercator and TransverseMercatorExact provide accurate
+implementations of the transverse Mercator projection. The
+TransverseMercatorProj
+utility provides an interface to these classes.
+
+Go to
+ - \ref testmerc
+ - \ref tmseries
+ - \ref tmfigures
+
+References:
+ - L. Krüger,
+ Konforme
+ Abbildung des Erdellipsoids in der Ebene (Conformal mapping of
+ the ellipsoidal earth to the plane), Royal Prussian Geodetic Institute,
+ New Series 52, 172 pp. (1912).
+ - L. P. Lee,
+ Conformal Projections Based on Elliptic Functions,
+ (B. V. Gutsell, Toronto, 1976), 128pp.,
+ ISBN: 0919870163
+ (Also appeared as:
+ Monograph 16, Suppl. No. 1 to Canadian Cartographer, Vol 13).
+ Part V, pp. 67--101,
+ Conformal
+ Projections Based On Jacobian Elliptic Functions.
+ - C. F. F. Karney,
+
+ Transverse Mercator with an accuracy of a few nanometers,
+ J. Geodesy 85(8), 475--485 (Aug. 2011);
+ addenda:
+ tm-addenda.html;
+ preprint:
+ arXiv:1002.1417;
+ resource page:
+ tm.html.
+ .
+The algorithm for TransverseMercator is based on
+Krüger (1912); that for TransverseMercatorExact is
+based on Lee (1976).
+
+See tm-grid.kmz, for an
+illustration of the exact transverse Mercator grid in Google Earth.
+
+\section testmerc Test data for the transverse Mercator projection
+
+A test set for the transverse Mercator projection is available at
+ -
+ TMcoords.dat.gz
+ - C. F. F. Karney, Test data for the transverse Mercator projection
+ (2009),
+ DOI:
+ 10.5281/zenodo.32470.
+ .
+This is about 17 MB (compressed). This test set consists of a set of
+geographic coordinates together with the corresponding transverse
+Mercator coordinates. The WGS84 ellipsoid is used, with central
+meridian 0°, central scale factor 0.9996 (the UTM value),
+false easting = false northing = 0 m.
+
+Each line of the test set gives 6 space delimited numbers
+ - latitude (degrees, exact)
+ - longitude (degrees, exact — see below)
+ - easting (meters, accurate to 0.1 pm)
+ - northing (meters, accurate to 0.1 pm)
+ - meridian convergence (degrees, accurate to 10−18 deg)
+ - scale (accurate to 10−20)
+ .
+The latitude and longitude are all multiples of 10−12
+deg and should be regarded as exact, except that longitude =
+82.63627282416406551 should be interpreted as exactly (1 − \e e)
+90°. These results are computed using Lee's formulas with
+Maxima's
+bfloats and fpprec set to 80 (so the errors in the data are probably 1/2
+of the values quoted above). The Maxima code,
+tm.mac and ellint.mac,
+was used to prepare this data set is included in the distribution; you
+will need to have Maxima installed to use this code. The comments at
+the top of tm.mac illustrate how to run it.
+
+The contents of the file are as follows:
+ - 250000 entries randomly distributed in lat in [0°, 90°], lon
+ in [0°, 90°];
+ - 1000 entries randomly distributed on lat in [0°, 90°], lon =
+ 0°;
+ - 1000 entries randomly distributed on lat = 0°, lon in [0°,
+ 90°];
+ - 1000 entries randomly distributed on lat in [0°, 90°], lon =
+ 90°;
+ - 1000 entries close to lat = 90° with lon in [0°, 90°];
+ - 1000 entries close to lat = 0°, lon = 0° with lat ≥
+ 0°, lon ≥ 0°;
+ - 1000 entries close to lat = 0°, lon = 90° with lat ≥
+ 0°, lon ≤ 90°;
+ - 2000 entries close to lat = 0°, lon = (1 − \e e) 90°
+ with lat ≥ 0°;
+ - 25000 entries randomly distributed in lat in [−89°,
+ 0°], lon in [(1 − \e e) 90°, 90°];
+ - 1000 entries randomly distributed on lat in [−89°, 0°],
+ lon = 90°;
+ - 1000 entries randomly distributed on lat in [−89°, 0°],
+ lon = (1 − \e e) 90°;
+ - 1000 entries close to lat = 0°, lon = 90° (lat < 0°, lon
+ ≤ 90°);
+ - 1000 entries close to lat = 0°, lon = (1 − \e e) 90°
+ (lat < 0°, lon ≤ (1 − \e e) 90°);
+ .
+(a total of 287000 entries). The entries for lat < 0° and
+lon in [(1 − \e e) 90°, 90°] use the "extended"
+domain for the transverse Mercator projection explained in Sec. 5 of
+Karney (2011). The first
+258000 entries have lat ≥ 0° and are suitable for testing
+implementations following the standard convention.
+
+\section tmseries Series approximation for transverse Mercator
+
+Krüger (1912) gives a 4th-order approximation to the transverse
+Mercator projection. This is accurate to about 200 nm (200
+nanometers) within the UTM domain. Here we present the series
+extended to 10th order. By default, TransverseMercator
+uses the 6th-order approximation. The preprocessor macro
+GEOGRAPHICLIB_TRANSVERSEMERCATOR_ORDER can be used to select an order
+from 4 thru 8. The series expanded to order n30 are
+given in tmseries30.html.
+
+In the formulas below ^ indicates exponentiation (n^3 =
+n*n*n) and / indicates real division (3/5 = 0.6).
+The equations need to be converted to Horner form, but are here left in
+expanded form so that they can be easily truncated to lower order in \e
+n. Some of the integers here are not representable as 32-bit integers
+and will need to be included as 64-bit integers.
+
+\e A in Krüger, p. 12, eq. (5)
+\verbatim
+ A = a/(n + 1) * (1 + 1/4 * n^2
+ + 1/64 * n^4
+ + 1/256 * n^6
+ + 25/16384 * n^8
+ + 49/65536 * n^10);
+\endverbatim
+
+γ in Krüger, p. 21, eq. (41)
+\verbatim
+alpha[1] = 1/2 * n
+ - 2/3 * n^2
+ + 5/16 * n^3
+ + 41/180 * n^4
+ - 127/288 * n^5
+ + 7891/37800 * n^6
+ + 72161/387072 * n^7
+ - 18975107/50803200 * n^8
+ + 60193001/290304000 * n^9
+ + 134592031/1026432000 * n^10;
+alpha[2] = 13/48 * n^2
+ - 3/5 * n^3
+ + 557/1440 * n^4
+ + 281/630 * n^5
+ - 1983433/1935360 * n^6
+ + 13769/28800 * n^7
+ + 148003883/174182400 * n^8
+ - 705286231/465696000 * n^9
+ + 1703267974087/3218890752000 * n^10;
+alpha[3] = 61/240 * n^3
+ - 103/140 * n^4
+ + 15061/26880 * n^5
+ + 167603/181440 * n^6
+ - 67102379/29030400 * n^7
+ + 79682431/79833600 * n^8
+ + 6304945039/2128896000 * n^9
+ - 6601904925257/1307674368000 * n^10;
+alpha[4] = 49561/161280 * n^4
+ - 179/168 * n^5
+ + 6601661/7257600 * n^6
+ + 97445/49896 * n^7
+ - 40176129013/7664025600 * n^8
+ + 138471097/66528000 * n^9
+ + 48087451385201/5230697472000 * n^10;
+alpha[5] = 34729/80640 * n^5
+ - 3418889/1995840 * n^6
+ + 14644087/9123840 * n^7
+ + 2605413599/622702080 * n^8
+ - 31015475399/2583060480 * n^9
+ + 5820486440369/1307674368000 * n^10;
+alpha[6] = 212378941/319334400 * n^6
+ - 30705481/10378368 * n^7
+ + 175214326799/58118860800 * n^8
+ + 870492877/96096000 * n^9
+ - 1328004581729009/47823519744000 * n^10;
+alpha[7] = 1522256789/1383782400 * n^7
+ - 16759934899/3113510400 * n^8
+ + 1315149374443/221405184000 * n^9
+ + 71809987837451/3629463552000 * n^10;
+alpha[8] = 1424729850961/743921418240 * n^8
+ - 256783708069/25204608000 * n^9
+ + 2468749292989891/203249958912000 * n^10;
+alpha[9] = 21091646195357/6080126976000 * n^9
+ - 67196182138355857/3379030566912000 * n^10;
+alpha[10]= 77911515623232821/12014330904576000 * n^10;
+\endverbatim
+
+β in Krüger, p. 18, eq. (26*)
+\verbatim
+ beta[1] = 1/2 * n
+ - 2/3 * n^2
+ + 37/96 * n^3
+ - 1/360 * n^4
+ - 81/512 * n^5
+ + 96199/604800 * n^6
+ - 5406467/38707200 * n^7
+ + 7944359/67737600 * n^8
+ - 7378753979/97542144000 * n^9
+ + 25123531261/804722688000 * n^10;
+ beta[2] = 1/48 * n^2
+ + 1/15 * n^3
+ - 437/1440 * n^4
+ + 46/105 * n^5
+ - 1118711/3870720 * n^6
+ + 51841/1209600 * n^7
+ + 24749483/348364800 * n^8
+ - 115295683/1397088000 * n^9
+ + 5487737251099/51502252032000 * n^10;
+ beta[3] = 17/480 * n^3
+ - 37/840 * n^4
+ - 209/4480 * n^5
+ + 5569/90720 * n^6
+ + 9261899/58060800 * n^7
+ - 6457463/17740800 * n^8
+ + 2473691167/9289728000 * n^9
+ - 852549456029/20922789888000 * n^10;
+ beta[4] = 4397/161280 * n^4
+ - 11/504 * n^5
+ - 830251/7257600 * n^6
+ + 466511/2494800 * n^7
+ + 324154477/7664025600 * n^8
+ - 937932223/3891888000 * n^9
+ - 89112264211/5230697472000 * n^10;
+ beta[5] = 4583/161280 * n^5
+ - 108847/3991680 * n^6
+ - 8005831/63866880 * n^7
+ + 22894433/124540416 * n^8
+ + 112731569449/557941063680 * n^9
+ - 5391039814733/10461394944000 * n^10;
+ beta[6] = 20648693/638668800 * n^6
+ - 16363163/518918400 * n^7
+ - 2204645983/12915302400 * n^8
+ + 4543317553/18162144000 * n^9
+ + 54894890298749/167382319104000 * n^10;
+ beta[7] = 219941297/5535129600 * n^7
+ - 497323811/12454041600 * n^8
+ - 79431132943/332107776000 * n^9
+ + 4346429528407/12703122432000 * n^10;
+ beta[8] = 191773887257/3719607091200 * n^8
+ - 17822319343/336825216000 * n^9
+ - 497155444501631/1422749712384000 * n^10;
+ beta[9] = 11025641854267/158083301376000 * n^9
+ - 492293158444691/6758061133824000 * n^10;
+ beta[10]= 7028504530429621/72085985427456000 * n^10;
+\endverbatim
+
+The high-order expansions for α and β were produced by the
+Maxima program tmseries.mac (included in the
+distribution). To run, start Maxima and enter
+\verbatim
+ load("tmseries.mac")$
+\endverbatim
+Further instructions are included at the top of the file.
+
+\section tmfigures Figures from paper on transverse Mercator projection
+
+This section gives color versions of the figures in
+ - C. F. F. Karney,
+
+ Transverse Mercator with an accuracy of a few nanometers,
+ J. Geodesy 85(8), 475--485 (Aug. 2011);
+ addenda:
+ tm-addenda.html;
+ preprint:
+ arXiv:1002.1417;
+ resource page:
+ tm.html.
+
+\b NOTE:
+The numbering of the figures matches that in the paper cited above. The
+figures in this section are relatively small in order to allow them to
+be displayed quickly. Vector versions of these figures are available in
+ tm-figs.pdf. This allows you to magnify the
+figures to show the details more clearly.
+
+\image html gauss-schreiber-graticule-a.png "Fig. 1(a)"
+Fig. 1(a):
+The graticule for the spherical transverse Mercator projection.
+The equator lies on \e y = 0.
+Compare this with Lee, Fig. 1 (right), which shows the graticule for
+half a sphere, but note that in his notation \e x and \e y have switched
+meanings. The graticule for the ellipsoid differs from that for a
+sphere only in that the latitude lines have shifted slightly. (The
+conformal transformation from an ellipsoid to a sphere merely relabels
+the lines of latitude.) This projection places the point latitude =
+0°, longitude = 90° at infinity.
+
+\image html gauss-krueger-graticule-a.png "Fig. 1(b)"
+Fig. 1(b):
+The graticule for the Gauss-Krüger transverse Mercator projection.
+The equator lies on \e y = 0 for longitude < 81°; beyond
+this, it arcs up to meet \e y = 1. Compare this with Lee, Fig. 45
+(upper), which shows the graticule for the International Ellipsoid. Lee,
+Fig. 46, shows the graticule for the entire ellipsoid. This projection
+(like the Thompson projection) projects the ellipsoid to a finite area.
+
+\image html thompson-tm-graticule-a.png "Fig. 1(c)"
+Fig. 1(c):
+The graticule for the Thompson transverse Mercator projection. The
+equator lies on \e y = 0 for longitude < 81°; at longitude =
+81°, it turns by 120° and heads for \e y = 1.
+Compare this with Lee, Fig. 43, which shows the graticule for the
+International Ellipsoid. Lee, Fig. 44, shows the graticule for the
+entire ellipsoid. This projection (like the Gauss-Krüger
+projection) projects the ellipsoid to a finite area.
+
+\image html gauss-krueger-error.png "Fig. 2"
+Fig. 2:
+The truncation error for the series for the Gauss-Krüger transverse
+Mercator projection. The blue curves show the truncation error for the
+order of the series \e J = 2 (top) thru \e J = 12 (bottom). The red
+curves show the combined truncation and round-off errors for
+ - float and \e J = 4 (top)
+ - double and \e J = 6 (middle)
+ - long double and \e J = 8 (bottom)
+
+\image html gauss-krueger-graticule.png "Fig. 3(a)"
+Fig. 3(a):
+The graticule for the extended domain. The blue lines show
+latitude and longitude at multiples of 10°. The green lines
+show 1° intervals for longitude in [80°, 90°] and latitude in
+[−5°, 10°].
+
+\image html gauss-krueger-convergence-scale.png "Fig. 3(b)"
+Fig. 3(b):
+The convergence and scale for the Gauss-Krüger
+transverse Mercator projection in the extended domain. The blue lines
+emanating from the top left corner (the north pole) are lines of
+constant convergence. Convergence = 0° is given by the
+dog-legged line joining the points (0,1), (0,0), (1.71,0),
+(1.71,−∞).
+Convergence = 90° is given by the line y = 1. The other
+lines show multiples of 10° between 0° and
+90°. The other blue, the green and the black lines show
+scale = 1 thru 2 at intervals of 0.1, 2 thru 15 at intervals of 1, and
+15 thru 35 at intervals of 5. Multiples of 5 are shown in black,
+multiples of 1 are shown in blue, and the rest are shown in green.
+Scale = 1 is given by the line segment (0,0) to (0,1). The red line
+shows the equator between lon = 81° and 90°. The
+scale and convergence at the branch point are 1/\e e = 10 and
+0°, respectively.
+
+\image html thompson-tm-graticule.png "Fig. 3(c)"
+Fig. 3(c):
+The graticule for the Thompson transverse Mercator
+projection for the extended domain. The range of the projection is the
+rectangular region shown
+ - 0 ≤ \e u ≤ K(e2),
+ 0 ≤ \e v ≤ K(1 − e2)
+ .
+The coloring of the lines is the same as Fig. 3(a), except that latitude
+lines extended down to −10° and a red line has been added
+showing the line \e y = 0 for \e x > 1.71 in the Gauss-Krüger
+projection (Fig. 3(a)). The extended Thompson projection figure has
+reflection symmetry on all the four sides of Fig. 3(c).
+
+
+Back to \ref greatellipse. Forward to \ref geocentric. Up to \ref contents.
+
+Back to \ref transversemercator. Forward to \ref auxlat. Up to \ref contents.
+
+
+The implementation of Geocentric::Reverse is adapted from
+ - H. Vermeille,
+
+ Direct transformation from geocentric coordinates to geodetic
+ coordinates, J. Geodesy 76, 451--454 (2002).
+
+This provides a closed-form solution but can't directly be applied close to
+the center of the earth. Several changes have been made to remove this
+restriction and to improve the numerical accuracy. Now the method is
+accurate for all inputs (even if \e h is infinite). The changes are
+described in Appendix B of
+ - C. F. F. Karney,
+ Geodesics
+ on an ellipsoid of revolution,
+ Feb. 2011; preprint
+ arxiv:1102.1215v1.
+ .
+Vermeille similarly updated his method in
+ - H. Vermeille,
+
+ An analytical method to transform geocentric into
+ geodetic coordinates, J. Geodesy 85, 105--117 (2011).
+
+The problems encountered near the center of the ellipsoid are:
+ - There's a potential division by zero in the definition of \e s. The
+ equations are easily reformulated to avoid this problem.
+ - t3 may be negative. This is OK; we just take the
+ real root.
+ - The solution for \e t may be complex. However this leads to 3 real roots
+ for u/\e r. It's then just a matter of picking the one that computes
+ the geodetic result which minimizes |h| and which avoids large
+ round-off errors.
+ - Some of the equations result in a large loss of accuracy due to
+ subtracting nearly equal quantities. E.g., \e k = sqrt(\e u + \e v +
+ w2) − \e w is inaccurate if \e u + \e v is small;
+ we can fix this by writing \e k = (\e u + \e v)/(sqrt(\e u + \e v +
+ w2) + \e w).
+
+The error is computed as follows. Write a version of
+Geocentric::WGS84.Forward which uses long doubles (including using long
+doubles for the WGS84 parameters). Generate random (long double)
+geodetic coordinates (\e lat0, \e lon0, \e h0) and use the "long double"
+WGS84.Forward to obtain the corresponding (long double) geocentric
+coordinates (\e x0, \e y0, \e z0). [We restrict \e h0 so that \e h0
+≥ − \e a (1 − e2) / sqrt(1 −
+e2 sin2\e lat0), which ensures that (\e
+lat0, \e lon0, \e h0) is the principal geodetic inverse of (\e x0, \e
+y0, \e z0).] Because the forward calculation is numerically stable and
+because long doubles (on Linux systems using g++) provide 11 bits
+additional accuracy (about 3.3 decimal digits), we regard this set of
+test data as exact.
+
+Apply the double version of WGS84.Reverse to (\e x0, \e y0, \e z0) to
+compute the approximate geodetic coordinates (\e lat1, \e lon1, \e h1).
+Convert (\e lat1 − \e lat0, \e lon1 − \e lon0) to a
+distance, \e ds, on the surface of the ellipsoid and define \e err =
+hypot(\e ds, \e h1 − \e h0). For |h0| < 5000 km, we
+have \e err < 7 nm (7 nanometers).
+
+This methodology is not very useful very far from the globe, because the
+absolute errors in the approximate geodetic height become large, or
+within 50 km of the center of the earth, because of errors in
+computing the approximate geodetic latitude. To illustrate the second
+issue, the maximum value of \e err for \e h0 < 0 is about 80 mm.
+The error is maximum close to the circle given by geocentric coordinates
+satisfying hypot(\e x, \e y) = \e a e2 (=
+42.7 km), \e z = 0. (This is the center of meridional curvature
+for \e lat = 0.) The geodetic latitude for these points is \e lat = 0.
+However, if we move 1 nm towards the center of the earth, the
+geodetic latitude becomes 0.04", a distance of 1.4 m from the
+equator. If, instead, we move 1 nm up, the geodetic latitude
+becomes 7.45", a distance of 229 m from the equator. In light of
+this, Reverse does quite well in this vicinity.
+
+To obtain a practical measure of the error for the general case we define
+- errh = |\e h1 − h0| / max(1, \e h0 / \e a)
+- for \e h0 > 0, errout = \e ds
+- for \e h0 < 0, apply the long double version of WGS84.Forward to (\e
+ lat1, \e lon1, \e h1) to give (\e x1, \e y1, \e z1) and compute
+ errin = hypot(\e x1 − \e x0, \e y1 − \e
+ y0, \e z1 − \e z0).
+.
+We then find errh < 8 nm,
+errout < 4 nm, and errin <
+7 nm. (1 nm = 1 nanometer.)
+
+The testing has been confined to the WGS84 ellipsoid. The method will
+work for all ellipsoids used in terrestrial geodesy. However, the
+central region, which leads to multiple real roots for the cubic
+equation in Reverse, pokes outside the ellipsoid (at the poles) for
+ellipsoids with \e e > 1/sqrt(2); Reverse has not been analyzed for this
+case. Similarly ellipsoids which are very nearly spherical may yield
+inaccurate results due to underflow; in the other hand, the case of the
+sphere, \e f = 0, is treated specially and gives accurate results.
+
+Other comparable methods are K. M. Borkowski,
+ Transformation
+of geocentric to geodetic coordinates without approximations,
+Astrophys. Space Sci. 139, 1--4 (1987)
+( erratum)
+and T. Fukushima,
+ Fast transform from
+geocentric to geodetic coordinates, J. Geodesy 73, 603--610 (1999).
+However the choice of independent variables in these methods leads
+to a loss of accuracy for points near the equatorial plane.
+
+
+Back to \ref transversemercator. Forward to \ref auxlat. Up to \ref contents.
+
+Back to \ref geocentric. Forward to \ref highprec. Up to \ref contents.
+
+
+Go to
+ - \ref auxlatformula
+ - \ref auxlattable
+ - \ref auxlaterror
+
+Six latitudes are used by GeographicLib:
+- φ, the (geographic) latitude;
+- β, the parametric latitude;
+- θ, the geocentric latitude;
+- μ, the rectifying latitude;
+- χ, the conformal latitude;
+- ξ, the authalic latitude.
+.
+The last five of these are called auxiliary latitudes. These
+quantities are all defined in the
+
+Wikipedia article on latitudes.
+
+In addition there's the isometric latitude, ψ, defined by ψ =
+gd−1χ = sinh−1 tanχ and
+χ = gdψ = tan−1 sinhψ. This is not an
+angle-like variable (for example, it diverges at the poles) and so we
+don't treat it further here. However conversions between ψ and any
+of the auxiliary latitudes is easily accomplished via an intermediate
+conversion to χ.
+
+The relations between φ, β, and θ are all simple
+elementary functions. The latitudes χ and ξ can be expressed as
+elementary functions of φ; however, these functions can only be
+inverted iteratively. The rectifying latitude μ as a function of
+φ (or β) involves the incomplete elliptic integral of the
+second kind (which is not an elementary function) and this needs to be
+inverted iteratively. The Ellipsoid class evaluates all the auxiliary
+latitudes (and the corresponding inverse relations) in terms of their
+basic definitions.
+
+An alternative method of evaluating these auxiliary latitudes is in
+terms of trigonometric series. This offers some advantages:
+- these series give a uniform way of expressing any latitude in terms of
+ any other latitude;
+- the evaluation may be faster, particularly if
+
+ Clenshaw summation is used;
+- provided that the flattening is sufficiently small, the result may be
+ more accurate.
+
+Here we give the complete matrix of relations between all six latitudes;
+there are 30 (= 6 × 5) such relations. These
+expansions complement the work of
+- O. S. Adams,
+
+ Latitude developments connected with geodesy and cartography,
+ Spec. Pub. 67 (US Coast and Geodetic Survey, 1921).
+- P. Osborne,
+
+ The Mercator Projections (2013), Chap. 5.
+- S. Orihuela,
+
+ Funciones de Latitud (2013).
+.
+Here, the expansions are in terms of the third flattening n =
+(a − b)/(a + b).
+This choice of expansion parameter results in expansions in which half
+the coefficients vanish for all relations between φ, β,
+θ, and μ. In addition, the expansions converge for
+b/a ∈ (0, ∞). These expansions were
+obtained with the the maxima code, auxlat.mac.
+
+Adams (1921) uses the eccentricity squared e2 as the
+expansion parameter, but the resulting series only converge for
+b/a ∈ (0, √2). In addition, it is shown
+in \ref auxlaterror, that the errors when the series are truncated are
+much worse than for the corresponding series in \e n.
+
+\section auxlatformula Series approximations for conversions
+
+Here are the relations between φ, β, θ, and μ carried
+out to 4th order in n:
+\f[
+\begin{align}
+\beta-\phi&=\textstyle{}
+-n\sin 2\phi
++\frac{1}{2}n^{2}\sin 4\phi
+-\frac{1}{3}n^{3}\sin 6\phi
++\frac{1}{4}n^{4}\sin 8\phi
+-\ldots\\
+\phi-\beta&=\textstyle{}
++n\sin 2\beta
++\frac{1}{2}n^{2}\sin 4\beta
++\frac{1}{3}n^{3}\sin 6\beta
++\frac{1}{4}n^{4}\sin 8\beta
++\ldots\\
+\theta-\phi&=\textstyle{}
+-\bigl(2n-2n^{3}\bigr)\sin 2\phi
++\bigl(2n^{2}-4n^{4}\bigr)\sin 4\phi
+-\frac{8}{3}n^{3}\sin 6\phi
++4n^{4}\sin 8\phi
+-\ldots\\
+\phi-\theta&=\textstyle{}
++\bigl(2n-2n^{3}\bigr)\sin 2\theta
++\bigl(2n^{2}-4n^{4}\bigr)\sin 4\theta
++\frac{8}{3}n^{3}\sin 6\theta
++4n^{4}\sin 8\theta
++\ldots\\
+\theta-\beta&=\textstyle{}
+-n\sin 2\beta
++\frac{1}{2}n^{2}\sin 4\beta
+-\frac{1}{3}n^{3}\sin 6\beta
++\frac{1}{4}n^{4}\sin 8\beta
+-\ldots\\
+\beta-\theta&=\textstyle{}
++n\sin 2\theta
++\frac{1}{2}n^{2}\sin 4\theta
++\frac{1}{3}n^{3}\sin 6\theta
++\frac{1}{4}n^{4}\sin 8\theta
++\ldots\\
+\mu-\phi&=\textstyle{}
+-\bigl(\frac{3}{2}n-\frac{9}{16}n^{3}\bigr)\sin 2\phi
++\bigl(\frac{15}{16}n^{2}-\frac{15}{32}n^{4}\bigr)\sin 4\phi
+-\frac{35}{48}n^{3}\sin 6\phi
++\frac{315}{512}n^{4}\sin 8\phi
+-\ldots\\
+\phi-\mu&=\textstyle{}
++\bigl(\frac{3}{2}n-\frac{27}{32}n^{3}\bigr)\sin 2\mu
++\bigl(\frac{21}{16}n^{2}-\frac{55}{32}n^{4}\bigr)\sin 4\mu
++\frac{151}{96}n^{3}\sin 6\mu
++\frac{1097}{512}n^{4}\sin 8\mu
++\ldots\\
+\mu-\beta&=\textstyle{}
+-\bigl(\frac{1}{2}n-\frac{3}{16}n^{3}\bigr)\sin 2\beta
+-\bigl(\frac{1}{16}n^{2}-\frac{1}{32}n^{4}\bigr)\sin 4\beta
+-\frac{1}{48}n^{3}\sin 6\beta
+-\frac{5}{512}n^{4}\sin 8\beta
+-\ldots\\
+\beta-\mu&=\textstyle{}
++\bigl(\frac{1}{2}n-\frac{9}{32}n^{3}\bigr)\sin 2\mu
++\bigl(\frac{5}{16}n^{2}-\frac{37}{96}n^{4}\bigr)\sin 4\mu
++\frac{29}{96}n^{3}\sin 6\mu
++\frac{539}{1536}n^{4}\sin 8\mu
++\ldots\\
+\mu-\theta&=\textstyle{}
++\bigl(\frac{1}{2}n+\frac{13}{16}n^{3}\bigr)\sin 2\theta
+-\bigl(\frac{1}{16}n^{2}-\frac{33}{32}n^{4}\bigr)\sin 4\theta
+-\frac{5}{16}n^{3}\sin 6\theta
+-\frac{261}{512}n^{4}\sin 8\theta
+-\ldots\\
+\theta-\mu&=\textstyle{}
+-\bigl(\frac{1}{2}n+\frac{23}{32}n^{3}\bigr)\sin 2\mu
++\bigl(\frac{5}{16}n^{2}-\frac{5}{96}n^{4}\bigr)\sin 4\mu
++\frac{1}{32}n^{3}\sin 6\mu
++\frac{283}{1536}n^{4}\sin 8\mu
++\ldots\\
+\end{align}
+\f]
+
+Here are the remaining relations (including χ and ξ) carried out
+to 3rd order in n:
+\f[
+\begin{align}
+\chi-\phi&=\textstyle{}
+-\bigl(2n-\frac{2}{3}n^{2}-\frac{4}{3}n^{3}\bigr)\sin 2\phi
++\bigl(\frac{5}{3}n^{2}-\frac{16}{15}n^{3}\bigr)\sin 4\phi
+-\frac{26}{15}n^{3}\sin 6\phi
++\ldots\\
+\phi-\chi&=\textstyle{}
++\bigl(2n-\frac{2}{3}n^{2}-2n^{3}\bigr)\sin 2\chi
++\bigl(\frac{7}{3}n^{2}-\frac{8}{5}n^{3}\bigr)\sin 4\chi
++\frac{56}{15}n^{3}\sin 6\chi
++\ldots\\
+\chi-\beta&=\textstyle{}
+-\bigl(n-\frac{2}{3}n^{2}\bigr)\sin 2\beta
++\bigl(\frac{1}{6}n^{2}-\frac{2}{5}n^{3}\bigr)\sin 4\beta
+-\frac{1}{15}n^{3}\sin 6\beta
++\ldots\\
+\beta-\chi&=\textstyle{}
++\bigl(n-\frac{2}{3}n^{2}-\frac{1}{3}n^{3}\bigr)\sin 2\chi
++\bigl(\frac{5}{6}n^{2}-\frac{14}{15}n^{3}\bigr)\sin 4\chi
++\frac{16}{15}n^{3}\sin 6\chi
++\ldots\\
+\chi-\theta&=\textstyle{}
++\bigl(\frac{2}{3}n^{2}+\frac{2}{3}n^{3}\bigr)\sin 2\theta
+-\bigl(\frac{1}{3}n^{2}-\frac{4}{15}n^{3}\bigr)\sin 4\theta
+-\frac{2}{5}n^{3}\sin 6\theta
+-\ldots\\
+\theta-\chi&=\textstyle{}
+-\bigl(\frac{2}{3}n^{2}+\frac{2}{3}n^{3}\bigr)\sin 2\chi
++\bigl(\frac{1}{3}n^{2}-\frac{4}{15}n^{3}\bigr)\sin 4\chi
++\frac{2}{5}n^{3}\sin 6\chi
++\ldots\\
+\chi-\mu&=\textstyle{}
+-\bigl(\frac{1}{2}n-\frac{2}{3}n^{2}+\frac{37}{96}n^{3}\bigr)\sin 2\mu
+-\bigl(\frac{1}{48}n^{2}+\frac{1}{15}n^{3}\bigr)\sin 4\mu
+-\frac{17}{480}n^{3}\sin 6\mu
+-\ldots\\
+\mu-\chi&=\textstyle{}
++\bigl(\frac{1}{2}n-\frac{2}{3}n^{2}+\frac{5}{16}n^{3}\bigr)\sin 2\chi
++\bigl(\frac{13}{48}n^{2}-\frac{3}{5}n^{3}\bigr)\sin 4\chi
++\frac{61}{240}n^{3}\sin 6\chi
++\ldots\\
+\xi-\phi&=\textstyle{}
+-\bigl(\frac{4}{3}n+\frac{4}{45}n^{2}-\frac{88}{315}n^{3}\bigr)\sin 2\phi
++\bigl(\frac{34}{45}n^{2}+\frac{8}{105}n^{3}\bigr)\sin 4\phi
+-\frac{1532}{2835}n^{3}\sin 6\phi
++\ldots\\
+\phi-\xi&=\textstyle{}
++\bigl(\frac{4}{3}n+\frac{4}{45}n^{2}-\frac{16}{35}n^{3}\bigr)\sin 2\xi
++\bigl(\frac{46}{45}n^{2}+\frac{152}{945}n^{3}\bigr)\sin 4\xi
++\frac{3044}{2835}n^{3}\sin 6\xi
++\ldots\\
+\xi-\beta&=\textstyle{}
+-\bigl(\frac{1}{3}n+\frac{4}{45}n^{2}-\frac{32}{315}n^{3}\bigr)\sin 2\beta
+-\bigl(\frac{7}{90}n^{2}+\frac{4}{315}n^{3}\bigr)\sin 4\beta
+-\frac{83}{2835}n^{3}\sin 6\beta
+-\ldots\\
+\beta-\xi&=\textstyle{}
++\bigl(\frac{1}{3}n+\frac{4}{45}n^{2}-\frac{46}{315}n^{3}\bigr)\sin 2\xi
++\bigl(\frac{17}{90}n^{2}+\frac{68}{945}n^{3}\bigr)\sin 4\xi
++\frac{461}{2835}n^{3}\sin 6\xi
++\ldots\\
+\xi-\theta&=\textstyle{}
++\bigl(\frac{2}{3}n-\frac{4}{45}n^{2}+\frac{62}{105}n^{3}\bigr)\sin 2\theta
++\bigl(\frac{4}{45}n^{2}-\frac{32}{315}n^{3}\bigr)\sin 4\theta
+-\frac{524}{2835}n^{3}\sin 6\theta
+-\ldots\\
+\theta-\xi&=\textstyle{}
+-\bigl(\frac{2}{3}n-\frac{4}{45}n^{2}+\frac{158}{315}n^{3}\bigr)\sin 2\xi
++\bigl(\frac{16}{45}n^{2}-\frac{16}{945}n^{3}\bigr)\sin 4\xi
+-\frac{232}{2835}n^{3}\sin 6\xi
++\ldots\\
+\xi-\mu&=\textstyle{}
++\bigl(\frac{1}{6}n-\frac{4}{45}n^{2}-\frac{817}{10080}n^{3}\bigr)\sin 2\mu
++\bigl(\frac{49}{720}n^{2}-\frac{2}{35}n^{3}\bigr)\sin 4\mu
++\frac{4463}{90720}n^{3}\sin 6\mu
++\ldots\\
+\mu-\xi&=\textstyle{}
+-\bigl(\frac{1}{6}n-\frac{4}{45}n^{2}-\frac{121}{1680}n^{3}\bigr)\sin 2\xi
+-\bigl(\frac{29}{720}n^{2}-\frac{26}{945}n^{3}\bigr)\sin 4\xi
+-\frac{1003}{45360}n^{3}\sin 6\xi
+-\ldots\\
+\xi-\chi&=\textstyle{}
++\bigl(\frac{2}{3}n-\frac{34}{45}n^{2}+\frac{46}{315}n^{3}\bigr)\sin 2\chi
++\bigl(\frac{19}{45}n^{2}-\frac{256}{315}n^{3}\bigr)\sin 4\chi
++\frac{248}{567}n^{3}\sin 6\chi
++\ldots\\
+\chi-\xi&=\textstyle{}
+-\bigl(\frac{2}{3}n-\frac{34}{45}n^{2}+\frac{88}{315}n^{3}\bigr)\sin 2\xi
++\bigl(\frac{1}{45}n^{2}-\frac{184}{945}n^{3}\bigr)\sin 4\xi
+-\frac{106}{2835}n^{3}\sin 6\xi
+-\ldots\\
+\end{align}
+\f]
+
+\section auxlattable Series approximations in tabular form
+
+Finally, this is a listing of all the coefficients for the expansions
+carried out to 8th order in n. Here's how to interpret this
+data: the 5th line for φ − θ is [32/5, 0,
+-32, 0]; this means that the coefficient of sin(10θ) is
+[(32/5)n5 −
+32n7 + O(n9)].
+
χ − ξ:
+ [-2/3, 34/45, -88/315, -2312/14175, 27128/93555, -55271278/212837625, 308365186/1915538625, -17451293242/488462349375]
+ [1/45, -184/945, 6079/14175, -65864/155925, 106691108/638512875, 149984636/1915538625, -101520127208/488462349375]
+ [-106/2835, 772/14175, -14246/467775, 5921152/54729675, -99534832/383107725, 10010741462/37574026875]
+ [-167/9450, -5312/467775, 75594328/638512875, -35573728/273648375, 1615002539/75148053750]
+ [-248/13365, 2837636/638512875, 130601488/1915538625, -3358119706/488462349375]
+ [-34761247/1915538625, -3196/3553875, 46771947158/488462349375]
+ [-2530364/127702575, -18696014/18091198125]
+ [-14744861191/651283132500]
+
+
+\section auxlaterror Truncation errors
+
+There are two sources of error when using these series. The truncation
+error arises from retaing terms up to a certain order in \e n; it is the
+absolute difference between the value of the truncated series compared
+with the exact latitude (evaluated with exact arithmetic). In addition,
+using standard double-precision arithmetic entails accumulating
+round-off errors so that at the end of a complex calculation a few of
+the trailing bits of the result are wrong.
+
+Here's a table of the truncation errors. The errors are given in "units
+in the last place (ulp)" where 1 ulp = 2−53 radian =
+6.4 × 10−15 degree = 2.3 ×
+10−11 arcsecond which is a measure of the round-off
+error for double precision. Here is some rough guidance on how to
+interpret these errors:
+- if the truncation error is less than 1 ulp, then round-off errors
+ dominate;
+- if the truncation error is greater than 8 ulp, then truncation errors
+ dominate;
+- otherwise, round-off and truncation errors are comparable.
+.
+The truncation errors are given accurate to 2 significant figures.
+
+
+
+
Auxiliary latitude truncation errors (ulp)
+
+
expression
+
[f = 1/150, order = 6]
+
[f = 1/297, order = 5]
+
+
n series
e2 series
+
n series
e2 series
+
β − φ
0.0060
28
0.035
41
+
φ − β
0.0060
28
0.035
41
+
θ − φ
2.9
82
6.0
120
+
φ − θ
2.9
82
6.0
120
+
θ − β
0.0060
28
0.035
41
+
β − θ
0.0060
28
0.035
41
+
μ − φ
0.037
41
0.18
60
+
φ − μ
0.98
59
2.3
84
+
μ − β
0.00069
5.8
0.0024
9.6
+
β − μ
0.13
12
0.35
19
+
μ − θ
0.24
30
0.67
40
+
θ − μ
0.099
23
0.23
33
+
χ − φ
0.78
43
2.1
64
+
φ − χ
9.0
71
17
100
+
χ − β
0.018
3.7
0.11
6.4
+
β − χ
1.7
16
3.4
24
+
χ − θ
0.18
31
0.56
43
+
θ − χ
0.87
23
1.9
32
+
χ − μ
0.022
0.56
0.11
0.91
+
μ − χ
0.31
1.2
0.86
2.0
+
ξ − φ
0.015
39
0.086
57
+
φ − ξ
0.34
53
1.1
75
+
ξ − β
0.00042
6.3
0.0039
10
+
β − ξ
0.040
10
0.15
15
+
ξ − θ
0.28
28
0.75
38
+
θ − ξ
0.040
23
0.11
33
+
ξ − μ
0.015
0.79
0.058
1.5
+
μ − ξ
0.0043
0.54
0.018
1.1
+
ξ − χ
0.60
1.9
1.5
3.6
+
χ − ξ
0.023
0.53
0.079
0.92
+
+
+
+\if SKIP
+ 0 beta phi ,0.0060!,28!!!,!0.035!,!41!!!
+ 1 phi beta ,0.0060!,28!!!,!0.035!,!41!!!
+ 2 theta phi ,2.9!!!!,82!!!,!6.0!!!,120!!!
+ 3 phi theta,2.9!!!!,82!!!,!6.0!!!,120!!!
+ 4 theta beta ,0.0060!,28!!!,!0.035!,!41!!!
+ 5 beta theta,0.0060!,28!!!,!0.035!,!41!!!
+ 6 mu phi ,0.037!!,41!!!,!0.18!!,!60!!!
+ 7 phi mu ,0.98!!!,59!!!,!2.3!!!,!84!!!
+ 8 mu beta ,0.00069,!5.8!,!0.0024,!!9.6!
+ 9 beta mu ,0.13!!!,12!!!,!0.35!!,!19!!!
+10 mu theta,0.24!!!,30!!!,!0.67!!,!40!!!
+11 theta mu ,0.099!!,23!!!,!0.23!!,!33!!!
+12 chi phi ,0.78!!!,43!!!,!2.1!!!,!64!!!
+13 phi chi ,9.0!!!!,71!!!,17!!!!!,100!!!
+14 chi beta ,0.018!!,!3.7!,!0.11!!,!!6.4!
+15 beta chi ,1.7!!!!,16!!!,!3.4!!!,!24!!!
+16 chi theta,0.18!!!,31!!!,!0.56!!,!43!!!
+17 theta chi ,0.87!!!,23!!!,!1.9!!!,!32!!!
+18 chi mu ,0.022!!,!0.56,!0.11!!,!!0.91
+19 mu chi ,0.31!!!,!1.2!,!0.86!!,!!2.0!
+20 xi phi ,0.015!!,39!!!,!0.086!,!57!!!
+21 phi xi ,0.34!!!,53!!!,!1.1!!!,!75!!!
+22 xi beta ,0.00042,!6.3!,!0.0039,!10!!!
+23 beta xi ,0.040!!,10!!!,!0.15!!,!15!!!
+24 xi theta,0.28!!!,28!!!,!0.75!!,!38!!!
+25 theta xi ,0.040!!,23!!!,!0.11!!,!33!!!
+26 xi mu ,0.015!!,!0.79,!0.058!,!!1.5!
+27 mu xi ,0.0043!,!0.54,!0.018!,!!1.1!
+28 xi chi ,0.60!!!,!1.9!,!1.5!!!,!!3.6!
+29 chi xi ,0.023!!,!0.53,!0.079!,!!0.92
+\endif
+
+The 2nd and 3rd columns show the results for the SRMmax ellipsoid, \e f
+= 1/150, retaining 6th order terms in the series expansion. The 4th and
+5th columns show the results for the International ellipsoid, \e f =
+1/297, retaining 5th order terms in the series expansion. The 2nd and
+4th columns give the errors for the series expansions in terms of \e n
+given in this section (appropriately truncated). The 3rd and 5th
+columns give the errors when the series are reexpanded in terms of
+e2 = 4\e n/(1 + \e n)2 and truncated
+retaining the e12 and e10 terms
+respectively.
+
+Some observations:
+- For production use, the 6th order series in \e n are recommended. For
+ \e f = 1/150, the resulting errors are close to the round-off limit.
+ The errors in the 6th order series scale as f7; so
+ the errors with \e f = 1/297 are about 120 times smaller.
+- It's inadvisable to use the 5th order series in \e n; this order is
+ barely acceptable for \e f = 1/297 and the errors grow as
+ f6 as \e f is increased.
+- In all cases, the expansions in terms of e2 are
+ considerably less accurate than the corresponding series in \e n.
+- For every series converting between φ and any of θ, μ,
+ χ, or ξ, the series where β is substituted for φ is
+ more accurate. Considering that the transformation between φ and
+ β is so simple, tanβ = (1 - \e f) tanφ, it sometimes
+ makes sense to use β internally as the basic measure of latitude.
+ (This is the case with geodesic calculations.)
+
+
+Back to \ref geocentric. Forward to \ref highprec. Up to \ref contents.
+
+
+**********************************************************************/
+/**
+\page highprec Support for high precision arithmetic
+
+
+Back to \ref auxlat. Forward to \ref changes. Up to \ref contents.
+
+
+One of the goals with the algorithms in GeographicLib is to deliver
+accuracy close to the limits for double precision. In order to develop
+such algorithms it is very useful to be have accurate test data. For
+this purpose, I used Maxima's bfloat capability, which support arbitrary
+precision floating point arithmetic. As of version 1.37, such
+high-precision test data can be generated directly by GeographicLib by
+compiling it with GEOGRAPHICLIB_PRECISION equal to 4 or 5.
+
+Here's what you should know:
+ - This is mainly for use for algorithm developers. It's not
+ recommended for installation for all users on a system.
+ - Configuring with -D GEOGRAPHICLIB_PRECISION=4 gives quad
+ precision (113-bit precision) via boost::multiprecision::float128;
+ this requires:
+ - Boost, version 1.54 or later,
+ - the quadmath library (the package names are libquadmath
+ and libquadmath-devel),
+ - the use of g++.
+ - Configuring with -D GEOGRAPHICLIB_PRECISION=5 gives
+ arbitrary precision via mpfr::mpreal; this requires:
+ - MPFR, version 3.0 or later,
+ - MPFR C++
+ (version 3.6.5, dated 2016-12-19, or later),
+ - a compiler which supports the explicit cast operator (e.g., g++ 4.5
+ or later, Visual Studio 12 2013 or later).
+ - MPFR, MPFR C++, and Boost all come with their own licenses. Be sure
+ to respect these.
+ - The indicated precision is used for all floating point
+ arithmetic. Thus, you can't compare the results of different
+ precisions within a single invocation of a program. Instead, you can
+ create a file of accurate test data at a high precision and use this
+ to test the algorithms at double precision.
+ - With MPFR, the precision should be set (using Utility::set_digits)
+ just once before any other GeographicLib routines are called.
+ Calling this function after other GeographicLib routines will lead to
+ inconsistent results (because the precision of some constants like
+ Math::pi() is set when the functions are first called).
+ - All the \ref utilities call Utility::set_digits() (with no
+ arguments). This causes the precision (in bits) to be determined by
+ the GEOGRAPHICLIB_DIGITS environment variable. If this
+ is not defined the precision is set to 256 bits (about 77 decimal
+ digits).
+ - The accuracy of most calculations should increase as the precision
+ increases (and typically only a few bits of accuracy should be lost).
+ We can distinguish 4 sources of error:
+ - Round-off errors; these are reliably reduced when the precision is
+ increased. For the most part, the algorithms used by GeographicLib
+ are carefully tuned to minimize round-off errors, so that only a
+ few bits of accuracy are lost.
+ - Convergence errors due to not iterating certain algorithms to
+ convergence. However, all iterative methods used by GeographicLib
+ converge quadratically (the number of correct digits doubles on
+ each iteration) so that full convergence is obtained for
+ "reasonable" precisions (no more than, say, 100 decimal digits or
+ about 340 bits). An exception is thrown if the convergence
+ criterion is not met when using high precision arithmetic.
+ - Truncation errors. Some classes (namely, Geodesic and
+ TransverseMercator) use series expansion to approximate the true
+ solution. Additional terms in the series are used for high
+ precision, however there's always a finite truncation error which
+ varies as some power of the flattening. On the other hand,
+ GeodesicExact and TransverseMercatorExact are somewhat slower
+ classes offering the same functionality implemented with
+ EllipticFunction. These classes provide arbitrary accuracy.
+ (However, a caveat is that the evaluation of the area in
+ GeodesicExact still uses a series (albeit of considerably higher
+ order). So the area calculations are always have a finite
+ truncation error.)
+ - Quantization errors. Geoid, GravityModel, and MagneticModel all
+ depend on external data files. The coefficient files for
+ GravityModel and MagneticModel store the coefficients as IEEE
+ doubles (and perhaps these coefficients can be regarded as exact).
+ However, with Geoid, the data files for the geoid heights are
+ quantized at 3mm leading to an irreducible ±1.5mm
+ quantization error. On the other hand, all the physical constants
+ used by GeographicLib, e.g., the flattening of the WGS84 ellipsoid,
+ are evaluated as exact decimal numbers.
+ - Where might high accuracy be important?
+ - checking the truncation error of series approximations;
+ - checking for excessive round-off errors (typically due to subtraction);
+ - checking the round-off error in computing areas of many-sided polygons;
+ - checking the summation of high order spherical harmonic expansions
+ (where underflow and overflow may also be a problem).
+ - Because only a tiny number of people will be interested in using this
+ facility:
+ - the cmake support for the required libraries is rudimentary;
+ - however geographiclib-config.cmake does export
+ GEOGRAPHICLIB_PRECISION and
+ GEOGRAPHICLIB_HIGHPREC_LIBRARIES, the libraries
+ providing the support for high-precision arithmetic;
+ - support for the C++11 mathematical functions and the explicit cast
+ operator is required;
+ - quad precision is only available on Linux;
+ - mpfr has been mostly tested on Linux (but it works on Windows with
+ Visual Studio 12 and MacOS too).
+
+The following steps needed to be taken
+
+ - Phase 1, make sure you can switch easily between double, float, and
+ long double.
+ - use \#include <cmath> instead of \#include
+ <math.h>;
+ - use, e.g., std::sqrt instead of sqrt in
+ header files (similarly for sin, cos,
+ atan2, etc.);
+ - use using namespace std; and plain sqrt,
+ etc., in code files;
+ - express all convergence criteria in terms of\code
+ numeric_limits::epsilon() \endcode
+ etc., instead of using "magic constants", such as 1.0e-15;
+ - use typedef double real; and replace all occurrences of
+ double by real;
+ - write all literals by, e.g., real(0.5). Some
+ constants might need the L suffix, e.g., real f =
+ 1/real(298.257223563L) (but see below);
+ - Change the typedef of real to float or
+ long double, compile, and test. In this way, the
+ library can be run with any of the three basic floating point
+ types.
+ - If you want to run the library with multiple floating point types
+ within a single executable, then make all your classes take a
+ template parameter specifying the floating-point type and
+ instantiate your classes with the floating-point types that you
+ plan to use. I did not take this approach with GeographicLib
+ because double precision is suitable for the vast majority of
+ applications and turning all the classes into templates classes
+ would end up needlessly complicating (and bloating) the library.
+
+ - Phase 2, changes to support arbitrary, but fixed, precision
+ - Use, e.g., \code
+ typedef boost::multiprecision::float128 real; \endcode
+ - Change std::sqrt(...), etc. to \code
+ using std::sqrt;
+ sqrt(...) \endcode
+ (but note that std::max can stay). It's only necessary
+ to do this in header files (code files already have using
+ namespace std;).
+ - In the case of boost's multiprecision numbers, the C++11
+ mathematical functions need special treatment, see Math.hpp.
+ - If necessary, use series with additional terms to improve the
+ accuracy.
+ - Replace slowly converging root finding methods with rapidly
+ converging methods. In particular, the simple iterative method to
+ determine the flattening from the dynamical form factor in
+ NormalGravity converged too slowly; this was replaced by Newton's
+ method.
+ - If necessary, increase the maximum allowed iteration count in root
+ finding loops. Also throw an exception of the maximum iteration
+ count is exceeded.
+ - Write literal constants in a way that works for any precision, e.g.,
+ \code
+ real f = 1/( real(298257223563LL) / 1000000000 ); \endcode
+ [Note that \code
+ real f = 1/( 298 + real(257223563) / 1000000000 ); \endcode
+ and 1/real(298.257223563L) are susceptible to
+ double rounding errors. We normally want to avoid such errors when
+ real is a double.]
+ - For arbitrary constants, you might have to resort to macros \code
+ #if GEOGRAPHICLIB_PRECISION == 1
+ #define REAL(x) x##F
+ #elif GEOGRAPHICLIB_PRECISION == 2
+ #define REAL(x) x
+ #elif GEOGRAPHICLIB_PRECISION == 3
+ #define REAL(x) x##L
+ #elif GEOGRAPHICLIB_PRECISION == 4
+ #define REAL(x) x##Q
+ #else
+ #define REAL(x) real(#x)
+ #endif \endcode
+ and then use \code
+ real f = 1/REAL(298.257223563); \endcode
+ - Perhaps use local static declarations to avoid the overhead of
+ reevaluating constants, e.g., \code
+ static inline real pi() {
+ using std::atan2;
+ // pi is computed just once
+ static const real pi = atan2(real(0), real(-1));
+ return pi;
+ } \endcode
+ This is not necessary for built-in floating point types,
+ since the atan2 function will be evaluated at compile time.
+ - In Utility::readarray and Utility::writearray, arrays of reals were
+ treated as plain old data. This assumption now no longer holds and
+ these functions needed special treatment.
+ - volatile declarations don't apply.
+
+ - Phase 3, changes to support arbitrary precision which can be set at
+ runtime.
+ - The big change now is that the precision is not known at compile
+ time. All static initializations which involve floating point
+ numbers need to be eliminated.
+ - Some static variables (e.g., tolerances which are expressed in
+ terms of numeric_limits<double>\::epsilon())
+ were made member variables and so initialized when the
+ constructor was called.
+ - Some simple static real arrays (e.g., the interpolating stencils
+ for Geoid) were changed into integer arrays.
+ - Some static variables where converted to static functions similar
+ to the definition of pi() above.
+ - All the static instances of classes where converted as follows
+ \code
+ // declaration
+ static const Geodesic WGS84;
+ // definition
+ const Geodesic Geodesic::WGS84(Constants::WGS84_a(),
+ Constants::WGS84_f());
+ // use
+ const Geodesic& geod = Geodesic::WGS84; \endcode
+ becomes \code
+ // declaration
+ static const Geodesic& WGS84();
+ // definition
+ const Geodesic& Geodesic::WGS84() {
+ static const Geodesic wgs84(Constants::WGS84_a(),
+ Constants::WGS84_f());
+ return wgs84;
+ static const Geodesic& WGS84();
+ }
+ // use
+ const Geodesic& geod = Geodesic::WGS84(); \endcode
+ This is the so-called
+
+ "construct on first use idiom". This is the most disruptive
+ of the changes since it requires a different calling convention
+ in user code. However the old static initializations were
+ invoked every time a code linking to GeographicLib was started,
+ even if the objects were not subsequently used. The new method
+ only initializes the static objects if they are used.
+ .
+ - numeric_limits<double>\::digits is no longer a
+ compile-time constant. It becomes
+ numeric_limits<double>\::digits().
+ - Depending on the precision cos(π/2) might be negative.
+ Similarly atan(tan(π/2)) may evaluate to −π/2.
+ GeographicLib already handled this, because this happens with long
+ doubles (64 bits in the fraction).
+ - The precision needs to be set in each thread in a multi-processing
+ applications (for an example, see
+ examples/GeoidToGTX.cpp).
+ - Passing numbers to functions by value incurs a substantially higher
+ overhead than with doubles. This could be avoided by passing such
+ arguments by reference. This was not done here because it
+ would junk up the code to benefit a narrow application.
+ - The constants in GeodesicExact, e.g., 831281402884796906843926125,
+ can't be specified as long doubles nor long longs (since they have
+ more than 64 significant bits):
+ - first tried macro which expanded to a string (see the macro REAL
+ above);
+ - now use inline function to combine two long long ints each with at
+ most 52 significant bits;
+ - also needed to simplify one routine in GeodesicExact which took
+ inordinately long (15 minutes) to compile using g++;
+ - but Visual Studio 12 then complained (with an
+ internal compiler error presumably due to overly aggressive
+ whole-file optimization); fixed by splitting one function into a
+ separate file.
+
+
+Back to \ref auxlat. Forward to \ref changes. Up to \ref contents.
+
+
+List of versions in reverse chronological order together with a brief
+list of changes. (Note: Old versions of the library use a year-month
+style of numbering. Now, the library uses a major and minor version
+number.) Recent versions of GeographicLib are available at
+
+https://sourceforge.net/projects/geographiclib/files/distrib/.
+Older versions are in
+
+https://sourceforge.net/projects/geographiclib/files/distrib/archive/.
+
+The corresponding documentation for these versions is obtained by
+clicking on the “Version m.nn” links below. Some of
+the links in the documentation of older versions may be out of date (in
+particular the links for the source code will not work if the code has
+been migrated to the archive subdirectory). All the releases are
+available as tags “rm.nn” in the the "release" branch
+of the
+
+git repository for GeographicLib.
+
+ - Version 1.49
+ (released 2017-10-05)
+ - Add the Enhanced Magnetic Model 2017, emm2017. This is valid for
+ 2000 thru the end of 2021.
+ - Avoid potential problems with the order of initializations in DMS,
+ GARS, Geohash, Georef, MGRS, OSGB, SphericalEngine; this only would
+ have been an issue if GeographicLib objects were instantiated
+ globally. Now no GeographicLib initialization code should be run
+ prior to the entry of main().
+ - To support the previous fix, add an overload,
+ Utility::lookup(const char* s, char c).
+ - NearestNeighbor::Search throws an error if \e pts is the wrong size
+ (instead of merely returning no results).
+ - Use complex arithmetic for Clenshaw sums in TransverseMercator and
+ tranmerc_{fwd,inv}.m.
+ - Changes in cmake support:
+ - fix compiler flags for GEOGRAPHICLIB_PRECISION = 4;
+ - add CONVERT_WARNINGS_TO_ERRORS option (default OFF), if ON then
+ compiler warnings are treated as errors.
+ - Fix warnings about implicit conversions of doubles to bools in C++,
+ C, and JavaScript packages.
+ - Binary installers for Windows now use Visual Studio 14 2015.
+
+ - Version 1.48
+ (released 2017-04-09)
+ - The "official" URL for GeographicLib is now
+ https://geographiclib.sourceforge.io (instead of
+ http://geographiclib.sourceforge.net).
+ - The default range for longitude and azimuth is now
+ (−180°, 180°], instead of [−180°,
+ 180°). This was already the case for the C++ library; now the
+ change has been made to the other implementations (C, Fortran,
+ Java, JavaScript, Python, MATLAB, and Maxima).
+ - Changes to NearestNeighbor:
+ - fix BUG in reading a NearestNeighbor object from a stream which
+ sometimes incorrectly caused a "Bad index" exception to be
+ thrown;
+ - add NearestNeighbor::operator<<, NearestNeighbor::operator>>,
+ NearestNeighbor::swap, std::swap(GeographicLib::NearestNeighbor&,
+ GeographicLib::NearestNeighbor&);
+ - Additions to the documentation:
+ - add documentation on \ref nearest;
+ - \ref normalgravity documentation is now on its own page and now
+ has an illustrative figure;
+ - document the \ref auxlaterror in the series for auxiliary
+ latitudes.
+ - Fix BUGS in MATLAB function geodreckon with mixed scalar and array
+ arguments.
+ - Workaround bug in math.fmod for Python 2.7 on 32-bit Windows
+ machines.
+ - Changes in cmake support:
+ - add USE_BOOST_FOR_EXAMPLES option (default OFF), if ON search for
+ Boost libraries for building examples;
+ - add APPLE_MULTIPLE_ARCHITECTURES option (default OFF), if ON
+ build for both i386 and x86_64 on Mac OS X systems;
+ - don't add flag for C++11 for g++ 6.0 (since it's not needed).
+ - Fix compiler warnings with Visual Studio 2017 and for the C
+ library.
+
+ - Version 1.47
+ (released 2017-02-15)
+ - Add NearestNeighbor class.
+ - Improve accuracy of area calculation (fixing a flaw introduced in
+ version 1.46); fix applied in Geodesic, GeodesicExact, and the
+ implementations in C, Fortran, Java, JavaScript, Python, MATLAB,
+ and Maxima.
+ - Generalize NormalGravity to allow oblate and prolate ellipsoids.
+ As a consequence a new form of constructor,
+ NormalGravity::NormalGravity, has been introduced and the old
+ form is now deprecated (and because the signatures of the two
+ constructors are similar, the compiler will warn about the use of
+ the old one).
+ - Changes in Math class:
+ - Math::sincosd, Math::sind, Math::cosd only return −0 for
+ the case sin(−0);
+ - Math::atan2d and Math::AngNormalize return results in
+ (−180°, 180°]; this may affect the longitudes and
+ azimuth returned by several other functions.
+ - Add Utility::trim() and Utility::val(); Utility::num() is now
+ deprecated.
+ - Changes in cmake support:
+ - remove support of PACKAGE_PATH and INSTALL_PATH in cmake
+ configuration;
+ - fix to FindGeographicLib.cmake to make it work on Debian systems;
+ - use $ (cmake version ≥ 3.1);
+ - use NAMESPACE for exported targets;
+ - geographiclib-config.cmake exports GEOGRAPHICLIB_DATA,
+ GEOGRAPHICLIB_PRECISION, and GeographicLib_HIGHPREC_LIBRARIES.
+ - Add pkg-config support for cmake and autoconf builds.
+ - Minor fixes:
+ - fix the order of declarations in C library, incorporating the
+ patches in version 1.46.1;
+ - fix the packaging of the Python library, incorporating the
+ patches in version 1.46.3;
+ - restrict junit dependency in the Java package to testing scope
+ (thanks to Mick Killianey);
+ - various behind-the-scenes fixes to EllipticFunction;
+ - fix documentation and default install location for Windows binary
+ installers;
+ - fix clang compiler warnings in GeodesicExactC4 and
+ TransverseMercator.
+
+ - Version 1.46
+ (released 2016-02-15)
+ - The following BUGS have been fixed:
+ - the -w flag to Planimeter(1) was
+ being ignored;
+ - in the Java package, the wrong longitude was being returned with
+ direct geodesic calculation with a negative distance when
+ starting point was at a pole (this bug was introduced in version
+ 1.44);
+ - in the JavaScript package, PolygonArea.TestEdge contained a
+ misspelling of a variable name and other typos (problem found by
+ threepointone).
+ - INCOMPATIBLE CHANGES:
+ - make the -w flag (to swap the default order of latitude and
+ longitude) a toggle for all \ref utilities;
+ - the -a option to GeodSolve(1) now
+ toggles (instead of sets) arc mode;
+ - swap order \e coslon and \e sinlon arguments in CircularEngine
+ class.
+ - Remove deprecated functionality:
+ - remove gradient calculation from the Geoid class and
+ GeoidEval(1) (this was inaccurate
+ and of dubious utility);
+ - remove reciprocal flattening functions, InverseFlattening in many
+ classes and Constants::WGS84_r(); stop treating flattening > 1
+ as the reciprocal flattening in constructors;
+ - remove DMS::Decode(string), DMS::DecodeFraction,
+ EllipticFunction:m, EllipticFunction:m1, Math::extradigits,
+ Math::AngNormalize2, PolygonArea::TestCompute;
+ - stop treating LONG_NOWRAP as an alias for LONG_UNROLL in
+ Geodesic (and related classes) and Rhumb;
+ - stop treating full/schmidt as aliases for FULL/SCHMIDT in
+ SphericalEngine (and related classes);
+ - remove qmake project file src/GeographicLib.pro because QtCreator
+ can handle cmake projects now;
+ - remove deprecated Visual Studio 2005 project and solution files.
+ - Changes to GeodesicLine and GeodesicLineExact classes; these
+ changes (1) simplify the process of computing waypoints on a
+ geodesic given two endpoints and (2) allow a GeodesicLine to be
+ defined which is consistent with the solution of the inverse
+ problem (in particular Geodesic::InverseLine the specification of
+ south-going lines which pass the poles in a westerly direction by
+ setting sin α1 = −0):
+ - the class stores the distance \e s13 and arc length \e a13 to a
+ reference point 3; by default these quantities are NaNs;
+ - GeodesicLine::SetDistance (and GeodesicLine::SetArc) specify the
+ distance (and arc length) to point 3;
+ - GeodesicLine::Distance (and GeodesicLine::Arc) return the
+ distance (and arc length) to point 3;
+ - new methods Geodesic::InverseLine and Geodesic::DirectLine return
+ a GeodesicLine with the reference point 3 defined as point 2 of
+ the corresponding geodesic calculation;
+ - these changes are also included in the C, Java, JavaScript, and
+ Python packages.
+ - Other changes to the geodesic routines:
+ - more accurate solution of the inverse problem when longitude
+ difference is close to 180° (also in C, Fortran, Java,
+ JavaScript, Python, MATLAB, and Maxima packages);
+ - more accurate calculation of lon2 in the inverse calculation with
+ LONG_UNROLL (also in Java, JavaScript, Python packages).
+ - Changes to GeodSolve(1) utility:
+ - the -I and -D options now specify geodesic line calculation via
+ the standard inverse or direct geodesic problems;
+ - rename -l flag to -L to parallel the new -I and -D flags (-l is
+ is retained for backward compatibility but is deprecated),
+ and similarly for RhumbSolve(1);
+ - the -F flag (in conjunction with the -I or -D flags) specifies that
+ distances read on standard input are fractions of \e s13 or \e
+ a13;
+ - the -a option now toggles arc mode (noted above);
+ - the -w option now toggles longitude first mode (noted above).
+ - Changes to Math class:
+ - Math::copysign added;
+ - add overloaded version of Math::AngDiff which returns the error
+ in the difference. This allows a more accurate treatment of
+ inverse geodesic problem when \e lon12 is close to 180°;
+ - Math::AngRound now converts tiny negative numbers to −0
+ (instead of +0), however −0 is still converted to +0.
+ - Add -S and -T options to
+ GeoConvert(1).
+ - Add Sphinx
+ documentation for Python package.
+ - Samples of wrapping the C++ library, so it's accessible in other
+ languages, are given in wrapper/C,
+ wrapper/python, and wrapper/matlab.
+ - Binary installers for Windows now use Visual Studio 12 2013.
+ - Remove top-level pom.xml from release (it was specific to SRI).
+ - A reminder: because of the JavaScript changes introduced in version
+ 1.45, you should remove the following installation directories from
+ your system:
+ - Windows: ${CMAKE_INSTALL_PREFIX}/doc/scripts
+ - Others: ${CMAKE_INSTALL_PREFIX}/share/doc/GeographicLib/scripts
+
+ - Version 1.45
+ (released 2015-09-30)
+ - Fix BUG in solution of inverse geodesic caused by misbehavior of
+ some versions of Visual Studio on Windows (fmod(−0.0, 360.0)
+ returns +0.0 instead of −0.0) and Octave (sind(−0.0)
+ returns +0.0 instead of −0.0). These bugs were exposed
+ because max(−0.0, +0.0) returns −0.0 for some
+ languages.
+ - Geodesic::Inverse now correctly returns NaNs if one of the
+ latitudes is a NaN.
+ - Changes to JavaScript package:
+ - thanks to help from Yurij Mikhalevich, it is a now a
+ node package that can be
+ installed with npm;
+ - make install now installs the node package in
+ lib/node_modules/geographiclib;
+ - add unit tests using mocha;
+ - add documentation via JSDoc;
+ - fix bug Geodesic.GenInverse (this bug, introduced in version
+ 1.44, resulted in the wrong azimuth being reported for points at
+ the pole).
+ - Changes to Java package:
+ - add implementation of ellipsoidal Gnomonic projection (courtesy
+ of Sebastian Mattheis);
+ - add unit tests using JUnit;
+ - Math.toRadians and Math.toDegrees are used instead of
+ GeoMath.degree (which is now removed), as a result…
+ - Java version 1.2 (released 1998-12) or later is now required.
+ - Changes to Python package:
+ - add unit tests using the unittest framework;
+ - fixed bug in normalization of the area.
+ - Changes to MATLAB package:
+ - fix array size mismatch in geoddistance by avoiding calls to
+ subfunctions with zero-length arrays;
+ - fix tranmerc_{fwd,inv} so that they work with arrays and
+ mixed array/scalar arguments;
+ - work around Octave problem which causes mgrs_fwd to return
+ garbage with prec = 10 or 11;
+ - add geographiclib_test.m to run a test suite.
+ - Behavior of substituting 1/\e f for \e f if \e f > 1 is now
+ deprecated. This behavior has been removed from the
+ JavaScript, C, and Python implementations (it was never
+ documented). Maxima, MATLAB, and Fortran implementations never
+ included this behavior.
+ - Other changes:
+ - fix bug, introduced in version 1.42, in the C++ implementation to
+ the computation of area which causes NaNs to be returned in the
+ case of a sphere;
+ - fixed bug, introduced in version 1.44, in the detection of C++11
+ math functions in configure.ac;
+ - throw error on non-convergence in Gnomonic::Reverse if
+ GEOGRAPHICLIB_PRECISION > 3;
+ - add geod_polygon_clear to C library;
+ - turn illegal latitudes into NaNs for Fortran library;
+ - add test suites for the C and Fortran libraries.
+
+ - Version 1.44
+ (released 2015-08-14)
+ - Various changes to improve accuracy, e.g., by minimizing round-off
+ errors:
+ - Add Math::sincosd, Math::sind, Math::cosd which take their
+ arguments in degrees. These functions do exact range reduction
+ and thus they obey exactly the elementary properties of the
+ trigonometric functions, e.g., sin 9° = cos 81° = −
+ sin 123456789°.
+ - Math::AngNormalize now works for any angles, instead of angles in
+ the range [−540°, 540°); the function
+ Math::AngNormalize2 is now deprecated.
+ - This means that there is now no restriction on longitudes and
+ azimuths; any values can be used.
+ - Improve the accuracy of Math::atan2d.
+ - DMS::Decode avoids unnecessary round-off errors; thus 7:33:36 and
+ 7.56 result in identical values. DMS::Encode rounds ties to
+ even. These changes have also been made to DMS.js.
+ - More accurate rounding in MGRS::Reverse and mgrs_inv.m; this
+ change only makes a difference at sub-meter precisions.
+ - With MGRS::Forward and mgrs_fwd.m, ensure that digits in lower
+ precision results match those at higher precision; as a result,
+ strings of trailing 9s are less likely to be generated. This
+ change only makes a difference at sub-meter precisions.
+ - Replace the series for A2 in the Geodesic class
+ with one with smaller truncation errors.
+ - Geodesic::Inverse sets \e s12 to zero for coincident points at
+ pole (instead of returning a tiny quantity).
+ - Math::LatFix returns its argument if it is in [−90°,
+ 90°]; if not, it returns NaN.
+ - Using Math::LatFix, routines which don't check their arguments
+ now interpret a latitude outside the legal range of
+ [−90°, 90°] as a NaN; such routines will return
+ NaNs instead of finite but incorrect results; caution:
+ code that (dangerously) relied on the "reasonable" results being
+ returned for values of the latitude outside the allowed range
+ will now malfunction.
+ - All the \ref utilities accept the -w option to swap the
+ latitude-longitude order on input and output (and where appropriate
+ on the command-line arguments). CartConvert now accepts the -p
+ option to set the precision; now all of the utilities except
+ GeoidEval accept -p.
+ - Add classes for GARS, the Global Area Reference System, and for
+ Georef, the World Geographic Reference System.
+ - Changes to DMS::Decode and DMS.js:
+ - tighten up the rules:
+ - 30:70.0 and 30:60 are illegal (minutes and second must be
+ strictly less than 60), however
+ - 30:60.0 and 30:60. are legal (floating point 60 is OK, since it
+ might have been generated by rounding 59.99…);
+ - generalize a+b concept, introduced in version 1.42, to any number
+ of pieces; thus 8+0:40-0:0:10 is interpreted as 8:39:50.
+ - Documentation fixes:
+ - update man pages to refer to
+ GeoConvert(1) on handling of
+ geographic coordinates;
+ - document limitations of the series used for TransverseMercator;
+ - hide the documentation of the computation of the gradient of the
+ geoid height (now deprecated) in the Geoid class;
+ - warn about the possible misinterpretation of 7.0E+1 by
+ DMS::Decode;
+ - \e swaplatlong optional argument of DMS::DecodeLatLon and
+ various functions in the GeoCoords class is now called \e
+ longfirst;
+ - require Doxygen 1.8.7 or later.
+ - More systematic treatment of version numbers:
+ - Python: \__init\__.py defines \__version\__ and \__version_info\__;
+ - JavaScript:
+ - Math.js defines Constants.version and Constants.version_string;
+ - version number included as comment in packed script
+ geographiclib.js;
+ - geod-calc.html and
+ geod-google.html
+ report the version number;
+ - https://geographiclib.sourceforge.io/scripts/ gives access to
+ earlier versions of geographiclib.js as
+ geographiclib-m.nn.js;
+ - Fortran: add geover subroutine to return version numbers;
+ - Maxima: geodesic.mac defines geod_version;
+ - CGI scripts: these report the version numbers of the utilities.
+ - BUG FIXES:
+ - NormalGravity now works properly for a sphere (\e omega = \e f =
+ \e J2 = 0), instead of returning NaNs (problem found by htallon);
+ - CassiniSoldner::Forward and cassini_fwd.m now returns the correct
+ azimuth for points at the pole.
+ - MATLAB-specific fixes:
+ - mgrs_fwd now treats treats prec > 11 as prec = 11;
+ - illegal letter combinations are now correctly detected by
+ mgrs_inv;
+ - fixed bug where mgrs_inv returned the wrong results for prec = 0
+ strings and center = 0;
+ - mgrs_inv now decodes prec = 11 strings properly;
+ - routines now return array results with the right shape;
+ - routines now properly handle mixed scalar and array arguments.
+ - Add Accumulator::operator*=(T y).
+ - Geohash uses "invalid" instead of "nan" when the latitude or
+ longitude is a nan.
+
+ - Version 1.43
+ (released 2015-05-23)
+ - Add the Enhanced Magnetic Model 2015, emm2015. This is valid for
+ 2000 thru the end of 2019. This required some changes in the
+ MagneticModel and MagneticCircle classes; so this model cannot be
+ used with versions of GeographicLib prior to 1.43.
+ - Fix BLUNDER in PolarStereographic constructor introduced in version
+ 1.42. This affected UTMUPS conversions for UPS which could be
+ incorrect by up to 0.5 km.
+ - Changes in the LONG_NOWRAP option (added in version 1.39) in the
+ Geodesic and GeodesicLine classes:
+ - The option is now called LONG_UNROLL (a less negative sounding
+ term); the original name, LONG_NOWRAP, is retained for backwards
+ compatibility.
+ - There were two bad BUGS in the implementation of this capability:
+ (a) it gave incorrect results for west-going
+ geodesics; (b) the option was ignored if used
+ directly via the GeodesicLine class. The first bug affected the
+ implementations in all languages. The second affected the
+ implementation in C++ (GeodesicLine and GeodesicLineExact),
+ JavaScript, Java, C, Python. These bugs have now been FIXED.
+ - The GeodSolve utility now accepts
+ a -u option, which turns on the LONG_UNROLL treatment. With this
+ option lon1 is reported as entered and
+ lon2 is given such that lon2 −
+ lon1 indicates how often and in what sense the
+ geodesic has encircled the earth. (This option also affects the
+ value of longitude reported when an inverse calculation is run
+ with the -f option.)
+ - The inverse calculation with the JavaScript and Python libraries
+ similarly sets lon1 and lon2 in output
+ dictionary respecting the LONG_UNROLL flag.
+ - The online version of
+ GeodSolve
+ now offers an option to unroll the longitude.
+ - To support these changes DMS::DecodeLatLon no longer reduces the
+ longitude to the range [−180°, 180°) and
+ Math::AngRound now coverts −0 to +0.
+ - Add Math::polyval (also to C, Java, JavaScript, Fortran, Python
+ versions of the library; this is a built-in function for
+ MATLAB/Octave). This evaluates a polynomial using Horner's method.
+ The Maxima-generated code fragments for the evaluation of series in
+ the Geodesic, TransverseMercator, and Rhumb classes and MATLAB
+ routines for great ellipses have been replaced by Maxima-generated
+ arrays of polynomial coefficients which are used as input to
+ Math::polyval.
+ - Add MGRS::Check() to verify that \e a, \e f,
+ kUTM, and kUPS are consistent
+ with the assumptions in the UTMUPS and MGRS classes. This is
+ invoked with GeoConvert \--version. (This function
+ was added to document and check the assumptions used in the UTMUPS
+ and MGRS classes in case they are extended to deal with ellipsoids
+ other than WS84.)
+ - MATLAB function mgrs_inv now takes an optional \e center argument
+ and strips white space from both beginning and end of the string.
+ - Minor internal changes:
+ - GeodSolve sets the geodesic mask so that unnecessary calculations
+ are avoided;
+ - some routines have migrated into a math class for the Python,
+ Java, and JavaScript libraries.
+ - A reminder: because of changes in the installation directories for
+ non-Windows systems introduced in version 1.42, you should remove
+ the following directories from your system:
+ - ${CMAKE_INSTALL_PREFIX}/share/cmake/GeographicLib*
+ - ${CMAKE_INSTALL_PREFIX}/libexec/GeographicLib/matlab
+
+ - Version 1.42
+ (released 2015-04-28)
+ - DMS::Decode allows a single addition or subtraction operation,
+ e.g., 70W+0:0:15. This affects the GeoCoords class and the
+ utilities (which use the DMS class for reading coordinates).
+ - Add Math::norm, Math::AngRound, Math::tand, Math::atan2d,
+ Math::eatanhe, Math::taupf, Math::tauf, Math::fma and remove
+ duplicated (but private) functionality from other classes.
+ - On non-Windows systems, the cmake config-style find_package files
+ are now installed under ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+ instead of ${CMAKE_INSTALL_PREFIX}/share, because the files are
+ architecture-specific. This change will let 32-bit and 64-bit
+ versions coexist on the same machine (in lib and lib64). You
+ should remove the versions in the old "share" location.
+ - MATLAB changes:
+ - provide native MATLAB implementations for compiled interface
+ functions, see \ref matlab;
+ - the compiled MATLAB interface is now deprecated and so the
+ MATLAB_COMPILER option in the cmake build has been removed;
+ - reorganize directories, so that
+ - matlab/geographiclib contains the native matlab code;
+ - matlab/geographiclib-legacy contains wrapper functions to mimic
+ the previous compiled functionality;
+ - the installed MATLAB code mirrors this layout, but the parent
+ installation directory on non-Windows systems is
+ ${CMAKE_INSTALL_PREFIX}/share (instead of
+ ${CMAKE_INSTALL_PREFIX}/libexec), because the files are now
+ architecture independent;
+ - matlab/geographiclib is now packaged and distributed as
+ MATLAB File Exchange package
+
+ 50605 (this supersedes three earlier MATLAB packages);
+ - point fix for geodarea.m to correct bug in area of polygons which
+ encircle a pole multiple times (released as version 1.41.1 of
+ MATLAB File Exchange package 39108, 2014-04-22).
+ - artifactId for Java package changed from GeographicLib to
+ GeographicLib-Java and the package is now deployed to
+ Maven Central (thanks to Chris Bennight for help on this).
+ - Fix autoconf mismatch of version numbers (which were inconsistent
+ in versions 1.40 and 1.41).
+ - Mark the computation of the gradient of the geoid height in the
+ Geoid class and the GeoidEval
+ utility as deprecated.
+ - Work around the boost-quadmath bug with setprecision(0).
+ - Deprecate use of Visual Studio 2005 "-vc8" project files in the
+ windows directory.
+
+ - Version 1.41
+ (released 2015-03-09)
+ - Fix bug in Rhumb::Inverse (with \e exact = true) and related
+ functions which causes the wrong distance to be reported if one of
+ the end points is at a pole. Thanks to Thomas Murray for reporting
+ this.
+ - Add International Geomagnetic Reference Field (12th generation),
+ which approximates the main magnetic field of the earth for the
+ period 1900--2020.
+ - Split information about \ref jacobi to a separate section and
+ include more material.
+
+ - Version 1.40
+ (released 2014-12-18)
+ - Add the World Magnetic Model 2015, wmm2015. This is now the
+ default magnetic model for
+ MagneticField (replacing wmm2010
+ which is valid thru the end of 2014).
+ - Geodesic::Inverse didn't return NaN if one of the longitudes was a
+ NaN (bug introduced in version 1.25). Fixed in the C++, Java,
+ JavaScript, C, Fortran, and Python implementations of the geodesic
+ routines. This bug was not present in the MATLAB version.
+ - Fix bug in Utility::readarray and Utility::writearray which caused
+ an exception in debug mode with zero-sized arrays.
+ - Fix BLUNDER in OSGB::GridReference (found by kalderami) where the
+ wrong result was returned if the easting or northing was negative.
+ - OSGB::GridReference now returns "INVALID" if either coordinate is
+ NaN. Similarly a grid reference starting with "IN" results in NaNs
+ for the coordinates.
+ - Default constructor for GeoCoords corresponds to an undefined
+ position (latitude and longitude = NaN), instead of the north pole.
+ - Add an online version of RhumbSolve
+ at https://geographiclib.sourceforge.io/cgi-bin/RhumbSolve.
+ - Additions to the documentation:
+ - documentation on \ref triaxial-conformal;
+ - a page on \ref auxlat (actually, this was added in version 1.39);
+ - document the use of two single quotes to stand for a double quote
+ in DMS (this feature was introduced in version 1.13).
+ - The MATLAB function, geographiclibinterface, which compiles the
+ wrapper routines for MATLAB now works with MATLAB on a Mac.
+
+ - Version 1.39
+ (released 2014-11-11)
+ - GeographicLib usually normalizes longitudes to the range
+ [−180°, 180°). However, when solving the direct
+ geodesic and rhumb line problems, it is sometimes necessary to know
+ how many lines the line encircled the earth by returning the
+ longitude "unwrapped". So the following changes have been made:
+ - add a LONG_NOWRAP flag to \e mask enums for the \e outmask
+ arguments for Geodesic, GeodesicLine, Rhumb, and RhumbLine;
+ - similar changes have been made to the Python, JavaScript, and
+ Java implementations of the geodesic routines;
+ - for the C, Fortran, and MATLAB implementations the \e arcmode
+ argument to the routines was generalized to allow a combination
+ of ARCMODE and LONG_NOWRAP bits;
+ - the Maxima version now returns the longitude unwrapped.
+ .
+ These changes were necessary to fix the PolygonAreaT::AddEdge (see
+ the next item).
+ - Changes in area calculations:
+ - fix BUG in PolygonAreaT::AddEdge (also in C, Java, JavaScript,
+ and Python implementations) which sometimes causes the wrong area
+ to be returned if the edge spanned more than 180°;
+ - add area calculation to the Rhumb and RhumbLine classes and the
+ RhumbSolve utility (see \ref
+ rhumbarea);
+ - add PolygonAreaRhumb typedef for PolygonAreaT;
+ - add -R option to Planimeter to use
+ PolygonAreaRhumb (and -G option for the default geodesic polygon);
+ - fix BLUNDER in area calculation in MATLAB routine geodreckon;
+ - add area calculation to MATLAB/Octave routines for great ellipses
+ (see \ref gearea).
+ - Fix bad BUG in Geohash::Reverse; this was introduced in version
+ 1.37 and affected all platforms where unsigned longs are 32-bits.
+ Thanks to Christian Csar for reporting and diagnosing this.
+ - Binary installers for Windows are now built with Visual Studio 11
+ 2012 (instead of Visual Studio 10 2010). Compiled MATLAB support
+ still with version 2013a (64-bit).
+ - Update GeographicLib.pro for builds with qmake to include all the
+ source files.
+ - Cmake updates:
+ - include cross-compiling checks in cmake config file;
+ - improve the way unsuitable versions are reported;
+ - include_directories (${GeographicLib_INCLUDE_DIRS}) is no longer
+ necessary with cmake 2.8.11 or later.
+ - legacy/Fortran now includes drop-in replacements for the geodesic
+ utilities from the NGS.
+ - geographiclib-get-{geoids,gravity,magnetic} with no arguments now
+ print the usage instead of loading the minimal sets.
+ - Utility::date(const std::string&, int&, int&, int&) and hence the
+ MagneticField utility accepts
+ the string "now" as a legal time (meaning today).
+
+ - Version 1.38
+ (released 2014-10-02)
+ - On MacOSX, the installed package is relocatable (for cmake version
+ 2.8.12 and later).
+ - On Mac OSX, GeographicLib can be installed using homebrew.
+ - In cmake builds under Windows, set the output directories so that
+ binaries and shared libraries are together.
+ - Accept the minus sign as a synonym for - in DMS.{cpp,js}.
+ - The cmake configuration file geographiclib-depends.cmake has been
+ renamed to geographiclib-targets.cmake.
+ - MATLAB/Octave routines for great ellipses added; see \ref
+ greatellipse.
+ - Provide man pages for geographiclib-get-{geoids,gravity,magnetic}.
+
+ - Version 1.37
+ (released 2014-08-08)
+ - Add \ref highprec.
+ - INCOMPATIBLE CHANGE: the static instantiations of various
+ classes for the WGS84 ellipsoid have been changed to a
+
+ "construct on first use idiom". This avoids a lot of wasteful
+ initialization before the user's code starts. Unfortunately it
+ means that existing source code that relies on any of the following
+ static variables will need to be changed to a function call:
+ - AlbersEqualArea::AzimuthalEqualAreaNorth
+ - AlbersEqualArea::AzimuthalEqualAreaSouth
+ - AlbersEqualArea::CylindricalEqualArea
+ - Ellipsoid::WGS84
+ - Geocentric::WGS84
+ - Geodesic::WGS84
+ - GeodesicExact::WGS84
+ - LambertConformalConic::Mercator
+ - NormalGravity::GRS80
+ - NormalGravity::WGS84
+ - PolarStereographic::UPS
+ - TransverseMercator::UTM
+ - TransverseMercatorExact::UTM
+ .
+ Thus, occurrences of, for example, \code
+ const Geodesic& geod = Geodesic::WGS84; // version 1.36 and earlier
+ \endcode
+ need to be changed to \code
+ const Geodesic& geod = Geodesic::WGS84(); // version 1.37 and later
+ \endcode
+ (note the parentheses!); alternatively use \code
+ // works with all versions
+ const Geodesic geod(Constants::WGS84_a(), Constants::WGS84_a()); \endcode
+ - Incompatible change: the environment variables
+ {GEOID,GRAVITY,MAGNETIC}_{NAME,PATH} are now prefixed
+ with GEOGRAPHICLIB_.
+ - Incompatible change for Windows XP: retire the Windows XP common
+ data path. If you're still using Windows XP, then you might have
+ to move the folder C:\\Documents and Settings\\All
+ Users\\Application Data\\GeographicLib to
+ C:\\ProgramData\\GeographicLib.
+ - All macro names affecting the compilation now start with
+ GEOGRAPHICLIB_; this applies to
+ GEOID_DEFAULT_NAME, GRAVITY_DEFAULT_NAME,
+ MAGNETIC_DEFAULT_NAME, PGM_PIXEL_WIDTH,
+ HAVE_LONG_DOUBLE, STATIC_ASSERT,
+ WORDS_BIGENDIAN.
+ - Changes to PolygonArea:
+ - introduce PolygonAreaT which takes a geodesic class as a parameter;
+ - PolygonArea and PolygonAreaExact are typedef'ed to
+ PolygonAreaT and PolygonAreaT;
+ - add -E option to Planimeter to use
+ PolygonAreaExact;
+ - add -Q option to Planimeter to
+ calculate the area on the authalic sphere.
+ - Add -p option to Planimeter,
+ ConicProj,
+ GeodesicProj,
+ TransverseMercatorProj.
+ - Add Rhumb and RhumbLine classes and the
+ RhumbSolve utility; see \ref rhumb
+ for more information.
+ - Minor changes to NormalGravity:
+ - add NormalGravity::J2ToFlattening and NormalGravity::FlatteningToJ2;
+ - use Newton's method to determine \e f from \e J2;
+ - in constructor, allow \e omega = 0 (i.e., treat the spherical case).
+ - Add grs80 GravityModel, see \ref gravity.
+ - Make geographiclib-get-{geoids,gravity,magnetic} scripts work on MacOS.
+ - Minor changes:
+ - simplify cross-platform support for C++11 mathematical functions;
+ - change way area coefficients are given in GeodesicExact to improve
+ compile times;
+ - enable searching the online documentation;
+ - add macros GEOGRAPHICLIB_VERSION and
+ GEOGRAPHICLIB_VERSION_NUM;
+ - add solution and project files for Visual Studio Express 2010.
+
+ - Version 1.36
+ (released 2014-05-13)
+ - Changes to comply with NGA's prohibition of the use of the
+ upper-case letters N/S to designate the hemisphere when displaying
+ UTM/UPS coordinates:
+ - UTMUPS::DecodeZone allows north/south as hemisphere
+ designators (in addition to n/s);
+ - UTMUPS::EncodeZone now encodes the hemisphere in
+ lower case (to distinguish this use from a grid zone
+ designator);
+ - UTMUPS::EncodeZone takes an optional parameter \e
+ abbrev to indicate whether to use n/s or north/south as the
+ hemisphere designator;
+ - GeoCoords::UTMUPSRepresentation and
+ GeoCoords::AltUTMUPSRepresentation similarly accept
+ the \e abbrev parameter;
+ - GeoConvert uses the
+ flags -a and -l to govern whether UTM/UPS output uses n/s
+ (the -a flag) or north/south (the -l flag) to denote the
+ hemisphere;
+ - Fixed a bug what allowed +3N to be accepted as an alternative UTM
+ zone designation (instead of 3N).
+ .
+ WARNING: The use of lower case n/s for the hemisphere might
+ cause compatibility problems. However DecodeZone has always
+ accepted either case; so the issue will only arise with other
+ software reading the zone information. To avoid possible
+ misinterpretation of the zone designator, consider calling
+ EncodeZone with \e abbrev = false and GeoConvert with -l, so that
+ north/south are used to denote the hemisphere.
+ - MGRS::Forward with \e prec = -1 will produce a grid
+ zone designation. Similarly MGRS::Reverse will
+ decode a grid zone designation (and return \e prec = -1).
+ - Stop using the throw() declaration specification which is
+ deprecated in C++11.
+ - Add missing std:: qualifications to copy in LocalCartesion and
+ Geocentric headers (bug found by Clemens).
+
+ - Version 1.35
+ (released 2014-03-13)
+ - Fix blunder in UTMUPS::EncodeEPSG (found by Ben
+ Adler).
+ - MATLAB wrapper routines geodesic{direct,inverse,line} switch to
+ "exact" routes if |f| > 0.02.
+ - GeodSolve.cgi allows ellipsoid to be set (and uses the -E option
+ for GeodSolve).
+ - Set title in HTML versions of man pages for the \ref utilities.
+ - Changes in cmake support:
+ - add _d to names of executables in debug mode of Visual Studio;
+ - add support for Android (cmake-only), thanks to Pullan Yu;
+ - check CPACK version numbers supplied on command line;
+ - configured version of project-config.cmake.in is
+ project-config.cmake (instead of geographiclib-config.cmake), to
+ prevent find_package incorrectly using this file;
+ - fix tests with multi-line output;
+ - this release includes a file, pom.xml, which is used by an
+ experimental build system (based on maven) at SRI.
+
+ - Version 1.34
+ (released 2013-12-11)
+ - Many changes in cmake support:
+ - minimum version of cmake needed increased to 2.8.4 (which was
+ released in 2011-02);
+ - allow building both shared and static libraries with -D
+ GEOGRAPHICLIB_LIB_TYPE=BOTH;
+ - both shared and static libraries (Release plus Debug) included in
+ binary installer;
+ - find_package uses COMPONENTS and GeographicLib_USE_STATIC_LIBS to
+ select the library to use;
+ - find_package version checking allows nmake and Visual Studio
+ generators to interoperate on Windows;
+ - find_package (GeographicLib …) requires that GeographicLib be
+ capitalized correctly;
+ - on Unix/Linux, don't include the version number in directory for
+ the cmake configuration files;
+ - defaults for GEOGRAPHICLIB_DOCUMENTATION and
+ BUILD_NETGEOGRAPHICLIB are now OFF;
+ - the GEOGRAPHICLIB_EXAMPLES configuration parameter is no longer
+ used; cmake always configures to build the examples, but they are
+ not built by default (instead build targets: exampleprograms and
+ netexamples);
+ - matlab-all target renamed to matlabinterface;
+ - the configuration parameters PACKAGE_PATH and INSTALL_PATH are
+ now deprecated (use CMAKE_INSTALL_PREFIX instead);
+ - on Linux, the installed package is relocatable;
+ - on MacOSX, the installed utilities can find the shared library.
+ - Use a more precise value for OSGB::CentralScale().
+ - Add Arc routines to Python interface.
+ - The Geod utility has been removed; the same functionality lives on
+ with GeodSolve (introduced in
+ version 1.30).
+
+ - Version 1.33
+ (released 2013-10-08)
+ - Add NETGeographic .NET wrapper library
+ (courtesy of Scott Heiman).
+ - Make inspector functions in Ellipsoid const.
+ - Add Accumulator.cpp to instantiate Accumulator.
+ - Defer some of the initialization of OSGB to when it
+ is first called.
+ - Fix bug in autoconf builds under MacOS.
+
+ - Version 1.32
+ (released 2013-07-12)
+ - Generalize C interface for polygon areas to allow vertices to be
+ specified incrementally.
+ - Fix way flags for C++11 support are determined.
+
+ - Version 1.31
+ (released 2013-07-01)
+ - Changes breaking binary compatibility (source compatibility is
+ maintained):
+ - overloaded versions of DMS::Encode,
+ EllipticFunction::EllipticFunction, and
+ GeoCoords::DMSRepresentation, have been eliminated
+ by the use of optional arguments;
+ - correct the declaration of first arg to
+ UTMUPS::DecodeEPSG.
+ - FIX BUG in GravityCircle constructor (found by
+ Mathieu Peyréga) which caused bogus results for the gravity
+ disturbance and gravity anomaly vectors. (This only affected
+ calculations using GravityCircle. GravityModel calculations did
+ not suffer from this bug.)
+ - Improvements to the build:
+ - add macros GEOGRAPHICLIB_VERSION_{MAJOR,MINOR,PATCH} to Config.h;
+ - fix documentation for new version of perlpod;
+ - improving setting of runtime path for Unix-like systems with cmake;
+ - install PDB files when compiling with Visual Studio to aid
+ debugging;
+ - Windows binary release now uses MATLAB R2013a (64-bit) and
+ uses the -largeArrayDims option.
+ - fixes to the way the MATLAB interface routines are built (thanks
+ to Phil Miller and Chris F.).
+ - Changes to the geodesic routines:
+ - add \ref java of the geodesic routines (thanks to Skip Breidbach
+ for the maven support);
+ - FIX BUG: avoid altering input args in Fortran implementation;
+ - more systematic treatment of very short geodesic;
+ - fixes to Python port so that they work with version 3.x, in
+ addition to 2.x (courtesy of Amato);
+ - accumulate the perimeter and area of polygons via a double-wide
+ accumulator in Fortran, C, and MATLAB implementations (this is
+ already included in the other implementations);
+ - port PolygonArea::AddEdge and
+ PolygonArea::TestEdge to JavaScript and Python
+ interfaces;
+ - include documentation on \ref geodshort.
+ - Unix scripts for downloading datasets,
+ geographiclib-get-{geoids,gravity,magnetic}, skip already download
+ models by default, unless the -f flag is given.
+ - FIX BUGS: meridian convergence and scale returned by
+ TransverseMercatorExact was wrong at a pole.
+ - Improve efficiency of MGRS::Forward by avoiding the
+ calculation of the latitude if possible (adapting an idea of Craig
+ Rollins).
+ - Fixes to the way the MATLAB interface routines are built (thanks to
+ Phil Miller and Chris F.).
+
+ - Version 1.30
+ (released 2013-02-27)
+ - Changes to geodesic routines:
+ - FIX BUG in fail-safe mechanisms in Geodesic::Inverse;
+ - the command line utility Geod is now called
+ GeodSolve;
+ - allow addition of polygon edges in PolygonArea;
+ - add full Maxima implementation of geodesic algorithms.
+
+ - Version 1.29
+ (released 2013-01-16)
+ - Changes to allow compilation with libc++ (courtesy of Kal Conley).
+ - Add description of \ref triaxial to documentation.
+ - Update journal reference for "Algorithms for geodesics".
+
+ - Version 1.28
+ (released 2012-12-11)
+ - Changes to geodesic routines:
+ - compute longitude difference exactly;
+ - hence FIX BUG in area calculations for polygons with vertices very
+ close to the prime meridian;
+ - FIX BUG is geoddistance.m where the value of m12 was wrong for
+ meridional geodesics;
+ - add MATLAB implementations of the geodesic projections;
+ - remove unneeded special code for geodesics which start at a pole;
+ - include polygon area routine in C and Fortran implementations;
+ - add doxygen documentation for C and Fortran libraries.
+
+ - Version 1.27
+ (released 2012-11-29)
+ - Changes to geodesic routines:
+ - add native MATLAB implementations: geoddistance.m, geodreckon.m,
+ geodarea.m;
+ - add C and Fortran implementations;
+ - improve the solution of the direct problem so that the series
+ solution is accurate to round off for |f| < 1/50;
+ - tighten up the convergence criteria for solution of the inverse
+ problem;
+ - no longer signal failures of convergence with NaNs (a slightly
+ less accurate answer is returned instead).
+ - Fix DMS::Decode double rounding BUG.
+ - On MacOSX platforms with the cmake configuration, universal
+ binaries are built.
+
+ - Version 1.26
+ (released 2012-10-22)
+ - Replace the series used for geodesic areas by one with better
+ convergence (this only makes an appreciable difference if
+ |f| > 1/150).
+
+ - Version 1.25
+ (released 2012-10-16)
+ - Changes to geodesic calculations:
+ - restart Newton's method in Geodesic::Inverse when it goes awry;
+ - back up Newton's method with the bisection method;
+ - Geodesic::Inverse now converges for any value of \e f;
+ - add GeodesicExact and GeodesicLineExact which are formulated in
+ terms of elliptic integrals and thus yield accurate results even
+ for very eccentric ellipsoids;
+ - the -E option to Geod invokes these
+ exact classes.
+ - Add functionality to EllipticFunction:
+ - add all the traditional elliptic integrals;
+ - remove restrictions on argument range for incomplete elliptic integrals;
+ - allow imaginary modulus for elliptic integrals and elliptic functions;
+ - make interface to the symmetric elliptic integrals public.
+ - Allow Ellipsoid to be copied.
+ - Changes to the build tools:
+ - cmake uses folders in Visual Studio to reduce clutter;
+ - allow precision of reals to be set in cmake;
+ - fail gracefully in the absence of pod documentation tools;
+ - remove support for maintainer tasks in Makefile.mk;
+ - upgrade to automake 1.11.6 to fix the "make distcheck" security
+ vulnerability; see
+ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-3386
+
+ - Version 1.24
+ (released 2012-09-22)
+ - Allow the specification of the hemisphere in UTM coordinates in
+ order to provide continuity across the equator:
+ - add UTMUPS::Transfer;
+ - add GeoCoords::UTMUPSRepresentation(bool, int) and
+ GeoCoords::AltUTMUPSRepresentation(bool, int);
+ - use the hemisphere letter in, e.g.,
+ GeoConvert -u -z 31n.
+ - Add UTMUPS::DecodeEPSG and
+ UTMUPS::EncodeEPSG.
+ - cmake changes:
+ - restore support for cmake 2.4.x;
+ - explicitly check version of doxygen.
+ - Fix building under cygwin.
+ - Document restrictions on \e f in \ref intro.
+ - Fix Python interface to work with version 2.6.x.
+
+ - Version 1.23
+ (released 2012-07-17)
+ - Documentation changes:
+ - remove html documentation from distribution and use web links if
+ doxygen is not available;
+ - use doxygen tags to document exceptions;
+ - begin migrating the documentation to using Greek letters where
+ appropriate (requires doxygen 1.8.1.2 or later).
+ - Add Math::AngNormalize and
+ Math::AngNormalize2; the allowed range for longitudes
+ and azimuths widened to [−540°, 540°).
+ - DMS::Decode understands more unicode symbols.
+ - Geohash uses geohash code "nan" to stand for not a
+ number.
+ - Add Ellipsoid::NormalCurvatureRadius.
+ - Various fixes in LambertConformalConic,
+ TransverseMercator,
+ PolarStereographic, and Ellipsoid to
+ handle reverse projections of points near infinity.
+ - Fix programming blunder in LambertConformalConic::Forward
+ (incorrect results were returned if the tangent latitude was
+ negative).
+
+ - Version 1.22
+ (released 2012-05-27)
+ - Add Geohash and Ellipsoid classes.
+ - FIX BUG in AlbersEqualArea for very prolate
+ ellipsoids (b2 > 2 a2).
+ - cmake changes:
+ - optionally use PACKAGE_PATH and INSTALL_PATH to determine
+ CMAKE_INSTALL_PREFIX;
+ - use COMMON_INSTALL_PATH to determine layout of installation
+ directories;
+ - as a consequence, the installation paths for the documentation,
+ and Python and MATLAB interfaces are shortened for Windows;
+ - zip source distribution now uses DOS line endings;
+ - the tests work in debug mode for Windows;
+ - default setting of GEOGRAPHICLIB_DATA does not depend on
+ CMAKE_INSTALL_PREFIX;
+ - add a cmake configuration for build tree.
+
+ - Version 1.21
+ (released 2012-04-25)
+ - Support colon-separated DMS output:
+ - DMS::Encode and
+ GeoCoords::DMSRepresentation generalized;
+ - GeoConvert and
+ Geod now accept a -: option.
+ - GeoidEval does not print the gradient
+ of the geoid height by default (because it's subject to large
+ errors); give the -g option to get the gradient printed.
+ - Work around optimization BUG in Geodesic::Inverse
+ with tdm mingw g++ version 4.6.1.
+ - autoconf fixed to ensure that that out-of-sources builds work;
+ document this as the preferred method of using autoconf.
+ - cmake tweaks:
+ - simplify the configuration of doxygen;
+ - allow the MATLAB compiler to be specified with the
+ MATLAB_COMPILER option.
+
+ - Version 1.20
+ (released 2012-03-23)
+ - cmake tweaks:
+ - improve find_package's matching of compiler versions;
+ - CMAKE_INSTALL_PREFIX set from CMAKE_PREFIX_PATH if available;
+ - add "x64" to the package name for the 64-bit binary installer;
+ - fix cmake warning with Visual Studio Express.
+ - Fix SphericalEngine to deal with aggressive iterator
+ checking by Visual Studio.
+ - Fix transcription BUG is Geodesic.js.
+
+ - Version 1.19
+ (released 2012-03-13)
+ - Slight improvement in Geodesic::Inverse for very
+ short lines.
+ - Fix argument checking tests in MGRS::Forward.
+ - Add \--comment-delimiter and \--line-separator options to the \ref
+ utilities.
+ - Add installer for 64-bit Windows; the compiled MATLAB interface is
+ supplied with the Windows 64-bit installer only.
+
+ - Version 1.18
+ (released 2012-02-18)
+ - Improve documentation on configuration with cmake.
+ - cmake's find_package ensures that the compiler versions match on Windows.
+ - Improve documentation on compiling MATLAB interface.
+ - Binary installer for Windows installs under C:/pkg-vc10 by default.
+
+ - Version 1.17
+ (released 2012-01-21)
+ - Work around optimization BUG in Geodesic::Inverse
+ with g++ version 4.4.0 (mingw).
+ - Fix BUG in argument checking with OSGB::GridReference.
+ - Fix missing include file in SphericalHarmonic2.
+ - Add simple examples of usage for each class.
+ - Add internal documentation to the cmake configuration files.
+
+ - Version 1.16
+ (released 2011-12-07)
+ - Add calculation of the earth's gravitational field:
+ - add NormalGravity GravityModel and
+ GravityCircle classes;
+ - add command line utility
+ Gravity;
+ - add \ref gravity;
+ - add Constants::WGS84_GM(), Constants::WGS84_omega(), and
+ similarly for GRS80.
+ - Build uses GEOGRAPHICLIB_DATA to specify a common parent directory
+ for geoid, gravity, and magnetic data (instead of
+ GEOGRAPHICLIB_GEOID_PATH, etc.); similarly,
+ GeoidEval,
+ Gravity, and
+ MagneticField, look at the
+ environment variable GEOGRAPHICLIB_DATA to locate the data.
+ - Spherical harmonic software changes:
+ - capitalize enums SphericalHarmonic::FULL and
+ SphericalHarmonic::SCHMIDT (the lower case names
+ are retained but deprecated);
+ - optimize the sum by using a static table of square roots which is
+ updated by SphericalEngine::RootTable;
+ - avoid overflow for high degree models.
+ - Magnetic software fixes:
+ - fix documentation BUG in MagneticModel::Circle;
+ - make MagneticModel constructor explicit;
+ - provide default MagneticCircle constructor;
+ - add additional inspector functions to
+ MagneticCircle;
+ - add -c option to MagneticField;
+ - default height to zero in
+ MagneticField.
+
+ - Version 1.15
+ (released 2011-11-08)
+ - Add calculation of the earth's magnetic field:
+ - add MagneticModel and MagneticCircle
+ classes;
+ - add command line utility
+ MagneticField;
+ - add \ref magnetic;
+ - add \ref magneticinst;
+ - add \ref magneticformat;
+ - add classes SphericalEngine,
+ CircularEngine, SphericalHarmonic,
+ SphericalHarmonic1, and
+ SphericalHarmonic2. which sum spherical harmonic
+ series.
+ - Add Utility class to support I/O and date
+ manipulation.
+ - Cmake configuration includes a _d suffix on the library built in
+ debug mode.
+ - For the Python package, include manifest and readme files; don't
+ install setup.py for non-Windows systems.
+ - Include Doxygen tag file in distribution as doc/html/Geographic.tag.
+
+ - Version 1.14
+ (released 2011-09-30)
+ - Ensure that geographiclib-config.cmake is relocatable.
+ - Allow more unicode symbols to be used in DMS::Decode.
+ - Modify GeoidEval so that it can be
+ used to convert the height datum for LIDAR data.
+ - Modest speed-up of Geodesic::Inverse.
+ - Changes in Python interface:
+ - FIX BUG in transcription of Geodesic::Inverse;
+ - include setup.py for easy installation;
+ - Python only distribution is available at
+ https://pypi.python.org/pypi/geographiclib
+ - Supply a minimal Qt qmake project file for library
+ src/Geographic.pro.
+
+ - Version 1.13
+ (released 2011-08-13)
+ - Changes to I/O:
+ - allow : (colon) to be used as a DMS separator in
+ DMS::Decode(const std::string&, flag&);
+ - also accept Unicode symbols for degrees, minutes, and seconds
+ (coded as UTF-8);
+ - provide optional \e swaplatlong argument to various
+ DMS and GeoCoords functions to make
+ longitude precede latitude;
+ - GeoConvert now has a -w option to
+ make longitude precede latitude on input and output;
+ - include a JavaScript version of DMS.
+ - Slight improvement in starting guess for solution of geographic
+ latitude in terms of conformal latitude in TransverseMercator,
+ TransverseMercatorExact, and LambertConformalConic.
+ - For most classes, get rid of const member variables so that the
+ default copy assignment works.
+ - Put Math and Accumulator in their own
+ header files.
+ - Remove unused "fast" Accumulator method.
+ - Reorganize the \ref python.
+ - Withdraw some deprecated routines.
+ - cmake changes:
+ - include FindGeographic.cmake in distribution;
+ - building with cmake creates and installs
+ geographiclib-config.cmake;
+ - better support for building a shared library under Windows.
+
+ - Version 1.12
+ (released 2011-07-21)
+ - Change license to MIT/X11.
+ - Add PolygonArea class and equivalent MATLAB function.
+ - Provide JavaScript and Python implementations of geodesic routines.
+ - Fix Windows installer to include runtime dlls for MATLAB.
+ - Fix (innocuous) unassigned variable in Geodesic::GenInverse.
+ - Geodesic routines in MATLAB return a12 as first column of aux return
+ value (incompatible change).
+ - A couple of code changes to enable compilation with Visual
+ Studio 2003.
+
+ - Version 1.11
+ (released 2011-06-27)
+ - Changes to Planimeter:
+ - add -l flag to Planimeter for polyline
+ calculations;
+ - trim precision of area to 3 decimal places;
+ - FIX BUG with pole crossing edges (due to compiler optimization).
+ - Geod no longer reports the reduced
+ length by default; however the -f flag still reports this and in
+ addition gives the geodesic scales and the geodesic area.
+ - FIX BUGS (compiler-specific) in inverse geodesic calculations.
+ - FIX BUG: accommodate tellg() returning −1 at end of string.
+ - Change way flattening of the ellipsoid is specified:
+ - constructors take \e f argument which is taken to be the
+ flattening if \e f < 1 and the inverse flattening otherwise
+ (this is a compatible change for spheres and oblate ellipsoids, but it
+ is an INCOMPATIBLE change for prolate ellipsoids);
+ - the -e arguments to the \ref utilities are handled similarly; in
+ addition, simple fractions, e.g., 1/297, can be used for the
+ flattening;
+ - introduce Constants::WGS84_f() for the WGS84
+ flattening (and deprecate Constants::WGS84_r() for the inverse
+ flattening);
+ - most classes have a Flattening() member function;
+ - InverseFlattening() has been deprecated (and now returns inf for a
+ sphere, instead of 0).
+
+ - Version 1.10
+ (released 2011-06-11)
+ - Improvements to MATLAB/Octave interface:
+ - add {geocentric,localcartesian}{forward,reverse};
+ - make geographiclibinterface more general;
+ - install the source for the interface;
+ - cmake compiles the interface if ENABLE_MATLAB=ON;
+ - include compiled interface with Windows binary installer.
+ - Fix various configuration issues
+ - autoconf did not install Config.h;
+ - cmake installed in man/man1 instead of share/man/man1;
+ - cmake did not set the rpath on the tools.
+
+ - Version 1.9
+ (released 2011-05-28)
+ - FIX BUG in area returned by
+ Planimeter for pole encircling polygons.
+ - FIX BUG in error message reported when DMS::Decode reads the string
+ "5d.".
+ - FIX BUG in AlbersEqualArea::Reverse (lon0 not being used).
+ - Ensure that all exceptions thrown in the \ref utilities are caught.
+ - Avoid using catch within DMS.
+ - Move Accumulator class from Planimeter.cpp to
+ Constants.hpp.
+ - Add Math::sq.
+ - Simplify \ref geoidinst
+ - add geographiclib-get-geoids for Unix-like systems;
+ - add installers for Windows.
+ - Provide cmake support:
+ - build binary installer for Windows;
+ - include regression tests;
+ - add \--input-string, \--input-file, \--output-file options to the
+ \ref utilities to support tests.
+ - Rename utility EquidistantTest as
+ GeodesicProj and TransverseMercatorTest as
+ TransverseMercatorProj.
+ - Add ConicProj.
+ - Reverse the initial sense of the -s option for
+ Planimeter.
+ - Migrate source from subversion to git.
+
+ - Version 1.8
+ (released 2011-02-22)
+ - Optionally return rotation matrix from Geocentric and
+ LocalCartesian.
+ - For the \ref utilities, supply man pages, -h prints the synopsis,
+ \--help prints the man page, \--version prints the version.
+ - Use accurate summation in Planimeter.
+ - Add 64-bit targets for Visual Studio 2010.
+ - Use templates for defining math functions and some constants.
+ - Geoid updates
+ - Add Geoid::DefaultGeoidPath and
+ Geoid::DefaultGeoidName;
+ - GeoidEval uses environment variable
+ GEOGRAPHICLIB_GEOID_NAME as the default geoid;
+ - Add \--msltohae and \--haetomsl as
+ GeoidEval options (and don't
+ document the single hyphen versions).
+ - Remove documentation that duplicates papers on transverse Mercator
+ and geodesics.
+
+ - Version 1.7
+ (released 2010-12-21)
+ - FIX BUG in scale returned by LambertConformalConic::Reverse.
+ - Add AlbersEqualArea projection.
+ - Library created by Visual Studio is Geographic.lib instead of
+ GeographicLib.lib (compatible with makefiles).
+ - Make classes NaN aware.
+ - Use cell arrays for MGRS strings in MATLAB.
+ - Add solution/project files for Visual Studio 2010 (32-bit only).
+ - Use C++11 static_assert and math functions, if available.
+
+ - Version 1.6
+ (released 2010-11-23)
+ - FIX BUG introduced in Geoid in version 1.5 (found by
+ Dave Edwards).
+
+ - Version 1.5
+ (released 2010-11-19)
+ - Improve area calculations for small polygons.
+ - Add -s and -r flags to Planimeter.
+ - Improve the accuracy of LambertConformalConic using
+ divided differences.
+ - FIX BUG in meridian convergence returned by
+ LambertConformalConic::Forward.
+ - Add optional threadsafe parameter to Geoid
+ constructor. WARNING: This changes may break binary compatibility
+ with previous versions of GeographicLib. However, the library is
+ source compatible.
+ - Add OSGB.
+ - MATLAB and Octave interfaces to UTMUPS,
+ MGRS, Geoid, Geodesic
+ provided.
+ - Minor changes
+ - explicitly turn on optimization in Visual Studio 2008 projects;
+ - add missing dependencies in some Makefiles;
+ - move pi() and degree() from Constants to
+ Math;
+ - introduce Math::extended type to aid testing;
+ - add Math::epi() and Math::edegree().
+ - fixes to compile under cygwin;
+ - tweak expression used to find latitude from conformal latitude.
+
+ - Version 1.4
+ (released 2010-09-12)
+ - Changes to Geodesic and GeodesicLine:
+ - FIX BUG in Geodesic::Inverse with prolate ellipsoids;
+ - add area computations to Geodesic::Direct and Geodesic::Inverse;
+ - add geodesic areas to geodesic test set;
+ - make GeodesicLine constructor public;
+ - change longitude series in Geodesic into Helmert-like form;
+ - ensure that equatorial geodesics have cos(alpha0) = 0 identically;
+ - generalize interface for Geodesic and GeodesicLine;
+ - split GeodesicLine and Geodesic into different files;
+ - signal convergence failure in Geodesic::Inverse with NaNs;
+ - deprecate one function in Geodesic and two functions in
+ GeodesicLine;
+ - deprecate -n option for Geod.
+ .
+ WARNING: These changes may break binary compatibility with
+ previous versions of GeographicLib. However, the library is
+ source compatible (with the proviso that
+ GeographicLib/GeodesicLine.hpp may now need to be included).
+ - Add the Planimeter utility for
+ computing the areas of geodesic polygons.
+ - Improve iterative solution of Gnomonic::Reverse.
+ - Add Geoid::ConvertHeight.
+ - Add -msltohae, -haetomsl, and -z options to
+ GeoidEval.
+ - Constructors check that minor radius is positive.
+ - Add overloaded Forward and Reverse functions to the projection
+ classes which don't return the convergence (or azimuth) and scale.
+ - Document function parameters and return values consistently.
+
+ - Version 1.3
+ (released 2010-07-21)
+ - Add Gnomonic, the ellipsoid generalization of the
+ gnomonic projection.
+ - Add -g and -e options to
+ EquidistantTest.
+ - Use fixed-point notation for output from
+ CartConvert,
+ EquidistantTest,
+ TransverseMercatorTest.
+ - PolarStereographic:
+ - Improved conversion to conformal coordinates;
+ - Fix bug with scale at opposite pole;
+ - Complain if latitude out of range in SetScale.
+ - Add Math::NaN().
+ - Add long double version of hypot for Windows.
+ - Add EllipticFunction::E(real).
+ - Update references to Geotrans in MGRS documentation.
+ - Speed up tmseries.mac.
+
+ - Version 1.2
+ (released 2010-05-21)
+ - FIX BUGS in Geodesic,
+ - wrong azimuth returned by Direct if point 2 is on a pole;
+ - Inverse sometimes fails with very close points.
+ - Improve calculation of scale in CassiniSoldner,
+ - add GeodesicLine::Scale,
+ GeodesicLine::EquatorialAzimuth, and
+ GeodesicLine::EquatorialArc;
+ - break friend connection between CassiniSoldner and Geodesic.
+ - Add DMS::DecodeAngle and
+ DMS::DecodeAzimuth. Extend
+ DMS::Decode and DMS::Encode to deal
+ with distances.
+ - Code and documentation changes in Geodesic and
+ Geocentric for consistency with
+ the forthcoming paper on geodesics.
+ - Increase order of series using in Geodesic to 6 (full
+ accuracy maintained for ellipsoid flattening < 0.01).
+ - Macro __NO_LONG_DOUBLE_MATH to disable use of long double.
+ - Correct declaration of Math::isfinite to return a bool.
+ - Changes in the \ref utilities,
+ - improve error reporting when parsing command line arguments;
+ - accept latitudes and longitudes in decimal degrees or degrees,
+ minutes, and seconds, with optional hemisphere designators;
+ - GeoConvert -z accepts zone or
+ zone+hemisphere;
+ - GeoidEval accepts any of the input
+ formats used by GeoConvert;
+ - CartConvert allows the ellipsoid
+ to be specified with -e.
+
+ - Version 1.1
+ (released 2010-02-09)
+ - FIX BUG (introduced in 2009-03) in EllipticFunction::E(sn,cn,dn).
+ - Increase accuracy of scale calculation in TransverseMercator and
+ TransverseMercatorExact.
+ - Code and documentation changes for consistency with
+ arXiv:1002.1417
+
+ - Version 1.0
+ (released 2010-01-07)
+ - Add autoconf configuration files.
+ - BUG FIX: Improve initial guess for Newton's method in
+ PolarStereographic::Reverse. (Previously this failed to converge
+ when the co-latitude exceeded about 130 deg.)
+ - Constructors for TransverseMercator, TransverseMercatorExact,
+ PolarStereographic, Geocentric, and Geodesic now check for obvious
+ problems with their arguments and throw an exception if necessary.
+ - Most classes now include inspector functions such as MajorRadius()
+ so that you can determine how instances were constructed.
+ - Add LambertConformalConic class.
+ - Add PolarStereographic::SetScale to allow the
+ latitude of true scale to be specified.
+ - Add solution and project files for Visual Studio 2008.
+ - Add GeographicErr for exceptions.
+ - Geoid changes:
+ - BUG FIX: fix typo in Geoid::Cache which could cause
+ a segmentation fault in some cases when the cached area spanned
+ the prime meridian.
+ - Include sufficient edge data to allow heights to be returned for
+ cached area without disk reads;
+ - Add inspector functions to query the extent of the cache.
+
+ - Version 2009-11
+ (released 2009-11-03)
+ - Allow specification of "closest UTM zone" in UTMUPS
+ and GeoConvert (via -t option).
+ - Utilities now complain is there are too many tokens on input lines.
+ - Include real-to-real versions of DMS::Decode and
+ DMS::Encode.
+ - More house-cleaning changes:
+ - Ensure that functions which return results through reference
+ arguments do not alter the arguments when an exception is thrown.
+ - Improve accuracy of MGRS::Forward.
+ - Include more information in some error messages.
+ - Improve accuracy of inverse hyperbolic functions.
+ - Fix the way Math functions handle different precisions.
+
+ - Version 2009-10
+ (released 2009-10-18)
+ - Change web site to https://geographiclib.sourceforge.io
+ - Several house-cleaning changes:
+ - Change from the a flat directory structure to a more easily
+ maintained one.
+ - Introduce Math class for common mathematical functions (in
+ Constants.hpp).
+ - Use Math::real as the type for all real quantities. By default this
+ is typedef'ed to double; and the library should be installed this
+ way.
+ - Eliminate const reference members of AzimuthalEquidistant,
+ CassiniSoldner and LocalCartesian so that they may be copied.
+ - Make several constructors explicit. Disallow some constructors.
+ Disallow copy constructor/assignment for Geoid.
+ - Document least squares formulas in Geoid.cpp.
+ - Use unsigned long long for files positions of geoid files in Geoid.
+ - Introduce optional mgrslimits argument in UTMUPS::Forward and
+ UTMUPS::Reverse to enforce stricter MGRS limits on eastings and
+ northings.
+ - Add 64-bit targets in Visual Studio project files.
+
+ - Version 2009-09
+ (released 2009-09-01)
+ - Add Geoid and
+ GeoidEval utility.
+
+ - Version 2009-08
+ (released 2009-08-14)
+ - Add CassiniSoldner class and
+ EquidistantTest utility.
+ - Fix bug in Geodesic::Inverse where NaNs were
+ sometimes returned.
+ - INCOMPATIBLE CHANGE: AzimuthalEquidistant now returns the reciprocal
+ of the azimuthal scale instead of the reduced length.
+ - Add -n option to GeoConvert.
+
+ - Version 2009-07
+ (released 2009-07-16)
+ - Speed up the series inversion code in tmseries.mac and geod.mac.
+ - Reference Borkowski in section on \ref geocentric.
+
+ - Version 2009-06
+ (released 2009-06-01)
+ - Add routines to decode and encode zone+hemisphere to UTMUPS.
+ - Clean up code in Geodesic.
+
+ - Version 2009-05
+ (released 2009-05-01)
+ - Improvements to Geodesic:
+ - more economical series expansions,
+ - return reduced length (as does the
+ Geod utility),
+ - improved calculation of starting point for inverse method,
+ - use reduced length to give derivative for Newton's method.
+ - Add AzimuthalEquidistant class.
+ - Make Geocentric, TransverseMercator,
+ and PolarStereographic classes work with prolate
+ ellipsoids.
+ - CartConvert checks its inputs more
+ carefully.
+ - Remove reference to defunct Constants.cpp from GeographicLib.vcproj.
+
+ - Version 2009-04
+ (released 2009-04-01)
+ - Use compile-time constants to select the order of series in
+ TransverseMercator.
+ - 2x unroll of Clenshaw summation to avoid data shuffling.
+ - Simplification of EllipticFunction::E.
+ - Use STATIC_ASSERT for compile-time checking of constants.
+ - Improvements to Geodesic:
+ - compile-time option to change order of series used,
+ - post Maxima code for generating the series,
+ - tune the order of series for double,
+ - improvements in the selection of starting points for Newton's
+ method,
+ - accept and return spherical arc lengths,
+ - works with both oblate and prolate ellipsoids,
+ - add -a, -e, -b options to the Geod
+ utility.
+
+ - Version 2009-03
+ (released 2009-03-01)
+ - Add Geodesic and the
+ Geod utility.
+ - Declare when no exceptions are thrown by functions.
+ - Minor changes to DMS class.
+ - Use invf = 0 to mean a sphere in constructors to some classes.
+ - The makefile creates a library and includes an install target.
+ - Rename ECEF to Geocentric, ECEFConvert
+ to CartConvert.
+ - Use inline functions to define constant doubles in Constants.hpp.
+
+ - Version 2009-02
+ (released 2009-01-30)
+ - Fix documentation of constructors (flattening → inverse
+ flattening).
+ - Use std versions of math functions.
+ - Add ECEF and LocalCartesian classes
+ and the ECEFConvert utility.
+ - Gather the documentation on the \ref utilities onto one page.
+
+ - Version 2009-01
+ (released 2009-01-12)
+ - First proper release of library.
+ - More robust TransverseMercatorExact:
+ - Introduce \e extendp version of constructor,
+ - Test against extended test data,
+ - Optimize starting positions for Newton's method,
+ - Fix behavior near all singularities,
+ - Fix order dependence in C++ start-up code,
+ - Improved method of computing scale and convergence.
+ - Documentation on transverse Mercator projection.
+ - Add MGRS, UTMUPS, etc.
+
+ - Version 2008-09
+ - Ad hoc posting of information on the transverse Mercator projection.
+
+
+Back to \ref highprec. Up to \ref contents.
+
+**********************************************************************/
+}
diff --git a/gtsam/3rdparty/GeographicLib/doc/Makefile.am b/gtsam/3rdparty/GeographicLib/doc/Makefile.am
index 84c8ccc87..d1832930f 100644
--- a/gtsam/3rdparty/GeographicLib/doc/Makefile.am
+++ b/gtsam/3rdparty/GeographicLib/doc/Makefile.am
@@ -1,26 +1,16 @@
EXTRAFILES = $(srcdir)/tmseries30.html $(srcdir)/geodseries30.html
-FIGURES = $(srcdir)/gauss-krueger-graticule.png \
+FIGURES = \
+ $(srcdir)/gauss-krueger-graticule.png \
$(srcdir)/thompson-tm-graticule.png \
$(srcdir)/gauss-krueger-convergence-scale.png \
$(srcdir)/gauss-schreiber-graticule-a.png \
$(srcdir)/gauss-krueger-graticule-a.png \
$(srcdir)/thompson-tm-graticule-a.png \
$(srcdir)/gauss-krueger-error.png \
- $(srcdir)/meridian-measures.png
-
-SCRIPTDRIVERS = \
- $(srcdir)/scripts/geod-calc.html \
- $(srcdir)/scripts/geod-google.html \
- $(srcdir)/scripts/geod-google-instructions.html
-
-JSSCRIPTS = \
- $(srcdir)/scripts/GeographicLib/Math.js \
- $(srcdir)/scripts/GeographicLib/Geodesic.js \
- $(srcdir)/scripts/GeographicLib/GeodesicLine.js \
- $(srcdir)/scripts/GeographicLib/PolygonArea.js \
- $(srcdir)/scripts/GeographicLib/DMS.js \
- $(srcdir)/scripts/GeographicLib/Interface.js
+ $(srcdir)/meridian-measures.png \
+ $(srcdir)/normal-gravity-potential-1.svg \
+ $(srcdir)/vptree.gif
HPPFILES = \
$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
@@ -31,14 +21,16 @@ HPPFILES = \
$(top_srcdir)/include/GeographicLib/DMS.hpp \
$(top_srcdir)/include/GeographicLib/Ellipsoid.hpp \
$(top_srcdir)/include/GeographicLib/EllipticFunction.hpp \
- $(top_srcdir)/include/GeographicLib/Geocentric.hpp \
+ $(top_srcdir)/include/GeographicLib/GARS.hpp \
$(top_srcdir)/include/GeographicLib/GeoCoords.hpp \
+ $(top_srcdir)/include/GeographicLib/Geocentric.hpp \
$(top_srcdir)/include/GeographicLib/Geodesic.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicExact.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicLine.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicLineExact.hpp \
$(top_srcdir)/include/GeographicLib/Geohash.hpp \
$(top_srcdir)/include/GeographicLib/Geoid.hpp \
+ $(top_srcdir)/include/GeographicLib/Georef.hpp \
$(top_srcdir)/include/GeographicLib/Gnomonic.hpp \
$(top_srcdir)/include/GeographicLib/LambertConformalConic.hpp \
$(top_srcdir)/include/GeographicLib/LocalCartesian.hpp \
@@ -58,12 +50,14 @@ ALLSOURCES = \
$(top_srcdir)/src/DMS.cpp \
$(top_srcdir)/src/Ellipsoid.cpp \
$(top_srcdir)/src/EllipticFunction.cpp \
- $(top_srcdir)/src/Geocentric.cpp \
+ $(top_srcdir)/src/GARS.cpp \
$(top_srcdir)/src/GeoCoords.cpp \
+ $(top_srcdir)/src/Geocentric.cpp \
$(top_srcdir)/src/Geodesic.cpp \
$(top_srcdir)/src/GeodesicLine.cpp \
$(top_srcdir)/src/Geohash.cpp \
$(top_srcdir)/src/Geoid.cpp \
+ $(top_srcdir)/src/Georef.cpp \
$(top_srcdir)/src/Gnomonic.cpp \
$(top_srcdir)/src/LambertConformalConic.cpp \
$(top_srcdir)/src/LocalCartesian.cpp \
@@ -94,20 +88,9 @@ MANPAGES = \
../man/Gravity.1.html \
../man/MagneticField.1.html \
../man/Planimeter.1.html \
+ ../man/RhumbSolve.1.html \
../man/TransverseMercatorProj.1.html
-LEGACYFILES = \
- $(top_srcdir)/legacy/C/geodesic.c \
- $(top_srcdir)/legacy/C/geodesic.h \
- $(top_srcdir)/legacy/C/direct.c \
- $(top_srcdir)/legacy/C/inverse.c \
- $(top_srcdir)/legacy/C/planimeter.c \
- $(top_srcdir)/legacy/Fortran/geodesic.for \
- $(top_srcdir)/legacy/Fortran/geodesic.inc \
- $(top_srcdir)/legacy/Fortran/geoddirect.for \
- $(top_srcdir)/legacy/Fortran/geodinverse.for \
- $(top_srcdir)/legacy/Fortran/planimeter.for
-
doc: html/index.html
if HAVE_DOXYGEN
@@ -116,21 +99,16 @@ manpages: $(MANPAGES)
cp $^ html/
touch $@
-html/index.html: manpages doxyfile.in GeographicLib.dox \
- $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
- doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
- $(LEGACYFILES)
+html/index.html: manpages doxyfile.in GeographicLib.dox.in \
+ $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES)
cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
$(top_srcdir)/LICENSE.txt html/
+ sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
+ $(srcdir)/GeographicLib.dox.in > GeographicLib.dox
sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+ -e "s%@PROJECT_BINARY_DIR@%..%g" \
-e "s%@PROJECT_VERSION@%$(VERSION)%g" \
$(srcdir)/doxyfile.in | $(DOXYGEN) -
- sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
- -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
- $(srcdir)/doxyfile-c.in | $(DOXYGEN) -
- sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
- -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
- $(srcdir)/doxyfile-for.in | $(DOXYGEN) -
else
html/index.html: index.html.in utilities.html.in
if test -d html; then rm -rf html/*; else mkdir html; fi
@@ -144,17 +122,11 @@ endif
maintainer-clean-local:
rm -rf html manpages
+htmldir=$(DESTDIR)$(docdir)/html
+
install-doc: html/index.html
- $(INSTALL) -d $(DESTDIR)$(docdir)/html
- $(INSTALL) -m 644 `dirname $<`/*.* $(DESTDIR)$(docdir)/html
- -test -f `dirname $<`/C/index.html && \
- $(INSTALL) -d $(DESTDIR)$(docdir)/html/C && \
- $(INSTALL) -m 644 `dirname $<`/C/*.* $(DESTDIR)$(docdir)/html/C
- -test -f `dirname $<`/Fortran/index.html && \
- $(INSTALL) -d $(DESTDIR)$(docdir)/html/Fortran && \
- $(INSTALL) -m 644 `dirname $<`/Fortran/*.* \
- $(DESTDIR)$(docdir)/html/Fortran
- $(INSTALL) -d $(DESTDIR)$(docdir)/scripts
- $(INSTALL) -m 644 $(SCRIPTDRIVERS) $(DESTDIR)$(docdir)/scripts
- $(INSTALL) -d $(DESTDIR)$(docdir)/scripts/GeographicLib
- $(INSTALL) -m 644 $(JSSCRIPTS) $(DESTDIR)$(docdir)/scripts/GeographicLib
+ $(INSTALL) -d $(htmldir)
+ $(INSTALL) -m 644 `dirname $<`/*.* $(htmldir)
+ -test -f `dirname $<`/search/search.js && \
+ $(INSTALL) -d $(htmldir)/search && \
+ $(INSTALL) -m 644 `dirname $<`/search/*.* $(htmldir)/search || true
diff --git a/gtsam/3rdparty/GeographicLib/doc/Makefile.in b/gtsam/3rdparty/GeographicLib/doc/Makefile.in
index 859662692..7a4f60e41 100644
--- a/gtsam/3rdparty/GeographicLib/doc/Makefile.in
+++ b/gtsam/3rdparty/GeographicLib/doc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -14,23 +14,61 @@
@SET_MAKE@
VPATH = @srcdir@
-am__make_dryrun = \
- { \
- am__dry=no; \
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
- echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
- | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
- *) \
- for am__flg in $$MAKEFLAGS; do \
- case $$am__flg in \
- *=*|--*) ;; \
- *n*) am__dry=yes; break;; \
- esac; \
- done;; \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
- test $$am__dry = yes; \
- }
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -51,18 +89,30 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(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.ac
+ $(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/GeographicLib/Config-ac.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
@@ -70,9 +120,12 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
@@ -121,6 +174,7 @@ LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -139,9 +193,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
POD2HTML = @POD2HTML@
POD2MAN = @POD2MAN@
-POW_LIB = @POW_LIB@
RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
@@ -178,7 +234,7 @@ host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = @htmldir@
+htmldir = $(DESTDIR)$(docdir)/html
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
@@ -190,6 +246,7 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
+pkgconfigdir = @pkgconfigdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
@@ -206,27 +263,17 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRAFILES = $(srcdir)/tmseries30.html $(srcdir)/geodseries30.html
-FIGURES = $(srcdir)/gauss-krueger-graticule.png \
+FIGURES = \
+ $(srcdir)/gauss-krueger-graticule.png \
$(srcdir)/thompson-tm-graticule.png \
$(srcdir)/gauss-krueger-convergence-scale.png \
$(srcdir)/gauss-schreiber-graticule-a.png \
$(srcdir)/gauss-krueger-graticule-a.png \
$(srcdir)/thompson-tm-graticule-a.png \
$(srcdir)/gauss-krueger-error.png \
- $(srcdir)/meridian-measures.png
-
-SCRIPTDRIVERS = \
- $(srcdir)/scripts/geod-calc.html \
- $(srcdir)/scripts/geod-google.html \
- $(srcdir)/scripts/geod-google-instructions.html
-
-JSSCRIPTS = \
- $(srcdir)/scripts/GeographicLib/Math.js \
- $(srcdir)/scripts/GeographicLib/Geodesic.js \
- $(srcdir)/scripts/GeographicLib/GeodesicLine.js \
- $(srcdir)/scripts/GeographicLib/PolygonArea.js \
- $(srcdir)/scripts/GeographicLib/DMS.js \
- $(srcdir)/scripts/GeographicLib/Interface.js
+ $(srcdir)/meridian-measures.png \
+ $(srcdir)/normal-gravity-potential-1.svg \
+ $(srcdir)/vptree.gif
HPPFILES = \
$(top_srcdir)/include/GeographicLib/Accumulator.hpp \
@@ -237,14 +284,16 @@ HPPFILES = \
$(top_srcdir)/include/GeographicLib/DMS.hpp \
$(top_srcdir)/include/GeographicLib/Ellipsoid.hpp \
$(top_srcdir)/include/GeographicLib/EllipticFunction.hpp \
- $(top_srcdir)/include/GeographicLib/Geocentric.hpp \
+ $(top_srcdir)/include/GeographicLib/GARS.hpp \
$(top_srcdir)/include/GeographicLib/GeoCoords.hpp \
+ $(top_srcdir)/include/GeographicLib/Geocentric.hpp \
$(top_srcdir)/include/GeographicLib/Geodesic.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicExact.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicLine.hpp \
$(top_srcdir)/include/GeographicLib/GeodesicLineExact.hpp \
$(top_srcdir)/include/GeographicLib/Geohash.hpp \
$(top_srcdir)/include/GeographicLib/Geoid.hpp \
+ $(top_srcdir)/include/GeographicLib/Georef.hpp \
$(top_srcdir)/include/GeographicLib/Gnomonic.hpp \
$(top_srcdir)/include/GeographicLib/LambertConformalConic.hpp \
$(top_srcdir)/include/GeographicLib/LocalCartesian.hpp \
@@ -264,12 +313,14 @@ ALLSOURCES = \
$(top_srcdir)/src/DMS.cpp \
$(top_srcdir)/src/Ellipsoid.cpp \
$(top_srcdir)/src/EllipticFunction.cpp \
- $(top_srcdir)/src/Geocentric.cpp \
+ $(top_srcdir)/src/GARS.cpp \
$(top_srcdir)/src/GeoCoords.cpp \
+ $(top_srcdir)/src/Geocentric.cpp \
$(top_srcdir)/src/Geodesic.cpp \
$(top_srcdir)/src/GeodesicLine.cpp \
$(top_srcdir)/src/Geohash.cpp \
$(top_srcdir)/src/Geoid.cpp \
+ $(top_srcdir)/src/Georef.cpp \
$(top_srcdir)/src/Gnomonic.cpp \
$(top_srcdir)/src/LambertConformalConic.cpp \
$(top_srcdir)/src/LocalCartesian.cpp \
@@ -300,20 +351,9 @@ MANPAGES = \
../man/Gravity.1.html \
../man/MagneticField.1.html \
../man/Planimeter.1.html \
+ ../man/RhumbSolve.1.html \
../man/TransverseMercatorProj.1.html
-LEGACYFILES = \
- $(top_srcdir)/legacy/C/geodesic.c \
- $(top_srcdir)/legacy/C/geodesic.h \
- $(top_srcdir)/legacy/C/direct.c \
- $(top_srcdir)/legacy/C/inverse.c \
- $(top_srcdir)/legacy/C/planimeter.c \
- $(top_srcdir)/legacy/Fortran/geodesic.for \
- $(top_srcdir)/legacy/Fortran/geodesic.inc \
- $(top_srcdir)/legacy/Fortran/geoddirect.for \
- $(top_srcdir)/legacy/Fortran/geodinverse.for \
- $(top_srcdir)/legacy/Fortran/planimeter.for
-
all: all-am
.SUFFIXES:
@@ -329,7 +369,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -353,11 +392,9 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
cscope cscopelist:
@@ -496,16 +533,19 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic maintainer-clean-local mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-local mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
doc: html/index.html
@@ -515,21 +555,16 @@ doc: html/index.html
@HAVE_DOXYGEN_TRUE@ cp $^ html/
@HAVE_DOXYGEN_TRUE@ touch $@
-@HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox \
-@HAVE_DOXYGEN_TRUE@ $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES) \
-@HAVE_DOXYGEN_TRUE@ doxyfile-c.in geodesic-c.dox doxyfile-for.in geodesic-for.dox \
-@HAVE_DOXYGEN_TRUE@ $(LEGACYFILES)
+@HAVE_DOXYGEN_TRUE@html/index.html: manpages doxyfile.in GeographicLib.dox.in \
+@HAVE_DOXYGEN_TRUE@ $(HPPFILES) $(ALLSOURCES) $(EXTRAFILES) $(FIGURES)
@HAVE_DOXYGEN_TRUE@ cp -p $(EXTRAFILES) $(top_srcdir)/maxima/*.mac \
@HAVE_DOXYGEN_TRUE@ $(top_srcdir)/LICENSE.txt html/
+@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
+@HAVE_DOXYGEN_TRUE@ $(srcdir)/GeographicLib.dox.in > GeographicLib.dox
@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
+@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_BINARY_DIR@%..%g" \
@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile.in | $(DOXYGEN) -
-@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
-@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
-@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile-c.in | $(DOXYGEN) -
-@HAVE_DOXYGEN_TRUE@ sed -e "s%@PROJECT_SOURCE_DIR@%$(top_srcdir)%g" \
-@HAVE_DOXYGEN_TRUE@ -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
-@HAVE_DOXYGEN_TRUE@ $(srcdir)/doxyfile-for.in | $(DOXYGEN) -
@HAVE_DOXYGEN_FALSE@html/index.html: index.html.in utilities.html.in
@HAVE_DOXYGEN_FALSE@ if test -d html; then rm -rf html/*; else mkdir html; fi
@HAVE_DOXYGEN_FALSE@ cp $(top_srcdir)/LICENSE.txt html/
@@ -542,19 +577,11 @@ maintainer-clean-local:
rm -rf html manpages
install-doc: html/index.html
- $(INSTALL) -d $(DESTDIR)$(docdir)/html
- $(INSTALL) -m 644 `dirname $<`/*.* $(DESTDIR)$(docdir)/html
- -test -f `dirname $<`/C/index.html && \
- $(INSTALL) -d $(DESTDIR)$(docdir)/html/C && \
- $(INSTALL) -m 644 `dirname $<`/C/*.* $(DESTDIR)$(docdir)/html/C
- -test -f `dirname $<`/Fortran/index.html && \
- $(INSTALL) -d $(DESTDIR)$(docdir)/html/Fortran && \
- $(INSTALL) -m 644 `dirname $<`/Fortran/*.* \
- $(DESTDIR)$(docdir)/html/Fortran
- $(INSTALL) -d $(DESTDIR)$(docdir)/scripts
- $(INSTALL) -m 644 $(SCRIPTDRIVERS) $(DESTDIR)$(docdir)/scripts
- $(INSTALL) -d $(DESTDIR)$(docdir)/scripts/GeographicLib
- $(INSTALL) -m 644 $(JSSCRIPTS) $(DESTDIR)$(docdir)/scripts/GeographicLib
+ $(INSTALL) -d $(htmldir)
+ $(INSTALL) -m 644 `dirname $<`/*.* $(htmldir)
+ -test -f `dirname $<`/search/search.js && \
+ $(INSTALL) -d $(htmldir)/search && \
+ $(INSTALL) -m 644 `dirname $<`/search/*.* $(htmldir)/search || true
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/gtsam/3rdparty/GeographicLib/doc/Makefile.mk b/gtsam/3rdparty/GeographicLib/doc/Makefile.mk
index ca852d9d0..e6373cec2 100644
--- a/gtsam/3rdparty/GeographicLib/doc/Makefile.mk
+++ b/gtsam/3rdparty/GeographicLib/doc/Makefile.mk
@@ -1,6 +1,3 @@
-SCRIPTDRIVERS = $(wildcard scripts/[A-Za-z]*.html)
-JSSCRIPTS = $(wildcard scripts/GeographicLib/[A-Za-z]*.js)
-
VERSION:=$(shell grep '\bVERSION=' ../configure | cut -f2 -d\' | head -1)
doc: html/index.html
@@ -16,15 +13,10 @@ html/index.html: index.html.in utilities.html.in
PREFIX = /usr/local
DEST = $(PREFIX)/share/doc/GeographicLib
DOCDEST = $(DEST)/html
-SCRIPTDEST = $(DEST)/scripts
INSTALL = install -b
install: html/index.html
test -d $(DOCDEST) || mkdir -p $(DOCDEST)
$(INSTALL) -m 644 html/* $(DOCDEST)/
- test -d $(SCRIPTDEST)/GeographicLib || \
- mkdir -p $(SCRIPTDEST)/GeographicLib
- $(INSTALL) -m 644 $(SCRIPTDRIVERS) $(SCRIPTDEST)/
- $(INSTALL) -m 644 $(JSSCRIPTS) $(SCRIPTDEST)/GeographicLib/
.PHONY: doc install clean
diff --git a/gtsam/3rdparty/GeographicLib/doc/NETGeographicLib.dox b/gtsam/3rdparty/GeographicLib/doc/NETGeographicLib.dox
index fd8f5e057..4009dfd83 100644
--- a/gtsam/3rdparty/GeographicLib/doc/NETGeographicLib.dox
+++ b/gtsam/3rdparty/GeographicLib/doc/NETGeographicLib.dox
@@ -5,16 +5,20 @@
*
* Written by Scott Heiman and licensed under the
* MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
**********************************************************************/
/**
\mainpage NETGeographicLib library
\author Scott Heiman (mrmtdew2@outlook.com)
-\version 1.35
-\date 2014-03-13
+\version 1.49
+\date 2017-10-05
-\section abstract Abstract
+The documentation for other versions is available at
+https://geographiclib.sourceforge.io/m.nn/NET for versions numbers
+m.nn ≥ 1.33.
+
+\section abstract-net Abstract
%NETGeographicLib is a .NET wrapper for GeographicLib. It allows
.NET developers to access GeographicLib classes within C#, Visual
@@ -25,15 +29,15 @@ of the GeographicLib software. It is a container that provides interfaces
to the GeographicLib classes. GeographicLib and NETGeographicLib is an
integrated product.
-The NETGeographic project in the GeographicLib-vc10.sln file located in
-\/GeographicLib-1.35/windows will create the NETGeographicLib
-DLL. The source code for NETGeographicLib is located in
-\/GeographicLib-1.35/dotnet/NETGeographicLib. NETGeographicLib
-is not available for older versions of Microsoft Visual Studio.
+The NETGeographic solutions and C++ projects are located in the
+\/windows folder. The C# Projections projects are located in
+the \/dotnet/Projections folder. Solution files have been provided
+for VS 2010 and VS 2013 NETGeographicLib is not available for older
+versions of Microsoft Visual Studio.
NETGeographicLib has been tested with C#, Managed C++, and Visual Basic.
Sample code snippets can be found in
-\/GeographicLib-1.35/dotnet/examples.
+\/GeographicLib-1.49/dotnet/examples.
\section differences Differences between NETGeographicLib and GeographicLib
@@ -41,14 +45,15 @@ The NETGeographicLib class names are identical to the GeographicLib class names.
All NETGeographicLib classes are in the NETGeographicLib namespace.
NETGeographicLib exposes most of the GeographicLib classes. The exceptions
-are SphericalEngine, GeographicLib::Math, and GeographicLib::Utility. The
+are SphericalEngine, GeographicLib::Math, and most of GeographicLib::Utility. The
SphericalEngine class is a template class which (according to the comments in
the SphericalEngine.h file) is not usually accessible to developers. The
GeographicLib::Math class contains several specialized functions required by
GeographicLib classes. They have limited use outside GeographicLib. This class
may be exposed in a future release if there is demand for it. The functions
provided by GeographicLib::Utility duplicate functions provided by existing .NET
-controls (DateTime).
+controls (DateTime). The GeographicLib::Utility::fractionalyear function is
+available to .NET programmers by calling NETGeographicLib::Utility::FractionalYear.
The SphericalCoefficients class replaces the SphericalEngine::coeff class.
@@ -59,7 +64,10 @@ in the header files contain a section labeled "INTERFACE DIFFERENCES" that detai
the differences between the NETGeographicLib interfaces and the GeographicLib
interfaces. The differences are summarized in the text that follows.
-Default values for function parameters are not supported in .NET.
+Default values for function parameters are not supported in .NET. If
+the documentation refers to a default value for a parameter, it applies
+only to GeographicLib. However, such a "default" value often provides a
+reasonable choice for this parameter.
Several GeographicLib class functions accept or return a "capabilities mask" as
an unsigned integer. The NETGeographicLib classes accept and return the capabilities
@@ -135,7 +143,7 @@ to any Visual Basic source that uses NETGeographicLib classes.
A C# sample application is provided that demonstrates NETGeographicLib classes.
The source code for the sample application is located in
-\/GeographicLib-1.35/dotnet/Projections. The sample
+\/GeographicLib-1.49/dotnet/Projections. The sample
application creates a tabbed dialog. Each tab provides data entry fields that
allow the user to exercise one or more NETGeographicLib classes.
@@ -153,12 +161,13 @@ The following table lists the source code that demonstrates specific classes.
@@ -174,7 +183,7 @@ two ways:
application. You can build %GeographicLib as a shared library using
-D GEOGRAPHICLIB_LIB_TYPE=SHARED or BOTH.
- you have installed %GeographicLib using one of the binary installers (see
- \ref windowsbin "Using a binary installer for Windows" in the
+ \ref binaryinstwin "Using a binary installer for Windows" in the
%GeographicLib documentation). In this case, you are restricted to using
Visual Studio 10.
diff --git a/gtsam/3rdparty/GeographicLib/doc/doxyfile-c.in b/gtsam/3rdparty/GeographicLib/doc/doxyfile-c.in
index f77a0b334..611f63e12 100644
--- a/gtsam/3rdparty/GeographicLib/doc/doxyfile-c.in
+++ b/gtsam/3rdparty/GeographicLib/doc/doxyfile-c.in
@@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
@@ -1200,7 +1186,7 @@ USE_MATHJAX = NO
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
@@ -1215,7 +1201,7 @@ MATHJAX_EXTENSIONS =
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1412,18 +1398,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
diff --git a/gtsam/3rdparty/GeographicLib/doc/doxyfile-for.in b/gtsam/3rdparty/GeographicLib/doc/doxyfile-for.in
index 47ef530d7..d18e706e2 100644
--- a/gtsam/3rdparty/GeographicLib/doc/doxyfile-for.in
+++ b/gtsam/3rdparty/GeographicLib/doc/doxyfile-for.in
@@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
@@ -680,8 +666,7 @@ INPUT_ENCODING = UTF-8
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.for *.vhd *.vhdl
-FILE_PATTERNS = *.for \
- *.inc
+FILE_PATTERNS = geod*.for planimeter.for geodesic.inc
# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
@@ -1200,7 +1185,7 @@ USE_MATHJAX = NO
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
@@ -1215,7 +1200,7 @@ MATHJAX_EXTENSIONS =
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1412,18 +1397,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
diff --git a/gtsam/3rdparty/GeographicLib/doc/doxyfile-net.in b/gtsam/3rdparty/GeographicLib/doc/doxyfile-net.in
index b9fedb587..2b082c806 100644
--- a/gtsam/3rdparty/GeographicLib/doc/doxyfile-net.in
+++ b/gtsam/3rdparty/GeographicLib/doc/doxyfile-net.in
@@ -324,30 +324,16 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
@@ -1201,7 +1187,7 @@ USE_MATHJAX = YES
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
@@ -1216,7 +1202,7 @@ MATHJAX_EXTENSIONS =
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1413,18 +1399,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
diff --git a/gtsam/3rdparty/GeographicLib/doc/doxyfile.in b/gtsam/3rdparty/GeographicLib/doc/doxyfile.in
index 448affa1a..eb234e9b9 100644
--- a/gtsam/3rdparty/GeographicLib/doc/doxyfile.in
+++ b/gtsam/3rdparty/GeographicLib/doc/doxyfile.in
@@ -139,7 +139,8 @@ STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@/
# definition is used. Otherwise one should specify the include paths that
# are normally passed to the compiler using the -I flag.
-STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include/
+STRIP_FROM_INC_PATH = @PROJECT_SOURCE_DIR@/include/ \
+ @PROJECT_SOURCE_DIR@/examples/
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
# (but less readable) file names. This can be useful if your file system
@@ -324,30 +325,16 @@ INLINE_SIMPLE_STRUCTS = NO
TYPEDEF_HIDES_STRUCT = NO
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penalty.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will roughly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
-
-SYMBOL_CACHE_SIZE = 0
-
-# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
-# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
-# their name and scope. Since this can be an expensive process and often the
-# same symbol appear multiple times in the code, doxygen keeps a cache of
-# pre-resolved symbols. If the cache is too small doxygen will become slower.
-# If the cache is too large, memory is wasted. The cache size is given by this
-# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols.
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
LOOKUP_CACHE_SIZE = 0
@@ -664,7 +651,8 @@ WARN_LOGFILE =
INPUT = @PROJECT_SOURCE_DIR@/src \
@PROJECT_SOURCE_DIR@/include/GeographicLib \
@PROJECT_SOURCE_DIR@/tools \
- @PROJECT_SOURCE_DIR@/doc/GeographicLib.dox
+ @PROJECT_BINARY_DIR@/doc/GeographicLib.dox \
+ @PROJECT_SOURCE_DIR@/examples/JacobiConformal.hpp
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -1202,7 +1190,7 @@ USE_MATHJAX = YES
# However, it is strongly recommended to install a local
# copy of MathJax from http://www.mathjax.org before deployment.
-MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
+MATHJAX_RELPATH = https://geographiclib.sourceforge.io/MathJax-2.7.2
# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
# names that should be enabled during MathJax rendering.
@@ -1217,7 +1205,7 @@ MATHJAX_EXTENSIONS =
# typically be disabled. For large projects the javascript based search engine
# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
-SEARCHENGINE = NO
+SEARCHENGINE = YES
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
# implemented using a PHP enabled web server instead of at the web client
@@ -1414,18 +1402,6 @@ GENERATE_XML = NO
XML_OUTPUT = xml
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
# dump the program listings (including syntax highlighting
# and cross-referencing information) to the XML output. Note that
diff --git a/gtsam/3rdparty/GeographicLib/doc/geodesic-c.dox b/gtsam/3rdparty/GeographicLib/doc/geodesic-c.dox
index d07fb61ba..2923dcf8a 100644
--- a/gtsam/3rdparty/GeographicLib/doc/geodesic-c.dox
+++ b/gtsam/3rdparty/GeographicLib/doc/geodesic-c.dox
@@ -5,49 +5,62 @@
*
* Written by Charles Karney and licensed under the
* MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
**********************************************************************/
/**
\mainpage Geodesic routines implemented in C
\author Charles F. F. Karney (charles@karney.com)
-\version 1.32
+\version 1.49
-\section abstract Abstract
+The documentation for other versions is available at
+https://geographiclib.sourceforge.io/m.nn/C for versions numbers
+m.nn ≥ 1.28.
-This is a C implementation of the geodesic algorithms from GeographicLib. This is a
-self-contained library (requiring only the standard C math library)
+\section abstract-c Abstract
+
+This is a C implementation of the geodesic algorithms from
+GeographicLib. This
+is a self-contained library (requiring only the standard C math library)
which makes it easy to do geodesic computations for an ellipsoid of
-revolution in a C program. It uses ANSI C as described in
-B. W. Kernigan and D. M. Ritchie, The C Programming Language, 2nd
-Ed. (Prentice Hall, 1988), and so should compile correctly with just
-about any C compiler.
+revolution in a C program. It is included with version 4.9.0 of
+proj.4 and later.
+It uses ANSI C as described in B. W. Kernigan and D. M. Ritchie, The C
+Programming Language, 2nd Ed. (Prentice Hall, 1988), and so should
+compile correctly with just about any C compiler. However, the C99 math
+functions are used if they are available.
-\section download Downloading the source
+\section download-c Downloading the source
The C library is part of %GeographicLib which available for download at
--
- GeographicLib-1.32.tar.gz
--
- GeographicLib-1.32.zip
+-
+ GeographicLib-1.49.tar.gz
+-
+ GeographicLib-1.49.zip
.
as either a compressed tar file (tar.gz) or a zip file. After unpacking
-the source, the C library can be found in GeographicLib-1.32/legacy/C.
+the source, the C library can be found in the directory legacy/C.
The library consists of two files geodesic.c and geodesic.h.
The library is also included as part of
-proj.4 starting with version
-4.9.0, where is used as the computational backend for
-geod(1).
+proj.4 starting with
+version 4.9.0, where it is used as the computational backend for
+geod(1).
Instructions for how to use the library via proj.4 are given below.
-\section doc Library documentation
+Licensed under the
+MIT/X11 License; see
+LICENSE.txt.
-The interface to the library is documented via doxygen in the header
-file. To access this, see geodesic.h.
+\section doc-c Library documentation
-\section samples Sample programs
+Here is the
+\link geodesic.h application programming interface\endlink
+for the library (this is just the documentation for the header file,
+geodesic.h). See also the documentation on the structures geod_geodesic,
+geod_geodesicline, and geod_polygon.
+
+\section samples-c Sample programs
Also included are 3 small test programs:
- direct.c is a simple command line utility for solving the
@@ -68,6 +81,7 @@ mkdir BUILD
cd BUILD
cmake ..
make
+make test
echo 30 0 29.5 179.5 | ./inverse \endverbatim
Alternatively, if you have proj.4 installed, you can compile and link
@@ -81,38 +95,158 @@ cc -c -I/usr/local/include inverse.c
cc -o inverse inverse.o -lproj -L/usr/local/lib -Wl,-rpath=/usr/local/lib
echo 30 0 29.5 179.5 | ./inverse \endverbatim
-\section library Using the library
+\section library-c Using the library
-- Put @verbatim
- #include "geodesic.h" @endverbatim
+- Put @code{.c}
+ #include "geodesic.h"
+ @endcode
in your source code. If you are using the library via proj.4, change
- this to @verbatim
- #include @endverbatim
-- make calls to the geodesic routines from your code. The interface to
+ this to @code{.c}
+ #include
+ @endcode
+- Make calls to the geodesic routines from your code. The interface to
the library is documented in geodesic.h.
- Compile and link as described above.
+- If linking with proj.4, you might want to check that the version of
+ proj.4 contains the geodesic routines. You can do this with @code{.c}
+ #include
+ #if PJ_VERSION >= 490
+ #include
+ #endif
+ ...
+ @endcode
-\section external External links
+- You can check the version of the geodesic library with, e.g.,
+ @code{.c}
+ #if GEODESIC_VERSION >= GEODESIC_VERSION_NUM(1,40,0)
+ ...
+ #endif
+ @endcode
+
+\section external-c External links
- These algorithms are derived in C. F. F. Karney,
-
+
Algorithms for geodesics,
J. Geodesy 87, 43--55 (2013)
- ( addenda).
+ ( addenda).
- A longer paper on geodesics: C. F. F. Karney,
- Geodesics
+ Geodesics
on an ellipsoid of revolution,
Feb. 2011
- (
+ (
errata).
-- The GeographicLib web site.
-- The C++ library.
-- The Java library.
-- The Fortran library.
-- Documentation on the C++ classes: GeographicLib::Geodesic,
- GeographicLib::GeodesicLine, GeographicLib::PolygonArea.
-- The section in the %GeographicLib documentation on geodesics: \ref
- geodesic.
--
- An online geodesic bibliography.
+-
+ Main project page
+-
+ GeographicLib web site
+ - Documentation on the C++ classes: GeographicLib::Geodesic,
+ GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
+ - The section in the %GeographicLib documentation on geodesics: \ref
+ geodesic.
+-
+ git repository
+- Implementations in various languages
+ - C++ (complete library):
+
+ documentation,
+
+ download;
+ - C (geodesic routines):
+
+ documentation, also included with recent versions of
+
+ proj.4;
+ - Fortran (geodesic routines):
+
+ documentation;
+ - Java (geodesic routines):
+
+ Maven Central package,
+
+ documentation;
+ - JavaScript (geodesic routines):
+
+ npm package,
+
+ documentation;
+ - Python (geodesic routines):
+
+ PyPI package,
+
+ documentation;
+ - Matlab/Octave (geodesic and some other routines):
+
+ Matlab Central package,
+
+ documentation;
+ - C# (.NET wrapper for complete C++ library):
+
+ documentation.
+-
+ A geodesic bibliography.
+- The wikipedia page,
+
+ Geodesics on an ellipsoid.
+
+\section changes-c Change log
+
+ - Version 1.49
+ (released 2017-10-05)
+ - Fix more warning messages from some compilers; add tests.
+
+ - Version 1.48
+ (released 2017-04-09)
+ - This is the version slated for the version of proj.4 after 4.9.4
+ (tagged v1.48.1-c).
+ - Fix warnings messages from some compilers.
+ - Change default range for longitude and azimuth to
+ (−180°, 180°] (instead of
+ [−180°, 180°)).
+
+ - Version 1.47
+ (released 2017-02-15)
+ - This is the version incorporated into proj.4 version 4.9.3 (tagged
+ v1.46.1-c).
+ - Fix the order of declarations, incorporating the patches in version
+ 1.46.1.
+ - Improve accuracy of area calculation (fixing a flaw introduced in
+ version 1.46).
+
+ - Version 1.46
+ (released 2016-02-15)
+ - Add s13 and a13 to the geod_geodesicline struct.
+ - Add geod_directline, geod_gendirectline, and geod_inverseline.
+ - More accurate inverse solution when longitude difference is close
+ to 180°.
+
+ - Version 1.45
+ (released 2015-09-30)
+ - The solution of the inverse problem now correctly returns NaNs if
+ one of the latitudes is a NaN.
+ - Include a test suite that can be run with "make test" after
+ configuring with cmake.
+ - Add geod_polygon_clear().
+
+ - Version 1.44
+ (released 2015-08-14)
+ - This is the version incorporated into proj.4 version 4.9.2.
+ - 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 [−540°, 540°).
+ - Enforce the restriction of latitude to [−90°, 90°] by
+ returning NaNs if the latitude is outside this range.
+ - The inverse calculation sets \e s12 to zero for coincident points
+ at pole (instead of returning a tiny quantity).
+
+ - Version 1.40
+ (released 2014-12-18)
+ - This is the version incorporated into proj.4 version 4.9.1.
+
+ - Version 1.32
+ (released 2013-07-12)
+ - This is the version incorporated into proj.4 version 4.9.0.
+
**********************************************************************/
diff --git a/gtsam/3rdparty/GeographicLib/doc/geodesic-for.dox b/gtsam/3rdparty/GeographicLib/doc/geodesic-for.dox
index 1ebc59860..477380e72 100644
--- a/gtsam/3rdparty/GeographicLib/doc/geodesic-for.dox
+++ b/gtsam/3rdparty/GeographicLib/doc/geodesic-for.dox
@@ -5,42 +5,52 @@
*
* Written by Charles Karney and licensed under the
* MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
+ * https://geographiclib.sourceforge.io/
**********************************************************************/
/**
\mainpage Geodesic routines implemented in Fortran
\author Charles F. F. Karney (charles@karney.com)
-\version 1.31
+\version 1.49
-\section abstract Abstract
+The documentation for other versions is available at
+https://geographiclib.sourceforge.io/m.nn/Fortran for versions numbers
+m.nn ≥ 1.28.
+
+\section abstract-for Abstract
This is a Fortran implementation of the geodesic algorithms from GeographicLib. This is a
+href="https://geographiclib.sourceforge.io">GeographicLib. This is a
self-contained library which makes it easy to do geodesic computations
for an ellipsoid of revolution in a Fortran program. It is written in
Fortran 77 (avoiding features which are now deprecated) and should
compile correctly with just about any Fortran compiler.
-\section download Downloading the source
+\section download-for Downloading the source
The Fortran library is part of %GeographicLib which available for download at
--
- GeographicLib-1.31.tar.gz
--
- GeographicLib-1.31.zip
+-
+ GeographicLib-1.49.tar.gz
+-
+ GeographicLib-1.49.zip
.
as either a compressed tar file (tar.gz) or a zip file. After unpacking
-the source, the Fortran library can be found in
-GeographicLib-1.31/legacy/Fortran. The library consists of the file
-geodesic.for.
+the source, the Fortran library can be found in the directory
+legacy/Fortran. The library consists of the file
+geodesic.for. The Fortran-90 interface is defined in geodesic.inc.
-\section doc Library documentation
+Licensed under the
+MIT/X11 License; see
+LICENSE.txt.
-The interface to the library is documented via doxygen in the source
-file. To access this, see geodesic.for.
+\section doc-for Library documentation
-\section samples Sample programs
+Here is the
+\link geodesic.for application programming interface\endlink
+for the library (this is just the documentation for the source file,
+geodesic.for).
+
+\section samples-for Sample programs
Also included are 3 small test programs:
- geoddirect.for is a simple command line utility for solving the
@@ -61,40 +71,148 @@ mkdir BUILD
cd BUILD
cmake ..
make
+make test
echo 30 0 29.5 179.5 | ./geodinverse \endverbatim
-\section library Using the library
+Finally, the two programs
+ - ngsforward
+ - ngsinverse
+ .
+which are also built with cmake, provide drop-in replacements for
+replacements for the NGS tools FORWARD and INVERSE available from
+http://www.ngs.noaa.gov/PC_PROD/Inv_Fwd/.
+These cure two problems of the Vincenty algorithms used by NGS:
+ - the accuracy is "only" 0.1 mm;
+ - the inverse program sometimes goes into an infinite loop.
+ .
+The corresponding source files
+ - ngsforward.for
+ - ngsinverse.for
+ - ngscommon.for
+ .
+are derived from the NGS source files
+ - forward.for, version 2.0, dated 2002-08-21
+ - inverse.for, version 3.0, dated 2012-11-04
+ .
+and are therefore in the public domain.
-- Optionall put @verbatim
- include "geodesic.inc" @endverbatim
+\section library-for Using the library
+
+- Optionally put @code{.for}
+ include "geodesic.inc"
+ @endcode
in declaration section of your subroutines.
- make calls to the geodesic routines from your code. The interface to
the library is documented in geodesic.for.
- Compile and link as described above.
-\section external External links
+\section external-for External links
- These algorithms are derived in C. F. F. Karney,
-
+
Algorithms for geodesics,
J. Geodesy 87, 43--55 (2013)
- ( addenda).
+ ( addenda).
- A longer paper on geodesics: C. F. F. Karney,
- Geodesics
+ Geodesics
on an ellipsoid of revolution,
Feb. 2011
- (
+ (
errata).
-- The GeographicLib web site.
-- The C++ library.
-- The C library.
-- The Java library.
-- Documentation on the C++ classes: GeographicLib::Geodesic,
- GeographicLib::GeodesicLine, GeographicLib::PolygonArea.
-- The section in the %GeographicLib documentation on geodesics: \ref
- geodesic.
--
- An online geodesic bibliography.
-**********************************************************************/
+-
+ Main project page
+-
+ GeographicLib web site
+ - Documentation on the C++ classes: GeographicLib::Geodesic,
+ GeographicLib::GeodesicLine, GeographicLib::PolygonAreaT.
+ - The section in the %GeographicLib documentation on geodesics: \ref
+ geodesic.
+-
+ git repository
+- Implementations in various languages
+ - C++ (complete library):
+
+ documentation,
+
+ download;
+ - C (geodesic routines):
+
+ documentation, also included with recent versions of
+
+ proj.4;
+ - Fortran (geodesic routines):
+
+ documentation;
+ - Java (geodesic routines):
+
+ Maven Central package,
+
+ documentation;
+ - JavaScript (geodesic routines):
+
+ npm package,
+
+ documentation;
+ - Python (geodesic routines):
+
+ PyPI package,
+
+ documentation;
+ - Matlab/Octave (geodesic and some other routines):
+
+ Matlab Central package,
+
+ documentation;
+ - C# (.NET wrapper for complete C++ library):
+
+ documentation.
+-
+ A geodesic bibliography.
+- The wikipedia page,
+
+ Geodesics on an ellipsoid.
+\section changes-for Change log
+
+ - Version 1.49
+ (released 2017-10-05)
+ - Fix code formatting and add two tests.
+
+ - Version 1.48
+ (released 2017-04-09)
+ - Change default range for longitude and azimuth to
+ (−180°, 180°] (instead of
+ [−180°, 180°)).
+
+ - Version 1.47
+ (released 2017-02-15)
+ - Improve accuracy of area calculation (fixing a flaw introduced in
+ version 1.46).
+
+ - Version 1.46
+ (released 2016-02-15)
+ - More accurate inverse solution when longitude difference is close
+ to 180°.
+
+ - Version 1.45
+ (released 2015-09-30)
+ - The solution of the inverse problem now correctly returns NaNs if
+ one of the latitudes is a NaN.
+ - Include a test suite that can be run with "make test" after
+ configuring with cmake.
+ - The library now treats latitudes outside the range [−90°,
+ 90°] as NaNs; so the sample programs no longer check for legal
+ values of latitude.
+
+ - Version 1.44
+ (released 2015-08-14)
+ - 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 [−540°, 540°).
+ - The sample programs, geoddirect and geodinverse, enforce the
+ restriction of latitude to [−90°, 90°].
+ - The inverse calculation sets \e s12 to zero for coincident points
+ at pole (instead of returning a tiny quantity).
**********************************************************************/
diff --git a/gtsam/3rdparty/GeographicLib/doc/geodseries30.html b/gtsam/3rdparty/GeographicLib/doc/geodseries30.html
index 9305117b3..a428749dc 100644
--- a/gtsam/3rdparty/GeographicLib/doc/geodseries30.html
+++ b/gtsam/3rdparty/GeographicLib/doc/geodseries30.html
@@ -3,6 +3,7 @@
Series for geodesic calculations
+
Series for geodesic calculations
@@ -12,15 +13,15 @@ This extends the series given
flattening. See
You will be redirected there. Click on the link to go there
diff --git a/gtsam/3rdparty/GeographicLib/doc/normal-gravity-potential-1.svg b/gtsam/3rdparty/GeographicLib/doc/normal-gravity-potential-1.svg
new file mode 100644
index 000000000..416ef946f
--- /dev/null
+++ b/gtsam/3rdparty/GeographicLib/doc/normal-gravity-potential-1.svg
@@ -0,0 +1,170 @@
+
+
+
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/DMS.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/DMS.js
deleted file mode 100644
index e2f339f01..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/DMS.js
+++ /dev/null
@@ -1,364 +0,0 @@
-/**
- * DMS.js
- * Transcription of DMS.[ch]pp into JavaScript.
- *
- * See the documentation for the C++ class. The conversion is a literal
- * conversion from C++.
- *
- * Copyright (c) Charles Karney (2011) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-GeographicLib.DMS = {};
-
-(function() {
- var d = GeographicLib.DMS;
- var m = GeographicLib.Math;
- d.lookup = function(s, c) {
- return s.indexOf(c.toUpperCase());
- }
- d.zerofill = function(s, n) {
- return String("0000").substr(0, Math.max(0, Math.min(4, n-s.length))) +
- s;
- }
- d.hemispheres_ = "SNWE";
- d.signs_ = "-+";
- d.digits_ = "0123456789";
- d.dmsindicators_ = "D'\":";
- // d.dmsindicatorsu_ = "\u00b0\u2032\u2033"; // Unicode variants
- d.dmsindicatorsu_ = "\u00b0'\""; // Use degree symbol
- d.components_ = ["degrees", "minutes", "seconds"];
- d.NONE = 0;
- d.LATITUDE = 1;
- d.LONGITUDE = 2;
- d.AZIMUTH = 3;
- d.NUMBER = 4;
- d.DEGREE = 0;
- d.MINUTE = 1;
- d.SECOND = 2;
-
- // return val, ind
- d.Decode = function(dms) {
- var vals = {};
- var errormsg = new String("");
- var dmsa = dms;
- dmsa = dmsa.replace(/\u00b0/g, 'd');
- dmsa = dmsa.replace(/\u00ba/g, 'd');
- dmsa = dmsa.replace(/\u2070/g, 'd');
- dmsa = dmsa.replace(/\u02da/g, 'd');
- dmsa = dmsa.replace(/\u2032/g, '\'');
- dmsa = dmsa.replace(/\u00b4/g, '\'');
- dmsa = dmsa.replace(/\u2019/g, '\'');
- dmsa = dmsa.replace(/\u2033/g, '"');
- dmsa = dmsa.replace(/\u201d/g, '"');
- dmsa = dmsa.replace(/''/g, '"');
- dmsa = dmsa.replace(/^\s+/, "");
- dmsa = dmsa.replace(/\s+$/, "");
- do { // Executed once (provides the ability to break)
- var sign = 1;
- var beg = 0, end = dmsa.length;
- var ind1 = d.NONE;
- var k = -1;
- if (end > beg && (k = d.lookup(d.hemispheres_, dmsa.charAt(beg))) >= 0) {
- ind1 = (k & 2) ? d.LONGITUDE : d.LATITUDE;
- sign = (k & 1) ? 1 : -1;
- ++beg;
- }
- if (end > beg &&
- (k = d.lookup(d.hemispheres_, dmsa.charAt(end-1))) >= 0) {
- if (k >= 0) {
- if (ind1 != d.NONE) {
- if (dmsa.charAt(beg - 1).toUpperCase() ==
- dmsa.charAt(end - 1).toUpperCase())
- errormsg = "Repeated hemisphere indicators " +
- dmsa.charAt(beg - 1) + " in " +
- dmsa.substr(beg - 1, end - beg + 1);
- else
- errormsg = "Contradictory hemisphere indicators " +
- dmsa.charAt(beg - 1) + " and " + dmsa.charAt(end - 1) + " in " +
- dmsa.substr(beg - 1, end - beg + 1);
- break;
- }
- ind1 = (k & 2) ? d.LONGITUDE : d.LATITUDE;
- sign = (k & 1) ? 1 : -1;
- --end;
- }
- }
- if (end > beg && (k = d.lookup(d.signs_, dmsa.charAt(beg))) >= 0) {
- if (k >= 0) {
- sign *= k ? 1 : -1;
- ++beg;
- }
- }
- if (end == beg) {
- errormsg = "Empty or incomplete DMS string " + dmsa;
- break;
- }
- var ipieces = [0, 0, 0];
- var fpieces = [0, 0, 0];
- var npiece = 0;
- var icurrent = 0;
- var fcurrent = 0;
- var ncurrent = 0, p = beg;
- var pointseen = false;
- var digcount = 0;
- var intcount = 0;
- while (p < end) {
- var x = dmsa.charAt(p++);
- if ((k = d.lookup(d.digits_, x)) >= 0) {
- ++ncurrent;
- if (digcount > 0)
- ++digcount; // Count of decimal digits
- else {
- icurrent = 10 * icurrent + k;
- ++intcount;
- }
- } else if (x == '.') {
- if (pointseen) {
- errormsg = "Multiple decimal points in "
- + dmsa.substr(beg, end - beg);
- break;
- }
- pointseen = true;
- digcount = 1;
- } else if ((k = d.lookup(d.dmsindicators_, x)) >= 0) {
- if (k >= 3) {
- if (p == end) {
- errormsg = "Illegal for : to appear at the end of " +
- dmsa.substr(beg, end - beg);
- break;
- }
- k = npiece;
- }
- if (k == npiece - 1) {
- errormsg = "Repeated " + d.components_[k] +
- " component in " + dmsa.substr(beg, end - beg);
- break;
- } else if (k < npiece) {
- errormsg = d.components_[k] + " component follows "
- + d.components_[npiece - 1] + " component in "
- + dmsa.substr(beg, end - beg);
- break;
- }
- if (ncurrent == 0) {
- errormsg = "Missing numbers in " + d.components_[k] +
- " component of " + dmsa.substr(beg, end - beg);
- break;
- }
- if (digcount > 1) {
- fcurrent = parseFloat(dmsa.substr(p - intcount - digcount - 1,
- intcount + digcount));
- icurrent = 0;
- }
- ipieces[k] = icurrent;
- fpieces[k] = icurrent + fcurrent;
- if (p < end) {
- npiece = k + 1;
- icurrent = fcurrent = 0;
- ncurrent = digcount = intcount = 0;
- }
- } else if (d.lookup(d.signs_, x) >= 0) {
- errormsg = "Internal sign in DMS string "
- + dmsa.substr(beg, end - beg);
- break;
- } else {
- errormsg = "Illegal character " + x + " in DMS string "
- + dmsa.substr(beg, end - beg);
- break;
- }
- }
- if (errormsg.length)
- break;
- if (d.lookup(d.dmsindicators_, dmsa.charAt(p - 1)) < 0) {
- if (npiece >= 3) {
- errormsg = "Extra text following seconds in DMS string "
- + dmsa.substr(beg, end - beg);
- break;
- }
- if (ncurrent == 0) {
- errormsg = "Missing numbers in trailing component of "
- + dmsa.substr(beg, end - beg);
- break;
- }
- if (digcount > 1) {
- fcurrent = parseFloat(dmsa.substr(p - intcount - digcount,
- intcount + digcount));
- icurrent = 0;
- }
- ipieces[npiece] = icurrent;
- fpieces[npiece] = icurrent + fcurrent;
- }
- if (pointseen && digcount == 0) {
- errormsg = "Decimal point in non-terminal component of "
- + dmsa.substr(beg, end - beg);
- break;
- }
- // Note that we accept 59.999999... even though it rounds to 60.
- if (ipieces[1] >= 60) {
- errormsg = "Minutes " + fpieces[1] + " not in range [0, 60)";
- break;
- }
- if (ipieces[2] >= 60) {
- errormsg = "Seconds " + fpieces[2] + " not in range [0, 60)";
- break;
- }
- vals.ind = ind1;
- // Assume check on range of result is made by calling routine (which
- // might be able to offer a better diagnostic).
- vals.val = sign * (fpieces[0] + (fpieces[1] + fpieces[2] / 60) / 60);
- return vals;
- } while (false);
- vals.val = d.NumMatch(dmsa);
- if (vals.val == 0)
- throw new Error(errormsg);
- else
- vals.ind = d.NONE;
- return vals;
- }
-
- d.NumMatch = function(s) {
- if (s.length < 3)
- return 0;
- var t = s.toUpperCase().replace(/0+$/,"");
- var sign = t.charAt(0) == '-' ? -1 : 1;
- var p0 = t.charAt(0) == '-' || t.charAt(0) == '+' ? 1 : 0;
- var p1 = t.length - 1;
- if (p1 + 1 < p0 + 3)
- return 0;
- // Strip off sign and trailing 0s
- t = t.substr(p0, p1 + 1 - p0); // Length at least 3
- if (t == "NAN" || t == "1.#QNAN" || t == "1.#SNAN" || t == "1.#IND" ||
- t == "1.#R")
- return sign * Number.NaN;
- else if (t == "INF" || t == "1.#INF")
- return sign * Number.POSITIVE_INFINITY;
- return 0;
- }
-
- // return lat, lon
- d.DecodeLatLon = function(stra, strb, swaplatlong) {
- var vals = {};
- if (!swaplatlong) swaplatlong = false;
- var valsa = d.Decode(stra);
- var valsb = d.Decode(strb);
- var a = valsa.val, ia = valsa.ind;
- var b = valsb.val, ib = valsb.ind;
- if (ia == d.NONE && ib == d.NONE) {
- // Default to lat, long unless swaplatlong
- ia = swaplatlong ? d.LONGITUDE : d.LATITUDE;
- ib = swaplatlong ? d.LATITUDE : d.LONGITUDE;
- } else if (ia == d.NONE)
- ia = d.LATITUDE + d.LONGITUDE - ib;
- else if (ib == d.NONE)
- ib = d.LATITUDE + d.LONGITUDE - ia;
- if (ia == ib)
- throw new Error("Both " + stra + " and "
- + strb + " interpreted as "
- + (ia == d.LATITUDE ? "latitudes" : "longitudes"));
- var lat = ia == d.LATITUDE ? a : b, lon = ia == d.LATITUDE ? b : a;
- if (Math.abs(lat) > 90)
- throw new Error("Latitude " + lat + "d not in [-90d, 90d]");
- if (lon < -540 || lon >= 540)
- throw new Error("Latitude " + lon + "d not in [-540d, 540d)");
- lon = m.AngNormalize(lon);
- vals.lat = lat;
- vals.lon = lon;
- return vals;
- }
-
- d.DecodeAngle = function(angstr) {
- var vals = d.Decode(angstr);
- var ang = vals.val, ind = vals.ind;
- if (ind != d.NONE)
- throw new Error("Arc angle " + angstr
- + " includes a hemisphere, N/E/W/S");
- return ang;
- }
-
- d.DecodeAzimuth = function(azistr) {
- var vals = d.Decode(azistr);
- var azi = vals.val, ind = vals.ind;
- if (ind == d.LATITUDE)
- throw new Error("Azimuth " + azistr
- + " has a latitude hemisphere, N/S");
- if (azi < -540 || azi >= 540)
- throw new Error("Azimuth " + azistr + " not in range [-540d, 540d)");
- azi = m.AngNormalize(azi);
- return azi;
- }
-
- d.Encode = function(angle, trailing, prec, ind) {
- // Assume check on range of input angle has been made by calling
- // routine (which might be able to offer a better diagnostic).
- if (!ind) ind = d.NONE;
- if (!isFinite(angle))
- return angle < 0 ? String("-inf") :
- (angle > 0 ? String("inf") : String("nan"));
-
- // 15 - 2 * trailing = ceiling(log10(2^53/90/60^trailing)).
- // This suffices to give full real precision for numbers in [-90,90]
- prec = Math.min(15 - 2 * trailing, prec);
- var scale = 1, i;
- for (i = 0; i < trailing; ++i)
- scale *= 60;
- for (i = 0; i < prec; ++i)
- scale *= 10;
- if (ind == d.AZIMUTH)
- angle -= Math.floor(angle/360) * 360;
- var sign = angle < 0 ? -1 : 1;
- angle *= sign;
-
- // Break off integer part to preserve precision in manipulation of
- // fractional part.
- var
- idegree = Math.floor(angle),
- fdegree = Math.floor((angle - idegree) * scale + 0.5) / scale;
- if (fdegree >= 1) {
- idegree += 1;
- fdegree -= 1;
- }
- var pieces = [fdegree, 0, 0];
- for (i = 1; i <= trailing; ++i) {
- var
- ip = Math.floor(pieces[i - 1]),
- fp = pieces[i - 1] - ip;
- pieces[i] = fp * 60;
- pieces[i - 1] = ip;
- }
- pieces[0] += idegree;
- var s = new String("");
- if (ind == d.NONE && sign < 0)
- s += '-';
- switch (trailing) {
- case d.DEGREE:
- s += d.zerofill(pieces[0].toFixed(prec),
- ind == d.NONE ? 0 :
- 1 + Math.min(ind, 2) + prec + (prec ? 1 : 0)) +
- d.dmsindicatorsu_.charAt(0);
- break;
- default:
- s += d.zerofill(pieces[0].toFixed(0),
- ind == d.NONE ? 0 : 1 + Math.min(ind, 2)) +
- d.dmsindicatorsu_.charAt(0);
- switch (trailing) {
- case d.MINUTE:
- s += d.zerofill(pieces[1].toFixed(prec), 2 + prec + (prec ? 1 : 0)) +
- d.dmsindicatorsu_.charAt(1);
- break;
- case d.SECOND:
- s += d.zerofill(pieces[1].toFixed(0), 2) + d.dmsindicatorsu_.charAt(1);
- s += d.zerofill(pieces[2].toFixed(prec), 2 + prec + (prec ? 1 : 0)) +
- d.dmsindicatorsu_.charAt(2);
- break;
- default:
- break;
- }
- }
- if (ind != d.NONE && ind != d.AZIMUTH)
- s += d.hemispheres_.charAt((ind == d.LATITUDE ? 0 : 2) +
- (sign < 0 ? 0 : 1));
- return s;
- }
-
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Geodesic.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Geodesic.js
deleted file mode 100644
index cf059126f..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Geodesic.js
+++ /dev/null
@@ -1,1019 +0,0 @@
-/**
- * Geodesic.js
- * Transcription of Geodesic.[ch]pp into JavaScript.
- *
- * See the documentation for the C++ class. The conversion is a literal
- * conversion from C++.
- *
- * The algorithms are derived in
- *
- * Charles F. F. Karney,
- * Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- * http://dx.doi.org/10.1007/s00190-012-0578-z
- * Addenda: http://geographiclib.sf.net/geod-addenda.html
- *
- * Copyright (c) Charles Karney (2011-2013) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-// Load AFTER Math.js
-
-GeographicLib.Geodesic = {};
-GeographicLib.GeodesicLine = {};
-
-(function() {
- var m = GeographicLib.Math;
- var g = GeographicLib.Geodesic;
- var l = GeographicLib.GeodesicLine;
- g.GEOGRAPHICLIB_GEODESIC_ORDER = 6;
- g.nA1_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nC1_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nC1p_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nA2_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nC2_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nA3_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nA3x_ = g.nA3_;
- g.nC3_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nC3x_ = (g.nC3_ * (g.nC3_ - 1)) / 2;
- g.nC4_ = g.GEOGRAPHICLIB_GEODESIC_ORDER;
- g.nC4x_ = (g.nC4_ * (g.nC4_ + 1)) / 2;
- g.maxit1_ = 20;
- g.maxit2_ = g.maxit1_ + m.digits + 10;
- g.tiny_ = Math.sqrt(Number.MIN_VALUE);
- g.tol0_ = m.epsilon;
- g.tol1_ = 200 * g.tol0_;
- g.tol2_ = Math.sqrt(g.tol0_);
- g.tolb_ = g.tol0_ * g.tol1_;
- g.xthresh_ = 1000 * g.tol2_;
-
- g.CAP_NONE = 0;
- g.CAP_C1 = 1<<0;
- g.CAP_C1p = 1<<1;
- g.CAP_C2 = 1<<2;
- g.CAP_C3 = 1<<3;
- g.CAP_C4 = 1<<4;
- g.CAP_ALL = 0x1F;
- g.OUT_ALL = 0x7F80;
- g.NONE = 0;
- g.LATITUDE = 1<<7 | g.CAP_NONE;
- g.LONGITUDE = 1<<8 | g.CAP_C3;
- g.AZIMUTH = 1<<9 | g.CAP_NONE;
- g.DISTANCE = 1<<10 | g.CAP_C1;
- g.DISTANCE_IN = 1<<11 | g.CAP_C1 | g.CAP_C1p;
- g.REDUCEDLENGTH = 1<<12 | g.CAP_C1 | g.CAP_C2;
- g.GEODESICSCALE = 1<<13 | g.CAP_C1 | g.CAP_C2;
- g.AREA = 1<<14 | g.CAP_C4;
- g.ALL = g.OUT_ALL| g.CAP_ALL;
-
- g.SinCosSeries = function(sinp, sinx, cosx, c, n) {
- // Evaluate
- // y = sinp ? sum(c[i] * sin( 2*i * x), i, 1, n) :
- // sum(c[i] * cos((2*i+1) * x), i, 0, n-1)
- // using Clenshaw summation. N.B. c[0] is unused for sin series
- // Approx operation count = (n + 5) mult and (2 * n + 2) add
- var k = n + (sinp ? 1 : 0); // Point to one beyond last element
- var
- ar = 2 * (cosx - sinx) * (cosx + sinx), // 2 * cos(2 * x)
- y0 = n & 1 ? c[--k] : 0, y1 = 0; // accumulators for sum
- // Now n is even
- n = Math.floor(n/2);
- while (n--) {
- // Unroll loop x 2, so accumulators return to their original role
- y1 = ar * y0 - y1 + c[--k];
- y0 = ar * y1 - y0 + c[--k];
- }
- return (sinp
- ? 2 * sinx * cosx * y0 // sin(2 * x) * y0
- : cosx * (y0 - y1)); // cos(x) * (y0 - y1)
- }
-
- g.AngRound = function(x) {
- // The makes the smallest gap in x = 1/16 - nextafter(1/16, 0) = 1/2^57
- // for reals = 0.7 pm on the earth if x is an angle in degrees. (This
- // is about 1000 times more resolution than we get with angles around 90
- // degrees.) We use this to avoid having to deal with near singular
- // cases when x is non-zero but tiny (e.g., 1.0e-200).
- var z = 1/16;
- var y = Math.abs(x);
- // The compiler mustn't "simplify" z - (z - y) to y
- y = y < z ? z - (z - y) : y;
- return x < 0 ? -y : y;
- }
- g.Astroid = function(x, y) {
- // Solve k^4+2*k^3-(x^2+y^2-1)*k^2-2*y^2*k-y^2 = 0 for positive
- // root k. This solution is adapted from Geocentric::Reverse.
- var k;
- var
- p = m.sq(x),
- q = m.sq(y),
- r = (p + q - 1) / 6;
- if ( !(q == 0 && r <= 0) ) {
- var
- // Avoid possible division by zero when r = 0 by multiplying
- // equations for s and t by r^3 and r, resp.
- S = p * q / 4, // S = r^3 * s
- r2 = m.sq(r),
- r3 = r * r2,
- // The discrimant of the quadratic equation for T3. This is
- // zero on the evolute curve p^(1/3)+q^(1/3) = 1
- disc = S * (S + 2 * r3);
- var u = r;
- if (disc >= 0) {
- var T3 = S + r3;
- // Pick the sign on the sqrt to maximize abs(T3). This
- // minimizes loss of precision due to cancellation. The
- // result is unchanged because of the way the T is used
- // in definition of u.
- T3 += T3 < 0 ? -Math.sqrt(disc)
- : Math.sqrt(disc); // T3 = (r * t)^3
- // N.B. cbrt always returns the real root. cbrt(-8) = -2.
- var T = m.cbrt(T3); // T = r * t
- // T can be zero; but then r2 / T -> 0.
- u += T + (T != 0 ? r2 / T : 0);
- } else {
- // T is complex, but the way u is defined the result is real.
- var ang = Math.atan2(Math.sqrt(-disc), -(S + r3));
- // There are three possible cube roots. We choose the
- // root which avoids cancellation. Note that disc < 0
- // implies that r < 0.
- u += 2 * r * Math.cos(ang / 3);
- }
- var
- v = Math.sqrt(m.sq(u) + q), // guaranteed positive
- // Avoid loss of accuracy when u < 0.
- uv = u < 0 ? q / (v - u) : u + v, // u+v, guaranteed positive
- w = (uv - q) / (2 * v); // positive?
- // Rearrange expression for k to avoid loss of accuracy due to
- // subtraction. Division by 0 not possible because uv > 0, w >= 0.
- k = uv / (Math.sqrt(uv + m.sq(w)) + w); // guaranteed positive
- } else { // q == 0 && r <= 0
- // y = 0 with |x| <= 1. Handle this case directly.
- // for y small, positive root is k = abs(y)/sqrt(1-x^2)
- k = 0;
- }
- return k;
- }
-
- g.A1m1f = function(eps) {
- var
- eps2 = m.sq(eps),
- t = eps2*(eps2*(eps2+4)+64)/256;
- return (t + eps) / (1 - eps);
- }
-
- g.C1f = function(eps, c) {
- var
- eps2 = m.sq(eps),
- d = eps;
- c[1] = d*((6-eps2)*eps2-16)/32;
- d *= eps;
- c[2] = d*((64-9*eps2)*eps2-128)/2048;
- d *= eps;
- c[3] = d*(9*eps2-16)/768;
- d *= eps;
- c[4] = d*(3*eps2-5)/512;
- d *= eps;
- c[5] = -7*d/1280;
- d *= eps;
- c[6] = -7*d/2048;
- }
-
- g.C1pf = function(eps, c) {
- var
- eps2 = m.sq(eps),
- d = eps;
- c[1] = d*(eps2*(205*eps2-432)+768)/1536;
- d *= eps;
- c[2] = d*(eps2*(4005*eps2-4736)+3840)/12288;
- d *= eps;
- c[3] = d*(116-225*eps2)/384;
- d *= eps;
- c[4] = d*(2695-7173*eps2)/7680;
- d *= eps;
- c[5] = 3467*d/7680;
- d *= eps;
- c[6] = 38081*d/61440;
- }
-
- g.A2m1f = function(eps) {
- var
- eps2 = m.sq(eps),
- t = eps2*(eps2*(25*eps2+36)+64)/256;
- return t * (1 - eps) - eps;
- }
-
- g.C2f = function(eps, c) {
- var
- eps2 = m.sq(eps),
- d = eps;
- c[1] = d*(eps2*(eps2+2)+16)/32;
- d *= eps;
- c[2] = d*(eps2*(35*eps2+64)+384)/2048;
- d *= eps;
- c[3] = d*(15*eps2+80)/768;
- d *= eps;
- c[4] = d*(7*eps2+35)/512;
- d *= eps;
- c[5] = 63*d/1280;
- d *= eps;
- c[6] = 77*d/2048;
- }
-
- g.Geodesic = function(a, f) {
- this._a = a;
- this._f = f <= 1 ? f : 1/f;
- this._f1 = 1 - this._f;
- this._e2 = this._f * (2 - this._f);
- this._ep2 = this._e2 / m.sq(this._f1); // e2 / (1 - e2)
- this._n = this._f / ( 2 - this._f);
- this._b = this._a * this._f1;
- // authalic radius squared
- this._c2 = (m.sq(this._a) + m.sq(this._b) *
- (this._e2 == 0 ? 1 :
- (this._e2 > 0 ? m.atanh(Math.sqrt(this._e2)) :
- Math.atan(Math.sqrt(-this._e2))) /
- Math.sqrt(Math.abs(this._e2))))/2;
- // The sig12 threshold for "really short". Using the auxiliary sphere
- // solution with dnm computed at (bet1 + bet2) / 2, the relative error in
- // the azimuth consistency check is sig12^2 * abs(f) * min(1, 1-f/2) / 2.
- // (Error measured for 1/100 < b/a < 100 and abs(f) >= 1/1000. For a given
- // f and sig12, the max error occurs for lines near the pole. If the old
- // rule for computing dnm = (dn1 + dn2)/2 is used, then the error increases
- // by a factor of 2.) Setting this equal to epsilon gives sig12 = etol2.
- // Here 0.1 is a safety factor (error decreased by 100) and max(0.001,
- // abs(f)) stops etol2 getting too large in the nearly spherical case.
- this._etol2 = 0.1 * g.tol2_ /
- Math.sqrt( Math.max(0.001, Math.abs(this._f)) *
- Math.min(1.0, 1 - this._f/2) / 2 );
- if (!(isFinite(this._a) && this._a > 0))
- throw new Error("Major radius is not positive");
- if (!(isFinite(this._b) && this._b > 0))
- throw new Error("Minor radius is not positive");
- this._A3x = new Array(g.nA3x_);
- this._C3x = new Array(g.nC3x_);
- this._C4x = new Array(g.nC4x_);
- this.A3coeff();
- this.C3coeff();
- this.C4coeff();
- }
-
- g.Geodesic.prototype.A3coeff = function() {
- var _n = this._n;
- this._A3x[0] = 1;
- this._A3x[1] = (_n-1)/2;
- this._A3x[2] = (_n*(3*_n-1)-2)/8;
- this._A3x[3] = ((-_n-3)*_n-1)/16;
- this._A3x[4] = (-2*_n-3)/64;
- this._A3x[5] = -3/128;
- }
-
- g.Geodesic.prototype.C3coeff = function() {
- var _n = this._n;
- this._C3x[0] = (1-_n)/4;
- this._C3x[1] = (1-_n*_n)/8;
- this._C3x[2] = ((3-_n)*_n+3)/64;
- this._C3x[3] = (2*_n+5)/128;
- this._C3x[4] = 3/128;
- this._C3x[5] = ((_n-3)*_n+2)/32;
- this._C3x[6] = ((-3*_n-2)*_n+3)/64;
- this._C3x[7] = (_n+3)/128;
- this._C3x[8] = 5/256;
- this._C3x[9] = (_n*(5*_n-9)+5)/192;
- this._C3x[10] = (9-10*_n)/384;
- this._C3x[11] = 7/512;
- this._C3x[12] = (7-14*_n)/512;
- this._C3x[13] = 7/512;
- this._C3x[14] = 21/2560;
- }
-
- g.Geodesic.prototype.C4coeff = function() {
- var _n = this._n;
- this._C4x[0] = (_n*(_n*(_n*(_n*(100*_n+208)+572)+3432)-12012)+30030)/45045;
- this._C4x[1] = (_n*(_n*(_n*(64*_n+624)-4576)+6864)-3003)/15015;
- this._C4x[2] = (_n*((14144-10656*_n)*_n-4576)-858)/45045;
- this._C4x[3] = ((-224*_n-4784)*_n+1573)/45045;
- this._C4x[4] = (1088*_n+156)/45045;
- this._C4x[5] = 97/15015.0;
- this._C4x[6] = (_n*(_n*((-64*_n-624)*_n+4576)-6864)+3003)/135135;
- this._C4x[7] = (_n*(_n*(5952*_n-11648)+9152)-2574)/135135;
- this._C4x[8] = (_n*(5792*_n+1040)-1287)/135135;
- this._C4x[9] = (468-2944*_n)/135135;
- this._C4x[10] = 1/9009.0;
- this._C4x[11] = (_n*((4160-1440*_n)*_n-4576)+1716)/225225;
- this._C4x[12] = ((4992-8448*_n)*_n-1144)/225225;
- this._C4x[13] = (1856*_n-936)/225225;
- this._C4x[14] = 8/10725.0;
- this._C4x[15] = (_n*(3584*_n-3328)+1144)/315315;
- this._C4x[16] = (1024*_n-208)/105105;
- this._C4x[17] = -136/63063.0;
- this._C4x[18] = (832-2560*_n)/405405;
- this._C4x[19] = -128/135135.0;
- this._C4x[20] = 128/99099.0;
- }
-
- g.Geodesic.prototype.A3f = function(eps) {
- // Evaluate sum(_A3x[k] * eps^k, k, 0, nA3x_-1) by Horner's method
- var v = 0;
- for (var i = g.nA3x_; i; )
- v = eps * v + this._A3x[--i];
- return v;
- }
-
- g.Geodesic.prototype.C3f = function(eps, c) {
- // Evaluate C3 coeffs by Horner's method
- // Elements c[1] thru c[nC3_ - 1] are set
- for (var j = g.nC3x_, k = g.nC3_ - 1; k; ) {
- var t = 0;
- for (var i = g.nC3_ - k; i; --i)
- t = eps * t + this._C3x[--j];
- c[k--] = t;
- }
-
- var mult = 1;
- for (var k = 1; k < g.nC3_; ) {
- mult *= eps;
- c[k++] *= mult;
- }
- }
-
- g.Geodesic.prototype.C4f = function(eps, c) {
- // Evaluate C4 coeffs by Horner's method
- // Elements c[0] thru c[nC4_ - 1] are set
- for (var j = g.nC4x_, k = g.nC4_; k; ) {
- var t = 0;
- for (var i = g.nC4_ - k + 1; i; --i)
- t = eps * t + this._C4x[--j];
- c[--k] = t;
- }
-
- var mult = 1;
- for (var k = 1; k < g.nC4_; ) {
- mult *= eps;
- c[k++] *= mult;
- }
- }
-
- // return s12b, m12b, m0, M12, M21
- g.Geodesic.prototype.Lengths = function(eps, sig12,
- ssig1, csig1, dn1, ssig2, csig2, dn2,
- cbet1, cbet2, scalep,
- C1a, C2a) {
- var vals = {};
- // Return m12b = (reduced length)/_b; also calculate s12b =
- // distance/_b, and m0 = coefficient of secular term in
- // expression for reduced length.
- g.C1f(eps, C1a);
- g.C2f(eps, C2a);
- var
- A1m1 = g.A1m1f(eps),
- AB1 = (1 + A1m1) * (g.SinCosSeries(true, ssig2, csig2, C1a, g.nC1_) -
- g.SinCosSeries(true, ssig1, csig1, C1a, g.nC1_)),
- A2m1 = g.A2m1f(eps),
- AB2 = (1 + A2m1) * (g.SinCosSeries(true, ssig2, csig2, C2a, g.nC2_) -
- g.SinCosSeries(true, ssig1, csig1, C2a, g.nC2_));
- vals.m0 = A1m1 - A2m1;
- var J12 = vals.m0 * sig12 + (AB1 - AB2);
- // Missing a factor of _b.
- // Add parens around (csig1 * ssig2) and (ssig1 * csig2) to
- // ensure accurate cancellation in the case of coincident
- // points.
- vals.m12b = dn2 * (csig1 * ssig2) - dn1 * (ssig1 * csig2)
- - csig1 * csig2 * J12;
- // Missing a factor of _b
- vals.s12b = (1 + A1m1) * sig12 + AB1;
- if (scalep) {
- var csig12 = csig1 * csig2 + ssig1 * ssig2;
- var t = this._ep2 * (cbet1 - cbet2) * (cbet1 + cbet2) / (dn1 + dn2);
- vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * ssig1 / dn1;
- vals.M21 = csig12 - (t * ssig1 - csig1 * J12) * ssig2 / dn2;
- }
- return vals;
- }
-
- // return sig12, salp1, calp1, salp2, calp2, dnm
- g.Geodesic.prototype.InverseStart = function(sbet1, cbet1, dn1,
- sbet2, cbet2, dn2, lam12,
- C1a, C2a) {
- // Return a starting point for Newton's method in salp1 and calp1
- // (function value is -1). If Newton's method doesn't need to be
- // used, return also salp2 and calp2 and function value is sig12.
- // salp2, calp2 only updated if return val >= 0.
- var
- vals = {},
- // bet12 = bet2 - bet1 in [0, pi); bet12a = bet2 + bet1 in (-pi, 0]
- sbet12 = sbet2 * cbet1 - cbet2 * sbet1,
- cbet12 = cbet2 * cbet1 + sbet2 * sbet1;
- vals.sig12 = -1; // Return value
- // Volatile declaration needed to fix inverse cases
- // 88.202499451857 0 -88.202499451857 179.981022032992859592
- // 89.262080389218 0 -89.262080389218 179.992207982775375662
- // 89.333123580033 0 -89.333123580032997687 179.99295812360148422
- // which otherwise fail with g++ 4.4.4 x86 -O3
- var sbet12a = sbet2 * cbet1;
- sbet12a += cbet2 * sbet1;
-
- var shortline = cbet12 >= 0 && sbet12 < 0.5 && cbet2 * lam12 < 0.5;
- var omg12 = lam12;
- if (shortline) {
- var sbetm2 = m.sq(sbet1 + sbet2);
- // sin((bet1+bet2)/2)^2
- // = (sbet1 + sbet2)^2 / ((sbet1 + sbet2)^2 + (cbet1 + cbet2)^2)
- sbetm2 /= sbetm2 + m.sq(cbet1 + cbet2);
- vals.dnm = Math.sqrt(1 + this._ep2 * sbetm2);
- omg12 /= this._f1 * vals.dnm;
- }
- var somg12 = Math.sin(omg12), comg12 = Math.cos(omg12);
-
- vals.salp1 = cbet2 * somg12;
- vals.calp1 = comg12 >= 0 ?
- sbet12 + cbet2 * sbet1 * m.sq(somg12) / (1 + comg12) :
- sbet12a - cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
-
- var
- ssig12 = m.hypot(vals.salp1, vals.calp1),
- csig12 = sbet1 * sbet2 + cbet1 * cbet2 * comg12;
-
- if (shortline && ssig12 < this._etol2) {
- // really short lines
- vals.salp2 = cbet1 * somg12;
- vals.calp2 = sbet12 - cbet1 * sbet2 *
- (comg12 >= 0 ? m.sq(somg12) / (1 + comg12) : 1 - comg12);
- // SinCosNorm(vals.salp2, vals.calp2);
- var t = m.hypot(vals.salp2, vals.calp2); vals.salp2 /= t; vals.calp2 /= t;
- // Set return value
- vals.sig12 = Math.atan2(ssig12, csig12);
- } else if (Math.abs(this._n) > 0.1 || // Skip astroid calc if too eccentric
- csig12 >= 0 ||
- ssig12 >= 6 * Math.abs(this._n) * Math.PI * m.sq(cbet1)) {
- // Nothing to do, zeroth order spherical approximation is OK
- } else {
- // Scale lam12 and bet2 to x, y coordinate system where antipodal
- // point is at origin and singular point is at y = 0, x = -1.
- var y, lamscale, betscale;
- // Volatile declaration needed to fix inverse case
- // 56.320923501171 0 -56.320923501171 179.664747671772880215
- // which otherwise fails with g++ 4.4.4 x86 -O3
- var x;
- if (this._f >= 0) { // In fact f == 0 does not get here
- // x = dlong, y = dlat
- {
- var
- k2 = m.sq(sbet1) * this._ep2,
- eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
- lamscale = this._f * cbet1 * this.A3f(eps) * Math.PI;
- }
- betscale = lamscale * cbet1;
-
- x = (lam12 - Math.PI) / lamscale;
- y = sbet12a / betscale;
- } else { // _f < 0
- // x = dlat, y = dlong
- var
- cbet12a = cbet2 * cbet1 - sbet2 * sbet1,
- bet12a = Math.atan2(sbet12a, cbet12a);
- var m12b, m0;
- // In the case of lon12 = 180, this repeats a calculation made
- // in Inverse.
- var nvals = this.Lengths(this._n, Math.PI + bet12a,
- sbet1, -cbet1, dn1, sbet2, cbet2, dn2,
- cbet1, cbet2, false, C1a, C2a);
- m12b = nvals.m12b; m0 = nvals.m0;
- x = -1 + m12b / (cbet1 * cbet2 * m0 * Math.PI);
- betscale = x < -0.01 ? sbet12a / x :
- -this._f * m.sq(cbet1) * Math.PI;
- lamscale = betscale / cbet1;
- y = (lam12 - Math.PI) / lamscale;
- }
-
- if (y > -g.tol1_ && x > -1 - g.xthresh_) {
- // strip near cut
- if (this._f >= 0) {
- vals.salp1 = Math.min(1, -x);
- vals.calp1 = - Math.sqrt(1 - m.sq(vals.salp1));
- } else {
- vals.calp1 = Math.max(x > -g.tol1_ ? 0 : -1, x);
- vals.salp1 = Math.sqrt(1 - m.sq(vals.calp1));
- }
- } else {
- // Estimate alp1, by solving the astroid problem.
- //
- // Could estimate alpha1 = theta + pi/2, directly, i.e.,
- // calp1 = y/k; salp1 = -x/(1+k); for _f >= 0
- // calp1 = x/(1+k); salp1 = -y/k; for _f < 0 (need to check)
- //
- // However, it's better to estimate omg12 from astroid and use
- // spherical formula to compute alp1. This reduces the mean number of
- // Newton iterations for astroid cases from 2.24 (min 0, max 6) to 2.12
- // (min 0 max 5). The changes in the number of iterations are as
- // follows:
- //
- // change percent
- // 1 5
- // 0 78
- // -1 16
- // -2 0.6
- // -3 0.04
- // -4 0.002
- //
- // The histogram of iterations is (m = number of iterations estimating
- // alp1 directly, n = number of iterations estimating via omg12, total
- // number of trials = 148605):
- //
- // iter m n
- // 0 148 186
- // 1 13046 13845
- // 2 93315 102225
- // 3 36189 32341
- // 4 5396 7
- // 5 455 1
- // 6 56 0
- //
- // Because omg12 is near pi, estimate work with omg12a = pi - omg12
- var k = g.Astroid(x, y);
- var
- omg12a = lamscale * ( this._f >= 0 ? -x * k/(1 + k) : -y * (1 + k)/k );
- somg12 = Math.sin(omg12a); comg12 = -Math.cos(omg12a);
- // Update spherical estimate of alp1 using omg12 instead of
- // lam12
- vals.salp1 = cbet2 * somg12;
- vals.calp1 = sbet12a -
- cbet2 * sbet1 * m.sq(somg12) / (1 - comg12);
- }
- }
- if (vals.salp1 > 0) { // Sanity check on starting guess
- // SinCosNorm(vals.salp1, vals.calp1);
- var t = m.hypot(vals.salp1, vals.calp1); vals.salp1 /= t; vals.calp1 /= t;
- } else {
- vals.salp1 = 1; vals.calp1 = 0;
- }
- return vals;
- }
-
- // return lam12, salp2, calp2, sig12, ssig1, csig1, ssig2, csig2, eps,
- // domg12, dlam12,
- g.Geodesic.prototype.Lambda12 = function(sbet1, cbet1, dn1, sbet2, cbet2, dn2,
- salp1, calp1, diffp,
- C1a, C2a, C3a) {
- var vals = {};
- if (sbet1 == 0 && calp1 == 0)
- // Break degeneracy of equatorial line. This case has already been
- // handled.
- calp1 = -g.tiny_;
-
- var
- // sin(alp1) * cos(bet1) = sin(alp0)
- salp0 = salp1 * cbet1,
- calp0 = m.hypot(calp1, salp1 * sbet1); // calp0 > 0
-
- var somg1, comg1, somg2, comg2, omg12;
- // tan(bet1) = tan(sig1) * cos(alp1)
- // tan(omg1) = sin(alp0) * tan(sig1) = tan(omg1)=tan(alp1)*sin(bet1)
- vals.ssig1 = sbet1; somg1 = salp0 * sbet1;
- vals.csig1 = comg1 = calp1 * cbet1;
- // SinCosNorm(vals.ssig1, vals.csig1);
- var t = m.hypot(vals.ssig1, vals.csig1); vals.ssig1 /= t; vals.csig1 /= t;
- // SinCosNorm(somg1, comg1); -- don't need to normalize!
-
- // Enforce symmetries in the case abs(bet2) = -bet1. Need to be careful
- // about this case, since this can yield singularities in the Newton
- // iteration.
- // sin(alp2) * cos(bet2) = sin(alp0)
- vals.salp2 = cbet2 != cbet1 ? salp0 / cbet2 : salp1;
- // calp2 = sqrt(1 - sq(salp2))
- // = sqrt(sq(calp0) - sq(sbet2)) / cbet2
- // and subst for calp0 and rearrange to give (choose positive sqrt
- // to give alp2 in [0, pi/2]).
- vals.calp2 = cbet2 != cbet1 || Math.abs(sbet2) != -sbet1 ?
- Math.sqrt(m.sq(calp1 * cbet1) + (cbet1 < -sbet1 ?
- (cbet2 - cbet1) * (cbet1 + cbet2) :
- (sbet1 - sbet2) * (sbet1 + sbet2)))
- / cbet2 : Math.abs(calp1);
- // tan(bet2) = tan(sig2) * cos(alp2)
- // tan(omg2) = sin(alp0) * tan(sig2).
- vals.ssig2 = sbet2; somg2 = salp0 * sbet2;
- vals.csig2 = comg2 = vals.calp2 * cbet2;
- // SinCosNorm(vals.ssig2, vals.csig2);
- var t = m.hypot(vals.ssig2, vals.csig2); vals.ssig2 /= t; vals.csig2 /= t;
- // SinCosNorm(somg2, comg2); -- don't need to normalize!
-
- // sig12 = sig2 - sig1, limit to [0, pi]
- vals.sig12 = Math.atan2(Math.max(vals.csig1 * vals.ssig2 -
- vals.ssig1 * vals.csig2, 0),
- vals.csig1 * vals.csig2 + vals.ssig1 * vals.ssig2);
-
- // omg12 = omg2 - omg1, limit to [0, pi]
- omg12 = Math.atan2(Math.max(comg1 * somg2 - somg1 * comg2, 0),
- comg1 * comg2 + somg1 * somg2);
- var B312, h0;
- var k2 = m.sq(calp0) * this._ep2;
- vals.eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
- this.C3f(vals.eps, C3a);
- B312 = (g.SinCosSeries(true, vals.ssig2, vals.csig2, C3a, g.nC3_-1) -
- g.SinCosSeries(true, vals.ssig1, vals.csig1, C3a, g.nC3_-1));
- h0 = -this._f * this.A3f(vals.eps);
- vals.domg12 = salp0 * h0 * (vals.sig12 + B312);
- vals.lam12 = omg12 + vals.domg12;
-
- if (diffp) {
- if (vals.calp2 == 0)
- vals.dlam12 = - 2 * this._f1 * dn1 / sbet1;
- else {
- var nvals = this.Lengths(vals.eps, vals.sig12,
- vals.ssig1, vals.csig1, dn1,
- vals.ssig2, vals.csig2, dn2,
- cbet1, cbet2, false, C1a, C2a);
- vals.dlam12 = nvals.m12b;
- vals.dlam12 *= this._f1 / (vals.calp2 * cbet2);
- }
- }
- return vals;
- }
-
- // return a12, s12, azi1, azi2, m12, M12, M21, S12
- g.Geodesic.prototype.GenInverse = function(lat1, lon1, lat2, lon2, outmask) {
- var vals = {};
- outmask &= g.OUT_ALL;
- // Compute longitude difference (AngDiff does this carefully). Result is
- // in [-180, 180] but -180 is only for west-going geodesics. 180 is for
- // east-going and meridional geodesics.
- var lon12 = m.AngDiff(m.AngNormalize(lon1), m.AngNormalize(lon2));
- // If very close to being on the same half-meridian, then make it so.
- lon12 = g.AngRound(lon12);
- // Make longitude difference positive.
- var lonsign = lon12 >= 0 ? 1 : -1;
- lon12 *= lonsign;
- // If really close to the equator, treat as on equator.
- lat1 = g.AngRound(lat1);
- lat2 = g.AngRound(lat2);
- // Swap points so that point with higher (abs) latitude is point 1
- var swapp = Math.abs(lat1) >= Math.abs(lat2) ? 1 : -1;
- if (swapp < 0) {
- lonsign *= -1;
- var t = lat1;
- lat1 = lat2;
- lat2 = t;
- // swap(lat1, lat2);
- }
- // Make lat1 <= 0
- var latsign = lat1 < 0 ? 1 : -1;
- lat1 *= latsign;
- lat2 *= latsign;
- // Now we have
- //
- // 0 <= lon12 <= 180
- // -90 <= lat1 <= 0
- // lat1 <= lat2 <= -lat1
- //
- // longsign, swapp, latsign register the transformation to bring the
- // coordinates to this canonical form. In all cases, 1 means no change was
- // made. We make these transformations so that there are few cases to
- // check, e.g., on verifying quadrants in atan2. In addition, this
- // enforces some symmetries in the results returned.
-
- var phi, sbet1, cbet1, sbet2, cbet2, s12x, m12x;
-
- phi = lat1 * m.degree;
- // Ensure cbet1 = +epsilon at poles
- sbet1 = this._f1 * Math.sin(phi);
- cbet1 = lat1 == -90 ? g.tiny_ : Math.cos(phi);
- // SinCosNorm(sbet1, cbet1);
- var t = m.hypot(sbet1, cbet1); sbet1 /= t; cbet1 /= t;
-
- phi = lat2 * m.degree;
- // Ensure cbet2 = +epsilon at poles
- sbet2 = this._f1 * Math.sin(phi);
- cbet2 = Math.abs(lat2) == 90 ? g.tiny_ : Math.cos(phi);
- // SinCosNorm(sbet2, cbet2);
- var t = m.hypot(sbet2, cbet2); sbet2 /= t; cbet2 /= t;
-
- // If cbet1 < -sbet1, then cbet2 - cbet1 is a sensitive measure of the
- // |bet1| - |bet2|. Alternatively (cbet1 >= -sbet1), abs(sbet2) + sbet1 is
- // a better measure. This logic is used in assigning calp2 in Lambda12.
- // Sometimes these quantities vanish and in that case we force bet2 = +/-
- // bet1 exactly. An example where is is necessary is the inverse problem
- // 48.522876735459 0 -48.52287673545898293 179.599720456223079643
- // which failed with Visual Studio 10 (Release and Debug)
-
- if (cbet1 < -sbet1) {
- if (cbet2 == cbet1)
- sbet2 = sbet2 < 0 ? sbet1 : -sbet1;
- } else {
- if (Math.abs(sbet2) == -sbet1)
- cbet2 = cbet1;
- }
-
- var
- dn1 = Math.sqrt(1 + this._ep2 * m.sq(sbet1)),
- dn2 = Math.sqrt(1 + this._ep2 * m.sq(sbet2));
-
- var
- lam12 = lon12 * m.degree,
- slam12 = lon12 == 180 ? 0 : Math.sin(lam12),
- clam12 = Math.cos(lam12); // lon12 == 90 isn't interesting
-
- var sig12, calp1, salp1, calp2, salp2;
- // index zero elements of these arrays are unused
- var
- C1a = new Array(g.nC1_ + 1),
- C2a = new Array(g.nC2_ + 1),
- C3a = new Array(g.nC3_);
-
- var meridian = lat1 == -90 || slam12 == 0;
-
- if (meridian) {
-
- // Endpoints are on a single full meridian, so the geodesic might
- // lie on a meridian.
-
- calp1 = clam12; salp1 = slam12; // Head to the target longitude
- calp2 = 1; salp2 = 0; // At the target we're heading north
-
- var
- // tan(bet) = tan(sig) * cos(alp)
- ssig1 = sbet1, csig1 = calp1 * cbet1,
- ssig2 = sbet2, csig2 = calp2 * cbet2;
-
- // sig12 = sig2 - sig1
- sig12 = Math.atan2(Math.max(csig1 * ssig2 - ssig1 * csig2, 0),
- csig1 * csig2 + ssig1 * ssig2);
- {
- var nvals = this.Lengths(this._n, sig12,
- ssig1, csig1, dn1, ssig2, csig2, dn2,
- cbet1, cbet2, (outmask & g.GEODESICSCALE) != 0,
- C1a, C2a);
- s12x = nvals.s12b;
- m12x = nvals.m12b;
- // Ignore m0
- if ((outmask & g.GEODESICSCALE) != 0) {
- vals.M12 = nvals.M12;
- vals.M21 = nvals.M21;
- }
- }
- // Add the check for sig12 since zero length geodesics might yield
- // m12 < 0. Test case was
- //
- // echo 20.001 0 20.001 0 | GeodSolve -i
- //
- // In fact, we will have sig12 > pi/2 for meridional geodesic
- // which is not a shortest path.
- if (sig12 < 1 || m12x >= 0) {
- m12x *= this._b;
- s12x *= this._b;
- vals.a12 = sig12 / m.degree;
- } else
- // m12 < 0, i.e., prolate and too close to anti-podal
- meridian = false;
- }
-
- var omg12;
- if (!meridian &&
- sbet1 == 0 && // and sbet2 == 0
- // Mimic the way Lambda12 works with calp1 = 0
- (this._f <= 0 || lam12 <= Math.PI - this._f * Math.PI)) {
-
- // Geodesic runs along equator
- calp1 = calp2 = 0; salp1 = salp2 = 1;
- s12x = this._a * lam12;
- sig12 = omg12 = lam12 / this._f1;
- m12x = this._b * Math.sin(sig12);
- if (outmask & g.GEODESICSCALE)
- vals.M12 = vals.M21 = Math.cos(sig12);
- vals.a12 = lon12 / this._f1;
-
- } else if (!meridian) {
-
- // Now point1 and point2 belong within a hemisphere bounded by a
- // meridian and geodesic is neither meridional or equatorial.
-
- // Figure a starting point for Newton's method
- var nvals = this.InverseStart(sbet1, cbet1, dn1, sbet2, cbet2, dn2, lam12,
- C1a, C2a);
- sig12 = nvals.sig12;
- salp1 = nvals.salp1;
- calp1 = nvals.calp1;
-
- if (sig12 >= 0) {
- salp2 = nvals.salp2;
- calp2 = nvals.calp2;
- // Short lines (InverseStart sets salp2, calp2, dnm)
-
- var dnm = nvals.dnm;
- s12x = sig12 * this._b * dnm;
- m12x = m.sq(dnm) * this._b * Math.sin(sig12 / dnm);
- if (outmask & g.GEODESICSCALE)
- vals.M12 = vals.M21 = Math.cos(sig12 / dnm);
- vals.a12 = sig12 / m.degree;
- omg12 = lam12 / (this._f1 * dnm);
- } else {
-
- // Newton's method. This is a straightforward solution of f(alp1) =
- // lambda12(alp1) - lam12 = 0 with one wrinkle. f(alp) has exactly one
- // root in the interval (0, pi) and its derivative is positive at the
- // root. Thus f(alp) is positive for alp > alp1 and negative for alp <
- // alp1. During the course of the iteration, a range (alp1a, alp1b) is
- // maintained which brackets the root and with each evaluation of
- // f(alp) the range is shrunk if possible. Newton's method is
- // restarted whenever the derivative of f is negative (because the new
- // value of alp1 is then further from the solution) or if the new
- // estimate of alp1 lies outside (0,pi); in this case, the new starting
- // guess is taken to be (alp1a + alp1b) / 2.
- var ssig1, csig1, ssig2, csig2, eps;
- var numit = 0;
- // Bracketing range
- var salp1a = g.tiny_, calp1a = 1, salp1b = g.tiny_, calp1b = -1;
- for (var tripn = false, tripb = false; numit < g.maxit2_; ++numit) {
- // the WGS84 test set: mean = 1.47, sd = 1.25, max = 16
- // WGS84 and random input: mean = 2.85, sd = 0.60
- var dv;
- var nvals = this.Lambda12(sbet1, cbet1, dn1, sbet2, cbet2, dn2,
- salp1, calp1, numit < g.maxit1_,
- C1a, C2a, C3a);
- var v = nvals.lam12 - lam12;
- salp2 = nvals.salp2;
- calp2 = nvals.calp2;
- sig12 = nvals.sig12;
- ssig1 = nvals.ssig1;
- csig1 = nvals.csig1;
- ssig2 = nvals.ssig2;
- csig2 = nvals.csig2;
- eps = nvals.eps;
- omg12 = nvals.domg12;
- dv = nvals.dlam12;
-
- // 2 * tol0 is approximately 1 ulp for a number in [0, pi].
- // Reversed test to allow escape with NaNs
- if (tripb || !(Math.abs(v) >= (tripn ? 8 : 2) * g.tol0_))
- break;
- // Update bracketing values
- if (v > 0 && (numit < g.maxit1_ || calp1/salp1 > calp1b/salp1b)) {
- salp1b = salp1; calp1b = calp1;
- } else if (v < 0 &&
- (numit < g.maxit1_ || calp1/salp1 < calp1a/salp1a)) {
- salp1a = salp1; calp1a = calp1;
- }
- if (numit < g.maxit1_ && dv > 0) {
- var
- dalp1 = -v/dv;
- var
- sdalp1 = Math.sin(dalp1), cdalp1 = Math.cos(dalp1),
- nsalp1 = salp1 * cdalp1 + calp1 * sdalp1;
- if (nsalp1 > 0 && Math.abs(dalp1) < Math.PI) {
- calp1 = calp1 * cdalp1 - salp1 * sdalp1;
- salp1 = Math.max(0, nsalp1);
- // SinCosNorm(salp1, calp1);
- var t = m.hypot(salp1, calp1); salp1 /= t; calp1 /= t;
- // In some regimes we don't get quadratic convergence because
- // slope -> 0. So use convergence conditions based on epsilon
- // instead of sqrt(epsilon).
- tripn = Math.abs(v) <= 16 * g.tol0_;
- continue;
- }
- }
- // Either dv was not postive or updated value was outside legal
- // range. Use the midpoint of the bracket as the next estimate.
- // This mechanism is not needed for the WGS84 ellipsoid, but it does
- // catch problems with more eccentric ellipsoids. Its efficacy is
- // such for the WGS84 test set with the starting guess set to alp1 =
- // 90deg:
- // the WGS84 test set: mean = 5.21, sd = 3.93, max = 24
- // WGS84 and random input: mean = 4.74, sd = 0.99
- salp1 = (salp1a + salp1b)/2;
- calp1 = (calp1a + calp1b)/2;
- // SinCosNorm(salp1, calp1);
- var t = m.hypot(salp1, calp1); salp1 /= t; calp1 /= t;
- tripn = false;
- tripb = (Math.abs(salp1a - salp1) + (calp1a - calp1) < g.tolb_ ||
- Math.abs(salp1 - salp1b) + (calp1 - calp1b) < g.tolb_);
- }
- {
- var nvals = this.Lengths(eps, sig12,
- ssig1, csig1, dn1, ssig2, csig2, dn2,
- cbet1, cbet2,
- (outmask & g.GEODESICSCALE) != 0,
- C1a, C2a);
- s12x = nvals.s12b;
- m12x = nvals.m12b;
- // Ignore m0
- if ((outmask & g.GEODESICSCALE) != 0) {
- vals.M12 = nvals.M12;
- vals.M21 = nvals.M21;
- }
- }
- m12x *= this._b;
- s12x *= this._b;
- vals.a12 = sig12 / m.degree;
- omg12 = lam12 - omg12;
- }
- }
-
- if (outmask & g.DISTANCE)
- vals.s12 = 0 + s12x; // Convert -0 to 0
-
- if (outmask & g.REDUCEDLENGTH)
- vals.m12 = 0 + m12x; // Convert -0 to 0
-
- if (outmask & g.AREA) {
- var
- // From Lambda12: sin(alp1) * cos(bet1) = sin(alp0)
- salp0 = salp1 * cbet1,
- calp0 = m.hypot(calp1, salp1 * sbet1); // calp0 > 0
- var alp12;
- if (calp0 != 0 && salp0 != 0) {
- var
- // From Lambda12: tan(bet) = tan(sig) * cos(alp)
- ssig1 = sbet1, csig1 = calp1 * cbet1,
- ssig2 = sbet2, csig2 = calp2 * cbet2,
- k2 = m.sq(calp0) * this._ep2,
- eps = k2 / (2 * (1 + Math.sqrt(1 + k2)) + k2);
- // Multiplier = a^2 * e^2 * cos(alpha0) * sin(alpha0).
- A4 = m.sq(this._a) * calp0 * salp0 * this._e2;
- // SinCosNorm(ssig1, csig1);
- var t = m.hypot(ssig1, csig1); ssig1 /= t; csig1 /= t;
- // SinCosNorm(ssig2, csig2);
- var t = m.hypot(ssig2, csig2); ssig2 /= t; csig2 /= t;
- var C4a = new Array(g.nC4_);
- this.C4f(eps, C4a);
- var
- B41 = g.SinCosSeries(false, ssig1, csig1, C4a, g.nC4_),
- B42 = g.SinCosSeries(false, ssig2, csig2, C4a, g.nC4_);
- vals.S12 = A4 * (B42 - B41);
- } else
- // Avoid problems with indeterminate sig1, sig2 on equator
- vals.S12 = 0;
- if (!meridian &&
- omg12 < 0.75 * Math.PI && // Long difference too big
- sbet2 - sbet1 < 1.75) { // Lat difference too big
- // Use tan(Gamma/2) = tan(omg12/2)
- // * (tan(bet1/2)+tan(bet2/2))/(1+tan(bet1/2)*tan(bet2/2))
- // with tan(x/2) = sin(x)/(1+cos(x))
- var
- somg12 = Math.sin(omg12), domg12 = 1 + Math.cos(omg12),
- dbet1 = 1 + cbet1, dbet2 = 1 + cbet2;
- alp12 = 2 * Math.atan2( somg12 * (sbet1*dbet2 + sbet2*dbet1),
- domg12 * (sbet1*sbet2 + dbet1*dbet2) );
- } else {
- // alp12 = alp2 - alp1, used in atan2 so no need to normalize
- var
- salp12 = salp2 * calp1 - calp2 * salp1,
- calp12 = calp2 * calp1 + salp2 * salp1;
- // The right thing appears to happen if alp1 = +/-180 and alp2 = 0, viz
- // salp12 = -0 and alp12 = -180. However this depends on the sign
- // being attached to 0 correctly. The following ensures the correct
- // behavior.
- if (salp12 == 0 && calp12 < 0) {
- salp12 = g.tiny_ * calp1;
- calp12 = -1;
- }
- alp12 = Math.atan2(salp12, calp12);
- }
- vals.S12 += this._c2 * alp12;
- vals.S12 *= swapp * lonsign * latsign;
- // Convert -0 to 0
- vals.S12 += 0;
- }
-
- // Convert calp, salp to azimuth accounting for lonsign, swapp, latsign.
- if (swapp < 0) {
- var t = salp1;
- salp1 = salp2;
- salp2 = t;
- // swap(salp1, salp2);
- var t = calp1;
- calp1 = calp2;
- calp2 = t;
- // swap(calp1, calp2);
- if (outmask & g.GEODESICSCALE) {
- var t = vals.M12;
- vals.M12 = vals.M21;
- vals.M21 = t;
- // swap(vals.M12, vals.M21);
- }
- }
-
- salp1 *= swapp * lonsign; calp1 *= swapp * latsign;
- salp2 *= swapp * lonsign; calp2 *= swapp * latsign;
-
- if (outmask & g.AZIMUTH) {
- // minus signs give range [-180, 180). 0- converts -0 to +0.
- vals.azi1 = 0 - Math.atan2(-salp1, calp1) / m.degree;
- vals.azi2 = 0 - Math.atan2(-salp2, calp2) / m.degree;
- }
-
- // Returned value in [0, 180]
- return vals;
- }
-
- // return a12, lat2, lon2, azi2, s12, m12, M12, M21, S12
- g.Geodesic.prototype.GenDirect = function (lat1, lon1, azi1,
- arcmode, s12_a12, outmask) {
- var line = new l.GeodesicLine
- (this, lat1, lon1, azi1,
- // Automatically supply DISTANCE_IN if necessary
- outmask | (arcmode ? g.NONE : g.DISTANCE_IN));
- return line.GenPosition(arcmode, s12_a12, outmask);
- }
-
- g.WGS84 = new g.Geodesic(GeographicLib.Constants.WGS84.a,
- GeographicLib.Constants.WGS84.f);
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/GeodesicLine.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/GeodesicLine.js
deleted file mode 100644
index b2df9c1f6..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/GeodesicLine.js
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * GeodesicLine.js
- * Transcription of GeodesicLine.[ch]pp into JavaScript.
- *
- * See the documentation for the C++ class. The conversion is a literal
- * conversion from C++.
- *
- * The algorithms are derived in
- *
- * Charles F. F. Karney,
- * Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- * http://dx.doi.org/10.1007/s00190-012-0578-z
- * Addenda: http://geographiclib.sf.net/geod-addenda.html
- *
- * Copyright (c) Charles Karney (2011-2012) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-// Load AFTER GeographicLib/Math.js and GeographicLib/Geodesic.js
-
-(function() {
- var g = GeographicLib.Geodesic;
- var l = GeographicLib.GeodesicLine;
- var m = GeographicLib.Math;
-
- l.GeodesicLine = function(geod, lat1, lon1, azi1, caps) {
- this._a = geod._a;
- this._f = geod._f;
- this._b = geod._b;
- this._c2 = geod._c2;
- this._f1 = geod._f1;
- this._caps = !caps ? g.ALL : (caps | g.LATITUDE | g.AZIMUTH);
-
- azi1 = g.AngRound(m.AngNormalize(azi1));
- lon1 = m.AngNormalize(lon1);
- this._lat1 = lat1;
- this._lon1 = lon1;
- this._azi1 = azi1;
- // alp1 is in [0, pi]
- var alp1 = azi1 * m.degree;
- // Enforce sin(pi) == 0 and cos(pi/2) == 0. Better to face the ensuing
- // problems directly than to skirt them.
- this._salp1 = azi1 == -180 ? 0 : Math.sin(alp1);
- this._calp1 = Math.abs(azi1) == 90 ? 0 : Math.cos(alp1);
- var cbet1, sbet1, phi;
- phi = lat1 * m.degree;
- // Ensure cbet1 = +epsilon at poles
- sbet1 = this._f1 * Math.sin(phi);
- cbet1 = Math.abs(lat1) == 90 ? g.tiny_ : Math.cos(phi);
- // SinCosNorm(sbet1, cbet1);
- var t = m.hypot(sbet1, cbet1); sbet1 /= t; cbet1 /= t;
- this._dn1 = Math.sqrt(1 + geod._ep2 * m.sq(sbet1));
-
- // Evaluate alp0 from sin(alp1) * cos(bet1) = sin(alp0),
- this._salp0 = this._salp1 * cbet1; // alp0 in [0, pi/2 - |bet1|]
- // Alt: calp0 = hypot(sbet1, calp1 * cbet1). The following
- // is slightly better (consider the case salp1 = 0).
- this._calp0 = m.hypot(this._calp1, this._salp1 * sbet1);
- // Evaluate sig with tan(bet1) = tan(sig1) * cos(alp1).
- // sig = 0 is nearest northward crossing of equator.
- // With bet1 = 0, alp1 = pi/2, we have sig1 = 0 (equatorial line).
- // With bet1 = pi/2, alp1 = -pi, sig1 = pi/2
- // With bet1 = -pi/2, alp1 = 0 , sig1 = -pi/2
- // Evaluate omg1 with tan(omg1) = sin(alp0) * tan(sig1).
- // With alp0 in (0, pi/2], quadrants for sig and omg coincide.
- // No atan2(0,0) ambiguity at poles since cbet1 = +epsilon.
- // With alp0 = 0, omg1 = 0 for alp1 = 0, omg1 = pi for alp1 = pi.
- this._ssig1 = sbet1; this._somg1 = this._salp0 * sbet1;
- this._csig1 = this._comg1 =
- sbet1 != 0 || this._calp1 != 0 ? cbet1 * this._calp1 : 1;
- // SinCosNorm(this._ssig1, this._csig1); // sig1 in (-pi, pi]
- var t = m.hypot(this._ssig1, this._csig1);
- this._ssig1 /= t; this._csig1 /= t;
- // SinCosNorm(this._somg1, this._comg1); -- don't need to normalize!
-
- this._k2 = m.sq(this._calp0) * geod._ep2;
- var eps = this._k2 / (2 * (1 + Math.sqrt(1 + this._k2)) + this._k2);
-
- if (this._caps & g.CAP_C1) {
- this._A1m1 = g.A1m1f(eps);
- this._C1a = new Array(g.nC1_ + 1);
- g.C1f(eps, this._C1a);
- this._B11 = g.SinCosSeries(true, this._ssig1, this._csig1,
- this._C1a, g.nC1_);
- var s = Math.sin(this._B11), c = Math.cos(this._B11);
- // tau1 = sig1 + B11
- this._stau1 = this._ssig1 * c + this._csig1 * s;
- this._ctau1 = this._csig1 * c - this._ssig1 * s;
- // Not necessary because C1pa reverts C1a
- // _B11 = -SinCosSeries(true, _stau1, _ctau1, _C1pa, nC1p_);
- }
-
- if (this._caps & g.CAP_C1p) {
- this._C1pa = new Array(g.nC1p_ + 1),
- g.C1pf(eps, this._C1pa);
- }
-
- if (this._caps & g.CAP_C2) {
- this._A2m1 = g.A2m1f(eps);
- this._C2a = new Array(g.nC2_ + 1);
- g.C2f(eps, this._C2a);
- this._B21 = g.SinCosSeries(true, this._ssig1, this._csig1,
- this._C2a, g.nC2_);
- }
-
- if (this._caps & g.CAP_C3) {
- this._C3a = new Array(g.nC3_);
- geod.C3f(eps, this._C3a);
- this._A3c = -this._f * this._salp0 * geod.A3f(eps);
- this._B31 = g.SinCosSeries(true, this._ssig1, this._csig1,
- this._C3a, g.nC3_-1);
- }
-
- if (this._caps & g.CAP_C4) {
- this._C4a = new Array(g.nC4_); // all the elements of _C4a are used
- geod.C4f(eps, this._C4a);
- // Multiplier = a^2 * e^2 * cos(alpha0) * sin(alpha0)
- this._A4 = m.sq(this._a) * this._calp0 * this._salp0 * geod._e2;
- this._B41 = g.SinCosSeries(false, this._ssig1, this._csig1,
- this._C4a, g.nC4_);
- }
- }
-
- // return a12, lat2, lon2, azi2, s12, m12, M12, M21, S12
- l.GeodesicLine.prototype.GenPosition = function(arcmode, s12_a12,
- outmask) {
- var vals = {};
- outmask &= this._caps & g.OUT_ALL;
- if (!( arcmode || (this._caps & g.DISTANCE_IN & g.OUT_ALL) )) {
- // Uninitialized or impossible distance calculation requested
- vals.a12 = Number.NaN;
- return vals;
- }
-
- // Avoid warning about uninitialized B12.
- var sig12, ssig12, csig12, B12 = 0, AB1 = 0;
- if (arcmode) {
- // Interpret s12_a12 as spherical arc length
- sig12 = s12_a12 * m.degree;
- var s12a = Math.abs(s12_a12);
- s12a -= 180 * Math.floor(s12a / 180);
- ssig12 = s12a == 0 ? 0 : Math.sin(sig12);
- csig12 = s12a == 90 ? 0 : Math.cos(sig12);
- } else {
- // Interpret s12_a12 as distance
- var
- tau12 = s12_a12 / (this._b * (1 + this._A1m1)),
- s = Math.sin(tau12),
- c = Math.cos(tau12);
- // tau2 = tau1 + tau12
- B12 = - g.SinCosSeries(true,
- this._stau1 * c + this._ctau1 * s,
- this._ctau1 * c - this._stau1 * s,
- this._C1pa, g.nC1p_);
- sig12 = tau12 - (B12 - this._B11);
- ssig12 = Math.sin(sig12); csig12 = Math.cos(sig12);
- if (Math.abs(this._f) > 0.01) {
- // Reverted distance series is inaccurate for |f| > 1/100, so correct
- // sig12 with 1 Newton iteration. The following table shows the
- // approximate maximum error for a = WGS_a() and various f relative to
- // GeodesicExact.
- // erri = the error in the inverse solution (nm)
- // errd = the error in the direct solution (series only) (nm)
- // errda = the error in the direct solution (series + 1 Newton) (nm)
- //
- // f erri errd errda
- // -1/5 12e6 1.2e9 69e6
- // -1/10 123e3 12e6 765e3
- // -1/20 1110 108e3 7155
- // -1/50 18.63 200.9 27.12
- // -1/100 18.63 23.78 23.37
- // -1/150 18.63 21.05 20.26
- // 1/150 22.35 24.73 25.83
- // 1/100 22.35 25.03 25.31
- // 1/50 29.80 231.9 30.44
- // 1/20 5376 146e3 10e3
- // 1/10 829e3 22e6 1.5e6
- // 1/5 157e6 3.8e9 280e6
- var
- ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12,
- csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
- B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a, g.nC1_);
- var serr = (1 + this._A1m1) * (sig12 + (B12 - this._B11)) -
- s12_a12 / this._b;
- sig12 = sig12 - serr / Math.sqrt(1 + this._k2 * m.sq(ssig2));
- ssig12 = Math.sin(sig12); csig12 = Math.cos(sig12);
- // Update B12 below
- }
- }
-
- var omg12, lam12, lon12;
- var ssig2, csig2, sbet2, cbet2, somg2, comg2, salp2, calp2;
- // sig2 = sig1 + sig12
- ssig2 = this._ssig1 * csig12 + this._csig1 * ssig12;
- csig2 = this._csig1 * csig12 - this._ssig1 * ssig12;
- var dn2 = Math.sqrt(1 + this._k2 * m.sq(ssig2));
- if (outmask & (g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE)) {
- if (arcmode || Math.abs(this._f) > 0.01)
- B12 = g.SinCosSeries(true, ssig2, csig2, this._C1a, g.nC1_);
- AB1 = (1 + this._A1m1) * (B12 - this._B11);
- }
- // sin(bet2) = cos(alp0) * sin(sig2)
- sbet2 = this._calp0 * ssig2;
- // Alt: cbet2 = hypot(csig2, salp0 * ssig2);
- cbet2 = m.hypot(this._salp0, this._calp0 * csig2);
- if (cbet2 == 0)
- // I.e., salp0 = 0, csig2 = 0. Break the degeneracy in this case
- cbet2 = csig2 = g.tiny_;
- // tan(omg2) = sin(alp0) * tan(sig2)
- somg2 = this._salp0 * ssig2; comg2 = csig2; // No need to normalize
- // tan(alp0) = cos(sig2)*tan(alp2)
- salp2 = this._salp0; calp2 = this._calp0 * csig2; // No need to normalize
- // omg12 = omg2 - omg1
- omg12 = Math.atan2(somg2 * this._comg1 - comg2 * this._somg1,
- comg2 * this._comg1 + somg2 * this._somg1);
-
- if (outmask & g.DISTANCE)
- vals.s12 = arcmode ? this._b * ((1 + this._A1m1) * sig12 + AB1) : s12_a12;
-
- if (outmask & g.LONGITUDE) {
- lam12 = omg12 + this._A3c *
- ( sig12 + (g.SinCosSeries(true, ssig2, csig2, this._C3a, g.nC3_-1)
- - this._B31));
- lon12 = lam12 / m.degree;
- // Use AngNormalize2 because longitude might have wrapped multiple times.
- lon12 = m.AngNormalize2(lon12);
- vals.lon2 = m.AngNormalize(this._lon1 + lon12);
- }
-
- if (outmask & g.LATITUDE)
- vals.lat2 = Math.atan2(sbet2, this._f1 * cbet2) / m.degree;
-
- if (outmask & g.AZIMUTH)
- // minus signs give range [-180, 180). 0- converts -0 to +0.
- vals.azi2 = 0 - Math.atan2(-salp2, calp2) / m.degree;
-
- if (outmask & (g.REDUCEDLENGTH | g.GEODESICSCALE)) {
- var
- B22 = g.SinCosSeries(true, ssig2, csig2, this._C2a, g.nC2_),
- AB2 = (1 + this._A2m1) * (B22 - this._B21),
- J12 = (this._A1m1 - this._A2m1) * sig12 + (AB1 - AB2);
- if (outmask & g.REDUCEDLENGTH)
- // Add parens around (_csig1 * ssig2) and (_ssig1 * csig2) to ensure
- // accurate cancellation in the case of coincident points.
- vals.m12 = this._b * (( dn2 * (this._csig1 * ssig2) -
- this._dn1 * (this._ssig1 * csig2))
- - this._csig1 * csig2 * J12);
- if (outmask & g.GEODESICSCALE) {
- var t = this._k2 * (ssig2 - this._ssig1) * (ssig2 + this._ssig1) /
- (this._dn1 + dn2);
- vals.M12 = csig12 + (t * ssig2 - csig2 * J12) * this._ssig1 / this._dn1;
- vals.M21 = csig12 - (t * this._ssig1 - this._csig1 * J12) * ssig2 / dn2;
- }
- }
-
- if (outmask & g.AREA) {
- var
- B42 = g.SinCosSeries(false, ssig2, csig2, this._C4a, g.nC4_);
- var salp12, calp12;
- if (this._calp0 == 0 || this._salp0 == 0) {
- // alp12 = alp2 - alp1, used in atan2 so no need to normalized
- salp12 = salp2 * this._calp1 - calp2 * this._salp1;
- calp12 = calp2 * this._calp1 + salp2 * this._salp1;
- // The right thing appears to happen if alp1 = +/-180 and alp2 = 0, viz
- // salp12 = -0 and alp12 = -180. However this depends on the sign being
- // attached to 0 correctly. The following ensures the correct behavior.
- if (salp12 == 0 && calp12 < 0) {
- salp12 = g.tiny_ * this._calp1;
- calp12 = -1;
- }
- } else {
- // tan(alp) = tan(alp0) * sec(sig)
- // tan(alp2-alp1) = (tan(alp2) -tan(alp1)) / (tan(alp2)*tan(alp1)+1)
- // = calp0 * salp0 * (csig1-csig2) / (salp0^2 + calp0^2 * csig1*csig2)
- // If csig12 > 0, write
- // csig1 - csig2 = ssig12 * (csig1 * ssig12 / (1 + csig12) + ssig1)
- // else
- // csig1 - csig2 = csig1 * (1 - csig12) + ssig12 * ssig1
- // No need to normalize
- salp12 = this._calp0 * this._salp0 *
- (csig12 <= 0 ? this._csig1 * (1 - csig12) + ssig12 * this._ssig1 :
- ssig12 * (this._csig1 * ssig12 / (1 + csig12) + this._ssig1));
- calp12 = m.sq(this._salp0) + m.sq(this._calp0) * this._csig1 * csig2;
- }
- vals.S12 = this._c2 * Math.atan2(salp12, calp12) +
- this._A4 * (B42 - this._B41);
- }
-
- vals.a12 = arcmode ? s12_a12 : sig12 / m.degree;
- return vals;
- }
-
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Interface.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Interface.js
deleted file mode 100644
index 55a230888..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Interface.js
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * Interface.js
- * JavaScript interface routines for the geodesic routines GeographicLib.
- *
- * This provides JavaScript-style interfaces to Math.js, Geodesic.js,
- * GeodesicLine.js, and PolygonArea.js which, in turn, are rather
- * literal translations of the following classes from GeographicLib:
- * Math, Accumulator, Geodesic, GeodesicLine, PolygonArea. See the
- * documentation for the C++ class for more information at
- *
- * http://geographiclib.sourceforge.net/html/annotated.html
- *
- * The algorithms are derived in
- *
- * Charles F. F. Karney,
- * Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- * http://dx.doi.org/10.1007/s00190-012-0578-z
- * Addenda: http://geographiclib.sf.net/geod-addenda.html
- *
- * Copyright (c) Charles Karney (2011) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************
- * GeographicLib.Geodesic.WGS84.Inverse(lat1, lon1, lat2, lon2, outmask);
- * GeographicLib.Geodesic.WGS84.Direct(lat1, lon1, azi1, s12, outmask);
- *
- * perform the basic geodesic calculations. These return an object with
- * (some) of the following fields:
- *
- * lat1 latitude of point 1
- * lon1 longitude of point 1
- * azi1 azimuth of line at point 1
- * lat2 latitude of point 2
- * lon2 longitude of point 2
- * azi2 azimuth of line at point 2
- * s12 distance from 1 to 2
- * a12 arc length on auxiliary sphere from 1 to 2
- * m12 reduced length of geodesic
- * M12 geodesic scale 2 relative to 1
- * M21 geodesic scale 1 relative to 2
- * S12 area between geodesic and equator
- *
- * outmask determines which fields get included and if outmask is
- * omitted, then only the basic geodesic fields are computed. The mask
- * is an or'ed combination of the following values
- *
- * GeographicLib.Geodesic.LATITUDE
- * GeographicLib.Geodesic.LONGITUDE
- * GeographicLib.Geodesic.AZIMUTH
- * GeographicLib.Geodesic.DISTANCE
- * GeographicLib.Geodesic.REDUCEDLENGTH
- * GeographicLib.Geodesic.GEODESICSCALE
- * GeographicLib.Geodesic.AREA
- * GeographicLib.Geodesic.ALL
- *
- **********************************************************************
- * GeographicLib.Geodesic.WGS84.InversePath(lat1, lon1, lat2, lon2, ds12, maxk);
- * GeographicLib.Geodesic.WGS84.DirectPath(lat1, lon1, azi1, s12, ds12, maxk);
- *
- * splits a geodesic line into k equal pieces which are no longer than
- * about ds12 (but k cannot exceed maxk, default 20), and returns an
- * array of length k + 1 of objects with fields
- *
- * lat, lon, azi
- *
- **********************************************************************
- * GeographicLib.Geodesic.Envelope(lat1, lon1, azi1, s12, k)
- *
- * return the geodesic circle of radius s12 centered on the point lat1,
- * lon1. k equally spaced azimuths starting at azi1 are computed. This
- * returns an array of k + 1 points with fields lat and lon (with the
- * first and last points matching).
- *
- **********************************************************************
- * GeographicLib.Geodesic.Envelope(lat1, lon1, k, ord);
- *
- * returns the ord'th order envelope for geodesics emanating from lat1,
- * lon1. This is located approximately circumference * ord/2 from the
- * point. Thus odd numbered envelopes are centered at the antipodal
- * point and even number envelopes are centered on the point itself.
- * This returns an array of k + 1 points with fields lat and lon (with
- * the first and last points matching).
- *
- **********************************************************************
- * GeographicLib.Geodesic.WGS84.Area(points, polyline);
- *
- * computes the area of a polygon with vertices given by an array
- * points, each of whose elements contains lat and lon fields. The
- * function returns an object with fields.
- *
- * number, perimeter, area
- *
- * There is no need to "close" the polygon. If polyline (default =
- * false) is true, then the points denote a polyline and its length is
- * returned as the perimeter (and the area is not calculated).
- **********************************************************************/
-
-(function() {
- var m = GeographicLib.Math;
- var g = GeographicLib.Geodesic;
- var l = GeographicLib.GeodesicLine;
-
- g.Geodesic.CheckPosition = function(lat, lon) {
- if (!(Math.abs(lat) <= 90))
- throw new Error("latitude " + lat + " not in [-90, 90]");
- if (!(lon >= -540 && lon < 540))
- throw new Error("longitude " + lon + " not in [-540, 540)");
- return m.AngNormalize(lon);
- }
-
- g.Geodesic.CheckAzimuth = function(azi) {
- if (!(azi >= -540 && azi < 540))
- throw new Error("longitude " + azi + " not in [-540, 540)");
- return m.AngNormalize(azi);
- }
-
- g.Geodesic.CheckDistance = function(s) {
- if (!(isFinite(s)))
- throw new Error("distance " + s + " not a finite number");
- }
-
- g.Geodesic.prototype.Inverse = function(lat1, lon1, lat2, lon2, outmask) {
- if (!outmask) outmask = g.DISTANCE | g.AZIMUTH;
- lon1 = g.Geodesic.CheckPosition(lat1, lon1);
- lon2 = g.Geodesic.CheckPosition(lat2, lon2);
-
- var result = this.GenInverse(lat1, lon1, lat2, lon2, outmask);
- result.lat1 = lat1; result.lon1 = lon1;
- result.lat2 = lat2; result.lon2 = lon2;
-
- return result;
- }
-
- g.Geodesic.prototype.Direct = function(lat1, lon1, azi1, s12, outmask) {
- if (!outmask) outmask = g.LATITUDE | g.LONGITUDE | g.AZIMUTH;
- lon1 = g.Geodesic.CheckPosition(lat1, lon1);
- azi1 = g.Geodesic.CheckAzimuth(azi1);
- g.Geodesic.CheckDistance(s12);
-
- var result = this.GenDirect(lat1, lon1, azi1, false, s12, outmask);
- result.lat1 = lat1; result.lon1 = lon1;
- result.azi1 = azi1; result.s12 = s12;
-
- return result;
- }
-
- g.Geodesic.prototype.InversePath =
- function(lat1, lon1, lat2, lon2, ds12, maxk) {
- var t = this.Inverse(lat1, lon1, lat2, lon2);
- if (!maxk) maxk = 20;
- if (!(ds12 > 0))
- throw new Error("ds12 must be a positive number")
- var
- k = Math.max(1, Math.min(maxk, Math.ceil(t.s12/ds12))),
- points = new Array(k + 1);
- points[0] = {lat: t.lat1, lon: t.lon1, azi: t.azi1};
- points[k] = {lat: t.lat2, lon: t.lon2, azi: t.azi2};
- if (k > 1) {
- var line = new l.GeodesicLine(this, t.lat1, t.lon1, t.azi1,
- g.LATITUDE | g.LONGITUDE | g.AZIMUTH),
- da12 = t.a12/k;
- var vals;
- for (var i = 1; i < k; ++i) {
- vals =
- line.GenPosition(true, i * da12, g.LATITUDE | g.LONGITUDE | g.AZIMUTH);
- points[i] = {lat: vals.lat2, lon: vals.lon2, azi: vals.azi2};
- }
- }
- return points;
- }
-
- g.Geodesic.prototype.DirectPath =
- function(lat1, lon1, azi1, s12, ds12, maxk) {
- var t = this.Direct(lat1, lon1, azi1, s12);
- if (!maxk) maxk = 20;
- if (!(ds12 > 0))
- throw new Error("ds12 must be a positive number")
- var
- k = Math.max(1, Math.min(maxk, Math.ceil(Math.abs(t.s12)/ds12))),
- points = new Array(k + 1);
- points[0] = {lat: t.lat1, lon: t.lon1, azi: t.azi1};
- points[k] = {lat: t.lat2, lon: t.lon2, azi: t.azi2};
- if (k > 1) {
- var line = new l.GeodesicLine(this, t.lat1, t.lon1, t.azi1,
- g.LATITUDE | g.LONGITUDE | g.AZIMUTH),
- da12 = t.a12/k;
- var vals;
- for (var i = 1; i < k; ++i) {
- vals =
- line.GenPosition(true, i * da12, g.LATITUDE | g.LONGITUDE | g.AZIMUTH);
- points[i] = {lat: vals.lat2, lon: vals.lon2, azi: vals.azi2};
- }
- }
- return points;
- }
-
- g.Geodesic.prototype.Circle = function(lat1, lon1, azi1, s12, k) {
- if (!(Math.abs(lat1) <= 90))
- throw new Error("lat1 must be in [-90, 90]");
- if (!(lon1 >= -540 && lon1 < 540))
- throw new Error("lon1 must be in [-540, 540)");
- if (!(azi1 >= -540 && azi1 < 540))
- throw new Error("azi1 must be in [-540, 540)");
- if (!(isFinite(s12)))
- throw new Error("s12 must be a finite number");
- lon1 = m.AngNormalize(lon1);
- azi1 = m.AngNormalize(azi1);
- if (!k || k < 4) k = 24;
- var points = new Array(k + 1);
- var vals;
- for (var i = 0; i <= k; ++i) {
- var azi1a = azi1 + (k - i) * 360 / k; // Traverse circle counter-clocwise
- if (azi1a >= 180) azi1a -= 360;
- vals =
- this.GenDirect(lat1, lon1, azi1a, false, s12, g.LATITUDE | g.LONGITUDE);
- points[i] = {lat: vals.lat2, lon: vals.lon2};
- }
- return points;
- }
-
- g.Geodesic.prototype.Envelope = function(lat1, lon1, k, ord) {
- if (!(Math.abs(lat1) <= 90))
- throw new Error("lat1 must be in [-90, 90]");
- if (!(lon1 >= -540 && lon1 < 540))
- throw new Error("lon1 must be in [-540, 540)");
- lon1 = m.AngNormalize(lon1);
- if (!k || k < 4) k = 24;
- if (!ord) ord = 1;
- var points = new Array(k + 1);
- var vals, line, s12, j;
- for (var i = 0; i <= k; ++i) {
- var azi1 = -180 + i * 360 / k;
- line = new l.GeodesicLine(this, lat1, lon1, azi1,
- g.LATITUDE | g.LONGITUDE | g.DISTANCE_IN |
- g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
- vals = line.GenPosition(true, 180 * ord,
- g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
- j = 0;
- while (true) {
- // Solve m12(s12) = 0 by Newton's method using dm12/ds12 = M21
- s12 = vals.s12 - vals.m12/vals.M21;
- if (Math.abs(vals.m12) < line._a * g.tol2_ * 0.1 || ++j > 10)
- break;
- vals = line.GenPosition(false, s12,
- g.DISTANCE | g.REDUCEDLENGTH | g.GEODESICSCALE);
- }
- vals = line.GenPosition(false, s12, g.LATITUDE | g.LONGITUDE);
- points[i] = {lat: vals.lat2, lon: vals.lon2};
- }
- return points;
- }
-
- g.Geodesic.prototype.Area = function(points, polyline) {
- return GeographicLib.PolygonArea.Area(this, points, polyline);
- }
-
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Math.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Math.js
deleted file mode 100644
index c13dd2c93..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/Math.js
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * Math.js
- * Transcription of Math.hpp, Constants.hpp, and Accumulator.hpp into
- * JavaScript.
- *
- * Copyright (c) Charles Karney (2011) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-var GeographicLib; if (!GeographicLib) GeographicLib = {};
-
-GeographicLib.Math = {};
-
-GeographicLib.Math.sq = function(x) { return x * x; }
-
-GeographicLib.Math.hypot = function(x, y) {
- x = Math.abs(x);
- y = Math.abs(y);
- var a = Math.max(x, y), b = Math.min(x, y) / (a ? a : 1);
- return a * Math.sqrt(1 + b * b);
-}
-
-GeographicLib.Math.cbrt = function(x) {
- var y = Math.pow(Math.abs(x), 1/3);
- return x < 0 ? -y : y;
-}
-
-GeographicLib.Math.log1p = function(x) {
- var
- y = 1 + x,
- z = y - 1;
- // Here's the explanation for this magic: y = 1 + z, exactly, and z
- // approx x, thus log(y)/z (which is nearly constant near z = 0) returns
- // a good approximation to the true log(1 + x)/x. The multiplication x *
- // (log(y)/z) introduces little additional error.
- return z == 0 ? x : x * Math.log(y) / z;
-}
-
-GeographicLib.Math.atanh = function(x) {
- var y = Math.abs(x); // Enforce odd parity
- y = GeographicLib.Math.log1p(2 * y/(1 - y))/2;
- return x < 0 ? -y : y;
-}
-
-GeographicLib.Math.sum = function(u, v) {
- var
- s = u + v,
- up = s - v,
- vpp = s - up;
- up -= u;
- vpp -= v;
- t = -(up + vpp);
- // u + v = s + t
- // = round(u + v) + t
- return {s: s, t: t};
-}
-
-GeographicLib.Math.AngNormalize = function(x) {
- // Place angle in [-180, 180). Assumes x is in [-540, 540).
- return x >= 180 ? x - 360 : (x < -180 ? x + 360 : x);
-}
-
-GeographicLib.Math.AngNormalize2 = function(x) {
- // Place arbitrary angle in [-180, 180).
- return GeographicLib.Math.AngNormalize(x % 360);
-}
-
-GeographicLib.Math.AngDiff = function(x, y) {
- // Compute y - x and reduce to [-180,180] accurately.
- // This is the same logic as the Accumulator class uses.
- var
- d = y - x,
- yp = d + x,
- xpp = yp - d;
- yp -= y;
- xpp -= x;
- var t = xpp - yp;
- // y - x = d + t
- // = round(y - x) + t
- if ((d - 180) + t > 0) // y - x > 180
- d -= 360; // exact
- else if ((d + 180) + t <= 0) // y - x <= -180
- d += 360; // exact
- return d + t;
-}
-
-GeographicLib.Math.epsilon = Math.pow(0.5, 52);
-GeographicLib.Math.degree = Math.PI/180;
-GeographicLib.Math.digits = 53;
-
-GeographicLib.Constants = {};
-GeographicLib.Constants.WGS84 = { a: 6378137, f: 1/298.257223563 };
-
-GeographicLib.Accumulator = {};
-(function() {
- a = GeographicLib.Accumulator;
- var m = GeographicLib.Math;
-
- a.Accumulator = function(y) {
- this.Set(y);
- }
-
- a.Accumulator.prototype.Set = function(y) {
- if (!y) y = 0;
- if (y.constructor == a.Accumulator) {
- this._s = y._s;
- this._t = y._t;
- } else {
- this._s = y;
- this._t = 0;
- }
- }
-
- a.Accumulator.prototype.Add = function(y) {
- // Here's Shewchuk's solution...
- // Accumulate starting at least significant end
- var u = m.sum(y, this._t);
- var v = m.sum(u.s, this._s);
- u = u.t;
- this._s = v.s;
- this._t = v.t;
- // Start is _s, _t decreasing and non-adjacent. Sum is now (s + t + u)
- // exactly with s, t, u non-adjacent and in decreasing order (except
- // for possible zeros). The following code tries to normalize the
- // result. Ideally, we want _s = round(s+t+u) and _u = round(s+t+u -
- // _s). The follow does an approximate job (and maintains the
- // decreasing non-adjacent property). Here are two "failures" using
- // 3-bit floats:
- //
- // Case 1: _s is not equal to round(s+t+u) -- off by 1 ulp
- // [12, -1] - 8 -> [4, 0, -1] -> [4, -1] = 3 should be [3, 0] = 3
- //
- // Case 2: _s+_t is not as close to s+t+u as it shold be
- // [64, 5] + 4 -> [64, 8, 1] -> [64, 8] = 72 (off by 1)
- // should be [80, -7] = 73 (exact)
- //
- // "Fixing" these problems is probably not worth the expense. The
- // representation inevitably leads to small errors in the accumulated
- // values. The additional errors illustrated here amount to 1 ulp of
- // the less significant word during each addition to the Accumulator
- // and an additional possible error of 1 ulp in the reported sum.
- //
- // Incidentally, the "ideal" representation described above is not
- // canonical, because _s = round(_s + _t) may not be true. For
- // example, with 3-bit floats:
- //
- // [128, 16] + 1 -> [160, -16] -- 160 = round(145).
- // But [160, 0] - 16 -> [128, 16] -- 128 = round(144).
- //
- if (this._s == 0) // This implies t == 0,
- this._s = u; // so result is u
- else
- this._t += u; // otherwise just accumulate u to t.
- }
-
- a.Accumulator.prototype.Sum = function(y) {
- if (!y)
- return this._s;
- else {
- var b = new a.Accumulator(this);
- b.Add(y);
- return b._s;
- }
- }
-
- a.Accumulator.prototype.Negate = function() {
- this._s *= -1;
- this._t *= -1;
- }
-
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/PolygonArea.js b/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/PolygonArea.js
deleted file mode 100644
index e1e07f608..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/GeographicLib/PolygonArea.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * PolygonArea.js
- * Transcription of PolygonArea.[ch]pp into JavaScript.
- *
- * See the documentation for the C++ class. The conversion is a literal
- * conversion from C++.
- *
- * The algorithms are derived in
- *
- * Charles F. F. Karney,
- * Algorithms for geodesics, J. Geodesy 87, 43-55 (2013);
- * http://dx.doi.org/10.1007/s00190-012-0578-z
- * Addenda: http://geographiclib.sf.net/geod-addenda.html
- *
- * Copyright (c) Charles Karney (2011-2013) and licensed
- * under the MIT/X11 License. For more information, see
- * http://geographiclib.sourceforge.net/
- **********************************************************************/
-
-// Load AFTER GeographicLib/Math.js and GeographicLib/Geodesic.js
-
-GeographicLib.PolygonArea = {};
-
-(function() {
- var m = GeographicLib.Math;
- var a = GeographicLib.Accumulator;
- var g = GeographicLib.Geodesic;
- var p = GeographicLib.PolygonArea;
-
- p.transit = function(lon1, lon2) {
- // Return 1 or -1 if crossing prime meridian in east or west direction.
- // Otherwise return zero.
- // Compute lon12 the same way as Geodesic::Inverse.
- lon1 = m.AngNormalize(lon1);
- lon2 = m.AngNormalize(lon2);
- var lon12 = m.AngDiff(lon1, lon2);
- var cross =
- lon1 < 0 && lon2 >= 0 && lon12 > 0 ? 1 :
- (lon2 < 0 && lon1 >= 0 && lon12 < 0 ? -1 : 0);
- return cross;
- }
-
- p.PolygonArea = function(earth, polyline) {
- this._earth = earth;
- this._area0 = 4 * Math.PI * earth._c2;
- this._polyline = !polyline ? false : polyline;
- this._mask = g.LATITUDE | g.LONGITUDE | g.DISTANCE |
- (this._polyline ? g.NONE : g.AREA);
- if (!this._polyline)
- this._areasum = new a.Accumulator(0);
- this._perimetersum = new a.Accumulator(0);
- this.Clear();
- }
-
- p.PolygonArea.prototype.Clear = function() {
- this._num = 0;
- this._crossings = 0;
- if (!this._polyline)
- this._areasum.Set(0);
- this._perimetersum.Set(0);
- this._lat0 = this._lon0 = this._lat1 = this._lon1 = Number.NaN;
- }
-
- p.PolygonArea.prototype.AddPoint = function(lat, lon) {
- if (this._num == 0) {
- this._lat0 = this._lat1 = lat;
- this._lon0 = this._lon1 = lon;
- } else {
- var t = this._earth.Inverse(this._lat1, this._lon1, lat, lon, this._mask);
- this._perimetersum.Add(t.s12);
- if (!this._polyline) {
- this._areasum.Add(t.S12);
- this._crossings += p.transit(this._lon1, lon);
- }
- this._lat1 = lat;
- this._lon1 = lon;
- }
- ++this._num;
- }
-
- p.PolygonArea.prototype.AddEdge = function(azi, s) {
- if (this._num) {
- var t = this._earth.Direct(this._lat1, this._lon1, azi, s, this._mask);
- this._perimetersum.Add(s);
- if (!this._polyline) {
- this._areasum.Add(t.S12);
- this._crossings += p.transit(this._lon1, t.lon2);
- }
- this._lat1 = t.lat2;
- this._lon1 = t.lon2;
- }
- ++this._num;
- }
-
- // return number, perimeter, area
- p.PolygonArea.prototype.Compute = function(reverse, sign) {
- var vals = {number: this._num};
- if (this._num < 2) {
- vals.perimeter = 0;
- if (!this._polyline)
- vals.area = 0;
- return vals;
- }
- if (this._polyline) {
- vals.perimeter = this._perimetersum.Sum();
- return vals;
- }
- var t = this._earth.Inverse(this._lat1, this._lon1, this._lat0, this._lon0,
- this._mask);
- vals.perimeter = this._perimetersum.Sum(t.s12);
- var tempsum = new a.Accumulator(this._areasum);
- tempsum.Add(t.S12);
- var crossings = this._crossings + p.transit(this._lon1, this._lon0);
- if (crossings & 1)
- tempsum.Add( (tempsum.Sum() < 0 ? 1 : -1) * this._area0/2 );
- // area is with the clockwise sense. If !reverse convert to
- // counter-clockwise convention.
- if (!reverse)
- tempsum.Negate();
- // If sign put area in (-area0/2, area0/2], else put area in [0, area0)
- if (sign) {
- if (tempsum.Sum() > this._area0/2)
- tempsum.Add( -this._area0 );
- else if (tempsum.Sum() <= -this._area0/2)
- tempsum.Add( +this._area0 );
- } else {
- if (tempsum.Sum() >= this._area0)
- tempsum.Add( -this._area0 );
- else if (tempsum < 0)
- tempsum.Add( -this._area0 );
- }
- vals.area = tempsum.Sum();
- return vals;
- }
-
- // return number, perimeter, area
- p.PolygonArea.prototype.TestPoint = function(lat, lon, reverse, sign) {
- var vals = {number: this._num + 1};
- if (this._num == 0) {
- vals.perimeter = 0;
- if (!this._polyline)
- vals.area = 0;
- return vals;
- }
- vals.perimeter = this._perimetersum.Sum();
- var tempsum = this._polyline ? 0 : this._areasum.Sum();
- var crossings = this._crossings;
- var t;
- for (var i = 0; i < (this._polyline ? 1 : 2); ++i) {
- t = this._earth.Inverse
- (i == 0 ? this._lat1 : lat, i == 0 ? this._lon1 : lon,
- i != 0 ? this._lat0 : lat, i != 0 ? this._lon0 : lon,
- this._mask);
- vals.perimeter += t.s12;
- if (!this._polyline) {
- tempsum += t.S12;
- crossings += p.transit(i == 0 ? this._lon1 : lon,
- i != 0 ? this._lon0 : lon);
- }
- }
-
- if (this._polyline)
- return vals;
-
- if (crossings & 1)
- tempsum += (tempsum < 0 ? 1 : -1) * this._area0/2;
- // area is with the clockwise sense. If !reverse convert to
- // counter-clockwise convention.
- if (!reverse)
- tempsum *= -1;
- // If sign put area in (-area0/2, area0/2], else put area in [0, area0)
- if (sign) {
- if (tempsum > this._area0/2)
- tempsum -= this._area0;
- else if (tempsum <= -this._area0/2)
- tempsum += this._area0;
- } else {
- if (tempsum >= this._area0)
- tempsum -= this._area0;
- else if (tempsum < 0)
- tempsum += this._area0;
- }
- vals.area = tempsum;
- return vals;
- }
-
- // return number, perimeter, area
- p.PolygonArea.prototype.TestEdge = function(azi, s, reverse, sign) {
- var vals = {number: this._num ? this._num + 1 : 0};
- if (this._num == 0)
- return vals;
- vals.perimeter = this._perimetersum.Sum() + s;
- if (this._polyline)
- return vals;
-
- var tempsum = this._areasum.Sum();
- var crossings = this._crossings;
- var t;
- t = this._earth.Direct(this._lat1, this._lon1, azi, s, this._mask);
- tempsum += t.S12;
- crossings += p.transit(this._lon1, t.lon2);
- t = this._earth(t.lat2, t.lon2, this._lat0, this._lon0, this._mask);
- perimeter += t.s12;
- tempsum += t.S12;
- crossings += p.transit(t.lon2, this._lon0);
-
- if (crossings & 1)
- tempsum += (tempsum < 0 ? 1 : -1) * this._area0/2;
- // area is with the clockwise sense. If !reverse convert to
- // counter-clockwise convention.
- if (!reverse)
- tempsum *= -1;
- // If sign put area in (-area0/2, area0/2], else put area in [0, area0)
- if (sign) {
- if (tempsum > this._area0/2)
- tempsum -= this._area0;
- else if (tempsum <= -this._area0/2)
- tempsum += this._area0;
- } else {
- if (tempsum >= this._area0)
- tempsum -= this._area0;
- else if (tempsum < 0)
- tempsum += this._area0;
- }
- vals.area = tempsum;
- return vals;
- }
-
- p.PolygonArea.prototype.CurrentPoint = function() {
- var vals = {lat: this._lat1, lon: this._lon1};
- return vals;
- }
-
- p.Area = function(earth, points, polyline) {
- var poly = new p.PolygonArea(earth, polyline);
- for (var i = 0; i < points.length; ++i)
- poly.AddPoint(points[i].lat, points[i].lon);
- return poly.Compute(false, true);
- }
-
-})();
diff --git a/gtsam/3rdparty/GeographicLib/doc/scripts/geod-calc.html b/gtsam/3rdparty/GeographicLib/doc/scripts/geod-calc.html
deleted file mode 100644
index a6e0b094b..000000000
--- a/gtsam/3rdparty/GeographicLib/doc/scripts/geod-calc.html
+++ /dev/null
@@ -1,471 +0,0 @@
-
-
-
- Geodesic calculations for an ellipsoid done right
-
-
-
-
-
-
-
-
-
Geodesic calculations for an ellipsoid done right
-
-
- This page illustrates the geodesic routines available in
- GeographicLib.
- The C++ code has been converted to JavaScript so the calculations
- are carried out on the client. The algorithms are considerably
- more accurate than Vincenty's method, and offer more functionality
- (an inverse method which never fails to converge, differential
- properties of the geodesic, and the area under a geodesic). The
- algorithms are derived in
-
- This page just provides a basic interface. Enter latitudes,
- longitudes, and azimuths as degrees and distances as meters using
- spaces or commas as separators. (Angles may be entered as decimal
- degrees or as degrees, minutes, and seconds, e.g. -20.51125,
- 20°30′40.5″S, S20d30'40.5", or
- -20:30:40.5.) The results are accurate to about
- 15 nanometers (or 0.1 m2 per vertex for
- areas). A slicker page where the geodesics are incorporated into
- Google Maps is given here.
-
- Geodesic lines, circles, envelopes in Google Maps (instructions)
-
-
- The page allows you to draw
- accurate ellipsoidal geodesics on Google Maps. You can specify the
- geodesic in one of two forms:
-
-
- The direct problem: specify a starting point, an
- azimuth and a distance as lat1 lon1 azi1 s12 as degrees
- and meters.
-
- The inverse problem: specify the two end points
- as lat1 lon1 lat2 lon2 as degrees; this finds the
- shortest path between the two points.
-
- (Angles may be entered as decimal degrees or as degrees, minutes,
- and seconds, e.g. -20.51125, 20°30′40.5″S,
- S20d30'40.5", or -20:30:40.5.) Click on the
- corresponding "compute" button. The display then shows
-
-
The requested geodesic as a blue
- line; the WGS84 ellipsoid model is used.
-
The geodesic circle as a green
- curve; this shows the locus of points a
- distance s12 from lat1, lon1.
-
The geodesic envelopes as red
- curves; all the geodesics emanating from lat1,
- lon1 are tangent to the envelopes (providing they are
- extended far enough). The number of solutions to the inverse
- problem changes depending on whether lat2, lon2 lies
- inside the envelopes. For example, there are four (resp. two)
- approximately hemispheroidal geodesics if this point lies
- inside (resp. outside) the inner envelope (only one of which
- is a shortest path).
-
-
-
- The sample data has lat1, lon1 in Wellington, New
- Zealand, lat2, lon2 in Salamanca, Spain, and s12
- about 1.5 times the earth's circumference. Try clicking on the
- "compute" button next to the "Direct:" input box when the page
- first loads. You can navigate around the map using the normal
- Google Map controls.
-
-
- The precision of output for the geodesic is 0.1" or 1 m.
- A text-only geodesic calculator based
- on the same JavaScript library is also available; this calculator
- solves the inverse and direct geodesic problems, computes
- intermediate points on a geodesic, and finds the area of a
- geodesic polygon; it allows you to specify the precision of the
- output and choose between decimal degrees and degress, minutes,
- and seconds.
-
- The Javascipt code for computing the geodesic lines, circles, and
- envelopes is part of
- GeographicLib.
- The algorithms are derived in
-