aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2015-07-07 18:46:36 +0200
committerEven Rouault <even.rouault@spatialys.com>2015-07-07 18:46:36 +0200
commit2b5b97942016c2f18a0992b934d1b6b460391dac (patch)
tree46cffbdad4a652422cc94f6077e3ab3955e6dc0f /cmake
parent396afc3312243ff4a8e95c3b9398d56c5582e30d (diff)
downloadPROJ-2b5b97942016c2f18a0992b934d1b6b460391dac.tar.gz
PROJ-2b5b97942016c2f18a0992b934d1b6b460391dac.zip
Make pj_init() locale safe and no longer modify locale (#226)
Remove setlocale() use in pj_init_ctx(), and replace uses of atof() & strtod() by their locale safe variants pj_atof() and pj_strtod(). Proj versions from now advertize #define PJ_LOCALE_SAFE 1 in proj_api.h and export pj_atof() & pj_strtod()
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Proj4Config.cmake3
-rw-r--r--cmake/proj_config.cmake.in3
2 files changed, 6 insertions, 0 deletions
diff --git a/cmake/Proj4Config.cmake b/cmake/Proj4Config.cmake
index e9aa1de5..fda9c9c2 100644
--- a/cmake/Proj4Config.cmake
+++ b/cmake/Proj4Config.cmake
@@ -9,6 +9,7 @@
################################################################################
include (CheckIncludeFiles)
include (CheckLibraryExists)
+include (CheckFunctionExists)
# check needed include file
check_include_files (dlfcn.h HAVE_DLFCN_H)
@@ -23,6 +24,8 @@ check_include_files (sys/types.h HAVE_SYS_TYPES_H)
check_include_files (unistd.h HAVE_UNISTD_H)
check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
+CHECK_FUNCTION_EXISTS(localeconv HAVE_LOCALECONV)
+
# check libm need on unix
check_library_exists(m ceil "" HAVE_LIBM)
diff --git a/cmake/proj_config.cmake.in b/cmake/proj_config.cmake.in
index 8f782a7c..bbdf3249 100644
--- a/cmake/proj_config.cmake.in
+++ b/cmake/proj_config.cmake.in
@@ -10,6 +10,9 @@
/* Define to 1 if you have the `m' library (-lm). */
#cmakedefine HAVE_LIBM 1
+/* Define to 1 if you have localeconv */
+#cmakedefine HAVE_LOCALECONV 1
+
/* Define to 1 if you have the <memory.h> header file. */
#cmakedefine HAVE_MEMORY_H 1