Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: automatically enable system error messages #1336

Merged
merged 1 commit into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmake/ProjConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ 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(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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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