summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2018-05-28 13:33:32 +0200
committerDaiki Ueno <ueno@gnu.org>2018-05-28 16:01:34 +0200
commit79f928492dba6a46c63e77d6b22c17c23e66403b (patch)
treeffe8ac73b67d0d5cabc8607d76d829a5c54c5b82 /configure.ac
parentcd0a2de679a81829b7323bc5db46222b9eaab1d9 (diff)
build: Don't use locale funcs if locale_t is not defined in locale.h
On macOS, locale_t is not defined in <locale.h>. Although it is defined in <xlocale.h>, we rather not use locales at all for POSIX compliance.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5667874..5f561a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -96,12 +96,17 @@ if test "$os_unix" = "yes"; then
AC_MSG_ERROR([could not find socket])
])
- # These are thngs we can work around
- AC_CHECK_HEADERS([locale.h sys/resource.h ucred.h])
+ AC_CHECK_HEADERS([locale.h], [
+ AC_CHECK_TYPES([locale_t], [], [], [[#include <locale.h>]])
+ AC_CHECK_FUNCS([newlocale strerror_l])
+ ])
+
+ # These are things we can work around
+ AC_CHECK_HEADERS([sys/resource.h ucred.h])
AC_CHECK_MEMBERS([struct dirent.d_type],,,[#include <dirent.h>])
AC_CHECK_FUNCS([getprogname getexecname basename mkstemp mkdtemp])
AC_CHECK_FUNCS([getauxval issetugid getresuid secure_getenv])
- AC_CHECK_FUNCS([strnstr memdup newlocale strndup strerror_l strerror_r])
+ AC_CHECK_FUNCS([strnstr memdup strndup strerror_r])
AC_CHECK_FUNCS([reallocarray])
AC_CHECK_FUNCS([fdwalk])
AC_CHECK_FUNCS([setenv])