From 090a36cf8838fb217eaa83d7f72603cb24fccafc Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Wed, 20 Mar 2019 20:14:50 +0000 Subject: [PATCH] Automatically enable system error messages using Autotools Define HAVE_STRERROR from configure. Before: $ cs2cs +proj=latlong +to +proj=latlong dummy : Sys errno: 2: dummy After: $ cs2cs +proj=latlong +to +proj=latlong dummy : Sys errno: 2: No such file or directory dummy --- configure.ac | 2 ++ src/apps/emess.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index d155432b80..7f0c39557e 100644 --- a/configure.ac +++ b/configure.ac @@ -220,6 +220,8 @@ AC_SEARCH_LIBS([sqrt], [m]) AC_CHECK_FUNC(localeconv, [AC_DEFINE(HAVE_LOCALECONV,1,[Define to 1 if you have localeconv])]) +AC_CHECK_FUNCS([strerror]) + dnl --------------------------------------------------------------------------- dnl Check for JNI support. dnl --------------------------------------------------------------------------- diff --git a/src/apps/emess.cpp b/src/apps/emess.cpp index 144e9e23e2..52f88aa35d 100644 --- a/src/apps/emess.cpp +++ b/src/apps/emess.cpp @@ -20,6 +20,7 @@ #include #include "proj_api.h" +#include "proj_config.h" #define EMESS_ROUTINE #include "emess.h"