From 79f928492dba6a46c63e77d6b22c17c23e66403b Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 28 May 2018 13:33:32 +0200 Subject: build: Don't use locale funcs if locale_t is not defined in locale.h On macOS, locale_t is not defined in . Although it is defined in , we rather not use locales at all for POSIX compliance. --- configure.ac | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'configure.ac') 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 ]]) + 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 ]) 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]) -- cgit v1.1