Skip to content

Commit

Permalink
Merge pull request #1346 from kbevers/backport-system-errmsg-fix
Browse files Browse the repository at this point in the history
[Backport] Build: automatically enable system error messages
  • Loading branch information
kbevers committed Mar 22, 2019
2 parents 7f31b7b + 3182dfb commit 6a4c597
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/ProjConfig.cmake
Expand Up @@ -24,7 +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_function_exists(localeconv HAVE_LOCALECONV)
check_function_exists(strerror HAVE_STRERROR)

# check libm need on unix
check_library_exists(m ceil "" HAVE_LIBM)
Expand Down
3 changes: 3 additions & 0 deletions cmake/proj_config.cmake.in
Expand Up @@ -22,6 +22,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1

/* Define to 1 if you have the `strerror' function. */
#cmakedefine HAVE_STRERROR 1

/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1

Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -219,6 +219,7 @@ CFLAGS="$save_CFLAGS $C99_MATH"
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.
Expand Down
1 change: 1 addition & 0 deletions src/apps/emess.cpp
Expand Up @@ -20,6 +20,7 @@
#include <string.h>

#include "proj_api.h"
#include "proj_config.h"
#define EMESS_ROUTINE
#include "emess.h"

Expand Down

0 comments on commit 6a4c597

Please sign in to comment.