]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gnulib/configure
Update gnulib
[thirdparty/binutils-gdb.git] / gnulib / configure
index 39555afe9f01f3b254c93db5bd81104ef066d039..26f24670b0d7b8be29c727d1dbeb2aeb6ee380d2 100644 (file)
@@ -622,12 +622,15 @@ ac_includes_default="\
 
 gl_use_threads_default=
 gl_use_winpthreads_default=
+ac_config_libobj_dir=import
 ac_func_list=
 gl_fnmatch_required=POSIX
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
+gltests_LIBOBJDEPS
 gltests_LTLIBOBJS
 gltests_LIBOBJS
+gl_LIBOBJDEPS
 gl_LTLIBOBJS
 gl_LIBOBJS
 LTLIBOBJS
@@ -671,7 +674,28 @@ INSTALL_SCRIPT
 INSTALL_PROGRAM
 LIBGNU_LTLIBDEPS
 LIBGNU_LIBDEPS
+GL_CFLAG_GNULIB_WARNINGS
+GL_CFLAG_ALLOW_WARNINGS
 gltests_WITNESS
+GL_COND_OBJ_WMEMPCPY_FALSE
+GL_COND_OBJ_WMEMPCPY_TRUE
+GL_COND_OBJ_WMEMCHR_FALSE
+GL_COND_OBJ_WMEMCHR_TRUE
+GL_COND_OBJ_WINDOWS_RWLOCK_FALSE
+GL_COND_OBJ_WINDOWS_RWLOCK_TRUE
+GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE
+GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE
+GL_COND_OBJ_WINDOWS_ONCE_FALSE
+GL_COND_OBJ_WINDOWS_ONCE_TRUE
+GL_COND_OBJ_WINDOWS_MUTEX_FALSE
+GL_COND_OBJ_WINDOWS_MUTEX_TRUE
+GL_GNULIB_TOWCTRANS
+GL_GNULIB_WCTRANS
+GL_GNULIB_ISWCTYPE
+GL_GNULIB_WCTYPE
+GL_GNULIB_ISWXDIGIT
+GL_GNULIB_ISWDIGIT
+GL_GNULIB_ISWBLANK
 REPLACE_TOWLOWER
 REPLACE_ISWCNTRL
 HAVE_WCTYPE_H
@@ -684,20 +708,30 @@ REPLACE_ISWBLANK
 HAVE_WCTRANS_T
 HAVE_WCTYPE_T
 HAVE_ISWBLANK
-GNULIB_TOWCTRANS
-GNULIB_WCTRANS
-GNULIB_ISWCTYPE
-GNULIB_WCTYPE
-GNULIB_ISWXDIGIT
-GNULIB_ISWDIGIT
-GNULIB_ISWBLANK
 HAVE_CRTDEFS_H
 HAVE_WINT_T
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
 NEXT_WCHAR_H
+GL_COND_OBJ_UNSETENV_FALSE
+GL_COND_OBJ_UNSETENV_TRUE
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
+GL_COND_OBJ_TIME_R_FALSE
+GL_COND_OBJ_TIME_R_TRUE
+GL_GNULIB_MDA_TZSET
+GL_GNULIB_TZSET
+GL_GNULIB_TIME_RZ
+GL_GNULIB_TIME_R
+GL_GNULIB_TIMESPEC_GETRES
+GL_GNULIB_TIMESPEC_GET
+GL_GNULIB_TIMEGM
+GL_GNULIB_STRPTIME
+GL_GNULIB_STRFTIME
+GL_GNULIB_NANOSLEEP
+GL_GNULIB_LOCALTIME
+GL_GNULIB_MKTIME
+GL_GNULIB_CTIME
 TIME_H_DEFINES_TIME_UTC
 UNISTD_H_DEFINES_STRUCT_TIMESPEC
 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
@@ -707,6 +741,7 @@ NEXT_AS_FIRST_DIRECTIVE_TIME_H
 NEXT_TIME_H
 REPLACE_LOCALTIME
 REPLACE_GMTIME
+GNULIB_GETTIMEOFDAY
 REPLACE_TZSET
 REPLACE_TIMEGM
 REPLACE_STRFTIME
@@ -715,26 +750,15 @@ REPLACE_MKTIME
 REPLACE_LOCALTIME_R
 REPLACE_CTIME
 HAVE_TIMEZONE_T
+HAVE_TIMESPEC_GETRES
 HAVE_TIMESPEC_GET
 HAVE_TIMEGM
 HAVE_STRPTIME
 HAVE_NANOSLEEP
 HAVE_DECL_LOCALTIME_R
-GNULIB_MDA_TZSET
-GNULIB_TZSET
-GNULIB_TIME_RZ
-GNULIB_TIME_R
-GNULIB_TIMESPEC_GET
-GNULIB_TIMEGM
-GNULIB_STRPTIME
-GNULIB_STRFTIME
-GNULIB_NANOSLEEP
-GNULIB_LOCALTIME
-GNULIB_MKTIME
-GNULIB_CTIME
+GL_GNULIB_WAITPID
 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
 NEXT_SYS_WAIT_H
-GNULIB_WAITPID
 HAVE_SYS_UIO_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
 NEXT_SYS_UIO_H
@@ -745,22 +769,53 @@ NEXT_SYS_TYPES_H
 HAVE_SYS_RANDOM_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
 NEXT_SYS_RANDOM_H
+GL_COND_OBJ_STRTOK_R_FALSE
+GL_COND_OBJ_STRTOK_R_TRUE
+GL_COND_OBJ_STRNLEN_FALSE
+GL_COND_OBJ_STRNLEN_TRUE
 HAVE_STRINGS_H
 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
 NEXT_STRINGS_H
 NEXT_AS_FIRST_DIRECTIVE_STRING_H
 NEXT_STRING_H
+GL_COND_OBJ_STRERROR_OVERRIDE_FALSE
+GL_COND_OBJ_STRERROR_OVERRIDE_TRUE
+GL_COND_OBJ_STRERROR_FALSE
+GL_COND_OBJ_STRERROR_TRUE
+GL_COND_OBJ_STRDUP_FALSE
+GL_COND_OBJ_STRDUP_TRUE
+GL_COND_OBJ_STRCHRNUL_FALSE
+GL_COND_OBJ_STRCHRNUL_TRUE
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
 NEXT_STDLIB_H
+GL_COND_OBJ_STDIO_WRITE_FALSE
+GL_COND_OBJ_STDIO_WRITE_TRUE
+GL_COND_OBJ_STDIO_READ_FALSE
+GL_COND_OBJ_STDIO_READ_TRUE
 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
 NEXT_STDIO_H
-HAVE__BOOL
+GL_GENERATE_STDINT_H_FALSE
+GL_GENERATE_STDINT_H_TRUE
+STDINT_H
+GL_GENERATE_STDDEF_H_FALSE
+GL_GENERATE_STDDEF_H_TRUE
+STDDEF_H
 GL_GENERATE_STDBOOL_H_FALSE
 GL_GENERATE_STDBOOL_H_TRUE
 STDBOOL_H
+HAVE__BOOL
 GL_GENERATE_STDALIGN_H_FALSE
 GL_GENERATE_STDALIGN_H_TRUE
 STDALIGN_H
+GL_COND_OBJ_STAT_FALSE
+GL_COND_OBJ_STAT_TRUE
+GL_COND_OBJ_SOCKET_FALSE
+GL_COND_OBJ_SOCKET_TRUE
+GL_GNULIB_SIGACTION
+GL_GNULIB_SIGPROCMASK
+GL_GNULIB_SIGNAL_H_SIGPIPE
+GL_GNULIB_RAISE
+GL_GNULIB_PTHREAD_SIGMASK
 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
 NEXT_SIGNAL_H
 REPLACE_RAISE
@@ -774,11 +829,16 @@ HAVE_SIGSET_T
 HAVE_RAISE
 HAVE_PTHREAD_SIGMASK
 HAVE_POSIX_SIGNALBLOCKING
-GNULIB_SIGACTION
-GNULIB_SIGPROCMASK
-GNULIB_SIGNAL_H_SIGPIPE
-GNULIB_RAISE
-GNULIB_PTHREAD_SIGMASK
+GL_COND_OBJ_SETSOCKOPT_FALSE
+GL_COND_OBJ_SETSOCKOPT_TRUE
+GL_COND_OBJ_SETLOCALE_LOCK_FALSE
+GL_COND_OBJ_SETLOCALE_LOCK_TRUE
+GL_COND_OBJ_SETENV_FALSE
+GL_COND_OBJ_SETENV_TRUE
+GL_GNULIB_SELECT
+GL_GNULIB_PSELECT
+GL_COND_OBJ_SELECT_FALSE
+GL_COND_OBJ_SELECT_TRUE
 LIB_SELECT
 LIBSOCKET
 HAVE_SYS_SELECT_H
@@ -787,14 +847,33 @@ NEXT_SYS_SELECT_H
 REPLACE_SELECT
 REPLACE_PSELECT
 HAVE_PSELECT
-GNULIB_SELECT
-GNULIB_PSELECT
+GL_COND_OBJ_RMDIR_FALSE
+GL_COND_OBJ_RMDIR_TRUE
+GL_COND_OBJ_REWINDDIR_FALSE
+GL_COND_OBJ_REWINDDIR_TRUE
+GL_COND_OBJ_RENAME_FALSE
+GL_COND_OBJ_RENAME_TRUE
+GL_COND_OBJ_READLINK_FALSE
+GL_COND_OBJ_READLINK_TRUE
+GL_COND_OBJ_READDIR_FALSE
+GL_COND_OBJ_READDIR_TRUE
+GL_COND_OBJ_RAWMEMCHR_FALSE
+GL_COND_OBJ_RAWMEMCHR_TRUE
+GL_COND_OBJ_PIPE_FALSE
+GL_COND_OBJ_PIPE_TRUE
+GL_COND_OBJ_OPENDIR_FALSE
+GL_COND_OBJ_OPENDIR_TRUE
+GL_COND_OBJ_OPENAT_FALSE
+GL_COND_OBJ_OPENAT_TRUE
+GL_COND_OBJ_OPEN_FALSE
+GL_COND_OBJ_OPEN_TRUE
 GL_GENERATE_NETINET_IN_H_FALSE
 GL_GENERATE_NETINET_IN_H_TRUE
 NETINET_IN_H
 HAVE_NETINET_IN_H
 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
 NEXT_NETINET_IN_H
+GL_GNULIB_GETADDRINFO
 HAVE_NETDB_H
 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
 NEXT_NETDB_H
@@ -805,7 +884,65 @@ HAVE_DECL_GETADDRINFO
 HAVE_DECL_GAI_STRERROR
 HAVE_DECL_FREEADDRINFO
 HAVE_STRUCT_ADDRINFO
-GNULIB_GETADDRINFO
+GL_COND_OBJ_MSVC_NOTHROW_FALSE
+GL_COND_OBJ_MSVC_NOTHROW_TRUE
+GL_COND_OBJ_MSVC_INVAL_FALSE
+GL_COND_OBJ_MSVC_INVAL_TRUE
+GL_COND_OBJ_MKOSTEMP_FALSE
+GL_COND_OBJ_MKOSTEMP_TRUE
+GL_COND_OBJ_MKDTEMP_FALSE
+GL_COND_OBJ_MKDTEMP_TRUE
+GL_COND_OBJ_MKDIR_FALSE
+GL_COND_OBJ_MKDIR_TRUE
+GL_COND_OBJ_MEMRCHR_FALSE
+GL_COND_OBJ_MEMRCHR_TRUE
+GL_COND_OBJ_MEMPCPY_FALSE
+GL_COND_OBJ_MEMPCPY_TRUE
+GL_GNULIB_MDA_STRDUP
+GL_GNULIB_MDA_MEMCCPY
+GL_GNULIB_STRVERSCMP
+GL_GNULIB_STRSIGNAL
+GL_GNULIB_SIGDESCR_NP
+GL_GNULIB_SIGABBREV_NP
+GL_GNULIB_STRERRORNAME_NP
+GL_GNULIB_STRERROR_R
+GL_GNULIB_STRERROR
+GL_GNULIB_MBSTOK_R
+GL_GNULIB_MBSSEP
+GL_GNULIB_MBSSPN
+GL_GNULIB_MBSPBRK
+GL_GNULIB_MBSCSPN
+GL_GNULIB_MBSCASESTR
+GL_GNULIB_MBSPCASECMP
+GL_GNULIB_MBSNCASECMP
+GL_GNULIB_MBSCASECMP
+GL_GNULIB_MBSSTR
+GL_GNULIB_MBSRCHR
+GL_GNULIB_MBSCHR
+GL_GNULIB_MBSNLEN
+GL_GNULIB_MBSLEN
+GL_GNULIB_STRTOK_R
+GL_GNULIB_STRCASESTR
+GL_GNULIB_STRSTR
+GL_GNULIB_STRSEP
+GL_GNULIB_STRPBRK
+GL_GNULIB_STRNLEN
+GL_GNULIB_STRNDUP
+GL_GNULIB_STRNCAT
+GL_GNULIB_STRDUP
+GL_GNULIB_STRCHRNUL
+GL_GNULIB_STPNCPY
+GL_GNULIB_STPCPY
+GL_GNULIB_RAWMEMCHR
+GL_GNULIB_MEMRCHR
+GL_GNULIB_MEMPCPY
+GL_GNULIB_MEMMEM
+GL_GNULIB_MEMCHR
+GL_GNULIB_FFSLL
+GL_GNULIB_FFSL
+GL_GNULIB_EXPLICIT_BZERO
+GL_COND_OBJ_MEMCHR_FALSE
+GL_COND_OBJ_MEMCHR_TRUE
 UNDEFINE_STRTOK_R
 REPLACE_STRSIGNAL
 REPLACE_STRERRORNAME_NP
@@ -846,74 +983,44 @@ HAVE_DECL_MEMMEM
 HAVE_FFSLL
 HAVE_FFSL
 HAVE_EXPLICIT_BZERO
-GNULIB_MDA_STRDUP
-GNULIB_MDA_MEMCCPY
 HAVE_MBSLEN
-GNULIB_STRVERSCMP
-GNULIB_STRSIGNAL
-GNULIB_SIGDESCR_NP
-GNULIB_SIGABBREV_NP
-GNULIB_STRERRORNAME_NP
-GNULIB_STRERROR_R
-GNULIB_STRERROR
-GNULIB_MBSTOK_R
-GNULIB_MBSSEP
-GNULIB_MBSSPN
-GNULIB_MBSPBRK
-GNULIB_MBSCSPN
-GNULIB_MBSCASESTR
-GNULIB_MBSPCASECMP
-GNULIB_MBSNCASECMP
-GNULIB_MBSCASECMP
-GNULIB_MBSSTR
-GNULIB_MBSRCHR
-GNULIB_MBSCHR
-GNULIB_MBSNLEN
-GNULIB_MBSLEN
-GNULIB_STRTOK_R
-GNULIB_STRCASESTR
-GNULIB_STRSTR
-GNULIB_STRSEP
-GNULIB_STRPBRK
-GNULIB_STRNLEN
-GNULIB_STRNDUP
-GNULIB_STRNCAT
-GNULIB_STRDUP
-GNULIB_STRCHRNUL
-GNULIB_STPNCPY
-GNULIB_STPCPY
-GNULIB_RAWMEMCHR
-GNULIB_MEMRCHR
-GNULIB_MEMPCPY
-GNULIB_MEMMEM
-GNULIB_MEMCHR
-GNULIB_FFSLL
-GNULIB_FFSL
-GNULIB_EXPLICIT_BZERO
+GL_COND_OBJ_MBTOWC_FALSE
+GL_COND_OBJ_MBTOWC_TRUE
+GL_COND_OBJ_MBSRTOWCS_FALSE
+GL_COND_OBJ_MBSRTOWCS_TRUE
+GL_COND_OBJ_MBSINIT_FALSE
+GL_COND_OBJ_MBSINIT_TRUE
 HAVE_VISIBILITY
 CFLAG_VISIBILITY
+GL_COND_OBJ_MBRTOWC_FALSE
+GL_COND_OBJ_MBRTOWC_TRUE
 LIB_MBRTOWC
 LOCALE_ZH_CN
 LOCALE_FR_UTF8
 LOCALE_JA
 NEXT_AS_FIRST_DIRECTIVE_MATH_H
 NEXT_MATH_H
+GL_COND_OBJ_LSTAT_FALSE
+GL_COND_OBJ_LSTAT_TRUE
 LTLIBMULTITHREAD
 LIBMULTITHREAD
 LTLIBTHREAD
 LIBTHREAD
 LIBSTDTHREAD
+GL_GNULIB_LOCALENAME
+GL_GNULIB_DUPLOCALE
+GL_GNULIB_SETLOCALE_NULL
+GL_GNULIB_SETLOCALE
+GL_GNULIB_LOCALECONV
 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
 NEXT_LOCALE_H
 HAVE_XLOCALE_H
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
 NEXT_STDDEF_H
-GL_GENERATE_STDDEF_H_FALSE
-GL_GENERATE_STDDEF_H_TRUE
-STDDEF_H
 HAVE_WCHAR_T
 HAVE_MAX_ALIGN_T
 REPLACE_NULL
+LOCALENAME_ENHANCE_LOCALE_FUNCS
 REPLACE_STRUCT_LCONV
 REPLACE_FREELOCALE
 REPLACE_DUPLOCALE
@@ -923,12 +1030,18 @@ REPLACE_LOCALECONV
 HAVE_FREELOCALE
 HAVE_DUPLOCALE
 HAVE_NEWLOCALE
-GNULIB_LOCALENAME
-GNULIB_DUPLOCALE
-GNULIB_SETLOCALE_NULL
-GNULIB_SETLOCALE
-GNULIB_LOCALECONV
 LOCALCHARSET_TESTS_ENVIRONMENT
+GL_COND_OBJ_LISTEN_FALSE
+GL_COND_OBJ_LISTEN_TRUE
+GL_GENERATE_LIMITS_H_FALSE
+GL_GENERATE_LIMITS_H_TRUE
+LIMITS_H
+GL_COND_OBJ_ISBLANK_FALSE
+GL_COND_OBJ_ISBLANK_TRUE
+GL_GNULIB_STRTOUMAX
+GL_GNULIB_STRTOIMAX
+GL_GNULIB_IMAXDIV
+GL_GNULIB_IMAXABS
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
 NEXT_INTTYPES_H
 UINT64_MAX_EQ_ULONG_MAX
@@ -943,13 +1056,6 @@ HAVE_DECL_STRTOUMAX
 HAVE_DECL_STRTOIMAX
 HAVE_DECL_IMAXDIV
 HAVE_DECL_IMAXABS
-GNULIB_STRTOUMAX
-GNULIB_STRTOIMAX
-GNULIB_IMAXDIV
-GNULIB_IMAXABS
-GL_GENERATE_STDINT_H_FALSE
-GL_GENERATE_STDINT_H_TRUE
-STDINT_H
 HAVE_SYS_INTTYPES_H
 HAVE_SYS_BITYPES_H
 HAVE_C99_STDINT_H
@@ -973,21 +1079,25 @@ NEXT_STDINT_H
 HAVE_SYS_TYPES_H
 HAVE_INTTYPES_H
 HAVE_WCHAR_H
-GNULIB_OVERRIDES_WINT_T
-GL_GENERATE_LIMITS_H_FALSE
-GL_GENERATE_LIMITS_H_TRUE
-LIMITS_H
+GNULIBHEADERS_OVERRIDE_WINT_T
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
 NEXT_LIMITS_H
+GL_COND_OBJ_INET_NTOP_FALSE
+GL_COND_OBJ_INET_NTOP_TRUE
 INET_NTOP_LIB
 LIB_HARD_LOCALE
 LIB_SETLOCALE_NULL
 LIB_SCHED_YIELD
 LIBPMULTITHREAD
 LIBPTHREAD
+GL_COND_OBJ_GLOB_PATTERN_P_FALSE
+GL_COND_OBJ_GLOB_PATTERN_P_TRUE
+GL_COND_OBJ_GLOB_FALSE
+GL_COND_OBJ_GLOB_TRUE
 GL_GENERATE_GLOB_H_FALSE
 GL_GENERATE_GLOB_H_TRUE
 GLOB_H
+GL_GNULIB_GLOB
 HAVE_GLOB_H
 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
 NEXT_GLOB_H
@@ -995,7 +1105,9 @@ REPLACE_GLOB_PATTERN_P
 REPLACE_GLOB
 HAVE_GLOB_PATTERN_P
 HAVE_GLOB
-GNULIB_GLOB
+GL_GNULIB_GETTIMEOFDAY
+GL_COND_OBJ_GETTIMEOFDAY_FALSE
+GL_COND_OBJ_GETTIMEOFDAY_TRUE
 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
 NEXT_SYS_TIME_H
 REPLACE_STRUCT_TIMEVAL
@@ -1003,14 +1115,83 @@ REPLACE_GETTIMEOFDAY
 HAVE_SYS_TIME_H
 HAVE_STRUCT_TIMEVAL
 HAVE_GETTIMEOFDAY
-GNULIB_GETTIMEOFDAY
 LTLIBINTL
 LIBINTL
+GL_GNULIB_GETRANDOM
+GL_COND_OBJ_GETRANDOM_FALSE
+GL_COND_OBJ_GETRANDOM_TRUE
 LIB_GETRANDOM
 REPLACE_GETRANDOM
 HAVE_GETRANDOM
-GNULIB_GETRANDOM
 LIB_GETLOGIN
+GL_COND_OBJ_GETLOGIN_R_FALSE
+GL_COND_OBJ_GETLOGIN_R_TRUE
+GL_COND_OBJ_GETLINE_FALSE
+GL_COND_OBJ_GETLINE_TRUE
+GL_COND_OBJ_GETDTABLESIZE_FALSE
+GL_COND_OBJ_GETDTABLESIZE_TRUE
+GL_GNULIB_MDA_TEMPNAM
+GL_GNULIB_MDA_PUTW
+GL_GNULIB_MDA_GETW
+GL_GNULIB_MDA_FILENO
+GL_GNULIB_MDA_FDOPEN
+GL_GNULIB_MDA_FCLOSEALL
+GL_GNULIB_VSPRINTF_POSIX
+GL_GNULIB_VSNPRINTF
+GL_GNULIB_VPRINTF_POSIX
+GL_GNULIB_VPRINTF
+GL_GNULIB_VFPRINTF_POSIX
+GL_GNULIB_VFPRINTF
+GL_GNULIB_VDPRINTF
+GL_GNULIB_VSCANF
+GL_GNULIB_VFSCANF
+GL_GNULIB_VASPRINTF
+GL_GNULIB_TMPFILE
+GL_GNULIB_STDIO_H_SIGPIPE
+GL_GNULIB_STDIO_H_NONBLOCKING
+GL_GNULIB_SPRINTF_POSIX
+GL_GNULIB_SNPRINTF
+GL_GNULIB_SCANF
+GL_GNULIB_RENAMEAT
+GL_GNULIB_RENAME
+GL_GNULIB_REMOVE
+GL_GNULIB_PUTS
+GL_GNULIB_PUTCHAR
+GL_GNULIB_PUTC
+GL_GNULIB_PRINTF_POSIX
+GL_GNULIB_PRINTF
+GL_GNULIB_POPEN
+GL_GNULIB_PERROR
+GL_GNULIB_PCLOSE
+GL_GNULIB_OBSTACK_PRINTF_POSIX
+GL_GNULIB_OBSTACK_PRINTF
+GL_GNULIB_GETLINE
+GL_GNULIB_GETDELIM
+GL_GNULIB_GETCHAR
+GL_GNULIB_GETC
+GL_GNULIB_FWRITE
+GL_GNULIB_FTELLO
+GL_GNULIB_FTELL
+GL_GNULIB_FSEEKO
+GL_GNULIB_FSEEK
+GL_GNULIB_FSCANF
+GL_GNULIB_FREOPEN
+GL_GNULIB_FREAD
+GL_GNULIB_FPUTS
+GL_GNULIB_FPUTC
+GL_GNULIB_FPURGE
+GL_GNULIB_FPRINTF_POSIX
+GL_GNULIB_FPRINTF
+GL_GNULIB_FOPEN_GNU
+GL_GNULIB_FOPEN
+GL_GNULIB_FGETS
+GL_GNULIB_FGETC
+GL_GNULIB_FFLUSH
+GL_GNULIB_FDOPEN
+GL_GNULIB_FCLOSE
+GL_GNULIB_DPRINTF
+GL_COND_OBJ_GETDELIM_FALSE
+GL_COND_OBJ_GETDELIM_TRUE
 REPLACE_VSPRINTF
 REPLACE_VSNPRINTF
 REPLACE_VPRINTF
@@ -1038,6 +1219,7 @@ REPLACE_FSEEK
 REPLACE_FREOPEN
 REPLACE_FPURGE
 REPLACE_FPRINTF
+REPLACE_FOPEN_FOR_FOPEN_GNU
 REPLACE_FOPEN
 REPLACE_FFLUSH
 REPLACE_FDOPEN
@@ -1060,69 +1242,37 @@ HAVE_DECL_FTELLO
 HAVE_DECL_FSEEKO
 HAVE_DECL_FPURGE
 HAVE_DECL_FCLOSEALL
-GNULIB_MDA_TEMPNAM
-GNULIB_MDA_PUTW
-GNULIB_MDA_GETW
-GNULIB_MDA_FILENO
-GNULIB_MDA_FDOPEN
-GNULIB_MDA_FCLOSEALL
-GNULIB_VSPRINTF_POSIX
-GNULIB_VSNPRINTF
-GNULIB_VPRINTF_POSIX
-GNULIB_VPRINTF
-GNULIB_VFPRINTF_POSIX
-GNULIB_VFPRINTF
-GNULIB_VDPRINTF
-GNULIB_VSCANF
-GNULIB_VFSCANF
-GNULIB_VASPRINTF
-GNULIB_TMPFILE
-GNULIB_STDIO_H_SIGPIPE
-GNULIB_STDIO_H_NONBLOCKING
-GNULIB_SPRINTF_POSIX
-GNULIB_SNPRINTF
-GNULIB_SCANF
-GNULIB_RENAMEAT
-GNULIB_RENAME
-GNULIB_REMOVE
-GNULIB_PUTS
-GNULIB_PUTCHAR
-GNULIB_PUTC
-GNULIB_PRINTF_POSIX
-GNULIB_PRINTF
-GNULIB_POPEN
-GNULIB_PERROR
-GNULIB_PCLOSE
-GNULIB_OBSTACK_PRINTF_POSIX
-GNULIB_OBSTACK_PRINTF
-GNULIB_GETLINE
-GNULIB_GETDELIM
-GNULIB_GETCHAR
-GNULIB_GETC
-GNULIB_FWRITE
-GNULIB_FTELLO
-GNULIB_FTELL
-GNULIB_FSEEKO
-GNULIB_FSEEK
-GNULIB_FSCANF
-GNULIB_FREOPEN
-GNULIB_FREAD
-GNULIB_FPUTS
-GNULIB_FPUTC
-GNULIB_FPURGE
-GNULIB_FPRINTF_POSIX
-GNULIB_FPRINTF
-GNULIB_FOPEN
-GNULIB_FGETS
-GNULIB_FGETC
-GNULIB_FFLUSH
-GNULIB_FDOPEN
-GNULIB_FCLOSE
-GNULIB_DPRINTF
+GL_COND_OBJ_GETCWD_LGPL_FALSE
+GL_COND_OBJ_GETCWD_LGPL_TRUE
+GL_COND_OBJ_GETCWD_FALSE
+GL_COND_OBJ_GETCWD_TRUE
+GL_COND_OBJ_FSTATAT_FALSE
+GL_COND_OBJ_FSTATAT_TRUE
+GL_GNULIB_MDA_UMASK
+GL_GNULIB_MDA_MKDIR
+GL_GNULIB_MDA_CHMOD
+GL_GNULIB_OVERRIDES_STRUCT_STAT
+GL_GNULIB_UTIMENSAT
+GL_GNULIB_STAT
+GL_GNULIB_MKNODAT
+GL_GNULIB_MKNOD
+GL_GNULIB_MKFIFOAT
+GL_GNULIB_MKFIFO
+GL_GNULIB_MKDIRAT
+GL_GNULIB_MKDIR
+GL_GNULIB_LSTAT
+GL_GNULIB_LCHMOD
+GL_GNULIB_GETUMASK
+GL_GNULIB_FUTIMENS
+GL_GNULIB_FSTATAT
+GL_GNULIB_FSTAT
+GL_GNULIB_FCHMODAT
 WINDOWS_64_BIT_ST_SIZE
 WINDOWS_STAT_TIMESPEC
 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
 NEXT_SYS_STAT_H
+GL_COND_OBJ_FSTAT_FALSE
+GL_COND_OBJ_FSTAT_TRUE
 REPLACE_UTIMENSAT
 REPLACE_STAT
 REPLACE_MKNODAT
@@ -1147,27 +1297,109 @@ HAVE_GETUMASK
 HAVE_FUTIMENS
 HAVE_FSTATAT
 HAVE_FCHMODAT
-GNULIB_MDA_UMASK
-GNULIB_MDA_MKDIR
-GNULIB_MDA_CHMOD
-GNULIB_OVERRIDES_STRUCT_STAT
-GNULIB_UTIMENSAT
-GNULIB_STAT
-GNULIB_MKNODAT
-GNULIB_MKNOD
-GNULIB_MKFIFOAT
-GNULIB_MKFIFO
-GNULIB_MKDIRAT
-GNULIB_MKDIR
-GNULIB_LSTAT
-GNULIB_LCHMOD
-GNULIB_GETUMASK
-GNULIB_FUTIMENS
-GNULIB_FSTATAT
-GNULIB_FSTAT
-GNULIB_FCHMODAT
 FREXPL_LIBM
 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+GL_GNULIB_MDA_YN
+GL_GNULIB_MDA_Y1
+GL_GNULIB_MDA_Y0
+GL_GNULIB_MDA_JN
+GL_GNULIB_MDA_J1
+GL_GNULIB_MDA_J0
+GL_GNULIB_TRUNCL
+GL_GNULIB_TRUNCF
+GL_GNULIB_TRUNC
+GL_GNULIB_TANHF
+GL_GNULIB_TANL
+GL_GNULIB_TANF
+GL_GNULIB_SQRTL
+GL_GNULIB_SQRTF
+GL_GNULIB_SINHF
+GL_GNULIB_SINL
+GL_GNULIB_SINF
+GL_GNULIB_SIGNBIT
+GL_GNULIB_ROUNDL
+GL_GNULIB_ROUNDF
+GL_GNULIB_ROUND
+GL_GNULIB_RINTL
+GL_GNULIB_RINTF
+GL_GNULIB_RINT
+GL_GNULIB_REMAINDERL
+GL_GNULIB_REMAINDERF
+GL_GNULIB_REMAINDER
+GL_GNULIB_POWF
+GL_GNULIB_MODFL
+GL_GNULIB_MODFF
+GL_GNULIB_MODF
+GL_GNULIB_LOGBL
+GL_GNULIB_LOGBF
+GL_GNULIB_LOGB
+GL_GNULIB_LOG2L
+GL_GNULIB_LOG2F
+GL_GNULIB_LOG2
+GL_GNULIB_LOG1PL
+GL_GNULIB_LOG1PF
+GL_GNULIB_LOG1P
+GL_GNULIB_LOG10L
+GL_GNULIB_LOG10F
+GL_GNULIB_LOG10
+GL_GNULIB_LOGL
+GL_GNULIB_LOGF
+GL_GNULIB_LOG
+GL_GNULIB_LDEXPL
+GL_GNULIB_LDEXPF
+GL_GNULIB_ISNANL
+GL_GNULIB_ISNAND
+GL_GNULIB_ISNANF
+GL_GNULIB_ISNAN
+GL_GNULIB_ISINF
+GL_GNULIB_ISFINITE
+GL_GNULIB_ILOGBL
+GL_GNULIB_ILOGBF
+GL_GNULIB_ILOGB
+GL_GNULIB_HYPOTL
+GL_GNULIB_HYPOTF
+GL_GNULIB_HYPOT
+GL_GNULIB_FREXPL
+GL_GNULIB_FREXP
+GL_GNULIB_FREXPF
+GL_GNULIB_FMODL
+GL_GNULIB_FMODF
+GL_GNULIB_FMOD
+GL_GNULIB_FMAL
+GL_GNULIB_FMAF
+GL_GNULIB_FMA
+GL_GNULIB_FLOORL
+GL_GNULIB_FLOORF
+GL_GNULIB_FLOOR
+GL_GNULIB_FABSL
+GL_GNULIB_FABSF
+GL_GNULIB_EXPM1L
+GL_GNULIB_EXPM1F
+GL_GNULIB_EXPM1
+GL_GNULIB_EXP2L
+GL_GNULIB_EXP2F
+GL_GNULIB_EXP2
+GL_GNULIB_EXPL
+GL_GNULIB_EXPF
+GL_GNULIB_COSHF
+GL_GNULIB_COSL
+GL_GNULIB_COSF
+GL_GNULIB_COPYSIGNL
+GL_GNULIB_COPYSIGNF
+GL_GNULIB_COPYSIGN
+GL_GNULIB_CEILL
+GL_GNULIB_CEILF
+GL_GNULIB_CEIL
+GL_GNULIB_CBRTL
+GL_GNULIB_CBRTF
+GL_GNULIB_CBRT
+GL_GNULIB_ATAN2F
+GL_GNULIB_ATANL
+GL_GNULIB_ATANF
+GL_GNULIB_ASINL
+GL_GNULIB_ASINF
+GL_GNULIB_ACOSL
+GL_GNULIB_ACOSF
 FREXP_LIBM
 REPLACE_TRUNCL
 REPLACE_TRUNCF
@@ -1344,159 +1576,92 @@ HAVE_ASINL
 HAVE_ASINF
 HAVE_ACOSL
 HAVE_ACOSF
-GNULIB_MDA_YN
-GNULIB_MDA_Y1
-GNULIB_MDA_Y0
-GNULIB_MDA_JN
-GNULIB_MDA_J1
-GNULIB_MDA_J0
-GNULIB_TRUNCL
-GNULIB_TRUNCF
-GNULIB_TRUNC
-GNULIB_TANHF
-GNULIB_TANL
-GNULIB_TANF
-GNULIB_SQRTL
-GNULIB_SQRTF
-GNULIB_SINHF
-GNULIB_SINL
-GNULIB_SINF
-GNULIB_SIGNBIT
-GNULIB_ROUNDL
-GNULIB_ROUNDF
-GNULIB_ROUND
-GNULIB_RINTL
-GNULIB_RINTF
-GNULIB_RINT
-GNULIB_REMAINDERL
-GNULIB_REMAINDERF
-GNULIB_REMAINDER
-GNULIB_POWF
-GNULIB_MODFL
-GNULIB_MODFF
-GNULIB_MODF
-GNULIB_LOGBL
-GNULIB_LOGBF
-GNULIB_LOGB
-GNULIB_LOG2L
-GNULIB_LOG2F
-GNULIB_LOG2
-GNULIB_LOG1PL
-GNULIB_LOG1PF
-GNULIB_LOG1P
-GNULIB_LOG10L
-GNULIB_LOG10F
-GNULIB_LOG10
-GNULIB_LOGL
-GNULIB_LOGF
-GNULIB_LOG
-GNULIB_LDEXPL
-GNULIB_LDEXPF
-GNULIB_ISNANL
-GNULIB_ISNAND
-GNULIB_ISNANF
-GNULIB_ISNAN
-GNULIB_ISINF
-GNULIB_ISFINITE
-GNULIB_ILOGBL
-GNULIB_ILOGBF
-GNULIB_ILOGB
-GNULIB_HYPOTL
-GNULIB_HYPOTF
-GNULIB_HYPOT
-GNULIB_FREXPL
-GNULIB_FREXP
-GNULIB_FREXPF
-GNULIB_FMODL
-GNULIB_FMODF
-GNULIB_FMOD
-GNULIB_FMAL
-GNULIB_FMAF
-GNULIB_FMA
-GNULIB_FLOORL
-GNULIB_FLOORF
-GNULIB_FLOOR
-GNULIB_FABSL
-GNULIB_FABSF
-GNULIB_EXPM1L
-GNULIB_EXPM1F
-GNULIB_EXPM1
-GNULIB_EXP2L
-GNULIB_EXP2F
-GNULIB_EXP2
-GNULIB_EXPL
-GNULIB_EXPF
-GNULIB_COSHF
-GNULIB_COSL
-GNULIB_COSF
-GNULIB_COPYSIGNL
-GNULIB_COPYSIGNF
-GNULIB_COPYSIGN
-GNULIB_CEILL
-GNULIB_CEILF
-GNULIB_CEIL
-GNULIB_CBRTL
-GNULIB_CBRTF
-GNULIB_CBRT
-GNULIB_ATAN2F
-GNULIB_ATANL
-GNULIB_ATANF
-GNULIB_ASINL
-GNULIB_ASINF
-GNULIB_ACOSL
-GNULIB_ACOSF
+GL_COND_OBJ_FREE_FALSE
+GL_COND_OBJ_FREE_TRUE
 GL_GENERATE_FNMATCH_H_FALSE
 GL_GENERATE_FNMATCH_H_TRUE
 FNMATCH_H
+GL_GNULIB_FNMATCH
 HAVE_FNMATCH_H
 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
 NEXT_FNMATCH_H
 REPLACE_FNMATCH
 HAVE_FNMATCH
-GNULIB_FNMATCH
-REPLACE_ITOLD
+GL_COND_OBJ_ITOLD_FALSE
+GL_COND_OBJ_ITOLD_TRUE
+GL_COND_OBJ_FLOAT_FALSE
+GL_COND_OBJ_FLOAT_TRUE
 GL_GENERATE_FLOAT_H_FALSE
 GL_GENERATE_FLOAT_H_TRUE
 FLOAT_H
+REPLACE_ITOLD
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
 NEXT_FLOAT_H
+GL_GNULIB_FFS
+GL_COND_OBJ_FFS_FALSE
+GL_COND_OBJ_FFS_TRUE
 HAVE_DECL_STRNCASECMP
 HAVE_STRCASECMP
 HAVE_FFS
-GNULIB_FFS
+GL_COND_OBJ_FDOPENDIR_FALSE
+GL_COND_OBJ_FDOPENDIR_TRUE
 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
 NEXT_FCNTL_H
+GL_GNULIB_MDA_OPEN
+GL_GNULIB_MDA_CREAT
+GL_GNULIB_OPENAT
+GL_GNULIB_OPEN
+GL_GNULIB_NONBLOCKING
+GL_GNULIB_FCNTL
+GL_GNULIB_CREAT
+GL_COND_OBJ_FCNTL_FALSE
+GL_COND_OBJ_FCNTL_TRUE
 REPLACE_OPENAT
 REPLACE_OPEN
 REPLACE_FCNTL
 REPLACE_CREAT
 HAVE_OPENAT
 HAVE_FCNTL
-GNULIB_MDA_OPEN
-GNULIB_MDA_CREAT
-GNULIB_OPENAT
-GNULIB_OPEN
-GNULIB_NONBLOCKING
-GNULIB_FCNTL
-GNULIB_CREAT
+GL_COND_OBJ_FCHDIR_FALSE
+GL_COND_OBJ_FCHDIR_TRUE
+GL_COND_OBJ_ERROR_FALSE
+GL_COND_OBJ_ERROR_TRUE
+GL_GENERATE_ERRNO_H_FALSE
+GL_GENERATE_ERRNO_H_TRUE
+ERRNO_H
 EOVERFLOW_VALUE
 EOVERFLOW_HIDDEN
 ENOLINK_VALUE
 ENOLINK_HIDDEN
 EMULTIHOP_VALUE
 EMULTIHOP_HIDDEN
-GL_GENERATE_ERRNO_H_FALSE
-GL_GENERATE_ERRNO_H_TRUE
-ERRNO_H
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
 NEXT_ERRNO_H
+GL_COND_OBJ_DUP2_FALSE
+GL_COND_OBJ_DUP2_TRUE
+GL_COND_OBJ_DUP_FALSE
+GL_COND_OBJ_DUP_TRUE
+GL_COND_OBJ_DIRFD_FALSE
+GL_COND_OBJ_DIRFD_TRUE
 HAVE_DIRENT_H
 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
 NEXT_DIRENT_H
+GL_GNULIB_ISBLANK
 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
 NEXT_CTYPE_H
 HAVE_ISBLANK
-GNULIB_ISBLANK
+GL_COND_OBJ_CONNECT_FALSE
+GL_COND_OBJ_CONNECT_TRUE
+GL_GNULIB_ALPHASORT
+GL_GNULIB_SCANDIR
+GL_GNULIB_FDOPENDIR
+GL_GNULIB_DIRFD
+GL_GNULIB_CLOSEDIR
+GL_GNULIB_REWINDDIR
+GL_GNULIB_READDIR
+GL_GNULIB_OPENDIR
+GL_COND_OBJ_CLOSEDIR_FALSE
+GL_COND_OBJ_CLOSEDIR_TRUE
 REPLACE_FDOPENDIR
 REPLACE_DIRFD
 REPLACE_CLOSEDIR
@@ -1510,24 +1675,116 @@ HAVE_CLOSEDIR
 HAVE_REWINDDIR
 HAVE_READDIR
 HAVE_OPENDIR
-GNULIB_ALPHASORT
-GNULIB_SCANDIR
-GNULIB_FDOPENDIR
-GNULIB_DIRFD
-GNULIB_CLOSEDIR
-GNULIB_REWINDDIR
-GNULIB_READDIR
-GNULIB_OPENDIR
+GL_COND_OBJ_CLOSE_FALSE
+GL_COND_OBJ_CLOSE_TRUE
 HAVE_MSVC_INVALID_PARAMETER_HANDLER
 LIB_CLOCK_GETTIME
+GL_COND_OBJ_FCHOWN_STUB_FALSE
+GL_COND_OBJ_FCHOWN_STUB_TRUE
+GL_COND_OBJ_CHOWN_FALSE
+GL_COND_OBJ_CHOWN_TRUE
+GL_COND_OBJ_CHDIR_LONG_FALSE
+GL_COND_OBJ_CHDIR_LONG_TRUE
+GL_GNULIB_MDA_WRITE
+GL_GNULIB_MDA_UNLINK
+GL_GNULIB_MDA_SWAB
+GL_GNULIB_MDA_RMDIR
+GL_GNULIB_MDA_READ
+GL_GNULIB_MDA_LSEEK
+GL_GNULIB_MDA_ISATTY
+GL_GNULIB_MDA_GETPID
+GL_GNULIB_MDA_GETCWD
+GL_GNULIB_MDA_EXECVPE
+GL_GNULIB_MDA_EXECVP
+GL_GNULIB_MDA_EXECVE
+GL_GNULIB_MDA_EXECV
+GL_GNULIB_MDA_EXECLP
+GL_GNULIB_MDA_EXECLE
+GL_GNULIB_MDA_EXECL
+GL_GNULIB_MDA_DUP2
+GL_GNULIB_MDA_DUP
+GL_GNULIB_MDA_CLOSE
+GL_GNULIB_MDA_CHDIR
+GL_GNULIB_MDA_ACCESS
+GL_GNULIB_WRITE
+GL_GNULIB_USLEEP
+GL_GNULIB_UNLINKAT
+GL_GNULIB_UNLINK
+GL_GNULIB_UNISTD_H_SIGPIPE
+GL_GNULIB_UNISTD_H_NONBLOCKING
+GL_GNULIB_UNISTD_H_GETOPT
+GL_GNULIB_TTYNAME_R
+GL_GNULIB_TRUNCATE
+GL_GNULIB_SYMLINKAT
+GL_GNULIB_SYMLINK
+GL_GNULIB_SLEEP
+GL_GNULIB_SETHOSTNAME
+GL_GNULIB_RMDIR
+GL_GNULIB_READLINKAT
+GL_GNULIB_READLINK
+GL_GNULIB_READ
+GL_GNULIB_PWRITE
+GL_GNULIB_PREAD
+GL_GNULIB_PIPE2
+GL_GNULIB_PIPE
+GL_GNULIB_LSEEK
+GL_GNULIB_LINKAT
+GL_GNULIB_LINK
+GL_GNULIB_LCHOWN
+GL_GNULIB_ISATTY
+GL_GNULIB_GROUP_MEMBER
+GL_GNULIB_GETUSERSHELL
+GL_GNULIB_GETPASS_GNU
+GL_GNULIB_GETPASS
+GL_GNULIB_GETPAGESIZE
+GL_GNULIB_GETOPT_POSIX
+GL_GNULIB_GETLOGIN_R
+GL_GNULIB_GETLOGIN
+GL_GNULIB_GETHOSTNAME
+GL_GNULIB_GETGROUPS
+GL_GNULIB_GETENTROPY
+GL_GNULIB_GETDTABLESIZE
+GL_GNULIB_GETDOMAINNAME
+GL_GNULIB_GETCWD
+GL_GNULIB_FTRUNCATE
+GL_GNULIB_FSYNC
+GL_GNULIB_FDATASYNC
+GL_GNULIB_FCHOWNAT
+GL_GNULIB_FCHDIR
+GL_GNULIB_FACCESSAT
+GL_GNULIB_EXECVPE
+GL_GNULIB_EXECVP
+GL_GNULIB_EXECVE
+GL_GNULIB_EXECV
+GL_GNULIB_EXECLP
+GL_GNULIB_EXECLE
+GL_GNULIB_EXECL
+GL_GNULIB_EUIDACCESS
+GL_GNULIB_ENVIRON
+GL_GNULIB_DUP3
+GL_GNULIB_DUP2
+GL_GNULIB_DUP
+GL_GNULIB_COPY_FILE_RANGE
+GL_GNULIB_CLOSE
+GL_GNULIB_CHOWN
+GL_GNULIB_CHDIR
+GL_GNULIB_ACCESS
+GL_COND_OBJ_CANONICALIZE_LGPL_FALSE
+GL_COND_OBJ_CANONICALIZE_LGPL_TRUE
 REPLACE_WCTOMB
 REPLACE_UNSETENV
+REPLACE_STRTOULL
+REPLACE_STRTOUL
+REPLACE_STRTOLL
 REPLACE_STRTOLD
+REPLACE_STRTOL
 REPLACE_STRTOD
 REPLACE_SETSTATE
 REPLACE_SETENV
 REPLACE_REALPATH
-REPLACE_REALLOC
+REPLACE_REALLOCARRAY
+REPLACE_REALLOC_FOR_REALLOC_POSIX
+REPLACE_REALLOC_FOR_REALLOC_GNU
 REPLACE_RANDOM_R
 REPLACE_RANDOM
 REPLACE_QSORT_R
@@ -1537,19 +1794,23 @@ REPLACE_PTSNAME
 REPLACE_POSIX_MEMALIGN
 REPLACE_MKSTEMP
 REPLACE_MBTOWC
-REPLACE_MALLOC
+REPLACE_MALLOC_FOR_MALLOC_POSIX
+REPLACE_MALLOC_FOR_MALLOC_GNU
 REPLACE_INITSTATE
 REPLACE_FREE
 REPLACE_CANONICALIZE_FILE_NAME
-REPLACE_CALLOC
+REPLACE_CALLOC_FOR_CALLOC_POSIX
+REPLACE_CALLOC_FOR_CALLOC_GNU
 REPLACE_ALIGNED_ALLOC
 HAVE_DECL_UNSETENV
 HAVE_UNLOCKPT
 HAVE_SYS_LOADAVG_H
 HAVE_STRUCT_RANDOM_DATA
 HAVE_STRTOULL
+HAVE_STRTOUL
 HAVE_STRTOLL
 HAVE_STRTOLD
+HAVE_STRTOL
 HAVE_STRTOD
 HAVE_DECL_SETSTATE
 HAVE_SETSTATE
@@ -1585,49 +1846,98 @@ HAVE_CANONICALIZE_FILE_NAME
 HAVE_ATOLL
 HAVE_ALIGNED_ALLOC
 HAVE__EXIT
-GNULIB_MDA_PUTENV
-GNULIB_MDA_MKTEMP
-GNULIB_MDA_GCVT
-GNULIB_MDA_FCVT
-GNULIB_MDA_ECVT
-GNULIB_WCTOMB
-GNULIB_UNSETENV
-GNULIB_UNLOCKPT
-GNULIB_SYSTEM_POSIX
-GNULIB_STRTOULL
-GNULIB_STRTOLL
-GNULIB_STRTOLD
-GNULIB_STRTOD
-GNULIB_SETENV
-GNULIB_SECURE_GETENV
-GNULIB_RPMATCH
-GNULIB_REALPATH
-GNULIB_REALLOC_POSIX
-GNULIB_REALLOCARRAY
-GNULIB_RANDOM_R
-GNULIB_RANDOM
-GNULIB_QSORT_R
-GNULIB_PUTENV
-GNULIB_PTSNAME_R
-GNULIB_PTSNAME
-GNULIB_POSIX_OPENPT
-GNULIB_POSIX_MEMALIGN
-GNULIB_MKSTEMPS
-GNULIB_MKSTEMP
-GNULIB_MKOSTEMPS
-GNULIB_MKOSTEMP
-GNULIB_MKDTEMP
-GNULIB_MBTOWC
-GNULIB_MALLOC_POSIX
-GNULIB_GRANTPT
-GNULIB_GETSUBOPT
-GNULIB_GETLOADAVG
-GNULIB_FREE_POSIX
-GNULIB_CANONICALIZE_FILE_NAME
-GNULIB_CALLOC_POSIX
-GNULIB_ATOLL
-GNULIB_ALIGNED_ALLOC
-GNULIB__EXIT
+GL_GNULIB_MDA_PUTENV
+GL_GNULIB_MDA_MKTEMP
+GL_GNULIB_MDA_GCVT
+GL_GNULIB_MDA_FCVT
+GL_GNULIB_MDA_ECVT
+GL_GNULIB_WCTOMB
+GL_GNULIB_UNSETENV
+GL_GNULIB_UNLOCKPT
+GL_GNULIB_SYSTEM_POSIX
+GL_GNULIB_STRTOULL
+GL_GNULIB_STRTOUL
+GL_GNULIB_STRTOLL
+GL_GNULIB_STRTOLD
+GL_GNULIB_STRTOL
+GL_GNULIB_STRTOD
+GL_GNULIB_SETENV
+GL_GNULIB_SECURE_GETENV
+GL_GNULIB_RPMATCH
+GL_GNULIB_REALPATH
+GL_GNULIB_REALLOC_POSIX
+GL_GNULIB_REALLOC_GNU
+GL_GNULIB_REALLOCARRAY
+GL_GNULIB_RANDOM_R
+GL_GNULIB_RANDOM
+GL_GNULIB_QSORT_R
+GL_GNULIB_PUTENV
+GL_GNULIB_PTSNAME_R
+GL_GNULIB_PTSNAME
+GL_GNULIB_POSIX_OPENPT
+GL_GNULIB_POSIX_MEMALIGN
+GL_GNULIB_MKSTEMPS
+GL_GNULIB_MKSTEMP
+GL_GNULIB_MKOSTEMPS
+GL_GNULIB_MKOSTEMP
+GL_GNULIB_MKDTEMP
+GL_GNULIB_MBTOWC
+GL_GNULIB_MALLOC_POSIX
+GL_GNULIB_MALLOC_GNU
+GL_GNULIB_GRANTPT
+GL_GNULIB_GETSUBOPT
+GL_GNULIB_GETLOADAVG
+GL_GNULIB_FREE_POSIX
+GL_GNULIB_CANONICALIZE_FILE_NAME
+GL_GNULIB_CALLOC_POSIX
+GL_GNULIB_CALLOC_GNU
+GL_GNULIB_ATOLL
+GL_GNULIB_ALIGNED_ALLOC
+GL_GNULIB__EXIT
+GL_GNULIB_MDA_WCSDUP
+GL_GNULIB_WCSFTIME
+GL_GNULIB_WCSWIDTH
+GL_GNULIB_WCSTOK
+GL_GNULIB_WCSSTR
+GL_GNULIB_WCSPBRK
+GL_GNULIB_WCSSPN
+GL_GNULIB_WCSCSPN
+GL_GNULIB_WCSRCHR
+GL_GNULIB_WCSCHR
+GL_GNULIB_WCSDUP
+GL_GNULIB_WCSXFRM
+GL_GNULIB_WCSCOLL
+GL_GNULIB_WCSNCASECMP
+GL_GNULIB_WCSCASECMP
+GL_GNULIB_WCSNCMP
+GL_GNULIB_WCSCMP
+GL_GNULIB_WCSNCAT
+GL_GNULIB_WCSCAT
+GL_GNULIB_WCPNCPY
+GL_GNULIB_WCSNCPY
+GL_GNULIB_WCPCPY
+GL_GNULIB_WCSCPY
+GL_GNULIB_WCSNLEN
+GL_GNULIB_WCSLEN
+GL_GNULIB_WMEMSET
+GL_GNULIB_WMEMPCPY
+GL_GNULIB_WMEMMOVE
+GL_GNULIB_WMEMCPY
+GL_GNULIB_WMEMCMP
+GL_GNULIB_WMEMCHR
+GL_GNULIB_WCWIDTH
+GL_GNULIB_WCSNRTOMBS
+GL_GNULIB_WCSRTOMBS
+GL_GNULIB_WCRTOMB
+GL_GNULIB_MBSNRTOWCS
+GL_GNULIB_MBSRTOWCS
+GL_GNULIB_MBRLEN
+GL_GNULIB_MBRTOWC
+GL_GNULIB_MBSINIT
+GL_GNULIB_WCTOB
+GL_GNULIB_BTOWC
+GL_COND_OBJ_BTOWC_FALSE
+GL_COND_OBJ_BTOWC_TRUE
 LOCALE_FR
 REPLACE_WCSTOK
 REPLACE_WCSFTIME
@@ -1686,49 +1996,10 @@ HAVE_MBRLEN
 HAVE_MBRTOWC
 HAVE_MBSINIT
 HAVE_BTOWC
-GNULIB_MDA_WCSDUP
-GNULIB_WCSFTIME
-GNULIB_WCSWIDTH
-GNULIB_WCSTOK
-GNULIB_WCSSTR
-GNULIB_WCSPBRK
-GNULIB_WCSSPN
-GNULIB_WCSCSPN
-GNULIB_WCSRCHR
-GNULIB_WCSCHR
-GNULIB_WCSDUP
-GNULIB_WCSXFRM
-GNULIB_WCSCOLL
-GNULIB_WCSNCASECMP
-GNULIB_WCSCASECMP
-GNULIB_WCSNCMP
-GNULIB_WCSCMP
-GNULIB_WCSNCAT
-GNULIB_WCSCAT
-GNULIB_WCPNCPY
-GNULIB_WCSNCPY
-GNULIB_WCPCPY
-GNULIB_WCSCPY
-GNULIB_WCSNLEN
-GNULIB_WCSLEN
-GNULIB_WMEMSET
-GNULIB_WMEMPCPY
-GNULIB_WMEMMOVE
-GNULIB_WMEMCPY
-GNULIB_WMEMCMP
-GNULIB_WMEMCHR
-GNULIB_WCWIDTH
-GNULIB_WCSNRTOMBS
-GNULIB_WCSRTOMBS
-GNULIB_WCRTOMB
-GNULIB_MBSNRTOWCS
-GNULIB_MBSRTOWCS
-GNULIB_MBRLEN
-GNULIB_MBRTOWC
-GNULIB_MBSINIT
-GNULIB_WCTOB
-GNULIB_BTOWC
-MKDIR_P
+GL_COND_OBJ_BIND_FALSE
+GL_COND_OBJ_BIND_TRUE
+GL_GNULIB_INET_PTON
+GL_GNULIB_INET_NTOP
 HAVE_FEATURES_H
 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
 NEXT_ARPA_INET_H
@@ -1737,13 +2008,29 @@ REPLACE_INET_PTON
 REPLACE_INET_NTOP
 HAVE_DECL_INET_PTON
 HAVE_DECL_INET_NTOP
-GNULIB_INET_PTON
-GNULIB_INET_NTOP
-HAVE_ALLOCA_H
+MKDIR_P
 GL_GENERATE_ALLOCA_H_FALSE
 GL_GENERATE_ALLOCA_H_TRUE
 ALLOCA_H
+HAVE_ALLOCA_H
 ALLOCA
+GL_GNULIB_ACCEPT4
+GL_GNULIB_SHUTDOWN
+GL_GNULIB_SETSOCKOPT
+GL_GNULIB_SENDTO
+GL_GNULIB_RECVFROM
+GL_GNULIB_SEND
+GL_GNULIB_RECV
+GL_GNULIB_LISTEN
+GL_GNULIB_GETSOCKOPT
+GL_GNULIB_GETSOCKNAME
+GL_GNULIB_GETPEERNAME
+GL_GNULIB_BIND
+GL_GNULIB_ACCEPT
+GL_GNULIB_CONNECT
+GL_GNULIB_SOCKET
+GL_COND_OBJ_ACCEPT_FALSE
+GL_COND_OBJ_ACCEPT_TRUE
 HAVE_WINSOCK2_H
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
@@ -1768,6 +2055,7 @@ REPLACE_LINKAT
 REPLACE_LINK
 REPLACE_LCHOWN
 REPLACE_ISATTY
+REPLACE_GETPASS_FOR_GETPASS_GNU
 REPLACE_GETPASS
 REPLACE_GETPAGESIZE
 REPLACE_GETGROUPS
@@ -1787,6 +2075,7 @@ REPLACE_EXECLE
 REPLACE_EXECL
 REPLACE_DUP2
 REPLACE_DUP
+REPLACE_COPY_FILE_RANGE
 REPLACE_CLOSE
 REPLACE_CHOWN
 REPLACE_ACCESS
@@ -1838,88 +2127,6 @@ HAVE_EUIDACCESS
 HAVE_DUP3
 HAVE_COPY_FILE_RANGE
 HAVE_CHOWN
-GNULIB_MDA_WRITE
-GNULIB_MDA_UNLINK
-GNULIB_MDA_SWAB
-GNULIB_MDA_RMDIR
-GNULIB_MDA_READ
-GNULIB_MDA_LSEEK
-GNULIB_MDA_ISATTY
-GNULIB_MDA_GETPID
-GNULIB_MDA_GETCWD
-GNULIB_MDA_EXECVPE
-GNULIB_MDA_EXECVP
-GNULIB_MDA_EXECVE
-GNULIB_MDA_EXECV
-GNULIB_MDA_EXECLP
-GNULIB_MDA_EXECLE
-GNULIB_MDA_EXECL
-GNULIB_MDA_DUP2
-GNULIB_MDA_DUP
-GNULIB_MDA_CLOSE
-GNULIB_MDA_CHDIR
-GNULIB_MDA_ACCESS
-GNULIB_WRITE
-GNULIB_USLEEP
-GNULIB_UNLINKAT
-GNULIB_UNLINK
-GNULIB_UNISTD_H_SIGPIPE
-GNULIB_UNISTD_H_NONBLOCKING
-GNULIB_TTYNAME_R
-GNULIB_TRUNCATE
-GNULIB_SYMLINKAT
-GNULIB_SYMLINK
-GNULIB_SLEEP
-GNULIB_SETHOSTNAME
-GNULIB_RMDIR
-GNULIB_READLINKAT
-GNULIB_READLINK
-GNULIB_READ
-GNULIB_PWRITE
-GNULIB_PREAD
-GNULIB_PIPE2
-GNULIB_PIPE
-GNULIB_LSEEK
-GNULIB_LINKAT
-GNULIB_LINK
-GNULIB_LCHOWN
-GNULIB_ISATTY
-GNULIB_GROUP_MEMBER
-GNULIB_GETUSERSHELL
-GNULIB_GETPASS
-GNULIB_GETPAGESIZE
-GNULIB_GETOPT_POSIX
-GNULIB_GETLOGIN_R
-GNULIB_GETLOGIN
-GNULIB_GETHOSTNAME
-GNULIB_GETGROUPS
-GNULIB_GETENTROPY
-GNULIB_GETDTABLESIZE
-GNULIB_GETDOMAINNAME
-GNULIB_GETCWD
-GNULIB_FTRUNCATE
-GNULIB_FSYNC
-GNULIB_FDATASYNC
-GNULIB_FCHOWNAT
-GNULIB_FCHDIR
-GNULIB_FACCESSAT
-GNULIB_EXECVPE
-GNULIB_EXECVP
-GNULIB_EXECVE
-GNULIB_EXECV
-GNULIB_EXECLP
-GNULIB_EXECLE
-GNULIB_EXECL
-GNULIB_EUIDACCESS
-GNULIB_ENVIRON
-GNULIB_DUP3
-GNULIB_DUP2
-GNULIB_DUP
-GNULIB_COPY_FILE_RANGE
-GNULIB_CLOSE
-GNULIB_CHOWN
-GNULIB_CHDIR
-GNULIB_ACCESS
 HAVE_WS2TCPIP_H
 HAVE_SYS_SOCKET_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
@@ -1932,21 +2139,6 @@ HAVE_ACCEPT4
 HAVE_SA_FAMILY_T
 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
 HAVE_STRUCT_SOCKADDR_STORAGE
-GNULIB_ACCEPT4
-GNULIB_SHUTDOWN
-GNULIB_SETSOCKOPT
-GNULIB_SENDTO
-GNULIB_RECVFROM
-GNULIB_SEND
-GNULIB_RECV
-GNULIB_LISTEN
-GNULIB_GETSOCKOPT
-GNULIB_GETSOCKNAME
-GNULIB_GETPEERNAME
-GNULIB_BIND
-GNULIB_ACCEPT
-GNULIB_CONNECT
-GNULIB_SOCKET
 GL_COND_LIBTOOL_FALSE
 GL_COND_LIBTOOL_TRUE
 RANLIB
@@ -2022,6 +2214,7 @@ enable_option_checking
 enable_maintainer_mode
 enable_plugins
 enable_largefile
+enable_year2038
 enable_threads
 enable_cross_guesses
 enable_dependency_tracking
@@ -2660,6 +2853,7 @@ Optional Features:
                           sometimes confusing) to the casual installer
   --enable-plugins        Enable support for plugins
   --disable-largefile     omit support for large files
+  --disable-year2038      omit support for timestamps past the year 2038
   --enable-threads={isoc|posix|isoc+posix|windows}
                           specify multithreading API
   --disable-threads       build without multithread safety
@@ -3747,6 +3941,7 @@ as_fn_append ac_func_list " btowc"
 as_fn_append ac_func_list " canonicalize_file_name"
 as_fn_append ac_func_list " faccessat"
 as_fn_append ac_func_list " realpath"
+as_fn_append ac_func_list " lstat"
 as_fn_append ac_header_list " sys/param.h"
 as_fn_append ac_header_list " unistd.h"
 as_fn_append ac_func_list " chown"
@@ -3785,7 +3980,6 @@ as_fn_append ac_header_list " sys/types.h"
 as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_func_list " isblank"
 as_fn_append ac_header_list " xlocale.h"
-as_fn_append ac_func_list " lstat"
 as_fn_append ac_header_list " math.h"
 as_fn_append ac_func_list " mbsinit"
 as_fn_append ac_func_list " mbrtowc"
@@ -6152,8 +6346,7 @@ if test "${enable_largefile+set}" = set; then :
   enableval=$enable_largefile;
 fi
 
-if test "$enable_largefile" != no; then
-
+if test "$enable_largefile" != no; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
 if ${ac_cv_sys_largefile_CC+:} false; then :
@@ -6236,6 +6429,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#undef _FILE_OFFSET_BITS
 #define _FILE_OFFSET_BITS 64
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -6273,7 +6467,8 @@ _ACEOF
 ;;
 esac
 rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
+  case $ac_cv_sys_file_offset_bits in #(
+  unknown) :
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
 if ${ac_cv_sys_large_files+:} false; then :
@@ -6305,6 +6500,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#undef _LARGE_FILES
 #define _LARGE_FILES 1
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -6341,9 +6537,126 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 ;;
 esac
-rm -rf conftest*
+rm -rf conftest* ;; #(
+  64) :
+
+ # Check whether --enable-year2038 was given.
+if test "${enable_year2038+set}" = set; then :
+  enableval=$enable_year2038;
+fi
+
+ if test "$enable_year2038" != no; then :
+
+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time_t past the year 2038" >&5
+$as_echo_n "checking for time_t past the year 2038... " >&6; }
+if ${gl_cv_type_time_t_y2038+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+  #include <time.h>
+  /* Check that time_t can represent 2**32 - 1 correctly.  */
+  #define LARGE_TIME_T \\
+    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+                           && LARGE_TIME_T % 65537 == 0)
+                          ? 1 : -1];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_time_t_y2038=yes
+else
+  gl_cv_type_time_t_y2038=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_y2038" >&5
+$as_echo "$gl_cv_type_time_t_y2038" >&6; }
+  if test "$gl_cv_type_time_t_y2038" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit time_t with _TIME_BITS=64" >&5
+$as_echo_n "checking for 64-bit time_t with _TIME_BITS=64... " >&6; }
+if ${gl_cv_type_time_t_bits_macro+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _TIME_BITS 64
+                           #define _FILE_OFFSET_BITS 64
+
+  #include <time.h>
+  /* Check that time_t can represent 2**32 - 1 correctly.  */
+  #define LARGE_TIME_T \\
+    ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+  int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+                           && LARGE_TIME_T % 65537 == 0)
+                          ? 1 : -1];
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_time_t_bits_macro=yes
+else
+  gl_cv_type_time_t_bits_macro=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_time_t_bits_macro" >&5
+$as_echo "$gl_cv_type_time_t_bits_macro" >&6; }
+    if test "$gl_cv_type_time_t_bits_macro" = yes; then
+
+$as_echo "#define _TIME_BITS 64" >>confdefs.h
+
+
+$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
+
+      gl_cv_type_time_t_y2038=yes
+    fi
+  fi
+  if test $gl_cv_type_time_t_y2038 = no; then
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef _USE_32BIT_TIME_T
+             int ok;
+           #else
+             error fail
+           #endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The 'time_t' type stops working after January 2038.
+          Remove _USE_32BIT_TIME_T from the compiler flags.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  # If not cross-compiling and  says we should check,
+       # and 'touch' works with a large timestamp, then evidently wider time_t
+       # is desired and supported, so fail and ask the builder to fix the
+       # problem.  Otherwise, just warn the builder.
+
+       if test "$gl_warned_about_y2038" != yes; then
+         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The 'time_t' type stops working after January 2038,
+            and this package needs a wider 'time_t' type
+            if there is any way to access timestamps after that.
+            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&5
+$as_echo "$as_me: WARNING: The 'time_t' type stops working after January 2038,
+            and this package needs a wider 'time_t' type
+            if there is any way to access timestamps after that.
+            Configure with 'CC=\"${CC} -m64\"' perhaps?" >&2;}
+         gl_warned_about_y2038=yes
+       fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   fi
 fi
+ ;; #(
+  *) :
+     ;;
+esac
+fi
 
 
 
@@ -6600,7 +6913,6 @@ fi
 
 
 
-
   # IEEE behaviour is the default on all CPUs except Alpha and SH
   # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
   # and the GCC 4.1.2 manual).
@@ -6629,6 +6941,16 @@ fi
 
 
 
+  case "$host_os" in
+    mingw*)
+
+$as_echo "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+
 
 
 
@@ -6698,7 +7020,6 @@ fi
 
 
 
-
   # Code from module absolute-header:
   # Code from module accept:
   # Code from module alloca:
@@ -6760,6 +7081,7 @@ fi
   # Code from module frexpl:
   # Code from module fstat:
   # Code from module fstatat:
+  # Code from module gen-header:
   # Code from module gendocs:
   # Code from module getcwd:
   # Code from module getcwd-lgpl:
@@ -6786,6 +7108,7 @@ fi
   # Code from module isnanl-nolibm:
   # Code from module largefile:
 
+
   # Code from module libc-config:
   # Code from module limits-h:
   # Code from module listen:
@@ -6887,6 +7210,7 @@ fi
   # Code from module unistd-safer:
   # Code from module unsetenv:
   # Code from module update-copyright:
+  # Code from module vararrays:
   # Code from module verify:
   # Code from module wchar:
   # Code from module wctype-h:
@@ -6941,6 +7265,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
+
                         # Check whether --enable-cross-guesses was given.
 if test "${enable_cross_guesses+set}" = set; then :
   enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
@@ -6965,21 +7290,6 @@ fi
 
 
 
-  GNULIB_SOCKET=0;
-  GNULIB_CONNECT=0;
-  GNULIB_ACCEPT=0;
-  GNULIB_BIND=0;
-  GNULIB_GETPEERNAME=0;
-  GNULIB_GETSOCKNAME=0;
-  GNULIB_GETSOCKOPT=0;
-  GNULIB_LISTEN=0;
-  GNULIB_RECV=0;
-  GNULIB_SEND=0;
-  GNULIB_RECVFROM=0;
-  GNULIB_SENDTO=0;
-  GNULIB_SETSOCKOPT=0;
-  GNULIB_SHUTDOWN=0;
-  GNULIB_ACCEPT4=0;
   HAVE_STRUCT_SOCKADDR_STORAGE=1;
   HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
 
@@ -7120,88 +7430,6 @@ $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
 
 
 
-  GNULIB_ACCESS=0;
-  GNULIB_CHDIR=0;
-  GNULIB_CHOWN=0;
-  GNULIB_CLOSE=0;
-  GNULIB_COPY_FILE_RANGE=0;
-  GNULIB_DUP=0;
-  GNULIB_DUP2=0;
-  GNULIB_DUP3=0;
-  GNULIB_ENVIRON=0;
-  GNULIB_EUIDACCESS=0;
-  GNULIB_EXECL=0;
-  GNULIB_EXECLE=0;
-  GNULIB_EXECLP=0;
-  GNULIB_EXECV=0;
-  GNULIB_EXECVE=0;
-  GNULIB_EXECVP=0;
-  GNULIB_EXECVPE=0;
-  GNULIB_FACCESSAT=0;
-  GNULIB_FCHDIR=0;
-  GNULIB_FCHOWNAT=0;
-  GNULIB_FDATASYNC=0;
-  GNULIB_FSYNC=0;
-  GNULIB_FTRUNCATE=0;
-  GNULIB_GETCWD=0;
-  GNULIB_GETDOMAINNAME=0;
-  GNULIB_GETDTABLESIZE=0;
-  GNULIB_GETENTROPY=0;
-  GNULIB_GETGROUPS=0;
-  GNULIB_GETHOSTNAME=0;
-  GNULIB_GETLOGIN=0;
-  GNULIB_GETLOGIN_R=0;
-  GNULIB_GETOPT_POSIX=0;
-  GNULIB_GETPAGESIZE=0;
-  GNULIB_GETPASS=0;
-  GNULIB_GETUSERSHELL=0;
-  GNULIB_GROUP_MEMBER=0;
-  GNULIB_ISATTY=0;
-  GNULIB_LCHOWN=0;
-  GNULIB_LINK=0;
-  GNULIB_LINKAT=0;
-  GNULIB_LSEEK=0;
-  GNULIB_PIPE=0;
-  GNULIB_PIPE2=0;
-  GNULIB_PREAD=0;
-  GNULIB_PWRITE=0;
-  GNULIB_READ=0;
-  GNULIB_READLINK=0;
-  GNULIB_READLINKAT=0;
-  GNULIB_RMDIR=0;
-  GNULIB_SETHOSTNAME=0;
-  GNULIB_SLEEP=0;
-  GNULIB_SYMLINK=0;
-  GNULIB_SYMLINKAT=0;
-  GNULIB_TRUNCATE=0;
-  GNULIB_TTYNAME_R=0;
-  GNULIB_UNISTD_H_NONBLOCKING=0;
-  GNULIB_UNISTD_H_SIGPIPE=0;
-  GNULIB_UNLINK=0;
-  GNULIB_UNLINKAT=0;
-  GNULIB_USLEEP=0;
-  GNULIB_WRITE=0;
-    GNULIB_MDA_ACCESS=1;
-  GNULIB_MDA_CHDIR=1;
-  GNULIB_MDA_CLOSE=1;
-  GNULIB_MDA_DUP=1;
-  GNULIB_MDA_DUP2=1;
-  GNULIB_MDA_EXECL=1;
-  GNULIB_MDA_EXECLE=1;
-  GNULIB_MDA_EXECLP=1;
-  GNULIB_MDA_EXECV=1;
-  GNULIB_MDA_EXECVE=1;
-  GNULIB_MDA_EXECVP=1;
-  GNULIB_MDA_EXECVPE=1;
-  GNULIB_MDA_GETCWD=1;
-  GNULIB_MDA_GETPID=1;
-  GNULIB_MDA_ISATTY=1;
-  GNULIB_MDA_LSEEK=1;
-  GNULIB_MDA_READ=1;
-  GNULIB_MDA_RMDIR=1;
-  GNULIB_MDA_SWAB=1;
-  GNULIB_MDA_UNLINK=1;
-  GNULIB_MDA_WRITE=1;
     HAVE_CHOWN=1;
   HAVE_COPY_FILE_RANGE=1;
   HAVE_DUP3=1;
@@ -7253,6 +7481,7 @@ $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
   REPLACE_ACCESS=0;
   REPLACE_CHOWN=0;
   REPLACE_CLOSE=0;
+  REPLACE_COPY_FILE_RANGE=0;
   REPLACE_DUP=0;
   REPLACE_DUP2=0;
   REPLACE_EXECL=0;
@@ -7272,6 +7501,7 @@ $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
   REPLACE_GETGROUPS=0;
   REPLACE_GETPAGESIZE=0;
   REPLACE_GETPASS=0;
+  REPLACE_GETPASS_FOR_GETPASS_GNU=0;
   REPLACE_ISATTY=0;
   REPLACE_LCHOWN=0;
   REPLACE_LINK=0;
@@ -7359,6 +7589,7 @@ $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
       ;;
   esac
 
+  GL_GENERATE_SYS_SOCKET_H=false
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
@@ -7427,7 +7658,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
       if test $gl_cv_header_sys_socket_h_shut = no; then
-        SYS_SOCKET_H='sys/socket.h'
+        GL_GENERATE_SYS_SOCKET_H=true
       fi
     fi
   fi
@@ -7487,8 +7718,8 @@ _ACEOF
         gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_socket_h
-           gl_cv_next_sys_socket_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_sys_socket_h
+          gl_cv_next_sys_socket_h='"'$gl_header'"'
           else
                gl_cv_next_sys_socket_h='<'sys/socket.h'>'
              fi
@@ -7605,7 +7836,7 @@ fi
   fi
   if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
      || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
-    SYS_SOCKET_H='sys/socket.h'
+    GL_GENERATE_SYS_SOCKET_H=true
   fi
 
 
@@ -7641,6 +7872,68 @@ done
 
 
 
+
+
+  GL_GNULIB_SOCKET=0
+
+
+
+  GL_GNULIB_CONNECT=0
+
+
+
+  GL_GNULIB_ACCEPT=0
+
+
+
+  GL_GNULIB_BIND=0
+
+
+
+  GL_GNULIB_GETPEERNAME=0
+
+
+
+  GL_GNULIB_GETSOCKNAME=0
+
+
+
+  GL_GNULIB_GETSOCKOPT=0
+
+
+
+  GL_GNULIB_LISTEN=0
+
+
+
+  GL_GNULIB_RECV=0
+
+
+
+  GL_GNULIB_SEND=0
+
+
+
+  GL_GNULIB_RECVFROM=0
+
+
+
+  GL_GNULIB_SENDTO=0
+
+
+
+  GL_GNULIB_SETSOCKOPT=0
+
+
+
+  GL_GNULIB_SHUTDOWN=0
+
+
+
+  GL_GNULIB_ACCEPT4=0
+
+
+
 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
 if test "x$ac_cv_type_size_t" = xyes; then :
 
@@ -7801,27 +8094,6 @@ _ACEOF
 
 fi
 
-
-  GNULIB_INET_NTOP=0;
-  GNULIB_INET_PTON=0;
-    HAVE_DECL_INET_NTOP=1;
-  HAVE_DECL_INET_PTON=1;
-  REPLACE_INET_NTOP=0;
-  REPLACE_INET_PTON=0;
-
-
-
-
-
-
-
-  if test $ac_cv_header_features_h = yes; then
-    HAVE_FEATURES_H=1
-  else
-    HAVE_FEATURES_H=0
-  fi
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
 $as_echo "$MKDIR_P" >&6; }
 
 
-  GNULIB_BTOWC=0;
-  GNULIB_WCTOB=0;
-  GNULIB_MBSINIT=0;
-  GNULIB_MBRTOWC=0;
-  GNULIB_MBRLEN=0;
-  GNULIB_MBSRTOWCS=0;
-  GNULIB_MBSNRTOWCS=0;
-  GNULIB_WCRTOMB=0;
-  GNULIB_WCSRTOMBS=0;
-  GNULIB_WCSNRTOMBS=0;
-  GNULIB_WCWIDTH=0;
-  GNULIB_WMEMCHR=0;
-  GNULIB_WMEMCMP=0;
-  GNULIB_WMEMCPY=0;
-  GNULIB_WMEMMOVE=0;
-  GNULIB_WMEMPCPY=0;
-  GNULIB_WMEMSET=0;
-  GNULIB_WCSLEN=0;
-  GNULIB_WCSNLEN=0;
-  GNULIB_WCSCPY=0;
-  GNULIB_WCPCPY=0;
-  GNULIB_WCSNCPY=0;
-  GNULIB_WCPNCPY=0;
-  GNULIB_WCSCAT=0;
-  GNULIB_WCSNCAT=0;
-  GNULIB_WCSCMP=0;
-  GNULIB_WCSNCMP=0;
-  GNULIB_WCSCASECMP=0;
-  GNULIB_WCSNCASECMP=0;
-  GNULIB_WCSCOLL=0;
-  GNULIB_WCSXFRM=0;
-  GNULIB_WCSDUP=0;
-  GNULIB_WCSCHR=0;
-  GNULIB_WCSRCHR=0;
-  GNULIB_WCSCSPN=0;
-  GNULIB_WCSSPN=0;
-  GNULIB_WCSPBRK=0;
-  GNULIB_WCSSTR=0;
-  GNULIB_WCSTOK=0;
-  GNULIB_WCSWIDTH=0;
-  GNULIB_WCSFTIME=0;
-    GNULIB_MDA_WCSDUP=1;
-    HAVE_BTOWC=1;
-  HAVE_MBSINIT=1;
-  HAVE_MBRTOWC=1;
-  HAVE_MBRLEN=1;
-  HAVE_MBSRTOWCS=1;
-  HAVE_MBSNRTOWCS=1;
-  HAVE_WCRTOMB=1;
-  HAVE_WCSRTOMBS=1;
-  HAVE_WCSNRTOMBS=1;
-  HAVE_WMEMCHR=1;
-  HAVE_WMEMCMP=1;
-  HAVE_WMEMCPY=1;
-  HAVE_WMEMMOVE=1;
-  HAVE_WMEMPCPY=1;
-  HAVE_WMEMSET=1;
-  HAVE_WCSLEN=1;
-  HAVE_WCSNLEN=1;
-  HAVE_WCSCPY=1;
-  HAVE_WCPCPY=1;
-  HAVE_WCSNCPY=1;
-  HAVE_WCPNCPY=1;
-  HAVE_WCSCAT=1;
-  HAVE_WCSNCAT=1;
-  HAVE_WCSCMP=1;
-  HAVE_WCSNCMP=1;
-  HAVE_WCSCASECMP=1;
-  HAVE_WCSNCASECMP=1;
-  HAVE_WCSCOLL=1;
-  HAVE_WCSXFRM=1;
-  HAVE_WCSDUP=1;
-  HAVE_WCSCHR=1;
-  HAVE_WCSRCHR=1;
-  HAVE_WCSCSPN=1;
-  HAVE_WCSSPN=1;
-  HAVE_WCSPBRK=1;
-  HAVE_WCSSTR=1;
-  HAVE_WCSTOK=1;
-  HAVE_WCSWIDTH=1;
-  HAVE_WCSFTIME=1;
-  HAVE_DECL_WCTOB=1;
-  HAVE_DECL_WCSDUP=1;
-  HAVE_DECL_WCWIDTH=1;
-  REPLACE_MBSTATE_T=0;
-  REPLACE_BTOWC=0;
-  REPLACE_WCTOB=0;
-  REPLACE_MBSINIT=0;
-  REPLACE_MBRTOWC=0;
-  REPLACE_MBRLEN=0;
-  REPLACE_MBSRTOWCS=0;
-  REPLACE_MBSNRTOWCS=0;
-  REPLACE_WCRTOMB=0;
-  REPLACE_WCSRTOMBS=0;
-  REPLACE_WCSNRTOMBS=0;
-  REPLACE_WCWIDTH=0;
-  REPLACE_WCSWIDTH=0;
-  REPLACE_WCSFTIME=0;
-  REPLACE_WCSTOK=0;
+    HAVE_DECL_INET_NTOP=1;
+  HAVE_DECL_INET_PTON=1;
+  REPLACE_INET_NTOP=0;
+  REPLACE_INET_PTON=0;
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
-$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
-if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  gl_cv_header_wchar_h_correct_inline=yes
-     case "$host_os" in
-       *-gnu* | gnu*)
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
 
-             #define wcstod renamed_wcstod
-             #include <wchar.h>
-             extern int zero (void);
-             int main () { return zero(); }
 
-_ACEOF
-                                                      save_ac_compile="$ac_compile"
-         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
-         if echo '#include "conftest.c"' >conftest1.c \
-            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  if test $ac_cv_header_features_h = yes; then
+    HAVE_FEATURES_H=1
+  else
+    HAVE_FEATURES_H=0
+  fi
+
+
+
+
+
+
+  if test $ac_cv_header_arpa_inet_h = yes; then
+    HAVE_ARPA_INET_H=1
+  else
+    HAVE_ARPA_INET_H=0
+  fi
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
+$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
+if ${gl_cv_next_arpa_inet_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_arpa_inet_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <arpa/inet.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'arpa/inet.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_arpa_inet_h
+          gl_cv_next_arpa_inet_h='"'$gl_header'"'
+          else
+               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
+$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
+     fi
+     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'arpa/inet.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_WS2TCPIP_H=0
+  else
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_INET_NTOP=0
+
+
+
+  GL_GNULIB_INET_PTON=0
+
+
+
+
+    HAVE_BTOWC=1;
+  HAVE_MBSINIT=1;
+  HAVE_MBRTOWC=1;
+  HAVE_MBRLEN=1;
+  HAVE_MBSRTOWCS=1;
+  HAVE_MBSNRTOWCS=1;
+  HAVE_WCRTOMB=1;
+  HAVE_WCSRTOMBS=1;
+  HAVE_WCSNRTOMBS=1;
+  HAVE_WMEMCHR=1;
+  HAVE_WMEMCMP=1;
+  HAVE_WMEMCPY=1;
+  HAVE_WMEMMOVE=1;
+  HAVE_WMEMPCPY=1;
+  HAVE_WMEMSET=1;
+  HAVE_WCSLEN=1;
+  HAVE_WCSNLEN=1;
+  HAVE_WCSCPY=1;
+  HAVE_WCPCPY=1;
+  HAVE_WCSNCPY=1;
+  HAVE_WCPNCPY=1;
+  HAVE_WCSCAT=1;
+  HAVE_WCSNCAT=1;
+  HAVE_WCSCMP=1;
+  HAVE_WCSNCMP=1;
+  HAVE_WCSCASECMP=1;
+  HAVE_WCSNCASECMP=1;
+  HAVE_WCSCOLL=1;
+  HAVE_WCSXFRM=1;
+  HAVE_WCSDUP=1;
+  HAVE_WCSCHR=1;
+  HAVE_WCSRCHR=1;
+  HAVE_WCSCSPN=1;
+  HAVE_WCSSPN=1;
+  HAVE_WCSPBRK=1;
+  HAVE_WCSSTR=1;
+  HAVE_WCSTOK=1;
+  HAVE_WCSWIDTH=1;
+  HAVE_WCSFTIME=1;
+  HAVE_DECL_WCTOB=1;
+  HAVE_DECL_WCSDUP=1;
+  HAVE_DECL_WCWIDTH=1;
+  REPLACE_MBSTATE_T=0;
+  REPLACE_BTOWC=0;
+  REPLACE_WCTOB=0;
+  REPLACE_MBSINIT=0;
+  REPLACE_MBRTOWC=0;
+  REPLACE_MBRLEN=0;
+  REPLACE_MBSRTOWCS=0;
+  REPLACE_MBSNRTOWCS=0;
+  REPLACE_WCRTOMB=0;
+  REPLACE_WCSRTOMBS=0;
+  REPLACE_WCSNRTOMBS=0;
+  REPLACE_WCWIDTH=0;
+  REPLACE_WCSWIDTH=0;
+  REPLACE_WCSFTIME=0;
+  REPLACE_WCSTOK=0;
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_wchar_h_correct_inline=yes
+     case "$host_os" in
+       *-gnu* | gnu*)
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+             #define wcstod renamed_wcstod
+             #include <wchar.h>
+             extern int zero (void);
+             int main () { return zero(); }
+
+_ACEOF
+                                                      save_ac_compile="$ac_compile"
+         ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+         if echo '#include "conftest.c"' >conftest1.c \
+            && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -8230,1674 +8598,555 @@ $as_echo "$gt_cv_locale_fr" >&6; }
 
 
 
-  GNULIB__EXIT=0;
-  GNULIB_ALIGNED_ALLOC=0;
-  GNULIB_ATOLL=0;
-  GNULIB_CALLOC_POSIX=0;
-  GNULIB_CANONICALIZE_FILE_NAME=0;
-  GNULIB_FREE_POSIX=0;
-  GNULIB_GETLOADAVG=0;
-  GNULIB_GETSUBOPT=0;
-  GNULIB_GRANTPT=0;
-  GNULIB_MALLOC_POSIX=0;
-  GNULIB_MBTOWC=0;
-  GNULIB_MKDTEMP=0;
-  GNULIB_MKOSTEMP=0;
-  GNULIB_MKOSTEMPS=0;
-  GNULIB_MKSTEMP=0;
-  GNULIB_MKSTEMPS=0;
-  GNULIB_POSIX_MEMALIGN=0;
-  GNULIB_POSIX_OPENPT=0;
-  GNULIB_PTSNAME=0;
-  GNULIB_PTSNAME_R=0;
-  GNULIB_PUTENV=0;
-  GNULIB_QSORT_R=0;
-  GNULIB_RANDOM=0;
-  GNULIB_RANDOM_R=0;
-  GNULIB_REALLOCARRAY=0;
-  GNULIB_REALLOC_POSIX=0;
-  GNULIB_REALPATH=0;
-  GNULIB_RPMATCH=0;
-  GNULIB_SECURE_GETENV=0;
-  GNULIB_SETENV=0;
-  GNULIB_STRTOD=0;
-  GNULIB_STRTOLD=0;
-  GNULIB_STRTOLL=0;
-  GNULIB_STRTOULL=0;
-  GNULIB_SYSTEM_POSIX=0;
-  GNULIB_UNLOCKPT=0;
-  GNULIB_UNSETENV=0;
-  GNULIB_WCTOMB=0;
-    GNULIB_MDA_ECVT=1;
-  GNULIB_MDA_FCVT=1;
-  GNULIB_MDA_GCVT=1;
-  GNULIB_MDA_MKTEMP=1;
-  GNULIB_MDA_PUTENV=1;
-    HAVE__EXIT=1;
-  HAVE_ALIGNED_ALLOC=1;
-  HAVE_ATOLL=1;
-  HAVE_CANONICALIZE_FILE_NAME=1;
-  HAVE_DECL_ECVT=1;
-  HAVE_DECL_FCVT=1;
-  HAVE_DECL_GCVT=1;
-  HAVE_DECL_GETLOADAVG=1;
-  HAVE_GETSUBOPT=1;
-  HAVE_GRANTPT=1;
-  HAVE_INITSTATE=1;
-  HAVE_DECL_INITSTATE=1;
-  HAVE_MBTOWC=1;
-  HAVE_MKDTEMP=1;
-  HAVE_MKOSTEMP=1;
-  HAVE_MKOSTEMPS=1;
-  HAVE_MKSTEMP=1;
-  HAVE_MKSTEMPS=1;
-  HAVE_POSIX_MEMALIGN=1;
-  HAVE_POSIX_OPENPT=1;
-  HAVE_PTSNAME=1;
-  HAVE_PTSNAME_R=1;
-  HAVE_QSORT_R=1;
-  HAVE_RANDOM=1;
-  HAVE_RANDOM_H=1;
-  HAVE_RANDOM_R=1;
-  HAVE_REALLOCARRAY=1;
-  HAVE_REALPATH=1;
-  HAVE_RPMATCH=1;
-  HAVE_SECURE_GETENV=1;
-  HAVE_SETENV=1;
-  HAVE_DECL_SETENV=1;
-  HAVE_SETSTATE=1;
-  HAVE_DECL_SETSTATE=1;
-  HAVE_STRTOD=1;
-  HAVE_STRTOLD=1;
-  HAVE_STRTOLL=1;
-  HAVE_STRTOULL=1;
-  HAVE_STRUCT_RANDOM_DATA=1;
-  HAVE_SYS_LOADAVG_H=0;
-  HAVE_UNLOCKPT=1;
-  HAVE_DECL_UNSETENV=1;
-  REPLACE_ALIGNED_ALLOC=0;
-  REPLACE_CALLOC=0;
-  REPLACE_CANONICALIZE_FILE_NAME=0;
-  REPLACE_FREE=0;
-  REPLACE_INITSTATE=0;
-  REPLACE_MALLOC=0;
-  REPLACE_MBTOWC=0;
-  REPLACE_MKSTEMP=0;
-  REPLACE_POSIX_MEMALIGN=0;
-  REPLACE_PTSNAME=0;
-  REPLACE_PTSNAME_R=0;
-  REPLACE_PUTENV=0;
-  REPLACE_QSORT_R=0;
-  REPLACE_RANDOM=0;
-  REPLACE_RANDOM_R=0;
-  REPLACE_REALLOC=0;
-  REPLACE_REALPATH=0;
-  REPLACE_SETENV=0;
-  REPLACE_SETSTATE=0;
-  REPLACE_STRTOD=0;
-  REPLACE_STRTOLD=0;
-  REPLACE_UNSETENV=0;
-  REPLACE_WCTOMB=0;
 
+  GL_GNULIB_BTOWC=0
 
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
-if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  rm -f conftest.sym conftest.file
-     echo >conftest.file
-     if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-          linux-* | linux)
-            # Guess yes on Linux systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          *-gnu* | gnu*)
-            # Guess yes on glibc systems.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
-          mingw*)
-            # Guess no on native Windows.
-            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
-          *)
-            # If we don't know, obey --enable-cross-guesses.
-            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
-struct stat sbuf;
-            if (symlink ("conftest.file", "conftest.sym") != 0)
-              return 1;
-            /* Linux will dereference the symlink and fail, as required by
-               POSIX.  That is better in the sense that it means we will not
-               have to compile and use the lstat wrapper.  */
-            return lstat ("conftest.sym/", &sbuf) == 0;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_lstat_dereferences_slashed_symlink=yes
-else
-  gl_cv_func_lstat_dereferences_slashed_symlink=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB_WCTOB=0
 
-     rm -f conftest.sym conftest.file
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
-$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
-  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
-    *yes)
 
-cat >>confdefs.h <<_ACEOF
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-_ACEOF
+  GL_GNULIB_MBSINIT=0
 
-      ;;
-  esac
 
 
+  GL_GNULIB_MBRTOWC=0
 
 
 
+  GL_GNULIB_MBRLEN=0
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
-$as_echo_n "checking whether // is distinct from /... " >&6; }
-if ${gl_cv_double_slash_root+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-   if test x"$cross_compiling" = xyes ; then
-        # When cross-compiling, there is no way to tell whether // is special
-        # short of a list of hosts.  However, the only known hosts to date
-        # that have a distinct // are Apollo DomainOS (too old to port to),
-        # Cygwin, and z/OS.  If anyone knows of another system for which // has
-        # special semantics and is distinct from /, please report it to
-        # <bug-gnulib@gnu.org>.
-        case $host in
-          *-cygwin | i370-ibm-openedition)
-            gl_cv_double_slash_root=yes ;;
-          *)
-            # Be optimistic and assume that / and // are the same when we
-            # don't know.
-            gl_cv_double_slash_root='unknown, assuming no' ;;
-        esac
-      else
-        set x `ls -di / // 2>/dev/null`
-        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
-          gl_cv_double_slash_root=no
-        else
-          gl_cv_double_slash_root=yes
-        fi
-      fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
-$as_echo "$gl_cv_double_slash_root" >&6; }
-  if test "$gl_cv_double_slash_root" = yes; then
 
-$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+  GL_GNULIB_MBSRTOWCS=0
 
-  fi
 
 
+  GL_GNULIB_MBSNRTOWCS=0
 
 
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
-$as_echo_n "checking whether realpath works... " >&6; }
-if ${gl_cv_func_realpath_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  GL_GNULIB_WCRTOMB=0
 
-    rm -rf conftest.a conftest.d
-    touch conftest.a
-    mkdir conftest.d
-    if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                       # Guess yes on glibc systems.
-        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
-                       # Guess yes on musl systems.
-        *-musl*)       gl_cv_func_realpath_works="guessing yes" ;;
-                       # Guess no on native Windows.
-        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
-                       # If we don't know, obey --enable-cross-guesses.
-        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
-      esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
+  GL_GNULIB_WCSRTOMBS=0
 
 
-#include <stdlib.h>
-#if defined __MACH__ && defined __APPLE__
-/* Avoid a crash on Mac OS X.  */
-#include <mach/mach.h>
-#include <mach/mach_error.h>
-#include <mach/thread_status.h>
-#include <mach/exception.h>
-#include <mach/task.h>
-#include <pthread.h>
-/* The exception port on which our thread listens.  */
-static mach_port_t our_exception_port;
-/* The main function of the thread listening for exceptions of type
-   EXC_BAD_ACCESS.  */
-static void *
-mach_exception_thread (void *arg)
-{
-  /* Buffer for a message to be received.  */
-  struct {
-    mach_msg_header_t head;
-    mach_msg_body_t msgh_body;
-    char data[1024];
-  } msg;
-  mach_msg_return_t retval;
-  /* Wait for a message on the exception port.  */
-  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
-                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-  if (retval != MACH_MSG_SUCCESS)
-    abort ();
-  exit (1);
-}
-static void
-nocrash_init (void)
-{
-  mach_port_t self = mach_task_self ();
-  /* Allocate a port on which the thread shall listen for exceptions.  */
-  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
-      == KERN_SUCCESS) {
-    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
-    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
-                                MACH_MSG_TYPE_MAKE_SEND)
-        == KERN_SUCCESS) {
-      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
-         for us.  */
-      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
-      /* Create the thread listening on the exception port.  */
-      pthread_attr_t attr;
-      pthread_t thread;
-      if (pthread_attr_init (&attr) == 0
-          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
-          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
-        pthread_attr_destroy (&attr);
-        /* Replace the exception port info for these exceptions with our own.
-           Note that we replace the exception port for the entire task, not only
-           for a particular thread.  This has the effect that when our exception
-           port gets the message, the thread specific exception port has already
-           been asked, and we don't need to bother about it.
-           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
-        task_set_exception_ports (self, mask, our_exception_port,
-                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
-      }
-    }
-  }
-}
-#elif defined _WIN32 && ! defined __CYGWIN__
-/* Avoid a crash on native Windows.  */
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <winerror.h>
-static LONG WINAPI
-exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
-{
-  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
-    {
-    case EXCEPTION_ACCESS_VIOLATION:
-    case EXCEPTION_IN_PAGE_ERROR:
-    case EXCEPTION_STACK_OVERFLOW:
-    case EXCEPTION_GUARD_PAGE:
-    case EXCEPTION_PRIV_INSTRUCTION:
-    case EXCEPTION_ILLEGAL_INSTRUCTION:
-    case EXCEPTION_DATATYPE_MISALIGNMENT:
-    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
-    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
-      exit (1);
-    }
-  return EXCEPTION_CONTINUE_SEARCH;
-}
-static void
-nocrash_init (void)
-{
-  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
-}
-#else
-/* Avoid a crash on POSIX systems.  */
-#include <signal.h>
-#include <unistd.h>
-/* A POSIX signal handler.  */
-static void
-exception_handler (int sig)
-{
-  _exit (1);
-}
-static void
-nocrash_init (void)
-{
-#ifdef SIGSEGV
-  signal (SIGSEGV, exception_handler);
-#endif
-#ifdef SIGBUS
-  signal (SIGBUS, exception_handler);
-#endif
-}
-#endif
 
-        #include <stdlib.h>
-        #include <string.h>
+  GL_GNULIB_WCSNRTOMBS=0
 
-int
-main ()
-{
 
-        int result = 0;
-        {
-          char *name = realpath ("conftest.a", NULL);
-          if (!(name && *name == '/'))
-            result |= 1;
-          free (name);
-        }
-        {
-          char *name = realpath ("conftest.b/../conftest.a", NULL);
-          if (name != NULL)
-            result |= 2;
-          free (name);
-        }
-        {
-          char *name = realpath ("conftest.a/", NULL);
-          if (name != NULL)
-            result |= 4;
-          free (name);
-        }
-        {
-          char *name1 = realpath (".", NULL);
-          char *name2 = realpath ("conftest.d//./..", NULL);
-          if (! name1 || ! name2 || strcmp (name1, name2))
-            result |= 8;
-          free (name1);
-          free (name2);
-        }
-        return result;
 
-  ;
-  return 0;
-}
+  GL_GNULIB_WCWIDTH=0
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_realpath_works=yes
-else
-  gl_cv_func_realpath_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-    rm -rf conftest.a conftest.d
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
-$as_echo "$gl_cv_func_realpath_works" >&6; }
-  case "$gl_cv_func_realpath_works" in
-    *yes)
+  GL_GNULIB_WMEMCHR=0
 
-$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
 
-      ;;
-  esac
 
+  GL_GNULIB_WMEMCMP=0
 
 
 
+  GL_GNULIB_WMEMCPY=0
 
 
 
+  GL_GNULIB_WMEMMOVE=0
 
 
-  case "$host_os" in
-    mingw*) ;;
-    *)      for ac_func in getcwd
-do :
-  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
-if test "x$ac_cv_func_getcwd" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_GETCWD 1
-_ACEOF
 
-fi
-done
- ;;
-  esac
+  GL_GNULIB_WMEMPCPY=0
 
 
 
+  GL_GNULIB_WMEMSET=0
 
 
 
+  GL_GNULIB_WCSLEN=0
 
 
 
+  GL_GNULIB_WCSNLEN=0
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
-$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
-if ${ac_cv_type_uid_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "uid_t" >/dev/null 2>&1; then :
-  ac_cv_type_uid_t=yes
-else
-  ac_cv_type_uid_t=no
-fi
-rm -f conftest*
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
-$as_echo "$ac_cv_type_uid_t" >&6; }
-if test $ac_cv_type_uid_t = no; then
+  GL_GNULIB_WCSCPY=0
 
-$as_echo "#define uid_t int" >>confdefs.h
 
 
-$as_echo "#define gid_t int" >>confdefs.h
+  GL_GNULIB_WCPCPY=0
 
-fi
 
-gl_mda_defines='
-#if defined _WIN32 && !defined __CYGWIN__
-#define access    _access
-#define chdir     _chdir
-#define chmod     _chmod
-#define close     _close
-#define creat     _creat
-#define dup       _dup
-#define dup2      _dup2
-#define ecvt      _ecvt
-#define execl     _execl
-#define execle    _execle
-#define execlp    _execlp
-#define execv     _execv
-#define execve    _execve
-#define execvp    _execvp
-#define execvpe   _execvpe
-#define fcloseall _fcloseall
-#define fcvt      _fcvt
-#define fdopen    _fdopen
-#define fileno    _fileno
-#define gcvt      _gcvt
-#define getcwd    _getcwd
-#define getpid    _getpid
-#define getw      _getw
-#define isatty    _isatty
-#define j0        _j0
-#define j1        _j1
-#define jn        _jn
-#define lfind     _lfind
-#define lsearch   _lsearch
-#define lseek     _lseek
-#define memccpy   _memccpy
-#define mkdir     _mkdir
-#define mktemp    _mktemp
-#define open      _open
-#define putenv    _putenv
-#define putw      _putw
-#define read      _read
-#define rmdir     _rmdir
-#define strdup    _strdup
-#define swab      _swab
-#define tempnam   _tempnam
-#define tzset     _tzset
-#define umask     _umask
-#define unlink    _unlink
-#define utime     _utime
-#define wcsdup    _wcsdup
-#define write     _write
-#define y0        _y0
-#define y1        _y1
-#define yn        _yn
-#endif
-'
 
+  GL_GNULIB_WCSNCPY=0
 
-      for ac_header in unistd.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
-if test "x$ac_cv_header_unistd_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UNISTD_H 1
-_ACEOF
 
-fi
 
-done
+  GL_GNULIB_WCPNCPY=0
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
-$as_echo_n "checking for working chown... " >&6; }
-if ${ac_cv_func_chown_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in # ((
-                           # Guess yes on Linux systems.
-          linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
-                           # Guess yes on glibc systems.
-          *-gnu* | gnu*)   ac_cv_func_chown_works="guessing yes" ;;
-                           # Guess no on native Windows.
-          mingw*)          ac_cv_func_chown_works="guessing no" ;;
-                           # If we don't know, obey --enable-cross-guesses.
-          *)               ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-           #include <fcntl.h>
 
+  GL_GNULIB_WCSCAT=0
 
-$gl_mda_defines
 
-int
-main ()
-{
 
-            char *f = "conftest.chown";
-            struct stat before, after;
+  GL_GNULIB_WCSNCAT=0
 
-            if (creat (f, 0600) < 0)
-              return 1;
-            if (stat (f, &before) < 0)
-              return 1;
-            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
-              return 1;
-            if (stat (f, &after) < 0)
-              return 1;
-            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
 
-  ;
-  return 0;
-}
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_chown_works=yes
-else
-  ac_cv_func_chown_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB_WCSCMP=0
 
-     rm -f conftest.chown
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
-$as_echo "$ac_cv_func_chown_works" >&6; }
-  case "$ac_cv_func_chown_works" in
-    *yes)
 
-$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
+  GL_GNULIB_WCSNCMP=0
 
-      ;;
-  esac
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
-$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
-if ${gl_cv_func_chown_follows_symlink+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  GL_GNULIB_WCSCASECMP=0
 
-      if test "$cross_compiling" = yes; then :
-  gl_cv_func_chown_follows_symlink="guessing yes"
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
+  GL_GNULIB_WCSNCASECMP=0
 
 
-$gl_mda_defines
 
-        int
-        main ()
-        {
-          int result = 0;
-          char const *dangling_symlink = "conftest.dangle";
+  GL_GNULIB_WCSCOLL=0
 
-          unlink (dangling_symlink);
-          if (symlink ("conftest.no-such", dangling_symlink))
-            abort ();
 
-          /* Exit successfully on a conforming system,
-             i.e., where chown must fail with ENOENT.  */
-          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
-            result |= 1;
-          if (errno != ENOENT)
-            result |= 2;
-          return result;
-        }
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_chown_follows_symlink=yes
-else
-  gl_cv_func_chown_follows_symlink=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB_WCSXFRM=0
 
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
-$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
+  GL_GNULIB_WCSDUP=0
 
-  case "$gl_cv_func_chown_follows_symlink" in
-    *yes) ;;
-    *)
 
-$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
 
-      ;;
-  esac
+  GL_GNULIB_WCSCHR=0
 
 
 
+  GL_GNULIB_WCSRCHR=0
 
 
 
+  GL_GNULIB_WCSCSPN=0
 
 
 
+  GL_GNULIB_WCSSPN=0
 
 
 
-    if test $ac_cv_func_chown = no; then
-    HAVE_CHOWN=0
-  else
-        case "$gl_cv_func_chown_follows_symlink" in
-      *yes) ;;
-      *) REPLACE_CHOWN=1 ;;
-    esac
+  GL_GNULIB_WCSPBRK=0
 
-        case "$ac_cv_func_chown_works" in
-      *no)
 
-$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
 
-        REPLACE_CHOWN=1
-        ;;
-    esac
+  GL_GNULIB_WCSSTR=0
 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
-$as_echo_n "checking whether chown honors trailing slash... " >&6; }
-if ${gl_cv_func_chown_slash_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  touch conftest.file && rm -f conftest.link
-       if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                    # Guess yes on glibc systems.
-           *-gnu*)  gl_cv_func_chown_slash_works="guessing yes" ;;
-                    # Guess yes on musl systems.
-           *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
-                    # If we don't know, obey --enable-cross-guesses.
-           *)       gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
-         esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
+  GL_GNULIB_WCSTOK=0
 
 
-$gl_mda_defines
 
-int
-main ()
-{
-if (symlink ("conftest.file", "conftest.link")) return 1;
-          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
+  GL_GNULIB_WCSWIDTH=0
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_chown_slash_works=yes
-else
-  gl_cv_func_chown_slash_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-      rm -f conftest.link conftest.file
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
-$as_echo "$gl_cv_func_chown_slash_works" >&6; }
-    case "$gl_cv_func_chown_slash_works" in
-      *yes) ;;
-      *)
 
-$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
+  GL_GNULIB_WCSFTIME=0
 
-        REPLACE_CHOWN=1
-        ;;
-    esac
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
-$as_echo_n "checking whether chown always updates ctime... " >&6; }
-if ${gl_cv_func_chown_ctime_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                    # Guess yes on glibc systems.
-           *-gnu*)  gl_cv_func_chown_ctime_works="guessing yes" ;;
-                    # Guess yes on musl systems.
-           *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
-                    # If we don't know, obey --enable-cross-guesses.
-           *)       gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
-         esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_MDA_WCSDUP=1
 
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
 
 
-$gl_mda_defines
 
-int
-main ()
-{
-struct stat st1, st2;
-          if (close (creat ("conftest.file", 0600))) return 1;
-          if (stat ("conftest.file", &st1)) return 2;
-          sleep (1);
-          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
-          if (stat ("conftest.file", &st2)) return 4;
-          if (st2.st_ctime <= st1.st_ctime) return 5;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_chown_ctime_works=yes
-else
-  gl_cv_func_chown_ctime_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
+  GL_GNULIB__EXIT=0
 
-      rm -f conftest.file
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
-$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
-    case "$gl_cv_func_chown_ctime_works" in
-      *yes) ;;
-      *)
 
-$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
 
-        REPLACE_CHOWN=1
-        ;;
-    esac
-  fi
+  GL_GNULIB_ALIGNED_ALLOC=0
 
 
 
+  GL_GNULIB_ATOLL=0
 
 
-  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
-    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
 
-$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+  GL_GNULIB_CALLOC_GNU=0
 
-  else
-    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
-  fi
 
 
+  GL_GNULIB_CALLOC_POSIX=0
 
 
 
-     GNULIB_OPENDIR=0;
-  GNULIB_READDIR=0;
-  GNULIB_REWINDDIR=0;
-  GNULIB_CLOSEDIR=0;
-  GNULIB_DIRFD=0;
-  GNULIB_FDOPENDIR=0;
-  GNULIB_SCANDIR=0;
-  GNULIB_ALPHASORT=0;
-    HAVE_OPENDIR=1;
-  HAVE_READDIR=1;
-  HAVE_REWINDDIR=1;
-  HAVE_CLOSEDIR=1;
-  HAVE_DECL_DIRFD=1;
-  HAVE_DECL_FDOPENDIR=1;
-  HAVE_FDOPENDIR=1;
-  HAVE_SCANDIR=1;
-  HAVE_ALPHASORT=1;
-  REPLACE_OPENDIR=0;
-  REPLACE_CLOSEDIR=0;
-  REPLACE_DIRFD=0;
-  REPLACE_FDOPENDIR=0;
+  GL_GNULIB_CANONICALIZE_FILE_NAME=0
 
 
-  GNULIB_ISBLANK=0;
-    HAVE_ISBLANK=1;
 
+  GL_GNULIB_FREE_POSIX=0
 
 
 
+  GL_GNULIB_GETLOADAVG=0
 
 
 
+  GL_GNULIB_GETSUBOPT=0
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
-$as_echo_n "checking if environ is properly declared... " >&6; }
-if ${gt_cv_var_environ_declaration+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if HAVE_UNISTD_H
-     #include <unistd.h>
-     #endif
-     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
-     #include <stdlib.h>
+  GL_GNULIB_GRANTPT=0
 
-            extern struct { int foo; } environ;
-int
-main ()
-{
-environ.foo = 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_var_environ_declaration=no
-else
-  gt_cv_var_environ_declaration=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
-$as_echo "$gt_cv_var_environ_declaration" >&6; }
-  if test $gt_cv_var_environ_declaration = yes; then
 
-$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
 
-  fi
+  GL_GNULIB_MALLOC_GNU=0
 
 
-  if test $gt_cv_var_environ_declaration != yes; then
-    HAVE_DECL_ENVIRON=0
-  fi
 
+  GL_GNULIB_MALLOC_POSIX=0
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
-$as_echo_n "checking for complete errno.h... " >&6; }
-if ${gl_cv_header_errno_h_complete+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_MBTOWC=0
 
-#include <errno.h>
-#if !defined ETXTBSY
-booboo
-#endif
-#if !defined ENOMSG
-booboo
-#endif
-#if !defined EIDRM
-booboo
-#endif
-#if !defined ENOLINK
-booboo
-#endif
-#if !defined EPROTO
-booboo
-#endif
-#if !defined EMULTIHOP
-booboo
-#endif
-#if !defined EBADMSG
-booboo
-#endif
-#if !defined EOVERFLOW
-booboo
-#endif
-#if !defined ENOTSUP
-booboo
-#endif
-#if !defined ENETRESET
-booboo
-#endif
-#if !defined ECONNABORTED
-booboo
-#endif
-#if !defined ESTALE
-booboo
-#endif
-#if !defined EDQUOT
-booboo
-#endif
-#if !defined ECANCELED
-booboo
-#endif
-#if !defined EOWNERDEAD
-booboo
-#endif
-#if !defined ENOTRECOVERABLE
-booboo
-#endif
-#if !defined EILSEQ
-booboo
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "booboo" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_complete=no
-else
-  gl_cv_header_errno_h_complete=yes
-fi
-rm -f conftest*
 
+  GL_GNULIB_MKDTEMP=0
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
-$as_echo "$gl_cv_header_errno_h_complete" >&6; }
-  if test $gl_cv_header_errno_h_complete = yes; then
-    ERRNO_H=''
-  else
 
 
+  GL_GNULIB_MKOSTEMP=0
 
 
 
+  GL_GNULIB_MKOSTEMPS=0
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_errno_h='<'errno.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
-$as_echo_n "checking absolute name of <errno.h>... " >&6; }
-if ${gl_cv_next_errno_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  GL_GNULIB_MKSTEMP=0
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <errno.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+  GL_GNULIB_MKSTEMPS=0
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'errno.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_errno_h
-           gl_cv_next_errno_h='"'$gl_header'"'
+  GL_GNULIB_POSIX_MEMALIGN=0
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
-$as_echo "$gl_cv_next_errno_h" >&6; }
-     fi
-     NEXT_ERRNO_H=$gl_cv_next_errno_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'errno.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_errno_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+  GL_GNULIB_POSIX_OPENPT=0
 
 
 
+  GL_GNULIB_PTSNAME=0
 
-    ERRNO_H='errno.h'
-  fi
 
-   if test -n "$ERRNO_H"; then
-  GL_GENERATE_ERRNO_H_TRUE=
-  GL_GENERATE_ERRNO_H_FALSE='#'
-else
-  GL_GENERATE_ERRNO_H_TRUE='#'
-  GL_GENERATE_ERRNO_H_FALSE=
-fi
 
+  GL_GNULIB_PTSNAME_R=0
 
-  if test -n "$ERRNO_H"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
-$as_echo_n "checking for EMULTIHOP value... " >&6; }
-if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <errno.h>
-#ifdef EMULTIHOP
-yes
-#endif
+  GL_GNULIB_PUTENV=0
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_EMULTIHOP=yes
-else
-  gl_cv_header_errno_h_EMULTIHOP=no
-fi
-rm -f conftest*
 
-      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#ifdef EMULTIHOP
-yes
-#endif
+  GL_GNULIB_QSORT_R=0
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_EMULTIHOP=hidden
-fi
-rm -f conftest*
 
-        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
-                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug.  */
-#include <stdio.h>
-#include <stdlib.h>
-"; then :
 
-fi
+  GL_GNULIB_RANDOM=0
 
-        fi
-      fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
-$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
-    case $gl_cv_header_errno_h_EMULTIHOP in
-      yes | no)
-        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
-        ;;
-      *)
-        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
-        ;;
-    esac
 
+  GL_GNULIB_RANDOM_R=0
 
-  fi
 
 
-  if test -n "$ERRNO_H"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
-$as_echo_n "checking for ENOLINK value... " >&6; }
-if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  GL_GNULIB_REALLOCARRAY=0
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <errno.h>
-#ifdef ENOLINK
-yes
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_ENOLINK=yes
-else
-  gl_cv_header_errno_h_ENOLINK=no
-fi
-rm -f conftest*
+  GL_GNULIB_REALLOC_GNU=0
 
-      if test $gl_cv_header_errno_h_ENOLINK = no; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#ifdef ENOLINK
-yes
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_ENOLINK=hidden
-fi
-rm -f conftest*
+  GL_GNULIB_REALLOC_POSIX=0
 
-        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
-                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug.  */
-#include <stdio.h>
-#include <stdlib.h>
-"; then :
 
-fi
 
-        fi
-      fi
+  GL_GNULIB_REALPATH=0
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
-$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
-    case $gl_cv_header_errno_h_ENOLINK in
-      yes | no)
-        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
-        ;;
-      *)
-        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
-        ;;
-    esac
 
 
-  fi
+  GL_GNULIB_RPMATCH=0
 
 
-  if test -n "$ERRNO_H"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
-$as_echo_n "checking for EOVERFLOW value... " >&6; }
-if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_SECURE_GETENV=0
 
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_EOVERFLOW=yes
-else
-  gl_cv_header_errno_h_EOVERFLOW=no
-fi
-rm -f conftest*
 
-      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_SETENV=0
 
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-#ifdef EOVERFLOW
-yes
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then :
-  gl_cv_header_errno_h_EOVERFLOW=hidden
-fi
-rm -f conftest*
 
-        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
-                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
-#define _XOPEN_SOURCE_EXTENDED 1
-#include <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug.  */
-#include <stdio.h>
-#include <stdlib.h>
-"; then :
+  GL_GNULIB_STRTOD=0
 
-fi
 
-        fi
-      fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
-$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
-    case $gl_cv_header_errno_h_EOVERFLOW in
-      yes | no)
-        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
-        ;;
-      *)
-        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
-        ;;
-    esac
+  GL_GNULIB_STRTOL=0
 
 
-  fi
 
+  GL_GNULIB_STRTOLD=0
 
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
 
-for ac_func in strerror_r
-do :
-  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
-if test "x$ac_cv_func_strerror_r" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STRERROR_R 1
-_ACEOF
+  GL_GNULIB_STRTOLL=0
 
-fi
-done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
-$as_echo_n "checking whether strerror_r returns char *... " >&6; }
-if ${ac_cv_func_strerror_r_char_p+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-    ac_cv_func_strerror_r_char_p=no
-    if test $ac_cv_have_decl_strerror_r = yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
+  GL_GNULIB_STRTOUL=0
 
-         char buf[100];
-         char x = *strerror_r (0, buf, sizeof buf);
-         char *p = strerror_r (0, buf, sizeof buf);
-         return !p || x;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_func_strerror_r_char_p=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    else
-      # strerror_r is not declared.  Choose between
-      # systems that have relatively inaccessible declarations for the
-      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
-      # former has a strerror_r that returns char*, while the latter
-      # has a strerror_r that returns `int'.
-      # This test should segfault on the DEC system.
-      if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-       extern char *strerror_r ();
-int
-main ()
-{
-char buf[100];
-         char x = *strerror_r (0, buf, sizeof buf);
-         return ! isalpha (x);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_strerror_r_char_p=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-    fi
+  GL_GNULIB_STRTOULL=0
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
-$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
-if test $ac_cv_func_strerror_r_char_p = yes; then
 
-$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
 
-fi
+  GL_GNULIB_SYSTEM_POSIX=0
 
 
 
+  GL_GNULIB_UNLOCKPT=0
 
-ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fchdir" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FCHDIR $ac_have_decl
-_ACEOF
 
+  GL_GNULIB_UNSETENV=0
 
-  GNULIB_CREAT=0;
-  GNULIB_FCNTL=0;
-  GNULIB_NONBLOCKING=0;
-  GNULIB_OPEN=0;
-  GNULIB_OPENAT=0;
-    GNULIB_MDA_CREAT=1;
-  GNULIB_MDA_OPEN=1;
-    HAVE_FCNTL=1;
-  HAVE_OPENAT=1;
-  REPLACE_CREAT=0;
-  REPLACE_FCNTL=0;
-  REPLACE_OPEN=0;
-  REPLACE_OPENAT=0;
 
 
+  GL_GNULIB_WCTOMB=0
 
 
 
+  GL_GNULIB_MDA_ECVT=1
 
 
 
+  GL_GNULIB_MDA_FCVT=1
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
-$as_echo_n "checking for working fcntl.h... " >&6; }
-if ${gl_cv_header_working_fcntl_h+:} false; then :
+
+  GL_GNULIB_MDA_GCVT=1
+
+
+
+  GL_GNULIB_MDA_MKTEMP=1
+
+
+
+  GL_GNULIB_MDA_PUTENV=1
+
+
+
+
+    HAVE__EXIT=1;
+  HAVE_ALIGNED_ALLOC=1;
+  HAVE_ATOLL=1;
+  HAVE_CANONICALIZE_FILE_NAME=1;
+  HAVE_DECL_ECVT=1;
+  HAVE_DECL_FCVT=1;
+  HAVE_DECL_GCVT=1;
+  HAVE_DECL_GETLOADAVG=1;
+  HAVE_GETSUBOPT=1;
+  HAVE_GRANTPT=1;
+  HAVE_INITSTATE=1;
+  HAVE_DECL_INITSTATE=1;
+  HAVE_MBTOWC=1;
+  HAVE_MKDTEMP=1;
+  HAVE_MKOSTEMP=1;
+  HAVE_MKOSTEMPS=1;
+  HAVE_MKSTEMP=1;
+  HAVE_MKSTEMPS=1;
+  HAVE_POSIX_MEMALIGN=1;
+  HAVE_POSIX_OPENPT=1;
+  HAVE_PTSNAME=1;
+  HAVE_PTSNAME_R=1;
+  HAVE_QSORT_R=1;
+  HAVE_RANDOM=1;
+  HAVE_RANDOM_H=1;
+  HAVE_RANDOM_R=1;
+  HAVE_REALLOCARRAY=1;
+  HAVE_REALPATH=1;
+  HAVE_RPMATCH=1;
+  HAVE_SECURE_GETENV=1;
+  HAVE_SETENV=1;
+  HAVE_DECL_SETENV=1;
+  HAVE_SETSTATE=1;
+  HAVE_DECL_SETSTATE=1;
+  HAVE_STRTOD=1;
+  HAVE_STRTOL=1;
+  HAVE_STRTOLD=1;
+  HAVE_STRTOLL=1;
+  HAVE_STRTOUL=1;
+  HAVE_STRTOULL=1;
+  HAVE_STRUCT_RANDOM_DATA=1;
+  HAVE_SYS_LOADAVG_H=0;
+  HAVE_UNLOCKPT=1;
+  HAVE_DECL_UNSETENV=1;
+  REPLACE_ALIGNED_ALLOC=0;
+  REPLACE_CALLOC_FOR_CALLOC_GNU=0;
+  REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
+  REPLACE_CANONICALIZE_FILE_NAME=0;
+  REPLACE_FREE=0;
+  REPLACE_INITSTATE=0;
+  REPLACE_MALLOC_FOR_MALLOC_GNU=0;
+  REPLACE_MALLOC_FOR_MALLOC_POSIX=0;
+  REPLACE_MBTOWC=0;
+  REPLACE_MKSTEMP=0;
+  REPLACE_POSIX_MEMALIGN=0;
+  REPLACE_PTSNAME=0;
+  REPLACE_PTSNAME_R=0;
+  REPLACE_PUTENV=0;
+  REPLACE_QSORT_R=0;
+  REPLACE_RANDOM=0;
+  REPLACE_RANDOM_R=0;
+  REPLACE_REALLOC_FOR_REALLOC_GNU=0;
+  REPLACE_REALLOC_FOR_REALLOC_POSIX=0;
+  REPLACE_REALLOCARRAY=0;
+  REPLACE_REALPATH=0;
+  REPLACE_SETENV=0;
+  REPLACE_SETSTATE=0;
+  REPLACE_STRTOD=0;
+  REPLACE_STRTOL=0;
+  REPLACE_STRTOLD=0;
+  REPLACE_STRTOLL=0;
+  REPLACE_STRTOUL=0;
+  REPLACE_STRTOULL=0;
+  REPLACE_UNSETENV=0;
+  REPLACE_WCTOMB=0;
+
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then :
+  rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                  # Guess 'no' on native Windows.
-          mingw*) gl_cv_header_working_fcntl_h='no' ;;
-          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
+          linux-* | linux)
+            # Guess yes on Linux systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *-gnu* | gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          mingw*)
+            # Guess no on native Windows.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+          *)
+            # If we don't know, obey --enable-cross-guesses.
+            gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;;
         esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-           #include <sys/stat.h>
-           #if HAVE_UNISTD_H
-           # include <unistd.h>
-           #else /* on Windows with MSVC */
-           # include <io.h>
-           # include <stdlib.h>
-           # defined sleep(n) _sleep ((n) * 1000)
-           #endif
-           #include <fcntl.h>
-
-
-$gl_mda_defines
-
-           #ifndef O_NOATIME
-            #define O_NOATIME 0
-           #endif
-           #ifndef O_NOFOLLOW
-            #define O_NOFOLLOW 0
-           #endif
-           static int const constants[] =
-            {
-              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
-              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
-            };
-
+$ac_includes_default
 int
 main ()
 {
+struct stat sbuf;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
 
-            int result = !constants;
-            #if HAVE_SYMLINK
-            {
-              static char const sym[] = "conftest.sym";
-              if (symlink ("/dev/null", sym) != 0)
-                result |= 2;
-              else
-                {
-                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
-                  if (fd >= 0)
-                    {
-                      close (fd);
-                      result |= 4;
-                    }
-                }
-              if (unlink (sym) != 0 || symlink (".", sym) != 0)
-                result |= 2;
-              else
-                {
-                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
-                  if (fd >= 0)
-                    {
-                      close (fd);
-                      result |= 4;
-                    }
-                }
-              unlink (sym);
-            }
-            #endif
-            {
-              static char const file[] = "confdefs.h";
-              int fd = open (file, O_RDONLY | O_NOATIME);
-              if (fd < 0)
-                result |= 8;
-              else
-                {
-                  struct stat st0;
-                  if (fstat (fd, &st0) != 0)
-                    result |= 16;
-                  else
-                    {
-                      char c;
-                      sleep (1);
-                      if (read (fd, &c, 1) != 1)
-                        result |= 24;
-                      else
-                        {
-                          if (close (fd) != 0)
-                            result |= 32;
-                          else
-                            {
-                              struct stat st1;
-                              if (stat (file, &st1) != 0)
-                                result |= 40;
-                              else
-                                if (st0.st_atime != st1.st_atime)
-                                  result |= 64;
-                            }
-                        }
-                    }
-                }
-            }
-            return result;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_header_working_fcntl_h=yes
+  gl_cv_func_lstat_dereferences_slashed_symlink=yes
 else
-  case $? in #(
-        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
-        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
-        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
-         *) gl_cv_header_working_fcntl_h='no';;
-        esac
+  gl_cv_func_lstat_dereferences_slashed_symlink=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+     rm -f conftest.sym conftest.file
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
-$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
-
-  case $gl_cv_header_working_fcntl_h in #(
-  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
-  *) ac_val=1;;
-  esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_WORKING_O_NOATIME $ac_val
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
 _ACEOF
 
-
-  case $gl_cv_header_working_fcntl_h in #(
-  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
-  *) ac_val=1;;
+      ;;
   esac
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_WORKING_O_NOFOLLOW $ac_val
-_ACEOF
-
-
-
-  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
-"
-if test "x$ac_cv_type_pid_t" = xyes; then :
-
-else
-                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-          #if defined _WIN64 && !defined __CYGWIN__
-          LLP64
-          #endif
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_pid_type='int'
-else
-  gl_pid_type='__int64'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t $gl_pid_type
-_ACEOF
 
 
-fi
 
 
-ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
-if test "x$ac_cv_type_mode_t" = xyes; then :
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if ${gl_cv_double_slash_root+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-
-cat >>confdefs.h <<_ACEOF
-#define mode_t int
-_ACEOF
-
+   if test x"$cross_compiling" = xyes ; then
+        # When cross-compiling, there is no way to tell whether // is special
+        # short of a list of hosts.  However, the only known hosts to date
+        # that have a distinct // are Apollo DomainOS (too old to port to),
+        # Cygwin, and z/OS.  If anyone knows of another system for which // has
+        # special semantics and is distinct from /, please report it to
+        # <bug-gnulib@gnu.org>.
+        case $host in
+          *-cygwin | i370-ibm-openedition)
+            gl_cv_double_slash_root=yes ;;
+          *)
+            # Be optimistic and assume that / and // are the same when we
+            # don't know.
+            gl_cv_double_slash_root='unknown, assuming no' ;;
+        esac
+      else
+        set x `ls -di / // 2>/dev/null`
+        if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+          gl_cv_double_slash_root=no
+        else
+          gl_cv_double_slash_root=yes
+        fi
+      fi
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+  if test "$gl_cv_double_slash_root" = yes; then
 
+$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
 
-
-
-  GNULIB_FFS=0;
-    HAVE_FFS=1;
-  HAVE_STRCASECMP=1;
-  HAVE_DECL_STRNCASECMP=1;
-
-
-
-
-  GNULIB_FNMATCH=0;
-    HAVE_FNMATCH=1;
-  REPLACE_FNMATCH=0;
-
-
-
-
-
-
-
-
-
+  fi
 
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
-$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
-if ${gl_cv_next_fnmatch_h+:} false; then :
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+$as_echo_n "checking whether realpath works... " >&6; }
+if ${gl_cv_func_realpath_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_fnmatch_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <fnmatch.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
+    rm -rf conftest.a conftest.d
+    touch conftest.a
+    # Assume that if we have lstat, we can also check symlinks.
+    if test $ac_cv_func_lstat = yes; then
+      ln -s conftest.a conftest.l
+    fi
+    mkdir conftest.d
+    if test "$cross_compiling" = yes; then :
   case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'fnmatch.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_fnmatch_h
-           gl_cv_next_fnmatch_h='"'$gl_header'"'
-          else
-               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
-             fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
-$as_echo "$gl_cv_next_fnmatch_h" >&6; }
-     fi
-     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'fnmatch.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
-  if test $ac_cv_header_fnmatch_h = yes; then
-    HAVE_FNMATCH_H=1
-  else
-    HAVE_FNMATCH_H=0
-  fi
-
-
-  FNMATCH_H=''
-     if false; then
-              FNMATCH_H=fnmatch.h
-     else
-       if test $ac_cv_header_fnmatch_h != yes; then
-                  FNMATCH_H=fnmatch.h
-       fi
-     fi
-
-
-   if test -n "$FNMATCH_H"; then
-  GL_GENERATE_FNMATCH_H_TRUE=
-  GL_GENERATE_FNMATCH_H_FALSE='#'
-else
-  GL_GENERATE_FNMATCH_H_TRUE='#'
-  GL_GENERATE_FNMATCH_H_FALSE=
-fi
-
-
-
-
-
-
-
-
-
+                       # Guess yes on glibc systems.
+        *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+                       # Guess 'nearly' on musl systems.
+        *-musl*)       gl_cv_func_realpath_works="guessing nearly" ;;
+                       # Guess no on Cygwin.
+        cygwin*)       gl_cv_func_realpath_works="guessing no" ;;
+                       # Guess no on native Windows.
+        mingw*)        gl_cv_func_realpath_works="guessing no" ;;
+                       # If we don't know, obey --enable-cross-guesses.
+        *)             gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
+      esac
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-$as_echo_n "checking for mbstate_t... " >&6; }
-if ${ac_cv_type_mbstate_t+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
-             #include <wchar.h>
-int
-main ()
-{
-mbstate_t x; return sizeof x;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_mbstate_t=yes
-else
-  ac_cv_type_mbstate_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-$as_echo "$ac_cv_type_mbstate_t" >&6; }
-   if test $ac_cv_type_mbstate_t = yes; then
-
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
-
-   else
-
-$as_echo "#define mbstate_t int" >>confdefs.h
-
-   fi
-
 
 
 
-  GNULIB_ACOSF=0;
-  GNULIB_ACOSL=0;
-  GNULIB_ASINF=0;
-  GNULIB_ASINL=0;
-  GNULIB_ATANF=0;
-  GNULIB_ATANL=0;
-  GNULIB_ATAN2F=0;
-  GNULIB_CBRT=0;
-  GNULIB_CBRTF=0;
-  GNULIB_CBRTL=0;
-  GNULIB_CEIL=0;
-  GNULIB_CEILF=0;
-  GNULIB_CEILL=0;
-  GNULIB_COPYSIGN=0;
-  GNULIB_COPYSIGNF=0;
-  GNULIB_COPYSIGNL=0;
-  GNULIB_COSF=0;
-  GNULIB_COSL=0;
-  GNULIB_COSHF=0;
-  GNULIB_EXPF=0;
-  GNULIB_EXPL=0;
-  GNULIB_EXP2=0;
-  GNULIB_EXP2F=0;
-  GNULIB_EXP2L=0;
-  GNULIB_EXPM1=0;
-  GNULIB_EXPM1F=0;
-  GNULIB_EXPM1L=0;
-  GNULIB_FABSF=0;
-  GNULIB_FABSL=0;
-  GNULIB_FLOOR=0;
-  GNULIB_FLOORF=0;
-  GNULIB_FLOORL=0;
-  GNULIB_FMA=0;
-  GNULIB_FMAF=0;
-  GNULIB_FMAL=0;
-  GNULIB_FMOD=0;
-  GNULIB_FMODF=0;
-  GNULIB_FMODL=0;
-  GNULIB_FREXPF=0;
-  GNULIB_FREXP=0;
-  GNULIB_FREXPL=0;
-  GNULIB_HYPOT=0;
-  GNULIB_HYPOTF=0;
-  GNULIB_HYPOTL=0;
-  GNULIB_ILOGB=0;
-  GNULIB_ILOGBF=0;
-  GNULIB_ILOGBL=0;
-  GNULIB_ISFINITE=0;
-  GNULIB_ISINF=0;
-  GNULIB_ISNAN=0;
-  GNULIB_ISNANF=0;
-  GNULIB_ISNAND=0;
-  GNULIB_ISNANL=0;
-  GNULIB_LDEXPF=0;
-  GNULIB_LDEXPL=0;
-  GNULIB_LOG=0;
-  GNULIB_LOGF=0;
-  GNULIB_LOGL=0;
-  GNULIB_LOG10=0;
-  GNULIB_LOG10F=0;
-  GNULIB_LOG10L=0;
-  GNULIB_LOG1P=0;
-  GNULIB_LOG1PF=0;
-  GNULIB_LOG1PL=0;
-  GNULIB_LOG2=0;
-  GNULIB_LOG2F=0;
-  GNULIB_LOG2L=0;
-  GNULIB_LOGB=0;
-  GNULIB_LOGBF=0;
-  GNULIB_LOGBL=0;
-  GNULIB_MODF=0;
-  GNULIB_MODFF=0;
-  GNULIB_MODFL=0;
-  GNULIB_POWF=0;
-  GNULIB_REMAINDER=0;
-  GNULIB_REMAINDERF=0;
-  GNULIB_REMAINDERL=0;
-  GNULIB_RINT=0;
-  GNULIB_RINTF=0;
-  GNULIB_RINTL=0;
-  GNULIB_ROUND=0;
-  GNULIB_ROUNDF=0;
-  GNULIB_ROUNDL=0;
-  GNULIB_SIGNBIT=0;
-  GNULIB_SINF=0;
-  GNULIB_SINL=0;
-  GNULIB_SINHF=0;
-  GNULIB_SQRTF=0;
-  GNULIB_SQRTL=0;
-  GNULIB_TANF=0;
-  GNULIB_TANL=0;
-  GNULIB_TANHF=0;
-  GNULIB_TRUNC=0;
-  GNULIB_TRUNCF=0;
-  GNULIB_TRUNCL=0;
-    GNULIB_MDA_J0=1;
-  GNULIB_MDA_J1=1;
-  GNULIB_MDA_JN=1;
-  GNULIB_MDA_Y0=1;
-  GNULIB_MDA_Y1=1;
-  GNULIB_MDA_YN=1;
-    HAVE_ACOSF=1;
-  HAVE_ACOSL=1;
-  HAVE_ASINF=1;
-  HAVE_ASINL=1;
-  HAVE_ATANF=1;
-  HAVE_ATANL=1;
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on Mac OS X.  */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens.  */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+   EXC_BAD_ACCESS.  */
+static void *
+mach_exception_thread (void *arg)
+{
+  /* Buffer for a message to be received.  */
+  struct {
+    mach_msg_header_t head;
+    mach_msg_body_t msgh_body;
+    char data[1024];
+  } msg;
+  mach_msg_return_t retval;
+  /* Wait for a message on the exception port.  */
+  retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+                     our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+  if (retval != MACH_MSG_SUCCESS)
+    abort ();
+  exit (1);
+}
+static void
+nocrash_init (void)
+{
+  mach_port_t self = mach_task_self ();
+  /* Allocate a port on which the thread shall listen for exceptions.  */
+  if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+      == KERN_SUCCESS) {
+    /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html.  */
+    if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+                                MACH_MSG_TYPE_MAKE_SEND)
+        == KERN_SUCCESS) {
+      /* The exceptions we want to catch.  Only EXC_BAD_ACCESS is interesting
+         for us.  */
+      exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+      /* Create the thread listening on the exception port.  */
+      pthread_attr_t attr;
+      pthread_t thread;
+      if (pthread_attr_init (&attr) == 0
+          && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+          && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+        pthread_attr_destroy (&attr);
+        /* Replace the exception port info for these exceptions with our own.
+           Note that we replace the exception port for the entire task, not only
+           for a particular thread.  This has the effect that when our exception
+           port gets the message, the thread specific exception port has already
+           been asked, and we don't need to bother about it.
+           See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html.  */
+        task_set_exception_ports (self, mask, our_exception_port,
+                                  EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+      }
+    }
+  }
+}
+#elif defined _WIN32 && ! defined __CYGWIN__
+/* Avoid a crash on native Windows.  */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <winerror.h>
+static LONG WINAPI
+exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
+{
+  switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
+    {
+    case EXCEPTION_ACCESS_VIOLATION:
+    case EXCEPTION_IN_PAGE_ERROR:
+    case EXCEPTION_STACK_OVERFLOW:
+    case EXCEPTION_GUARD_PAGE:
+    case EXCEPTION_PRIV_INSTRUCTION:
+    case EXCEPTION_ILLEGAL_INSTRUCTION:
+    case EXCEPTION_DATATYPE_MISALIGNMENT:
+    case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+    case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+      exit (1);
+    }
+  return EXCEPTION_CONTINUE_SEARCH;
+}
+static void
+nocrash_init (void)
+{
+  SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
+}
+#else
+/* Avoid a crash on POSIX systems.  */
+#include <signal.h>
+#include <unistd.h>
+/* A POSIX signal handler.  */
+static void
+exception_handler (int sig)
+{
+  _exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+  signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+  signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+        #include <errno.h>
+        #include <stdlib.h>
+        #include <string.h>
+
+int
+main ()
+{
+
+        int result = 0;
+        /* This test fails on Solaris 10.  */
+        {
+          char *name = realpath ("conftest.a", NULL);
+          if (!(name && *name == '/'))
+            result |= 1;
+          free (name);
+        }
+        /* This test fails on older versions of Cygwin.  */
+        {
+          char *name = realpath ("conftest.b/../conftest.a", NULL);
+          if (name != NULL)
+            result |= 2;
+          free (name);
+        }
+        /* This test fails on Cygwin 2.9.  */
+        #if HAVE_LSTAT
+        {
+          char *name = realpath ("conftest.l/../conftest.a", NULL);
+          if (name != NULL || errno != ENOTDIR)
+            result |= 4;
+          free (name);
+        }
+        #endif
+        /* This test fails on Mac OS X 10.13, OpenBSD 6.0.  */
+        {
+          char *name = realpath ("conftest.a/", NULL);
+          if (name != NULL)
+            result |= 8;
+          free (name);
+        }
+        /* This test fails on AIX 7, Solaris 10.  */
+        {
+          char *name1 = realpath (".", NULL);
+          char *name2 = realpath ("conftest.d//./..", NULL);
+          if (! name1 || ! name2 || strcmp (name1, name2))
+            result |= 16;
+          free (name1);
+          free (name2);
+        }
+        #ifdef __linux__
+        /* On Linux, // is the same as /. See also double-slash-root.m4.
+           realpath() should respect this.
+           This test fails on musl libc 1.2.2.  */
+        {
+          char *name = realpath ("//", NULL);
+          if (! name || strcmp (name, "/"))
+            result |= 32;
+          free (name);
+        }
+        #endif
+        return result;
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_realpath_works=yes
+else
+  case $? in
+        32) gl_cv_func_realpath_works=nearly ;;
+        *)  gl_cv_func_realpath_works=no ;;
+      esac
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    rm -rf conftest.a conftest.l conftest.d
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+$as_echo "$gl_cv_func_realpath_works" >&6; }
+  case "$gl_cv_func_realpath_works" in
+    *yes)
+
+$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
+
+      ;;
+    *nearly)
+
+$as_echo "#define FUNC_REALPATH_NEARLY_WORKS 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+
+
+
+
+
+
+
+  case "$host_os" in
+    mingw*) ;;
+    *)      for ac_func in getcwd
+do :
+  ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
+if test "x$ac_cv_func_getcwd" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETCWD 1
+_ACEOF
+
+fi
+done
+ ;;
+  esac
+
+
+
+
+
+
+
+  GL_GNULIB_ACCESS=0
+
+
+
+  GL_GNULIB_CHDIR=0
+
+
+
+  GL_GNULIB_CHOWN=0
+
+
+
+  GL_GNULIB_CLOSE=0
+
+
+
+  GL_GNULIB_COPY_FILE_RANGE=0
+
+
+
+  GL_GNULIB_DUP=0
+
+
+
+  GL_GNULIB_DUP2=0
+
+
+
+  GL_GNULIB_DUP3=0
+
+
+
+  GL_GNULIB_ENVIRON=0
+
+
+
+  GL_GNULIB_EUIDACCESS=0
+
+
+
+  GL_GNULIB_EXECL=0
+
+
+
+  GL_GNULIB_EXECLE=0
+
+
+
+  GL_GNULIB_EXECLP=0
+
+
+
+  GL_GNULIB_EXECV=0
+
+
+
+  GL_GNULIB_EXECVE=0
+
+
+
+  GL_GNULIB_EXECVP=0
+
+
+
+  GL_GNULIB_EXECVPE=0
+
+
+
+  GL_GNULIB_FACCESSAT=0
+
+
+
+  GL_GNULIB_FCHDIR=0
+
+
+
+  GL_GNULIB_FCHOWNAT=0
+
+
+
+  GL_GNULIB_FDATASYNC=0
+
+
+
+  GL_GNULIB_FSYNC=0
+
+
+
+  GL_GNULIB_FTRUNCATE=0
+
+
+
+  GL_GNULIB_GETCWD=0
+
+
+
+  GL_GNULIB_GETDOMAINNAME=0
+
+
+
+  GL_GNULIB_GETDTABLESIZE=0
+
+
+
+  GL_GNULIB_GETENTROPY=0
+
+
+
+  GL_GNULIB_GETGROUPS=0
+
+
+
+  GL_GNULIB_GETHOSTNAME=0
+
+
+
+  GL_GNULIB_GETLOGIN=0
+
+
+
+  GL_GNULIB_GETLOGIN_R=0
+
+
+
+  GL_GNULIB_GETOPT_POSIX=0
+
+
+
+  GL_GNULIB_GETPAGESIZE=0
+
+
+
+  GL_GNULIB_GETPASS=0
+
+
+
+  GL_GNULIB_GETPASS_GNU=0
+
+
+
+  GL_GNULIB_GETUSERSHELL=0
+
+
+
+  GL_GNULIB_GROUP_MEMBER=0
+
+
+
+  GL_GNULIB_ISATTY=0
+
+
+
+  GL_GNULIB_LCHOWN=0
+
+
+
+  GL_GNULIB_LINK=0
+
+
+
+  GL_GNULIB_LINKAT=0
+
+
+
+  GL_GNULIB_LSEEK=0
+
+
+
+  GL_GNULIB_PIPE=0
+
+
+
+  GL_GNULIB_PIPE2=0
+
+
+
+  GL_GNULIB_PREAD=0
+
+
+
+  GL_GNULIB_PWRITE=0
+
+
+
+  GL_GNULIB_READ=0
+
+
+
+  GL_GNULIB_READLINK=0
+
+
+
+  GL_GNULIB_READLINKAT=0
+
+
+
+  GL_GNULIB_RMDIR=0
+
+
+
+  GL_GNULIB_SETHOSTNAME=0
+
+
+
+  GL_GNULIB_SLEEP=0
+
+
+
+  GL_GNULIB_SYMLINK=0
+
+
+
+  GL_GNULIB_SYMLINKAT=0
+
+
+
+  GL_GNULIB_TRUNCATE=0
+
+
+
+  GL_GNULIB_TTYNAME_R=0
+
+
+
+  GL_GNULIB_UNISTD_H_GETOPT=0
+
+
+
+  GL_GNULIB_UNISTD_H_NONBLOCKING=0
+
+
+
+  GL_GNULIB_UNISTD_H_SIGPIPE=0
+
+
+
+  GL_GNULIB_UNLINK=0
+
+
+
+  GL_GNULIB_UNLINKAT=0
+
+
+
+  GL_GNULIB_USLEEP=0
+
+
+
+  GL_GNULIB_WRITE=0
+
+
+
+  GL_GNULIB_MDA_ACCESS=1
+
+
+
+  GL_GNULIB_MDA_CHDIR=1
+
+
+
+  GL_GNULIB_MDA_CLOSE=1
+
+
+
+  GL_GNULIB_MDA_DUP=1
+
+
+
+  GL_GNULIB_MDA_DUP2=1
+
+
+
+  GL_GNULIB_MDA_EXECL=1
+
+
+
+  GL_GNULIB_MDA_EXECLE=1
+
+
+
+  GL_GNULIB_MDA_EXECLP=1
+
+
+
+  GL_GNULIB_MDA_EXECV=1
+
+
+
+  GL_GNULIB_MDA_EXECVE=1
+
+
+
+  GL_GNULIB_MDA_EXECVP=1
+
+
+
+  GL_GNULIB_MDA_EXECVPE=1
+
+
+
+  GL_GNULIB_MDA_GETCWD=1
+
+
+
+  GL_GNULIB_MDA_GETPID=1
+
+
+
+  GL_GNULIB_MDA_ISATTY=1
+
+
+
+  GL_GNULIB_MDA_LSEEK=1
+
+
+
+  GL_GNULIB_MDA_READ=1
+
+
+
+  GL_GNULIB_MDA_RMDIR=1
+
+
+
+  GL_GNULIB_MDA_SWAB=1
+
+
+
+  GL_GNULIB_MDA_UNLINK=1
+
+
+
+  GL_GNULIB_MDA_WRITE=1
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+gl_mda_defines='
+#if defined _WIN32 && !defined __CYGWIN__
+#define access    _access
+#define chdir     _chdir
+#define chmod     _chmod
+#define close     _close
+#define creat     _creat
+#define dup       _dup
+#define dup2      _dup2
+#define ecvt      _ecvt
+#define execl     _execl
+#define execle    _execle
+#define execlp    _execlp
+#define execv     _execv
+#define execve    _execve
+#define execvp    _execvp
+#define execvpe   _execvpe
+#define fcloseall _fcloseall
+#define fcvt      _fcvt
+#define fdopen    _fdopen
+#define fileno    _fileno
+#define gcvt      _gcvt
+#define getcwd    _getcwd
+#define getpid    _getpid
+#define getw      _getw
+#define isatty    _isatty
+#define j0        _j0
+#define j1        _j1
+#define jn        _jn
+#define lfind     _lfind
+#define lsearch   _lsearch
+#define lseek     _lseek
+#define memccpy   _memccpy
+#define mkdir     _mkdir
+#define mktemp    _mktemp
+#define open      _open
+#define putenv    _putenv
+#define putw      _putw
+#define read      _read
+#define rmdir     _rmdir
+#define strdup    _strdup
+#define swab      _swab
+#define tempnam   _tempnam
+#define tzset     _tzset
+#define umask     _umask
+#define unlink    _unlink
+#define utime     _utime
+#define wcsdup    _wcsdup
+#define write     _write
+#define y0        _y0
+#define y1        _y1
+#define yn        _yn
+#endif
+'
+
+
+      for ac_header in unistd.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNISTD_H 1
+_ACEOF
+
+fi
+
+done
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
+$as_echo_n "checking for working chown... " >&6; }
+if ${ac_cv_func_chown_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in # ((
+                           # Guess yes on Linux systems.
+          linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
+                           # Guess yes on glibc systems.
+          *-gnu* | gnu*)   ac_cv_func_chown_works="guessing yes" ;;
+                           # Guess no on native Windows.
+          mingw*)          ac_cv_func_chown_works="guessing no" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
+        esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+           #include <fcntl.h>
+
+
+$gl_mda_defines
+
+int
+main ()
+{
+
+            char *f = "conftest.chown";
+            struct stat before, after;
+
+            if (creat (f, 0600) < 0)
+              return 1;
+            if (stat (f, &before) < 0)
+              return 1;
+            if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
+              return 1;
+            if (stat (f, &after) < 0)
+              return 1;
+            return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_chown_works=yes
+else
+  ac_cv_func_chown_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+     rm -f conftest.chown
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
+$as_echo "$ac_cv_func_chown_works" >&6; }
+  case "$ac_cv_func_chown_works" in
+    *yes)
+
+$as_echo "#define HAVE_CHOWN 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
+$as_echo_n "checking whether chown dereferences symlinks... " >&6; }
+if ${gl_cv_func_chown_follows_symlink+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+  gl_cv_func_chown_follows_symlink="guessing yes"
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+
+$gl_mda_defines
+
+        int
+        main ()
+        {
+          int result = 0;
+          char const *dangling_symlink = "conftest.dangle";
+
+          unlink (dangling_symlink);
+          if (symlink ("conftest.no-such", dangling_symlink))
+            abort ();
+
+          /* Exit successfully on a conforming system,
+             i.e., where chown must fail with ENOENT.  */
+          if (chown (dangling_symlink, getuid (), getgid ()) == 0)
+            result |= 1;
+          if (errno != ENOENT)
+            result |= 2;
+          return result;
+        }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_follows_symlink=yes
+else
+  gl_cv_func_chown_follows_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
+$as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
+
+  case "$gl_cv_func_chown_follows_symlink" in
+    *yes) ;;
+    *)
+
+$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+
+
+
+
+
+
+
+
+
+
+    if test $ac_cv_func_chown = no; then
+    HAVE_CHOWN=0
+  else
+        case "$gl_cv_func_chown_follows_symlink" in
+      *yes) ;;
+      *) REPLACE_CHOWN=1 ;;
+    esac
+
+        case "$ac_cv_func_chown_works" in
+      *no)
+
+$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
+
+        REPLACE_CHOWN=1
+        ;;
+    esac
+
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
+$as_echo_n "checking whether chown honors trailing slash... " >&6; }
+if ${gl_cv_func_chown_slash_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  touch conftest.file && rm -f conftest.link
+       if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                    # Guess yes on glibc systems.
+           *-gnu*)  gl_cv_func_chown_slash_works="guessing yes" ;;
+                    # Guess yes on musl systems.
+           *-musl*) gl_cv_func_chown_slash_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+           *)       gl_cv_func_chown_slash_works="$gl_cross_guess_normal" ;;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+
+
+$gl_mda_defines
+
+int
+main ()
+{
+if (symlink ("conftest.file", "conftest.link")) return 1;
+          if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_slash_works=yes
+else
+  gl_cv_func_chown_slash_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.link conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
+$as_echo "$gl_cv_func_chown_slash_works" >&6; }
+    case "$gl_cv_func_chown_slash_works" in
+      *yes) ;;
+      *)
+
+$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+        REPLACE_CHOWN=1
+        ;;
+    esac
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
+$as_echo_n "checking whether chown always updates ctime... " >&6; }
+if ${gl_cv_func_chown_ctime_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                    # Guess yes on glibc systems.
+           *-gnu*)  gl_cv_func_chown_ctime_works="guessing yes" ;;
+                    # Guess yes on musl systems.
+           *-musl*) gl_cv_func_chown_ctime_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+           *)       gl_cv_func_chown_ctime_works="$gl_cross_guess_normal" ;;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+
+$gl_mda_defines
+
+int
+main ()
+{
+struct stat st1, st2;
+          if (close (creat ("conftest.file", 0600))) return 1;
+          if (stat ("conftest.file", &st1)) return 2;
+          sleep (1);
+          if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
+          if (stat ("conftest.file", &st2)) return 4;
+          if (st2.st_ctime <= st1.st_ctime) return 5;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_chown_ctime_works=yes
+else
+  gl_cv_func_chown_ctime_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+      rm -f conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
+$as_echo "$gl_cv_func_chown_ctime_works" >&6; }
+    case "$gl_cv_func_chown_ctime_works" in
+      *yes) ;;
+      *)
+
+$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
+
+        REPLACE_CHOWN=1
+        ;;
+    esac
+  fi
+
+
+
+
+
+  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
+    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
+
+$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+
+  else
+    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+  fi
+
+
+
+
+
+    HAVE_OPENDIR=1;
+  HAVE_READDIR=1;
+  HAVE_REWINDDIR=1;
+  HAVE_CLOSEDIR=1;
+  HAVE_DECL_DIRFD=1;
+  HAVE_DECL_FDOPENDIR=1;
+  HAVE_FDOPENDIR=1;
+  HAVE_SCANDIR=1;
+  HAVE_ALPHASORT=1;
+  REPLACE_OPENDIR=0;
+  REPLACE_CLOSEDIR=0;
+  REPLACE_DIRFD=0;
+  REPLACE_FDOPENDIR=0;
+
+
+
+
+
+
+
+  GL_GNULIB_OPENDIR=0
+
+
+
+  GL_GNULIB_READDIR=0
+
+
+
+  GL_GNULIB_REWINDDIR=0
+
+
+
+  GL_GNULIB_CLOSEDIR=0
+
+
+
+  GL_GNULIB_DIRFD=0
+
+
+
+  GL_GNULIB_FDOPENDIR=0
+
+
+
+  GL_GNULIB_SCANDIR=0
+
+
+
+  GL_GNULIB_ALPHASORT=0
+
+
+
+
+    HAVE_ISBLANK=1;
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_ctype_h='<'ctype.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
+$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
+if ${gl_cv_next_ctype_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'ctype.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_ctype_h
+          gl_cv_next_ctype_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
+$as_echo "$gl_cv_next_ctype_h" >&6; }
+     fi
+     NEXT_CTYPE_H=$gl_cv_next_ctype_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'ctype.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_ctype_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_ISBLANK=0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_dirent_h='<'dirent.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
+$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
+if ${gl_cv_next_dirent_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_dirent_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <dirent.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'dirent.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_dirent_h
+          gl_cv_next_dirent_h='"'$gl_header'"'
+          else
+               gl_cv_next_dirent_h='<'dirent.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
+$as_echo "$gl_cv_next_dirent_h" >&6; }
+     fi
+     NEXT_DIRENT_H=$gl_cv_next_dirent_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'dirent.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_dirent_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_dirent_h = yes; then
+    HAVE_DIRENT_H=1
+  else
+    HAVE_DIRENT_H=0
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+if ${gt_cv_var_environ_declaration+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_UNISTD_H
+     #include <unistd.h>
+     #endif
+     /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>.  */
+     #include <stdlib.h>
+
+            typedef struct { int foo; } foo_t;
+            extern foo_t environ;
+int
+main ()
+{
+environ.foo = 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_var_environ_declaration=no
+else
+  gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+  if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+  fi
+
+
+  if test $gt_cv_var_environ_declaration != yes; then
+    HAVE_DECL_ENVIRON=0
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if ${gl_cv_header_errno_h_complete+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined EDQUOT
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "booboo" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_complete=no
+else
+  gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+  if test $gl_cv_header_errno_h_complete = yes; then
+    GL_GENERATE_ERRNO_H=false
+  else
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_errno_h='<'errno.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if ${gl_cv_next_errno_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'errno.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_errno_h
+          gl_cv_next_errno_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+     fi
+     NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'errno.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_errno_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+
+
+
+
+    GL_GENERATE_ERRNO_H=true
+  fi
+
+  if $GL_GENERATE_ERRNO_H; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=yes
+else
+  gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+    case $gl_cv_header_errno_h_EMULTIHOP in
+      yes | no)
+        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+        ;;
+      *)
+        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+        ;;
+    esac
+
+
+  fi
+
+
+  if $GL_GENERATE_ERRNO_H; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=yes
+else
+  gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_ENOLINK = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+    case $gl_cv_header_errno_h_ENOLINK in
+      yes | no)
+        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+        ;;
+      *)
+        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+        ;;
+    esac
+
+
+  fi
+
+
+  if $GL_GENERATE_ERRNO_H; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=yes
+else
+  gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+    case $gl_cv_header_errno_h_EOVERFLOW in
+      yes | no)
+        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+        ;;
+      *)
+        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+        ;;
+    esac
+
+
+  fi
+
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if ${ac_cv_func_strerror_r_char_p+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+         char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         char *p = strerror_r (0, buf, sizeof buf);
+         return !p || x;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    else
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+       extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+         char x = *strerror_r (0, buf, sizeof buf);
+         return ! isalpha (x);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+    fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ctype.h defines __header_inline" >&5
+$as_echo_n "checking whether ctype.h defines __header_inline... " >&6; }
+if ${gl_cv_have___header_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+                         #ifndef __header_inline
+                          #error "<ctype.h> does not define __header_inline"
+                         #endif
+
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  gl_cv_have___header_inline=yes
+else
+  gl_cv_have___header_inline=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___header_inline" >&5
+$as_echo "$gl_cv_have___header_inline" >&6; }
+  if test "$gl_cv_have___header_inline" = yes; then
+
+$as_echo "#define HAVE___HEADER_INLINE 1" >>confdefs.h
+
+  fi
+
+
+
+ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fchdir" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCHDIR $ac_have_decl
+_ACEOF
+
+
+    HAVE_FCNTL=1;
+  HAVE_OPENAT=1;
+  REPLACE_CREAT=0;
+  REPLACE_FCNTL=0;
+  REPLACE_OPEN=0;
+  REPLACE_OPENAT=0;
+
+
+
+
+
+  GL_GNULIB_CREAT=0
+
+
+
+  GL_GNULIB_FCNTL=0
+
+
+
+  GL_GNULIB_NONBLOCKING=0
+
+
+
+  GL_GNULIB_OPEN=0
+
+
+
+  GL_GNULIB_OPENAT=0
+
+
+
+  GL_GNULIB_MDA_CREAT=1
+
+
+
+  GL_GNULIB_MDA_OPEN=1
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if ${gl_cv_header_working_fcntl_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                  # Guess 'no' on native Windows.
+          mingw*) gl_cv_header_working_fcntl_h='no' ;;
+          *)      gl_cv_header_working_fcntl_h=cross-compiling ;;
+        esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
+           #include <fcntl.h>
+
+
+$gl_mda_defines
+
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
+
+int
+main ()
+{
+
+            int result = !constants;
+            #if HAVE_SYMLINK
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            #endif
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_fcntl_h=yes
+else
+  case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
+"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+          #if defined _WIN64 && !defined __CYGWIN__
+          LLP64
+          #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_pid_type='int'
+else
+  gl_pid_type='__int64'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t $gl_pid_type
+_ACEOF
+
+
+fi
+
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_fcntl_h='<'fcntl.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
+if ${gl_cv_next_fcntl_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fcntl.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'fcntl.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_fcntl_h
+          gl_cv_next_fcntl_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+$as_echo "$gl_cv_next_fcntl_h" >&6; }
+     fi
+     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'fcntl.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_fcntl_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    HAVE_FFS=1;
+  HAVE_STRCASECMP=1;
+  HAVE_DECL_STRNCASECMP=1;
+
+
+
+  GL_GNULIB_FFS=0
+
+
+
+
+
+
+    HAVE_FNMATCH=1;
+  REPLACE_FNMATCH=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_fnmatch_h='<'fnmatch.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
+$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
+if ${gl_cv_next_fnmatch_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_fnmatch_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <fnmatch.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'fnmatch.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_fnmatch_h
+          gl_cv_next_fnmatch_h='"'$gl_header'"'
+          else
+               gl_cv_next_fnmatch_h='<'fnmatch.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
+$as_echo "$gl_cv_next_fnmatch_h" >&6; }
+     fi
+     NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'fnmatch.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_fnmatch_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+  if test $ac_cv_header_fnmatch_h = yes; then
+    HAVE_FNMATCH_H=1
+  else
+    HAVE_FNMATCH_H=0
+  fi
+
+
+  GL_GENERATE_FNMATCH_H=false
+     if false; then
+              GL_GENERATE_FNMATCH_H=true
+     else
+       if test $ac_cv_header_fnmatch_h != yes; then
+                  GL_GENERATE_FNMATCH_H=true
+       fi
+     fi
+
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_FNMATCH=0
+
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if ${ac_cv_type_mbstate_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+             #include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_mbstate_t=yes
+else
+  ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+   if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+
+   else
+
+$as_echo "#define mbstate_t int" >>confdefs.h
+
+   fi
+
+
+
+
+    HAVE_ACOSF=1;
+  HAVE_ACOSL=1;
+  HAVE_ASINF=1;
+  HAVE_ASINL=1;
+  HAVE_ATANF=1;
+  HAVE_ATANL=1;
   HAVE_ATAN2F=1;
   HAVE_CBRT=1;
   HAVE_CBRTF=1;
@@ -10328,262 +11639,3848 @@ $as_echo "#define mbstate_t int" >>confdefs.h
   REPLACE_TRUNCL=0;
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
-$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
-if ${gl_cv_func_frexp_no_libm+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
+if ${gl_cv_func_frexp_no_libm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+             double x;
+int
+main ()
+{
+int e; return frexp (x, &e) > 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_frexp_no_libm=yes
+else
+  gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+
+
+
+  FREXP_LIBM=
+  if test $gl_cv_func_frexp_no_libm = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
+$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
+if ${gl_cv_func_frexp_in_libm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        save_LIBS="$LIBS"
+        LIBS="$LIBS -lm"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+               double x;
+int
+main ()
+{
+int e; return frexp (x, &e) > 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_frexp_in_libm=yes
+else
+  gl_cv_func_frexp_in_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
+$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
+    if test $gl_cv_func_frexp_in_libm = yes; then
+      FREXP_LIBM=-lm
+    fi
+  fi
+  if test $gl_cv_func_frexp_no_libm = yes \
+     || test $gl_cv_func_frexp_in_libm = yes; then
+    save_LIBS="$LIBS"
+    LIBS="$LIBS $FREXP_LIBM"
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if ${gl_cv_func_frexp_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+           netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
+           mingw*) # Guess yes with MSVC, no with mingw.
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef _MSC_VER
+ Good
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Good" >/dev/null 2>&1; then :
+  gl_cv_func_frexp_works="guessing yes"
+else
+  gl_cv_func_frexp_works="guessing no"
+fi
+rm -f conftest*
+
+             ;;
+           *) gl_cv_func_frexp_works="guessing yes" ;;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+#if HAVE_DECL_ALARM
+# include <signal.h>
+# include <unistd.h>
+#endif
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+   ICC 10.0 has a bug when optimizing the expression -zero.
+   The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
+   to PowerPC on Mac OS X 10.5.  */
+#if defined __hpux || defined __sgi || defined __ICC
+static double
+compute_minus_zero (void)
+{
+  return -DBL_MIN * DBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
+#else
+double minus_zero = -0.0;
+#endif
+int main()
+{
+  int result = 0;
+  int i;
+  volatile double x;
+  double zero = 0.0;
+#if HAVE_DECL_ALARM
+  /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
+     number.  Let the test fail in this case.  */
+  signal (SIGALRM, SIG_DFL);
+  alarm (5);
+#endif
+  /* Test on denormalized numbers.  */
+  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+    ;
+  if (x > 0.0)
+    {
+      int exp;
+      double y = frexp (x, &exp);
+      /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+         On NetBSD: y = 0.75. Correct: y = 0.5.  */
+      if (y != 0.5)
+        result |= 1;
+    }
+  /* Test on infinite numbers.  */
+  x = 1.0 / zero;
+  {
+    int exp;
+    double y = frexp (x, &exp);
+    if (y != x)
+      result |= 2;
+  }
+  /* Test on negative zero.  */
+  x = minus_zero;
+  {
+    int exp;
+    double y = frexp (x, &exp);
+    if (memcmp (&y, &x, sizeof x))
+      result |= 4;
+  }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_frexp_works=yes
+else
+  gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+    LIBS="$save_LIBS"
+    case "$gl_cv_func_frexp_works" in
+      *yes) gl_func_frexp=yes ;;
+      *)    gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
+    esac
+  else
+    gl_func_frexp=no
+  fi
+  if test $gl_func_frexp = yes; then
+
+$as_echo "#define HAVE_FREXP 1" >>confdefs.h
+
+  fi
+
+
+
+
+  GL_GNULIB_ACOSF=0
+
+
+
+  GL_GNULIB_ACOSL=0
+
+
+
+  GL_GNULIB_ASINF=0
+
+
+
+  GL_GNULIB_ASINL=0
+
+
+
+  GL_GNULIB_ATANF=0
+
+
+
+  GL_GNULIB_ATANL=0
+
+
+
+  GL_GNULIB_ATAN2F=0
+
+
+
+  GL_GNULIB_CBRT=0
+
+
+
+  GL_GNULIB_CBRTF=0
+
+
+
+  GL_GNULIB_CBRTL=0
+
+
+
+  GL_GNULIB_CEIL=0
+
+
+
+  GL_GNULIB_CEILF=0
+
+
+
+  GL_GNULIB_CEILL=0
+
+
+
+  GL_GNULIB_COPYSIGN=0
+
+
+
+  GL_GNULIB_COPYSIGNF=0
+
+
+
+  GL_GNULIB_COPYSIGNL=0
+
+
+
+  GL_GNULIB_COSF=0
+
+
+
+  GL_GNULIB_COSL=0
+
+
+
+  GL_GNULIB_COSHF=0
+
+
+
+  GL_GNULIB_EXPF=0
+
+
+
+  GL_GNULIB_EXPL=0
+
+
+
+  GL_GNULIB_EXP2=0
+
+
+
+  GL_GNULIB_EXP2F=0
+
+
+
+  GL_GNULIB_EXP2L=0
+
+
+
+  GL_GNULIB_EXPM1=0
+
+
+
+  GL_GNULIB_EXPM1F=0
+
+
+
+  GL_GNULIB_EXPM1L=0
+
+
+
+  GL_GNULIB_FABSF=0
+
+
+
+  GL_GNULIB_FABSL=0
+
+
+
+  GL_GNULIB_FLOOR=0
+
+
+
+  GL_GNULIB_FLOORF=0
+
+
+
+  GL_GNULIB_FLOORL=0
+
+
+
+  GL_GNULIB_FMA=0
+
+
+
+  GL_GNULIB_FMAF=0
+
+
+
+  GL_GNULIB_FMAL=0
+
+
+
+  GL_GNULIB_FMOD=0
+
+
+
+  GL_GNULIB_FMODF=0
+
+
+
+  GL_GNULIB_FMODL=0
+
+
+
+  GL_GNULIB_FREXPF=0
+
+
+
+  GL_GNULIB_FREXP=0
+
+
+
+  GL_GNULIB_FREXPL=0
+
+
+
+  GL_GNULIB_HYPOT=0
+
+
+
+  GL_GNULIB_HYPOTF=0
+
+
+
+  GL_GNULIB_HYPOTL=0
+
+
+
+  GL_GNULIB_ILOGB=0
+
+
+
+  GL_GNULIB_ILOGBF=0
+
+
+
+  GL_GNULIB_ILOGBL=0
+
+
+
+  GL_GNULIB_ISFINITE=0
+
+
+
+  GL_GNULIB_ISINF=0
+
+
+
+  GL_GNULIB_ISNAN=0
+
+
+
+  GL_GNULIB_ISNANF=0
+
+
+
+  GL_GNULIB_ISNAND=0
+
+
+
+  GL_GNULIB_ISNANL=0
+
+
+
+  GL_GNULIB_LDEXPF=0
+
+
+
+  GL_GNULIB_LDEXPL=0
+
+
+
+  GL_GNULIB_LOG=0
+
+
+
+  GL_GNULIB_LOGF=0
+
+
+
+  GL_GNULIB_LOGL=0
+
+
+
+  GL_GNULIB_LOG10=0
+
+
+
+  GL_GNULIB_LOG10F=0
+
+
+
+  GL_GNULIB_LOG10L=0
+
+
+
+  GL_GNULIB_LOG1P=0
+
+
+
+  GL_GNULIB_LOG1PF=0
+
+
+
+  GL_GNULIB_LOG1PL=0
+
+
+
+  GL_GNULIB_LOG2=0
+
+
+
+  GL_GNULIB_LOG2F=0
+
+
+
+  GL_GNULIB_LOG2L=0
+
+
+
+  GL_GNULIB_LOGB=0
+
+
+
+  GL_GNULIB_LOGBF=0
+
+
+
+  GL_GNULIB_LOGBL=0
+
+
+
+  GL_GNULIB_MODF=0
+
+
+
+  GL_GNULIB_MODFF=0
+
+
+
+  GL_GNULIB_MODFL=0
+
+
+
+  GL_GNULIB_POWF=0
+
+
+
+  GL_GNULIB_REMAINDER=0
+
+
+
+  GL_GNULIB_REMAINDERF=0
+
+
+
+  GL_GNULIB_REMAINDERL=0
+
+
+
+  GL_GNULIB_RINT=0
+
+
+
+  GL_GNULIB_RINTF=0
+
+
+
+  GL_GNULIB_RINTL=0
+
+
+
+  GL_GNULIB_ROUND=0
+
+
+
+  GL_GNULIB_ROUNDF=0
+
+
+
+  GL_GNULIB_ROUNDL=0
+
+
+
+  GL_GNULIB_SIGNBIT=0
+
+
+
+  GL_GNULIB_SINF=0
+
+
+
+  GL_GNULIB_SINL=0
+
+
+
+  GL_GNULIB_SINHF=0
+
+
+
+  GL_GNULIB_SQRTF=0
+
+
+
+  GL_GNULIB_SQRTL=0
+
+
+
+  GL_GNULIB_TANF=0
+
+
+
+  GL_GNULIB_TANL=0
+
+
+
+  GL_GNULIB_TANHF=0
+
+
+
+  GL_GNULIB_TRUNC=0
+
+
+
+  GL_GNULIB_TRUNCF=0
+
+
+
+  GL_GNULIB_TRUNCL=0
+
+
+
+  GL_GNULIB_MDA_J0=1
+
+
+
+  GL_GNULIB_MDA_J1=1
+
+
+
+  GL_GNULIB_MDA_JN=1
+
+
+
+  GL_GNULIB_MDA_Y0=1
+
+
+
+  GL_GNULIB_MDA_Y1=1
+
+
+
+  GL_GNULIB_MDA_YN=1
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
+$as_echo_n "checking whether long double and double are the same... " >&6; }
+if ${gl_cv_long_double_equals_double+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <float.h>
+int
+main ()
+{
+typedef int check[sizeof (long double) == sizeof (double)
+                              && LDBL_MANT_DIG == DBL_MANT_DIG
+                              && LDBL_MAX_EXP == DBL_MAX_EXP
+                              && LDBL_MIN_EXP == DBL_MIN_EXP
+                              ? 1 : -1];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_long_double_equals_double=yes
+else
+  gl_cv_long_double_equals_double=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
+$as_echo "$gl_cv_long_double_equals_double" >&6; }
+  if test $gl_cv_long_double_equals_double = yes; then
+
+$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
+
+    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
+  else
+    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
+  fi
+
+
+
+
+
+
+
+
+      ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = xyes; then :
+
+else
+  HAVE_DECL_FREXPL=0
+fi
+
+
+  FREXPL_LIBM=
+  if test $HAVE_DECL_FREXPL = 1; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
+if ${gl_cv_func_frexpl_no_libm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+             long double x;
+int
+main ()
+{
+int e; return frexpl (x, &e) > 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_frexpl_no_libm=yes
+else
+  gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+
+    if test $gl_cv_func_frexpl_no_libm = no; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
+$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
+if ${gl_cv_func_frexpl_in_libm+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+          save_LIBS="$LIBS"
+          LIBS="$LIBS -lm"
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+                 long double x;
+int
+main ()
+{
+int e; return frexpl (x, &e) > 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_frexpl_in_libm=yes
+else
+  gl_cv_func_frexpl_in_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
+$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
+      if test $gl_cv_func_frexpl_in_libm = yes; then
+        FREXPL_LIBM=-lm
+      fi
+    fi
+    if test $gl_cv_func_frexpl_no_libm = yes \
+       || test $gl_cv_func_frexpl_in_libm = yes; then
+      save_LIBS="$LIBS"
+      LIBS="$LIBS $FREXPL_LIBM"
+
+
+     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if ${gl_cv_func_frexpl_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      if test "$cross_compiling" = yes; then :
+
+         case "$host_os" in
+           aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
+              gl_cv_func_frexpl_works="guessing no";;
+           *) gl_cv_func_frexpl_works="guessing yes";;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h.  */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+#endif
+#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP    (-16381)
+#endif
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+#  undef LDBL_MIN_EXP
+#  define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+long double frexpl (long double, int *);
+long double zero = 0.0L;
+int main()
+{
+  int result = 0;
+  volatile long double x;
+  /* Test on finite numbers that fails on AIX 5.1.  */
+  x = 16.0L;
+  {
+    int exp = -9999;
+    frexpl (x, &exp);
+    if (exp != 5)
+      result |= 1;
+  }
+  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
+     function returns an invalid (incorrectly normalized) value: it returns
+               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+     but the correct result is
+          0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
+  x = 1.01L;
+  {
+    int exp = -9999;
+    long double y = frexpl (x, &exp);
+    if (!(exp == 1 && y == 0.505L))
+      result |= 2;
+  }
+  /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
+     LDBL_MAX_EXP = 16384.
+     In the loop end test, we test x against Infinity, rather than comparing
+     i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
+  {
+    int i;
+    for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+      {
+        int exp = -9999;
+        frexpl (x, &exp);
+        if (exp != i)
+          {
+            result |= 4;
+            break;
+          }
+      }
+  }
+  /* Test on denormalized numbers.  */
+  {
+    int i;
+    for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+      ;
+    if (x > 0.0L)
+      {
+        int exp;
+        long double y = frexpl (x, &exp);
+        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
+        if (exp != LDBL_MIN_EXP - 1)
+          result |= 8;
+      }
+  }
+  /* Test on infinite numbers.  */
+  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
+  x = 1.0L / zero;
+  {
+    int exp;
+    long double y = frexpl (x, &exp);
+    if (y != x)
+      result |= 16;
+  }
+  return result;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_frexpl_works=yes
+else
+  gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+      LIBS="$save_LIBS"
+      case "$gl_cv_func_frexpl_works" in
+        *yes) gl_func_frexpl=yes ;;
+        *)    gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
+      esac
+    else
+      gl_func_frexpl=no
+    fi
+    if test $gl_func_frexpl = yes; then
+
+$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
+
+    fi
+  fi
+  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
+        if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+
+      FREXPL_LIBM="$FREXP_LIBM"
+    else
+      FREXPL_LIBM=
+    fi
+  fi
+
+
+
+    HAVE_FCHMODAT=1;
+  HAVE_FSTATAT=1;
+  HAVE_FUTIMENS=1;
+  HAVE_GETUMASK=1;
+  HAVE_LCHMOD=1;
+  HAVE_LSTAT=1;
+  HAVE_MKDIRAT=1;
+  HAVE_MKFIFO=1;
+  HAVE_MKFIFOAT=1;
+  HAVE_MKNOD=1;
+  HAVE_MKNODAT=1;
+  HAVE_UTIMENSAT=1;
+  REPLACE_FCHMODAT=0;
+  REPLACE_FSTAT=0;
+  REPLACE_FSTATAT=0;
+  REPLACE_FUTIMENS=0;
+  REPLACE_LSTAT=0;
+  REPLACE_MKDIR=0;
+  REPLACE_MKFIFO=0;
+  REPLACE_MKFIFOAT=0;
+  REPLACE_MKNOD=0;
+  REPLACE_MKNODAT=0;
+  REPLACE_STAT=0;
+  REPLACE_UTIMENSAT=0;
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if ${ac_cv_header_stat_broken+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stat_broken=no
+else
+  ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+
+
+
+
+  case "$host_os" in
+    mingw*)
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
+$as_echo_n "checking for 64-bit off_t... " >&6; }
+if ${gl_cv_type_off_t_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_off_t_64=yes
+else
+  gl_cv_type_off_t_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
+$as_echo "$gl_cv_type_off_t_64" >&6; }
+      if test $gl_cv_type_off_t_64 = no; then
+        WINDOWS_64_BIT_OFF_T=1
+      else
+        WINDOWS_64_BIT_OFF_T=0
+      fi
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
+$as_echo_n "checking for 64-bit st_size... " >&6; }
+if ${gl_cv_member_st_size_64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+                struct stat buf;
+                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_member_st_size_64=yes
+else
+  gl_cv_member_st_size_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
+$as_echo "$gl_cv_member_st_size_64" >&6; }
+      if test $gl_cv_member_st_size_64 = no; then
+        WINDOWS_64_BIT_ST_SIZE=1
+      else
+        WINDOWS_64_BIT_ST_SIZE=0
+      fi
+      ;;
+    *)
+                                                      WINDOWS_64_BIT_OFF_T=0
+      WINDOWS_64_BIT_ST_SIZE=0
+      ;;
+  esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if ${gl_cv_next_sys_stat_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_stat_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/stat.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_stat_h
+          gl_cv_next_sys_stat_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+     fi
+     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/stat.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+    WINDOWS_STAT_TIMESPEC=0
+
+
+
+
+
+
+
+
+      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = xyes; then :
+
+else
+
+$as_echo "#define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+
+
+  case "$host_os" in
+    mingw*)
+      for ac_header in sdkddkver.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
+if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SDKDDKVER_H 1
+_ACEOF
+
+fi
+
+done
+
+      ;;
+  esac
+
+
+
+
+
+
+
+  GL_GNULIB_FCHMODAT=0
+
+
+
+  GL_GNULIB_FSTAT=0
+
+
+
+  GL_GNULIB_FSTATAT=0
+
+
+
+  GL_GNULIB_FUTIMENS=0
+
+
+
+  GL_GNULIB_GETUMASK=0
+
+
+
+  GL_GNULIB_LCHMOD=0
+
+
+
+  GL_GNULIB_LSTAT=0
+
+
+
+  GL_GNULIB_MKDIR=0
+
+
+
+  GL_GNULIB_MKDIRAT=0
+
+
+
+  GL_GNULIB_MKFIFO=0
+
+
+
+  GL_GNULIB_MKFIFOAT=0
+
+
+
+  GL_GNULIB_MKNOD=0
+
+
+
+  GL_GNULIB_MKNODAT=0
+
+
+
+  GL_GNULIB_STAT=0
+
+
+
+  GL_GNULIB_UTIMENSAT=0
+
+
+
+  GL_GNULIB_OVERRIDES_STRUCT_STAT=0
+
+
+
+  GL_GNULIB_MDA_CHMOD=1
+
+
+
+  GL_GNULIB_MDA_MKDIR=1
+
+
+
+  GL_GNULIB_MDA_UMASK=1
+
+
+
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
+$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
+if ${gl_cv_func_getcwd_null+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                           # Guess yes on glibc systems.
+            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
+                           # Guess yes on musl systems.
+            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
+                           # Guess yes on Cygwin.
+            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
+                           # If we don't know, obey --enable-cross-guesses.
+            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
+          esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#       include <stdlib.h>
+#        if HAVE_UNISTD_H
+#         include <unistd.h>
+#        else /* on Windows with MSVC */
+#         include <direct.h>
+#        endif
+
+
+$gl_mda_defines
+
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
+
+int
+main ()
+{
+
+#if defined _WIN32 && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but _getcwd does allocate.
+   However, mingw fails to honor non-zero size.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 { free (f); return 3; }
+               if (f[1] != '\0')
+                 { free (f); return 4; }
+               free (f);
+               return 0;
+             }
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getcwd_null=yes
+else
+  gl_cv_func_getcwd_null=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
+$as_echo "$gl_cv_func_getcwd_null" >&6; }
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
+$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
+if ${gl_cv_func_getcwd_posix_signature+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
+
+
+$gl_mda_defines
+
+int
+main ()
+{
+extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           char *getcwd (char *, size_t);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_getcwd_posix_signature=yes
+else
+  gl_cv_func_getcwd_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
+$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
+
+ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getcwd" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCWD $ac_have_decl
+_ACEOF
+
+
+    HAVE_DECL_FCLOSEALL=1;
+  HAVE_DECL_FPURGE=1;
+  HAVE_DECL_FSEEKO=1;
+  HAVE_DECL_FTELLO=1;
+  HAVE_DECL_GETDELIM=1;
+  HAVE_DECL_GETLINE=1;
+  HAVE_DECL_OBSTACK_PRINTF=1;
+  HAVE_DECL_SNPRINTF=1;
+  HAVE_DECL_VSNPRINTF=1;
+  HAVE_DPRINTF=1;
+  HAVE_FSEEKO=1;
+  HAVE_FTELLO=1;
+  HAVE_PCLOSE=1;
+  HAVE_POPEN=1;
+  HAVE_RENAMEAT=1;
+  HAVE_VASPRINTF=1;
+  HAVE_VDPRINTF=1;
+  REPLACE_DPRINTF=0;
+  REPLACE_FCLOSE=0;
+  REPLACE_FDOPEN=0;
+  REPLACE_FFLUSH=0;
+  REPLACE_FOPEN=0;
+  REPLACE_FOPEN_FOR_FOPEN_GNU=0;
+  REPLACE_FPRINTF=0;
+  REPLACE_FPURGE=0;
+  REPLACE_FREOPEN=0;
+  REPLACE_FSEEK=0;
+  REPLACE_FSEEKO=0;
+  REPLACE_FTELL=0;
+  REPLACE_FTELLO=0;
+  REPLACE_GETDELIM=0;
+  REPLACE_GETLINE=0;
+  REPLACE_OBSTACK_PRINTF=0;
+  REPLACE_PERROR=0;
+  REPLACE_POPEN=0;
+  REPLACE_PRINTF=0;
+  REPLACE_REMOVE=0;
+  REPLACE_RENAME=0;
+  REPLACE_RENAMEAT=0;
+  REPLACE_SNPRINTF=0;
+  REPLACE_SPRINTF=0;
+  REPLACE_STDIO_READ_FUNCS=0;
+  REPLACE_STDIO_WRITE_FUNCS=0;
+  REPLACE_TMPFILE=0;
+  REPLACE_VASPRINTF=0;
+  REPLACE_VDPRINTF=0;
+  REPLACE_VFPRINTF=0;
+  REPLACE_VPRINTF=0;
+  REPLACE_VSNPRINTF=0;
+  REPLACE_VSPRINTF=0;
+
+ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdelim" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM $ac_have_decl
+_ACEOF
+
+
+
+
+
+  GL_GNULIB_DPRINTF=0
+
+
+
+  GL_GNULIB_FCLOSE=0
+
+
+
+  GL_GNULIB_FDOPEN=0
+
+
+
+  GL_GNULIB_FFLUSH=0
+
+
+
+  GL_GNULIB_FGETC=0
+
+
+
+  GL_GNULIB_FGETS=0
+
+
+
+  GL_GNULIB_FOPEN=0
+
+
+
+  GL_GNULIB_FOPEN_GNU=0
+
+
+
+  GL_GNULIB_FPRINTF=0
+
+
+
+  GL_GNULIB_FPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_FPURGE=0
+
+
+
+  GL_GNULIB_FPUTC=0
+
+
+
+  GL_GNULIB_FPUTS=0
+
+
+
+  GL_GNULIB_FREAD=0
+
+
+
+  GL_GNULIB_FREOPEN=0
+
+
+
+  GL_GNULIB_FSCANF=0
+
+
+
+  GL_GNULIB_FSEEK=0
+
+
+
+  GL_GNULIB_FSEEKO=0
+
+
+
+  GL_GNULIB_FTELL=0
+
+
+
+  GL_GNULIB_FTELLO=0
+
+
+
+  GL_GNULIB_FWRITE=0
+
+
+
+  GL_GNULIB_GETC=0
+
+
+
+  GL_GNULIB_GETCHAR=0
+
+
+
+  GL_GNULIB_GETDELIM=0
+
+
+
+  GL_GNULIB_GETLINE=0
+
+
+
+  GL_GNULIB_OBSTACK_PRINTF=0
+
+
+
+  GL_GNULIB_OBSTACK_PRINTF_POSIX=0
+
+
+
+  GL_GNULIB_PCLOSE=0
+
+
+
+  GL_GNULIB_PERROR=0
+
+
+
+  GL_GNULIB_POPEN=0
+
+
+
+  GL_GNULIB_PRINTF=0
+
+
+
+  GL_GNULIB_PRINTF_POSIX=0
+
+
+
+  GL_GNULIB_PUTC=0
+
+
+
+  GL_GNULIB_PUTCHAR=0
+
+
+
+  GL_GNULIB_PUTS=0
+
+
+
+  GL_GNULIB_REMOVE=0
+
+
+
+  GL_GNULIB_RENAME=0
+
+
+
+  GL_GNULIB_RENAMEAT=0
+
+
+
+  GL_GNULIB_SCANF=0
+
+
+
+  GL_GNULIB_SNPRINTF=0
+
+
+
+  GL_GNULIB_SPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_STDIO_H_NONBLOCKING=0
+
+
+
+  GL_GNULIB_STDIO_H_SIGPIPE=0
+
+
+
+  GL_GNULIB_TMPFILE=0
+
+
+
+  GL_GNULIB_VASPRINTF=0
+
+
+
+  GL_GNULIB_VFSCANF=0
+
+
+
+  GL_GNULIB_VSCANF=0
+
+
+
+  GL_GNULIB_VDPRINTF=0
+
+
+
+  GL_GNULIB_VFPRINTF=0
+
+
+
+  GL_GNULIB_VFPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_VPRINTF=0
+
+
+
+  GL_GNULIB_VPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_VSNPRINTF=0
+
+
+
+  GL_GNULIB_VSPRINTF_POSIX=0
+
+
+
+  GL_GNULIB_MDA_FCLOSEALL=1
+
+
+
+  GL_GNULIB_MDA_FDOPEN=1
+
+
+
+  GL_GNULIB_MDA_FILENO=1
+
+
+
+  GL_GNULIB_MDA_GETW=1
+
+
+
+  GL_GNULIB_MDA_PUTW=1
+
+
+
+  GL_GNULIB_MDA_TEMPNAM=1
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getline" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN_R $ac_have_decl
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getlogin" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN $ac_have_decl
+_ACEOF
+
+
+
+  case $host_os in
+    mingw*)
+      LIB_GETLOGIN='-ladvapi32' ;;
+    *)
+      LIB_GETLOGIN= ;;
+  esac
+
+
+
+
+
+
+
+    HAVE_GETRANDOM=1;
+  REPLACE_GETRANDOM=0;
+
+
+
+
+
+  GL_GNULIB_GETRANDOM=0
+
+
+
+
+    HAVE_GETTIMEOFDAY=1;
+  HAVE_STRUCT_TIMEVAL=1;
+  HAVE_SYS_TIME_H=1;
+  REPLACE_GETTIMEOFDAY=0;
+  REPLACE_STRUCT_TIMEVAL=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_time_h='<'sys/time.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if ${gl_cv_next_sys_time_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_time_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/time.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_time_h
+          gl_cv_next_sys_time_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_time_h='<'sys/time.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+     fi
+     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
+  fi
+
+
+
+
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if ${gl_cv_sys_struct_timeval+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+            #if HAVE_WINSOCK2_H
+            # include <winsock2.h>
+            #endif
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval=yes
+else
+  gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  else
+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
+$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
+if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+               #include <sys/time.h>
+              #endif
+              #include <time.h>
+              #if HAVE_WINSOCK2_H
+              # include <winsock2.h>
+              #endif
+
+int
+main ()
+{
+static struct timeval x;
+              typedef int verify_tv_sec_type[
+                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+              ];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval_tv_sec=yes
+else
+  gl_cv_sys_struct_timeval_tv_sec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
+$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
+    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
+      REPLACE_STRUCT_TIMEVAL=1
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_GETTIMEOFDAY=0
+
+
+
+
+    HAVE_GLOB=1;
+  HAVE_GLOB_PATTERN_P=1;
+  REPLACE_GLOB=0;
+  REPLACE_GLOB_PATTERN_P=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_glob_h='<'glob.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
+$as_echo_n "checking absolute name of <glob.h>... " >&6; }
+if ${gl_cv_next_glob_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_glob_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <glob.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'glob.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_glob_h
+          gl_cv_next_glob_h='"'$gl_header'"'
+          else
+               gl_cv_next_glob_h='<'glob.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
+$as_echo "$gl_cv_next_glob_h" >&6; }
+     fi
+     NEXT_GLOB_H=$gl_cv_next_glob_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'glob.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_glob_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
+
+
+
+
+
+  if test $ac_cv_header_glob_h = yes; then
+    HAVE_GLOB_H=1
+  else
+    HAVE_GLOB_H=0
+  fi
+
+
+  GL_GENERATE_GLOB_H=false
+     if false; then
+              GL_GENERATE_GLOB_H=true
+     else
+       if test $ac_cv_header_glob_h != yes; then
+                  GL_GENERATE_GLOB_H=true
+       fi
+     fi
+
+
+
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_GLOB=0
+
+
+
+
+
+
+
+
+
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  gl_have_pthread_h=yes
+else
+  gl_have_pthread_h=no
+fi
+
+
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
+
+int
+main ()
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:13816: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:13817: LIBPTHREAD=$LIBPTHREAD" >&5
+
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_pthread_in_glibc=yes
+fi
+rm -f conftest*
+
+          ;;
+      esac
+      echo "$as_me:13842: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+
+      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+      # since it is defined as a macro on OSF/1.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
+
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+
+             esac
+           fi
+
+fi
+
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
+fi
+
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_kill=yes
+else
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
+fi
+
+        fi
+      fi
+      echo "$as_me:13996: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
+$as_echo_n "checking whether POSIX threads API is available... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+$as_echo "$gl_pthread_api" >&6; }
+
+
+    if test $gl_pthread_api = yes; then
+
+$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
+
+    fi
+
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main ()
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIB_SCHED_YIELD=
+
+else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sched_yield=yes
+else
+  ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lrt
+else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
+if ${ac_cv_lib_posix4_sched_yield+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix4_sched_yield=yes
+else
+  ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
+if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lposix4
+fi
+
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+
+    gl_pthreadlib_body_done=done
+  fi
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
+$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
+if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$host_os" in
+       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
+       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+         gl_cv_func_setlocale_null_all_mtsafe=no ;;
+       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
+       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
+$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_all_mtsafe" in
+    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
+_ACEOF
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
+$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
+if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$host_os" in
+       # Guess no on OpenBSD, AIX.
+       openbsd* | aix*)
+         gl_cv_func_setlocale_null_one_mtsafe=no ;;
+       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
+       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
+       # If we don't know, obey --enable-cross-guesses.
+       *)
+         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
+$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
+    case "$host_os" in
+    mingw*) ;;
+    *)
+      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
+      fi
+      ;;
+  esac
+  case "$gl_cv_func_setlocale_null_one_mtsafe" in
+    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
+    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
+_ACEOF
+
+
+    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+    case "$host_os" in
+      mingw*) LIB_SETLOCALE_NULL= ;;
+      *)
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
+$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
+if ${gl_cv_have_weak+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$host_os" in
+       cygwin*)
+                                    gl_cv_have_weak="guessing no"
+         ;;
+       *)
+         gl_cv_have_weak=no
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern void xyzzy ();
+#pragma weak xyzzy
+int
+main ()
+{
+xyzzy();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_have_weak=maybe
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+         if test $gl_cv_have_weak = maybe; then
+                                 if test "$cross_compiling" = yes; then :
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __ELF__
+                 Extensible Linking Format
+                 #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
+  gl_cv_have_weak="guessing yes"
+else
+  gl_cv_have_weak="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+  return (fputs == NULL);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_have_weak=yes
+else
+  gl_cv_have_weak=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+         fi
+         ;;
+     esac
+          case " $LDFLAGS " in
+       *" -static "*) gl_cv_have_weak=no ;;
+     esac
+                    case "$gl_cv_have_weak" in
+       *yes)
+         case "$host_os" in
+           freebsd* | dragonfly* | midnightbsd*)
+             : > conftest1.c
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
+             cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+  return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
+               || gl_cv_have_weak=no
+             rm -f conftest1.c libempty.so conftest2.c conftest
+             ;;
+         esac
+         ;;
+     esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
+$as_echo "$gl_cv_have_weak" >&6; }
+  case "$gl_cv_have_weak" in
+    *yes)
+
+$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
+
+      ;;
+  esac
+
+        case "$gl_cv_have_weak" in
+          *yes) LIB_SETLOCALE_NULL= ;;
+          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+        esac
+        ;;
+    esac
+  else
+    LIB_SETLOCALE_NULL=
+  fi
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
+$as_echo_n "checking for IPv4 sockets... " >&6; }
+if ${gl_cv_socket_ipv4+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+int
+main ()
+{
+int x = AF_INET; struct in_addr y; struct sockaddr_in z;
+ if (&x && &y && &z) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_socket_ipv4=yes
+else
+  gl_cv_socket_ipv4=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
+$as_echo "$gl_cv_socket_ipv4" >&6; }
+  if test $gl_cv_socket_ipv4 = yes; then
+
+$as_echo "#define HAVE_IPV4 1" >>confdefs.h
+
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
+$as_echo_n "checking for IPv6 sockets... " >&6; }
+if ${gl_cv_socket_ipv6+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+int
+main ()
+{
+int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
+ if (&x && &y && &z) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_socket_ipv6=yes
+else
+  gl_cv_socket_ipv6=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
+$as_echo "$gl_cv_socket_ipv6" >&6; }
+  if test $gl_cv_socket_ipv6 = yes; then
+
+$as_echo "#define HAVE_IPV6 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_limits_h='<'limits.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+$as_echo_n "checking absolute name of <limits.h>... " >&6; }
+if ${gl_cv_next_limits_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_limits_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'limits.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_limits_h
+          gl_cv_next_limits_h='"'$gl_header'"'
+          else
+               gl_cv_next_limits_h='<'limits.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+$as_echo "$gl_cv_next_limits_h" >&6; }
+     fi
+     NEXT_LIMITS_H=$gl_cv_next_limits_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'limits.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_limits_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has WORD_BIT, BOOL_WIDTH etc." >&5
+$as_echo_n "checking whether limits.h has WORD_BIT, BOOL_WIDTH etc.... " >&6; }
+if ${gl_cv_header_limits_width+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+            #endif
+            #include <limits.h>
+            long long llm = LLONG_MAX;
+            int wb = WORD_BIT;
+            int ullw = ULLONG_WIDTH;
+            int bw = BOOL_WIDTH;
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_limits_width=yes
+else
+  gl_cv_header_limits_width=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
+$as_echo "$gl_cv_header_limits_width" >&6; }
+  if test "$gl_cv_header_limits_width" = yes; then
+    GL_GENERATE_LIMITS_H=false
+  else
+    GL_GENERATE_LIMITS_H=true
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if ${gt_cv_c_wint_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+            wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wint_t=yes
+else
+  gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+  if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
+$as_echo_n "checking whether wint_t is large enough... " >&6; }
+if ${gl_cv_type_wint_t_large_enough+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wint_t_large_enough=yes
+else
+  gl_cv_type_wint_t_large_enough=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
+$as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
+    if test $gl_cv_type_wint_t_large_enough = no; then
+      GNULIBHEADERS_OVERRIDE_WINT_T=1
+    else
+      GNULIBHEADERS_OVERRIDE_WINT_T=0
+    fi
+  else
+    GNULIBHEADERS_OVERRIDE_WINT_T=0
+  fi
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
+$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
+if ${gl_cv_c_multiarch+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_c_multiarch=no
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+            not a universal capable compiler
+           #endif
+           typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+                        arch=
+        prev=
+        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+          if test -n "$prev"; then
+            case $word in
+              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
+                if test -z "$arch" || test "$arch" = "$word"; then
+                  arch="$word"
+                else
+                  gl_cv_c_multiarch=yes
+                fi
+                ;;
+            esac
+            prev=
+          else
+            if test "x$word" = "x-arch"; then
+              prev=arch
+            fi
+          fi
+        done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
+$as_echo "$gl_cv_c_multiarch" >&6; }
+  if test $gl_cv_c_multiarch = yes; then
+    APPLE_UNIVERSAL_BUILD=1
+  else
+    APPLE_UNIVERSAL_BUILD=0
+  fi
+
+
+
+
+
+
+
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+
+
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
+
+
+
+  if test $ac_cv_header_inttypes_h = yes; then
+    HAVE_INTTYPES_H=1
+  else
+    HAVE_INTTYPES_H=0
+  fi
+
+
+
+  if test $ac_cv_header_sys_types_h = yes; then
+    HAVE_SYS_TYPES_H=1
+  else
+    HAVE_SYS_TYPES_H=0
+  fi
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdint_h='<'stdint.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if ${gl_cv_next_stdint_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_stdint_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdint.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_stdint_h
+          gl_cv_next_stdint_h='"'$gl_header'"'
+          else
+               gl_cv_next_stdint_h='<'stdint.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+     fi
+     NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdint.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdint_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_stdint_h = yes; then
+    HAVE_STDINT_H=1
+  else
+    HAVE_STDINT_H=0
+  fi
+
+
+    if test $ac_cv_header_stdint_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if ${gl_cv_header_working_stdint_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_working_stdint_h=no
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+/* Check that SIZE_MAX has the correct type, if possible.  */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
+       || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t) \
+  ((t) ((t) 0 < (t) -1 \
+        ? (t) -1 \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+struct s {
+  int check_PTRDIFF:
+      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+      ? 1 : -1;
+  /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64.  */
+  int check_SIG_ATOMIC:
+      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+      ? 1 : -1;
+  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+  int check_WCHAR:
+      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+      ? 1 : -1;
+  /* Detect bug in mingw.  */
+  int check_WINT:
+      WINT_MIN == TYPE_MINIMUM (wint_t)
+      && WINT_MAX == TYPE_MAXIMUM (wint_t)
+      ? 1 : -1;
+
+  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
+  int check_UINT8_C:
+        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+  int check_UINT16_C:
+        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
+#ifdef UINT8_MAX
+  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+                                                    if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                         # Guess yes on native Windows.
+                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
+                         # In general, assume it works.
+                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
+               esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
+#include <stdint.h>
+
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+  {
+#ifdef INT8_MAX
+    MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+    MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+    MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+    MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+    MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+    MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+    MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+    MVAL (UINT64_MAX),
+#endif
+    NULL
+  };
+
+int
+main ()
+{
+
+  const char **mv;
+  for (mv = macro_values; *mv != NULL; mv++)
+    {
+      const char *value = *mv;
+      /* Test whether it looks like a cast expression.  */
+      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+          || strncmp (value, "((int)"/*)*/, 6) == 0
+          || strncmp (value, "((signed short)"/*)*/, 15) == 0
+          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+        return mv - macro_values + 1;
+    }
+  return 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+  fi
+
+  HAVE_C99_STDINT_H=0
+  HAVE_SYS_BITYPES_H=0
+  HAVE_SYS_INTTYPES_H=0
+  GL_GENERATE_STDINT_H=true
+  case "$gl_cv_header_working_stdint_h" in
+    *yes)
+      HAVE_C99_STDINT_H=1
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
+$as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
+if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  gl_cv_header_stdint_without_STDC_macros=no
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_without_STDC_macros=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
+$as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
+
+      if test $gl_cv_header_stdint_without_STDC_macros = no; then
+
+$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
+
+
+$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
+
+      fi
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
+$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
+if ${gl_cv_header_stdint_width+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_cv_header_stdint_width=no
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <math.h>
-             double x;
+
+              /* Work if build is not clean.  */
+              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+              #endif
+              #include <stdint.h>
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              int iw = UINTMAX_WIDTH;
+
 int
 main ()
 {
-int e; return frexp (x, &e) > 0;
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_frexp_no_libm=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_stdint_width=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
+$as_echo "$gl_cv_header_stdint_width" >&6; }
+      if test "$gl_cv_header_stdint_width" = yes; then
+        GL_GENERATE_STDINT_H=false
+      fi
+      ;;
+    *)
+                  for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+      if test $ac_cv_header_sys_inttypes_h = yes; then
+        HAVE_SYS_INTTYPES_H=1
+      fi
+      if test $ac_cv_header_sys_bitypes_h = yes; then
+        HAVE_SYS_BITYPES_H=1
+      fi
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  gl_cv_func_frexp_no_libm=no
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+
+       eval gl_cv_bitsizeof_${gltype}=\$result
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
-$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
 
-ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
-if test "x$ac_cv_have_decl_alarm" = xyes; then :
-  ac_have_decl=1
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
+
+
+  fi
+
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_have_decl=0
+  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+#include <limits.h>"; then :
+
+else
+  result=unknown
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ALARM $ac_have_decl
+       eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_bitsizeof_${gltype}
+    if test $result = unknown; then
+                                                result=0
+    fi
+    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
 _ACEOF
 
+    eval BITSIZEOF_${GLTYPE}=\$result
+  done
 
 
 
-  FREXP_LIBM=
-  if test $gl_cv_func_frexp_no_libm = no; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
-$as_echo_n "checking whether frexp() can be used with libm... " >&6; }
-if ${gl_cv_func_frexp_in_libm+:} false; then :
+
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval \${gl_cv_type_${gltype}_signed+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-        save_LIBS="$LIBS"
-        LIBS="$LIBS -lm"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  result=yes
+else
+  result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval result=\$gl_cv_type_${gltype}_signed
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    if test "$result" = yes; then
+      cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+      eval HAVE_SIGNED_${GLTYPE}=1
+    else
+      eval HAVE_SIGNED_${GLTYPE}=0
+    fi
+  done
+
+
+  gl_cv_type_ptrdiff_t_signed=yes
+  gl_cv_type_size_t_signed=no
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+  for gltype in ptrdiff_t size_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
+         esac
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <math.h>
-               double x;
+
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
 int
 main ()
 {
-int e; return frexp (x, &e) > 0;
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_frexp_in_libm=yes
-else
-  gl_cv_func_frexp_in_libm=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        LIBS="$save_LIBS"
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
-$as_echo "$gl_cv_func_frexp_in_libm" >&6; }
-    if test $gl_cv_func_frexp_in_libm = yes; then
-      FREXP_LIBM=-lm
-    fi
-  fi
-  if test $gl_cv_func_frexp_no_libm = yes \
-     || test $gl_cv_func_frexp_in_libm = yes; then
-    save_LIBS="$LIBS"
-    LIBS="$LIBS $FREXP_LIBM"
-
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
 
+  done
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
-$as_echo_n "checking whether frexp works... " >&6; }
-if ${gl_cv_func_frexp_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-      if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-           netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
-           mingw*) # Guess yes with MSVC, no with mingw.
-             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  fi
 
-#ifdef _MSC_VER
- Good
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Good" >/dev/null 2>&1; then :
-  gl_cv_func_frexp_works="guessing yes"
+  for gltype in sig_atomic_t wchar_t wint_t ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  gl_cv_func_frexp_works="guessing no"
-fi
-rm -f conftest*
-
-             ;;
-           *) gl_cv_func_frexp_works="guessing yes" ;;
+  eval gl_cv_type_${gltype}_suffix=no
+       eval result=\$gl_cv_type_${gltype}_signed
+       if test "$result" = yes; then
+         glsufu=
+       else
+         glsufu=u
+       fi
+       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+         case $glsuf in
+           '')  gltype1='int';;
+           l)   gltype1='long int';;
+           ll)  gltype1='long long int';;
+           i64) gltype1='__int64';;
+           u)   gltype1='unsigned int';;
+           ul)  gltype1='unsigned long int';;
+           ull) gltype1='unsigned long long int';;
+           ui64)gltype1='unsigned __int64';;
          esac
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <float.h>
-#include <math.h>
-#include <string.h>
-#if HAVE_DECL_ALARM
-# include <signal.h>
-# include <unistd.h>
-#endif
-/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
-   ICC 10.0 has a bug when optimizing the expression -zero.
-   The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
-   to PowerPC on Mac OS X 10.5.  */
-#if defined __hpux || defined __sgi || defined __ICC
-static double
-compute_minus_zero (void)
-{
-  return -DBL_MIN * DBL_MIN;
-}
-# define minus_zero compute_minus_zero ()
-#else
-double minus_zero = -0.0;
-#endif
-int main()
+  #include <stddef.h>
+  #include <signal.h>
+  #if HAVE_WCHAR_H
+  # include <wchar.h>
+  #endif
+
+              extern $gltype foo;
+              extern $gltype1 foo;
+int
+main ()
 {
-  int result = 0;
-  int i;
-  volatile double x;
-  double zero = 0.0;
-#if HAVE_DECL_ALARM
-  /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
-     number.  Let the test fail in this case.  */
-  signal (SIGALRM, SIG_DFL);
-  alarm (5);
-#endif
-  /* Test on denormalized numbers.  */
-  for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
-    ;
-  if (x > 0.0)
-    {
-      int exp;
-      double y = frexp (x, &exp);
-      /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
-         On NetBSD: y = 0.75. Correct: y = 0.5.  */
-      if (y != 0.5)
-        result |= 1;
-    }
-  /* Test on infinite numbers.  */
-  x = 1.0 / zero;
-  {
-    int exp;
-    double y = frexp (x, &exp);
-    if (y != x)
-      result |= 2;
-  }
-  /* Test on negative zero.  */
-  x = minus_zero;
-  {
-    int exp;
-    double y = frexp (x, &exp);
-    if (memcmp (&y, &x, sizeof x))
-      result |= 4;
-  }
-  return result;
+
+  ;
+  return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_frexp_works=yes
-else
-  gl_cv_func_frexp_works=no
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval gl_cv_type_${gltype}_suffix=\$glsuf
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+         eval result=\$gl_cv_type_${gltype}_suffix
+         test "$result" != no && break
+       done
 fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+    eval result=\$gl_cv_type_${gltype}_suffix
+    test "$result" = no && result=
+    eval ${GLTYPE}_SUFFIX=\$result
+    cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
 
+  done
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
-$as_echo "$gl_cv_func_frexp_works" >&6; }
 
-    LIBS="$save_LIBS"
-    case "$gl_cv_func_frexp_works" in
-      *yes) gl_func_frexp=yes ;;
-      *)    gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
-    esac
-  else
-    gl_func_frexp=no
+
+          if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+    BITSIZEOF_WINT_T=32
   fi
-  if test $gl_func_frexp = yes; then
 
-$as_echo "#define HAVE_FREXP 1" >>confdefs.h
+      ;;
+  esac
 
-  fi
 
 
+  GL_GENERATE_LIMITS_H=true
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
-$as_echo_n "checking whether long double and double are the same... " >&6; }
-if ${gl_cv_long_double_equals_double+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <float.h>
-int
-main ()
-{
-typedef int check[sizeof (long double) == sizeof (double)
-                              && LDBL_MANT_DIG == DBL_MANT_DIG
-                              && LDBL_MAX_EXP == DBL_MAX_EXP
-                              && LDBL_MIN_EXP == DBL_MIN_EXP
-                              ? 1 : -1];
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_long_double_equals_double=yes
-else
-  gl_cv_long_double_equals_double=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
-$as_echo "$gl_cv_long_double_equals_double" >&6; }
-  if test $gl_cv_long_double_equals_double = yes; then
 
-$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
 
-    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
-  else
-    HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
-  fi
+
+
+    HAVE_DECL_IMAXABS=1;
+  HAVE_DECL_IMAXDIV=1;
+  HAVE_DECL_STRTOIMAX=1;
+  HAVE_DECL_STRTOUMAX=1;
+  HAVE_IMAXDIV_T=1;
+  REPLACE_STRTOIMAX=0;
+  REPLACE_STRTOUMAX=0;
+  INT32_MAX_LT_INTMAX_MAX=1;
+  INT64_MAX_EQ_LONG_MAX='defined _LP64';
+  PRIPTR_PREFIX=__PRIPTR_PREFIX;
+  UINT32_MAX_LT_UINTMAX_MAX=1;
+  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
+
+
+
 
 
 
@@ -10592,345 +15489,170 @@ $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
 
 
 
-      ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
-"
-if test "x$ac_cv_have_decl_frexpl" = xyes; then :
 
-else
-  HAVE_DECL_FREXPL=0
-fi
 
 
-  FREXPL_LIBM=
-  if test $HAVE_DECL_FREXPL = 1; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
-$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
-if ${gl_cv_func_frexpl_no_libm+:} false; then :
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_inttypes_h='<'inttypes.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
+if ${gl_cv_next_inttypes_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
-             long double x;
-int
-main ()
-{
-int e; return frexpl (x, &e) > 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_frexpl_no_libm=yes
-else
-  gl_cv_func_frexpl_no_libm=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+             if test $ac_cv_header_inttypes_h = yes; then
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
-$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
 
-    if test $gl_cv_func_frexpl_no_libm = no; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
-$as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
-if ${gl_cv_func_frexpl_in_libm+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-          save_LIBS="$LIBS"
-          LIBS="$LIBS -lm"
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <math.h>
-                 long double x;
-int
-main ()
-{
-int e; return frexpl (x, &e) > 0;
-  ;
-  return 0;
-}
+#include <inttypes.h>
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_frexpl_in_libm=yes
-else
-  gl_cv_func_frexpl_in_libm=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-          LIBS="$save_LIBS"
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'inttypes.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_inttypes_h
+          gl_cv_next_inttypes_h='"'$gl_header'"'
+          else
+               gl_cv_next_inttypes_h='<'inttypes.h'>'
+             fi
+
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
-$as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
-      if test $gl_cv_func_frexpl_in_libm = yes; then
-        FREXPL_LIBM=-lm
-      fi
-    fi
-    if test $gl_cv_func_frexpl_no_libm = yes \
-       || test $gl_cv_func_frexpl_in_libm = yes; then
-      save_LIBS="$LIBS"
-      LIBS="$LIBS $FREXPL_LIBM"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+$as_echo "$gl_cv_next_inttypes_h" >&6; }
+     fi
+     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'inttypes.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_inttypes_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
 
-     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
-$as_echo_n "checking whether frexpl works... " >&6; }
-if ${gl_cv_func_frexpl_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-      if test "$cross_compiling" = yes; then :
 
-         case "$host_os" in
-           aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
-              gl_cv_func_frexpl_works="guessing no";;
-           *) gl_cv_func_frexpl_works="guessing yes";;
-         esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <float.h>
-#include <math.h>
-/* Override the values of <float.h>, like done in float.in.h.  */
-#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP    (-16381)
-#endif
-#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP    (-16381)
-#endif
-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
-#endif
-#if defined __sgi && (LDBL_MANT_DIG >= 106)
-# if defined __GNUC__
-#  undef LDBL_MIN_EXP
-#  define LDBL_MIN_EXP DBL_MIN_EXP
-# endif
-#endif
-extern
-#ifdef __cplusplus
-"C"
-#endif
-long double frexpl (long double, int *);
-long double zero = 0.0L;
-int main()
-{
-  int result = 0;
-  volatile long double x;
-  /* Test on finite numbers that fails on AIX 5.1.  */
-  x = 16.0L;
-  {
-    int exp = -9999;
-    frexpl (x, &exp);
-    if (exp != 5)
-      result |= 1;
-  }
-  /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
-     function returns an invalid (incorrectly normalized) value: it returns
-               y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
-     but the correct result is
-          0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 }  */
-  x = 1.01L;
-  {
-    int exp = -9999;
-    long double y = frexpl (x, &exp);
-    if (!(exp == 1 && y == 0.505L))
-      result |= 2;
-  }
-  /* Test on large finite numbers.  This fails on BeOS at i = 16322, while
-     LDBL_MAX_EXP = 16384.
-     In the loop end test, we test x against Infinity, rather than comparing
-     i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP.  */
-  {
-    int i;
-    for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
-      {
-        int exp = -9999;
-        frexpl (x, &exp);
-        if (exp != i)
-          {
-            result |= 4;
-            break;
-          }
-      }
-  }
-  /* Test on denormalized numbers.  */
-  {
-    int i;
-    for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
-      ;
-    if (x > 0.0L)
-      {
-        int exp;
-        long double y = frexpl (x, &exp);
-        /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
-           exp = -16382, y = 0.5.  On Mac OS X 10.5: exp = -16384, y = 0.5.  */
-        if (exp != LDBL_MIN_EXP - 1)
-          result |= 8;
-      }
-  }
-  /* Test on infinite numbers.  */
-  /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0.  */
-  x = 1.0L / zero;
-  {
-    int exp;
-    long double y = frexpl (x, &exp);
-    if (y != x)
-      result |= 16;
-  }
-  return result;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_frexpl_works=yes
-else
-  gl_cv_func_frexpl_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
-$as_echo "$gl_cv_func_frexpl_works" >&6; }
 
-      LIBS="$save_LIBS"
-      case "$gl_cv_func_frexpl_works" in
-        *yes) gl_func_frexpl=yes ;;
-        *)    gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
-      esac
-    else
-      gl_func_frexpl=no
-    fi
-    if test $gl_func_frexpl = yes; then
 
-$as_echo "#define HAVE_FREXPL 1" >>confdefs.h
 
-    fi
-  fi
-  if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
-        if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
 
-      FREXPL_LIBM="$FREXP_LIBM"
-    else
-      FREXPL_LIBM=
-    fi
-  fi
 
 
 
-     GNULIB_FCHMODAT=0;
-  GNULIB_FSTAT=0;
-  GNULIB_FSTATAT=0;
-  GNULIB_FUTIMENS=0;
-  GNULIB_GETUMASK=0;
-  GNULIB_LCHMOD=0;
-  GNULIB_LSTAT=0;
-  GNULIB_MKDIR=0;
-  GNULIB_MKDIRAT=0;
-  GNULIB_MKFIFO=0;
-  GNULIB_MKFIFOAT=0;
-  GNULIB_MKNOD=0;
-  GNULIB_MKNODAT=0;
-  GNULIB_STAT=0;
-  GNULIB_UTIMENSAT=0;
-  GNULIB_OVERRIDES_STRUCT_STAT=0;
-    GNULIB_MDA_CHMOD=1;
-  GNULIB_MDA_MKDIR=1;
-  GNULIB_MDA_UMASK=1;
-    HAVE_FCHMODAT=1;
-  HAVE_FSTATAT=1;
-  HAVE_FUTIMENS=1;
-  HAVE_GETUMASK=1;
-  HAVE_LCHMOD=1;
-  HAVE_LSTAT=1;
-  HAVE_MKDIRAT=1;
-  HAVE_MKFIFO=1;
-  HAVE_MKFIFOAT=1;
-  HAVE_MKNOD=1;
-  HAVE_MKNODAT=1;
-  HAVE_UTIMENSAT=1;
-  REPLACE_FCHMODAT=0;
-  REPLACE_FSTAT=0;
-  REPLACE_FSTATAT=0;
-  REPLACE_FUTIMENS=0;
-  REPLACE_LSTAT=0;
-  REPLACE_MKDIR=0;
-  REPLACE_MKFIFO=0;
-  REPLACE_MKFIFOAT=0;
-  REPLACE_MKNOD=0;
-  REPLACE_MKNODAT=0;
-  REPLACE_STAT=0;
-  REPLACE_UTIMENSAT=0;
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
-$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
-if ${ac_cv_header_stat_broken+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <sys/stat.h>
 
-#if defined S_ISBLK && defined S_IFDIR
-extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
-#endif
+  PRIPTR_PREFIX=
+  if $GL_GENERATE_STDINT_H; then
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-#if defined S_ISBLK && defined S_IFCHR
-extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
-#endif
+         #ifdef _WIN64
+         LLP64
+         #endif
 
-#if defined S_ISLNK && defined S_IFREG
-extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
-#endif
+int
+main ()
+{
 
-#if defined S_ISSOCK && defined S_IFREG
-extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
-#endif
+  ;
+  return 0;
+}
 
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stat_broken=no
+  PRIPTR_PREFIX='"l"'
 else
-  ac_cv_header_stat_broken=yes
+  PRIPTR_PREFIX='"ll"'
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
-$as_echo "$ac_cv_header_stat_broken" >&6; }
-if test $ac_cv_header_stat_broken = yes; then
-
-$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+  else
+        for glpfx in '' l ll I64; do
+      case $glpfx in
+        '')  gltype1='int';;
+        l)   gltype1='long int';;
+        ll)  gltype1='long long int';;
+        I64) gltype1='__int64';;
+      esac
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
+           extern intptr_t foo;
+           extern $gltype1 foo;
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  PRIPTR_PREFIX='"'$glpfx'"'
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      test -n "$PRIPTR_PREFIX" && break
+    done
+  fi
 
 
 
-
-
-  case "$host_os" in
-    mingw*)
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
-$as_echo_n "checking for 64-bit off_t... " >&6; }
-if ${gl_cv_type_off_t_64+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined INT32_MAX && defined INTMAX_MAX
+             #define CONDITION (INT32_MAX < INTMAX_MAX)
+            #else
+             #define CONDITION (sizeof (int) < sizeof (long long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
 int
 main ()
 {
@@ -10940,31 +15662,47 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_off_t_64=yes
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
 else
-  gl_cv_type_off_t_64=no
+  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
-$as_echo "$gl_cv_type_off_t_64" >&6; }
-      if test $gl_cv_type_off_t_64 = no; then
-        WINDOWS_64_BIT_OFF_T=1
-      else
-        WINDOWS_64_BIT_OFF_T=0
-      fi
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
-$as_echo_n "checking for 64-bit st_size... " >&6; }
-if ${gl_cv_member_st_size_64+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+    INT32_MAX_LT_INTMAX_MAX=1;
+  else
+    INT32_MAX_LT_INTMAX_MAX=0;
+  fi
+
+
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-                struct stat buf;
-                int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
+
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined INT64_MAX
+             #define CONDITION (INT64_MAX == LONG_MAX)
+            #else
+             #define CONDITION (sizeof (long long int) == sizeof (long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
 int
 main ()
 {
@@ -10974,707 +15712,860 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_member_st_size_64=yes
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
 else
-  gl_cv_member_st_size_64=no
+  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
-$as_echo "$gl_cv_member_st_size_64" >&6; }
-      if test $gl_cv_member_st_size_64 = no; then
-        WINDOWS_64_BIT_ST_SIZE=1
-      else
-        WINDOWS_64_BIT_ST_SIZE=0
-      fi
-      ;;
-    *)
-                                                      WINDOWS_64_BIT_OFF_T=0
-      WINDOWS_64_BIT_ST_SIZE=0
-      ;;
-  esac
-
-
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+    INT64_MAX_EQ_LONG_MAX=1;
+  else
+    INT64_MAX_EQ_LONG_MAX=0;
+  fi
 
 
+  else
+    INT64_MAX_EQ_LONG_MAX=-1
+  fi
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
 
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined UINT32_MAX && defined UINTMAX_MAX
+             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+            #else
+             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+    UINT32_MAX_LT_UINTMAX_MAX=1;
+  else
+    UINT32_MAX_LT_UINTMAX_MAX=0;
+  fi
 
 
+  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
-$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
-if ${gl_cv_next_sys_stat_h+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-             if test $ac_cv_header_sys_stat_h = yes; then
-
-
-
-
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/stat.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/stat.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
+/* Work also in C++ mode.  */
+            #define __STDC_LIMIT_MACROS 1
 
-        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+            /* Work if build is not clean.  */
+            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
-           gl_header=$gl_cv_absolute_sys_stat_h
-           gl_cv_next_sys_stat_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-             fi
+            #include <limits.h>
+            #if HAVE_STDINT_H
+             #include <stdint.h>
+            #endif
 
+            #if defined UINT64_MAX
+             #define CONDITION (UINT64_MAX == ULONG_MAX)
+            #else
+             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+            #endif
+            int test[CONDITION ? 1 : -1];
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
-$as_echo "$gl_cv_next_sys_stat_h" >&6; }
-     fi
-     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/stat.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+    UINT64_MAX_EQ_ULONG_MAX=1;
+  else
+    UINT64_MAX_EQ_ULONG_MAX=0;
+  fi
 
 
+  else
+    UINT64_MAX_EQ_ULONG_MAX=-1
+  fi
 
 
 
 
-    WINDOWS_STAT_TIMESPEC=0
+  GL_GNULIB_IMAXABS=0
 
 
 
+  GL_GNULIB_IMAXDIV=0
 
 
 
+  GL_GNULIB_STRTOIMAX=0
 
 
-      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
-     #include <sys/stat.h>
-"
-if test "x$ac_cv_type_nlink_t" = xyes; then :
 
-else
+  GL_GNULIB_STRTOUMAX=0
 
-$as_echo "#define nlink_t int" >>confdefs.h
 
-fi
 
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if ${gl_cv_cc_double_expbit0+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
+      if test "$cross_compiling" = yes; then :
 
+                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#if defined arm || defined __arm || defined __arm__
+  mixed_endianness
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+  gl_cv_cc_double_expbit0="unknown"
+else
 
+                                                         :
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
 
-  case "$host_os" in
-    mingw*)
-      for ac_header in sdkddkver.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
-if test "x$ac_cv_header_sdkddkver_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SDKDDKVER_H 1
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
 
-done
-
-      ;;
-  esac
-
-
-
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
-$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
-if ${gl_cv_func_getcwd_null+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                           # Guess yes on glibc systems.
-            *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
-                           # Guess yes on musl systems.
-            *-musl*)       gl_cv_func_getcwd_null="guessing yes";;
-                           # Guess yes on Cygwin.
-            cygwin*)       gl_cv_func_getcwd_null="guessing yes";;
-                           # If we don't know, obey --enable-cross-guesses.
-            *)             gl_cv_func_getcwd_null="$gl_cross_guess_normal";;
-          esac
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <limits.h>
 
-#       include <stdlib.h>
-#        if HAVE_UNISTD_H
-#         include <unistd.h>
-#        else /* on Windows with MSVC */
-#         include <direct.h>
-#        endif
-
-
-$gl_mda_defines
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
 
-#        ifndef getcwd
-         char *getcwd ();
-#        endif
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
 int
 main ()
 {
-
-#if defined _WIN32 && ! defined __CYGWIN__
-/* mingw cwd does not start with '/', but _getcwd does allocate.
-   However, mingw fails to honor non-zero size.  */
-#else
-           if (chdir ("/") != 0)
-             return 1;
-           else
-             {
-               char *f = getcwd (NULL, 0);
-               if (! f)
-                 return 2;
-               if (f[0] != '/')
-                 { free (f); return 3; }
-               if (f[1] != '\0')
-                 { free (f); return 4; }
-               free (f);
-               return 0;
-             }
-#endif
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_getcwd_null=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
 else
-  gl_cv_func_getcwd_null=no
+  ac_cv_c_bigendian=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
 
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
-$as_echo "$gl_cv_func_getcwd_null" >&6; }
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
-$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
-if ${gl_cv_func_getcwd_posix_signature+:} false; then :
-  $as_echo_n "(cached) " >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <unistd.h>
-
-
-$gl_mda_defines
-
+$ac_includes_default
 int
 main ()
 {
-extern
-           #ifdef __cplusplus
-           "C"
-           #endif
-           char *getcwd (char *, size_t);
+
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
 
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_getcwd_posix_signature=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
 else
-  gl_cv_func_getcwd_posix_signature=no
+  ac_cv_c_bigendian=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
-$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
 
-ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getcwd" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+    fi
 fi
+:
+ case $ac_cv_c_bigendian in #(
+   yes)
+     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+   no)
+     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+   universal)
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETCWD $ac_have_decl
-_ACEOF
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
+     ;; #(
+   *)
+     gl_cv_cc_double_expbit0="unknown" ;;
+ esac
 
-  GNULIB_DPRINTF=0;
-  GNULIB_FCLOSE=0;
-  GNULIB_FDOPEN=0;
-  GNULIB_FFLUSH=0;
-  GNULIB_FGETC=0;
-  GNULIB_FGETS=0;
-  GNULIB_FOPEN=0;
-  GNULIB_FPRINTF=0;
-  GNULIB_FPRINTF_POSIX=0;
-  GNULIB_FPURGE=0;
-  GNULIB_FPUTC=0;
-  GNULIB_FPUTS=0;
-  GNULIB_FREAD=0;
-  GNULIB_FREOPEN=0;
-  GNULIB_FSCANF=0;
-  GNULIB_FSEEK=0;
-  GNULIB_FSEEKO=0;
-  GNULIB_FTELL=0;
-  GNULIB_FTELLO=0;
-  GNULIB_FWRITE=0;
-  GNULIB_GETC=0;
-  GNULIB_GETCHAR=0;
-  GNULIB_GETDELIM=0;
-  GNULIB_GETLINE=0;
-  GNULIB_OBSTACK_PRINTF=0;
-  GNULIB_OBSTACK_PRINTF_POSIX=0;
-  GNULIB_PCLOSE=0;
-  GNULIB_PERROR=0;
-  GNULIB_POPEN=0;
-  GNULIB_PRINTF=0;
-  GNULIB_PRINTF_POSIX=0;
-  GNULIB_PUTC=0;
-  GNULIB_PUTCHAR=0;
-  GNULIB_PUTS=0;
-  GNULIB_REMOVE=0;
-  GNULIB_RENAME=0;
-  GNULIB_RENAMEAT=0;
-  GNULIB_SCANF=0;
-  GNULIB_SNPRINTF=0;
-  GNULIB_SPRINTF_POSIX=0;
-  GNULIB_STDIO_H_NONBLOCKING=0;
-  GNULIB_STDIO_H_SIGPIPE=0;
-  GNULIB_TMPFILE=0;
-  GNULIB_VASPRINTF=0;
-  GNULIB_VFSCANF=0;
-  GNULIB_VSCANF=0;
-  GNULIB_VDPRINTF=0;
-  GNULIB_VFPRINTF=0;
-  GNULIB_VFPRINTF_POSIX=0;
-  GNULIB_VPRINTF=0;
-  GNULIB_VPRINTF_POSIX=0;
-  GNULIB_VSNPRINTF=0;
-  GNULIB_VSPRINTF_POSIX=0;
-    GNULIB_MDA_FCLOSEALL=1;
-  GNULIB_MDA_FDOPEN=1;
-  GNULIB_MDA_FILENO=1;
-  GNULIB_MDA_GETW=1;
-  GNULIB_MDA_PUTW=1;
-  GNULIB_MDA_TEMPNAM=1;
-    HAVE_DECL_FCLOSEALL=1;
-  HAVE_DECL_FPURGE=1;
-  HAVE_DECL_FSEEKO=1;
-  HAVE_DECL_FTELLO=1;
-  HAVE_DECL_GETDELIM=1;
-  HAVE_DECL_GETLINE=1;
-  HAVE_DECL_OBSTACK_PRINTF=1;
-  HAVE_DECL_SNPRINTF=1;
-  HAVE_DECL_VSNPRINTF=1;
-  HAVE_DPRINTF=1;
-  HAVE_FSEEKO=1;
-  HAVE_FTELLO=1;
-  HAVE_PCLOSE=1;
-  HAVE_POPEN=1;
-  HAVE_RENAMEAT=1;
-  HAVE_VASPRINTF=1;
-  HAVE_VDPRINTF=1;
-  REPLACE_DPRINTF=0;
-  REPLACE_FCLOSE=0;
-  REPLACE_FDOPEN=0;
-  REPLACE_FFLUSH=0;
-  REPLACE_FOPEN=0;
-  REPLACE_FPRINTF=0;
-  REPLACE_FPURGE=0;
-  REPLACE_FREOPEN=0;
-  REPLACE_FSEEK=0;
-  REPLACE_FSEEKO=0;
-  REPLACE_FTELL=0;
-  REPLACE_FTELLO=0;
-  REPLACE_GETDELIM=0;
-  REPLACE_GETLINE=0;
-  REPLACE_OBSTACK_PRINTF=0;
-  REPLACE_PERROR=0;
-  REPLACE_POPEN=0;
-  REPLACE_PRINTF=0;
-  REPLACE_REMOVE=0;
-  REPLACE_RENAME=0;
-  REPLACE_RENAMEAT=0;
-  REPLACE_SNPRINTF=0;
-  REPLACE_SPRINTF=0;
-  REPLACE_STDIO_READ_FUNCS=0;
-  REPLACE_STDIO_WRITE_FUNCS=0;
-  REPLACE_TMPFILE=0;
-  REPLACE_VASPRINTF=0;
-  REPLACE_VDPRINTF=0;
-  REPLACE_VFPRINTF=0;
-  REPLACE_VPRINTF=0;
-  REPLACE_VSNPRINTF=0;
-  REPLACE_VSPRINTF=0;
 
-ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getdelim" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+  memory_double m;
+  size_t i;
+  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
+  memset (&m, 0, sizeof (memory_double));
+  m.value = x;
+  for (i = 0; i < NWORDS; i++)
+    {
+      ored_words[i] |= m.word[i];
+      anded_words[i] &= m.word[i];
+    }
+}
+int main ()
+{
+  size_t j;
+  FILE *fp = fopen ("conftest.out", "w");
+  if (fp == NULL)
+    return 1;
+  for (j = 0; j < NWORDS; j++)
+    anded_words[j] = ~ (unsigned int) 0;
+  add_to_ored_words (0.25);
+  add_to_ored_words (0.5);
+  add_to_ored_words (1.0);
+  add_to_ored_words (2.0);
+  add_to_ored_words (4.0);
+  /* Remove bits that are common (e.g. if representation of the first mantissa
+     bit is explicit).  */
+  for (j = 0; j < NWORDS; j++)
+    ored_words[j] &= ~anded_words[j];
+  /* Now find the nonzero word.  */
+  for (j = 0; j < NWORDS; j++)
+    if (ored_words[j] != 0)
+      break;
+  if (j < NWORDS)
+    {
+      size_t i;
+      for (i = j + 1; i < NWORDS; i++)
+        if (ored_words[i] != 0)
+          {
+            fprintf (fp, "unknown");
+            return (fclose (fp) != 0);
+          }
+      for (i = 0; ; i++)
+        if ((ored_words[j] >> i) & 1)
+          {
+            fprintf (fp, "word %d bit %d", (int) j, (int) i);
+            return (fclose (fp) != 0);
+          }
+    }
+  fprintf (fp, "unknown");
+  return (fclose (fp) != 0);
+}
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETDELIM $ac_have_decl
 _ACEOF
-
-
-
-
-
-ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getdtablesize" = xyes; then :
-  ac_have_decl=1
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_cc_double_expbit0=`cat conftest.out`
 else
-  ac_have_decl=0
+  gl_cv_cc_double_expbit0="unknown"
 fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
-_ACEOF
-
-ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getline" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETLINE $ac_have_decl
-_ACEOF
+      rm -f conftest.out
 
-ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getlogin_r" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+  case "$gl_cv_cc_double_expbit0" in
+    word*bit*)
+      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETLOGIN_R $ac_have_decl
+#define DBL_EXPBIT0_WORD $word
 _ACEOF
 
 
-
-ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
-if test "x$ac_cv_have_decl_getlogin" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GETLOGIN $ac_have_decl
+#define DBL_EXPBIT0_BIT $bit
 _ACEOF
 
-
-
-  case $host_os in
-    mingw*)
-      LIB_GETLOGIN='-ladvapi32' ;;
-    *)
-      LIB_GETLOGIN= ;;
+      ;;
   esac
 
 
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if ${ac_cv_c_bigendian+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_bigendian=unknown
+    # See if we're dealing with a universal compiler.
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __APPLE_CC__
+              not a universal capable compiler
+            #endif
+            typedef int dummy;
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
 
+       # Check for potential -arch flags.  It is not universal unless
+       # there are at least two -arch flags with different values.
+       ac_arch=
+       ac_prev=
+       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+        if test -n "$ac_prev"; then
+          case $ac_word in
+            i?86 | x86_64 | ppc | ppc64)
+              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+                ac_arch=$ac_word
+              else
+                ac_cv_c_bigendian=universal
+                break
+              fi
+              ;;
+          esac
+          ac_prev=
+        elif test "x$ac_word" = "x-arch"; then
+          ac_prev=arch
+        fi
+       done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if sys/param.h defines the BYTE_ORDER macro.
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+            #include <sys/param.h>
 
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+                    && LITTLE_ENDIAN)
+             bogus endian macros
+            #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+               #include <sys/param.h>
 
-  GNULIB_GETRANDOM=0;
-    HAVE_GETRANDOM=1;
-  REPLACE_GETRANDOM=0;
-
-
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+                not big endian
+               #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
-  GNULIB_GETTIMEOFDAY=0;
-    HAVE_GETTIMEOFDAY=1;
-  HAVE_STRUCT_TIMEVAL=1;
-  HAVE_SYS_TIME_H=1;
-  REPLACE_GETTIMEOFDAY=0;
-  REPLACE_STRUCT_TIMEVAL=0;
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+             bogus endian macros
+            #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  # It does; now see whether it defined to _BIG_ENDIAN or not.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <limits.h>
 
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+                not big endian
+               #endif
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_bigendian=yes
+else
+  ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    fi
+    if test $ac_cv_c_bigendian = unknown; then
+      # Compile a test program.
+      if test "$cross_compiling" = yes; then :
+  # Try to guess by grepping values from an object file.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+short int ascii_mm[] =
+                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+               short int ascii_ii[] =
+                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+               int use_ascii (int i) {
+                 return ascii_mm[i] + ascii_ii[i];
+               }
+               short int ebcdic_ii[] =
+                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+               short int ebcdic_mm[] =
+                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+               int use_ebcdic (int i) {
+                 return ebcdic_mm[i] + ebcdic_ii[i];
+               }
+               extern int foo;
 
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+             ac_cv_c_bigendian=yes
+           fi
+           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+             if test "$ac_cv_c_bigendian" = unknown; then
+               ac_cv_c_bigendian=no
+             else
+               # finding both strings is unlikely to happen, but who knows?
+               ac_cv_c_bigendian=unknown
+             fi
+           fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
 
+            /* Are we little or big endian?  From Harbison&Steele.  */
+            union
+            {
+              long int l;
+              char c[sizeof (long int)];
+            } u;
+            u.l = 1;
+            return u.c[sizeof (long int) - 1] == 1;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_bigendian=no
+else
+  ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+   yes)
+     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+   no)
+      ;; #(
+   universal)
 
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
+     ;; #(
+   *)
+     as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
 
 
 
+    HAVE_NEWLOCALE=1;
+  HAVE_DUPLOCALE=1;
+  HAVE_FREELOCALE=1;
+  REPLACE_LOCALECONV=0;
+  REPLACE_SETLOCALE=0;
+  REPLACE_NEWLOCALE=0;
+  REPLACE_DUPLOCALE=0;
+  REPLACE_FREELOCALE=0;
+  REPLACE_STRUCT_LCONV=0;
+  LOCALENAME_ENHANCE_LOCALE_FUNCS=0;
 
 
+    REPLACE_NULL=0;
+  HAVE_MAX_ALIGN_T=1;
+  HAVE_WCHAR_T=1;
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_time_h='<'sys/time.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
-$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
-if ${gl_cv_next_sys_time_h+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if ${gt_cv_c_wchar_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-             if test $ac_cv_header_sys_time_h = yes; then
-
-
-
-
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/time.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_sys_time_h
-           gl_cv_next_sys_time_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_time_h='<'sys/time.h'>'
-             fi
-
+#include <stddef.h>
+            wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_c_wchar_t=yes
+else
+  gt_cv_c_wchar_t=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
-$as_echo "$gl_cv_next_sys_time_h" >&6; }
-     fi
-     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/time.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_time_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
-
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+  if test $gt_cv_c_wchar_t = yes; then
 
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
 
-  if test $ac_cv_header_sys_time_h != yes; then
-    HAVE_SYS_TIME_H=0
   fi
 
 
 
 
 
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    for ac_header in winsock2.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
-
-fi
-
-done
 
-  fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
 
+  GL_GENERATE_STDDEF_H=false
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
-$as_echo_n "checking for struct timeval... " >&6; }
-if ${gl_cv_sys_struct_timeval+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
+$as_echo_n "checking for good max_align_t... " >&6; }
+if ${gl_cv_type_max_align_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if HAVE_SYS_TIME_H
-             #include <sys/time.h>
-            #endif
-            #include <time.h>
-            #if HAVE_WINSOCK2_H
-            # include <winsock2.h>
+#include <stddef.h>
+            unsigned int s = sizeof (max_align_t);
+            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
+            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
+            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
             #endif
+            typedef struct { char a; max_align_t b; } max_helper;
+            typedef struct { char a; long b; } long_helper;
+            typedef struct { char a; double b; } double_helper;
+            typedef struct { char a; long double b; } long_double_helper;
+            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
+            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
 int
 main ()
 {
-static struct timeval x; x.tv_sec = x.tv_usec;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timeval=yes
+  gl_cv_type_max_align_t=yes
 else
-  gl_cv_sys_struct_timeval=no
+  gl_cv_type_max_align_t=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
-$as_echo "$gl_cv_sys_struct_timeval" >&6; }
-  if test $gl_cv_sys_struct_timeval != yes; then
-    HAVE_STRUCT_TIMEVAL=0
-  else
-                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
-$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
-if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
+$as_echo "$gl_cv_type_max_align_t" >&6; }
+  if test $gl_cv_type_max_align_t = no; then
+    HAVE_MAX_ALIGN_T=0
+    GL_GENERATE_STDDEF_H=true
+  fi
+
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    GL_GENERATE_STDDEF_H=true
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if ${gl_cv_decl_null_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if HAVE_SYS_TIME_H
-               #include <sys/time.h>
-              #endif
-              #include <time.h>
-              #if HAVE_WINSOCK2_H
-              # include <winsock2.h>
-              #endif
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
 int
 main ()
 {
-static struct timeval x;
-              typedef int verify_tv_sec_type[
-                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
-              ];
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timeval_tv_sec=yes
+  gl_cv_decl_null_works=yes
 else
-  gl_cv_sys_struct_timeval_tv_sec=no
+  gl_cv_decl_null_works=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
-$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
-    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
-      REPLACE_STRUCT_TIMEVAL=1
-    fi
-  fi
-
-
-
-
-
-
-
-
-
-
-
-  GNULIB_GLOB=0;
-    HAVE_GLOB=1;
-  HAVE_GLOB_PATTERN_P=1;
-  REPLACE_GLOB=0;
-  REPLACE_GLOB_PATTERN_P=0;
-
-
-
-
-
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    GL_GENERATE_STDDEF_H=true
+  fi
 
+  if $GL_GENERATE_STDDEF_H; then
 
 
 
@@ -11684,22 +16575,19 @@ $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_glob_h='<'glob.h'>'
+       gl_cv_next_stddef_h='<'stddef.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
-$as_echo_n "checking absolute name of <glob.h>... " >&6; }
-if ${gl_cv_next_glob_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if ${gl_cv_next_stddef_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_glob_h = yes; then
-
-
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <glob.h>
+#include <stddef.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -11715,7 +16603,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'glob.h' \
+  gl_header_literal_regex=`echo 'stddef.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -11724,393 +16612,183 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_glob_h
-           gl_cv_next_glob_h='"'$gl_header'"'
-          else
-               gl_cv_next_glob_h='<'glob.h'>'
-             fi
+          gl_header=$gl_cv_absolute_stddef_h
+          gl_cv_next_stddef_h='"'$gl_header'"'
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
-$as_echo "$gl_cv_next_glob_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
      fi
-     NEXT_GLOB_H=$gl_cv_next_glob_h
+     NEXT_STDDEF_H=$gl_cv_next_stddef_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'glob.h'>'
+       gl_next_as_first_directive='<'stddef.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_glob_h
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive
-
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_glob_h = yes; then
-    HAVE_GLOB_H=1
-  else
-    HAVE_GLOB_H=0
   fi
 
 
-  GLOB_H=''
-     if false; then
-              GLOB_H=glob.h
-     else
-       if test $ac_cv_header_glob_h != yes; then
-                  GLOB_H=glob.h
-       fi
-     fi
-
-
-   if test -n "$GLOB_H"; then
-  GL_GENERATE_GLOB_H_TRUE=
-  GL_GENERATE_GLOB_H_FALSE='#'
-else
-  GL_GENERATE_GLOB_H_TRUE='#'
-  GL_GENERATE_GLOB_H_FALSE=
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
-  if test -z "$gl_pthreadlib_body_done"; then
-    gl_pthread_api=no
-    LIBPTHREAD=
-    LIBPMULTITHREAD=
-    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
-    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
-    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
-  gl_have_pthread_h=yes
-else
-  gl_have_pthread_h=no
-fi
-
-
-    if test "$gl_have_pthread_h" = yes; then
-      # Other possible tests:
-      #   -lpthreads (FSU threads, PCthreads)
-      #   -lgthreads
-      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
-      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
-      # the second one only in libpthread, and lock.c needs it.
-      #
-      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
-      # needs -pthread for some reason.  See:
-      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
-      save_LIBS=$LIBS
-      for gl_pthread in '' '-pthread'; do
-        LIBS="$LIBS $gl_pthread"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-               pthread_mutex_t m;
-               pthread_mutexattr_t ma;
-
-int
-main ()
-{
-pthread_mutex_lock (&m);
-               pthread_mutexattr_init (&ma);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=$gl_pthread
-           LIBPMULTITHREAD=$gl_pthread
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        LIBS=$save_LIBS
-        test $gl_pthread_api = yes && break
-      done
 
-      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
-      # since it is defined as a macro on OSF/1.)
-      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
-        # The program links fine without libpthread. But it may actually
-        # need to link with libpthread in order to create multiple threads.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
+if ${gl_cv_header_locale_has_locale_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
+#include <locale.h>
+            locale_t x;
 int
 main ()
 {
-return pthread_kill ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
-else
-  ac_cv_lib_pthread_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  LIBPMULTITHREAD=-lpthread
-           # On Solaris and HP-UX, most pthread functions exist also in libc.
-           # Therefore pthread_in_use() needs to actually try to create a
-           # thread: pthread_create from libc will fail, whereas
-           # pthread_create will actually create a thread.
-           # On Solaris 10 or newer, this test is no longer needed, because
-           # libc contains the fully functional pthread functions.
-           case "$host_os" in
-             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
 
-$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
-
-           esac
-
-fi
-
-      elif test $gl_pthread_api != yes; then
-        # Some library is needed. Try libpthread and libc_r.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
-int
-main ()
-{
-return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_has_locale_t=yes
 else
-  ac_cv_lib_pthread_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=-lpthread
-           LIBPMULTITHREAD=-lpthread
+  gl_cv_header_locale_has_locale_t=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-        if test $gl_pthread_api != yes; then
-          # For FreeBSD 4.
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
-$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
-int
-main ()
-{
-return pthread_kill ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_r_pthread_kill=yes
-else
-  ac_cv_lib_c_r_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
-$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-             LIBPTHREAD=-lc_r
-             LIBPMULTITHREAD=-lc_r
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
 
-        fi
-      fi
+
+  if test $ac_cv_header_xlocale_h = yes; then
+    HAVE_XLOCALE_H=1
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      gl_cv_header_locale_h_needs_xlocale_h=no
+    else
+      gl_cv_header_locale_h_needs_xlocale_h=yes
     fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
-$as_echo_n "checking whether POSIX threads API is available... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
-$as_echo "$gl_pthread_api" >&6; }
+    HAVE_LOCALE_T=1
+  else
+    HAVE_XLOCALE_H=0
+    gl_cv_header_locale_h_needs_xlocale_h=no
+    if test $gl_cv_header_locale_has_locale_t = yes; then
+      HAVE_LOCALE_T=1
+    else
+      HAVE_LOCALE_T=0
+    fi
+  fi
 
 
-    if test $gl_pthread_api = yes; then
 
-$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
-    fi
 
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sched.h>
-int
-main ()
-{
-sched_yield ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIB_SCHED_YIELD=
 
-else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
+
+
+
+
+
+
+  case "$host_os" in
+    solaris*)
+
+$as_echo "#define _LCONV_C99 1" >>confdefs.h
+
+      ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if ${gl_cv_header_locale_h_posix2001+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
+#include <locale.h>
+            int x = LC_MESSAGES;
+            int y = sizeof (((struct lconv *) 0)->decimal_point);
 int
 main ()
 {
-return sched_yield ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_sched_yield=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_locale_h_posix2001=yes
 else
-  ac_cv_lib_rt_sched_yield=no
+  gl_cv_header_locale_h_posix2001=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lrt
-else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
-$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
-if ${ac_cv_lib_posix4_sched_yield+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
+$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
+if ${gl_cv_sys_struct_lconv_ok+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix4  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
+#include <locale.h>
+            struct lconv l;
+            int x = sizeof (l.decimal_point);
+            int y = sizeof (l.int_p_cs_precedes);
 int
 main ()
 {
-return sched_yield ();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_posix4_sched_yield=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_lconv_ok=yes
 else
-  ac_cv_lib_posix4_sched_yield=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
-$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
-if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lposix4
+  gl_cv_sys_struct_lconv_ok=no
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
+$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
+  if test $gl_cv_sys_struct_lconv_ok = no; then
+            case "$host_os" in
+      mingw*)
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#ifdef _MSC_VER
+ Special
+#endif
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Special" >/dev/null 2>&1; then :
 
+else
+  REPLACE_STRUCT_LCONV=1
+fi
+rm -f conftest*
 
-    gl_pthreadlib_body_done=done
+        ;;
+      *) REPLACE_STRUCT_LCONV=1 ;;
+    esac
   fi
 
 
@@ -12121,86 +16799,104 @@ rm -f core conftest.err conftest.$ac_objext \
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
-$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
-if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_locale_h='<'locale.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+$as_echo_n "checking absolute name of <locale.h>... " >&6; }
+if ${gl_cv_next_locale_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  case "$host_os" in
-       # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
-         gl_cv_func_setlocale_null_all_mtsafe=no ;;
-       # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
-       *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
-         gl_cv_func_setlocale_null_all_mtsafe=yes ;;
-       # If we don't know, obey --enable-cross-guesses.
-       *)
-         gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
-     esac
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
-$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
-    case "$host_os" in
-    mingw*) ;;
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
     *)
-      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
-        gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
-      fi
+      gl_dirsep_regex='\/'
       ;;
   esac
-  case "$gl_cv_func_setlocale_null_all_mtsafe" in
-    *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
-    *)    SETLOCALE_NULL_ALL_MTSAFE=0 ;;
-  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'locale.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
 
-cat >>confdefs.h <<_ACEOF
-#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
-_ACEOF
+        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
+          gl_header=$gl_cv_absolute_locale_h
+          gl_cv_next_locale_h='"'$gl_header'"'
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
-$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
-if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case "$host_os" in
-       # Guess no on OpenBSD, AIX.
-       openbsd* | aix*)
-         gl_cv_func_setlocale_null_one_mtsafe=no ;;
-       # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
-       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
-         gl_cv_func_setlocale_null_one_mtsafe=yes ;;
-       # If we don't know, obey --enable-cross-guesses.
-       *)
-         gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
-     esac
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
-$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
-    case "$host_os" in
-    mingw*) ;;
-    *)
-      if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
-        gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
-      fi
-      ;;
-  esac
-  case "$gl_cv_func_setlocale_null_one_mtsafe" in
-    *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
-    *)    SETLOCALE_NULL_ONE_MTSAFE=0 ;;
-  esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+$as_echo "$gl_cv_next_locale_h" >&6; }
+     fi
+     NEXT_LOCALE_H=$gl_cv_next_locale_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'locale.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_locale_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+  GL_GNULIB_LOCALECONV=0
+
 
-cat >>confdefs.h <<_ACEOF
-#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
-_ACEOF
+
+  GL_GNULIB_SETLOCALE=0
+
+
+
+  GL_GNULIB_SETLOCALE_NULL=0
+
+
+
+  GL_GNULIB_DUPLOCALE=0
+
+
+
+  GL_GNULIB_LOCALENAME=0
 
 
-    if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
-    case "$host_os" in
-      mingw*) LIB_SETLOCALE_NULL= ;;
-      *)
+
+
+
+  gl_threads_api=none
+  LIBTHREAD=
+  LTLIBTHREAD=
+  LIBMULTITHREAD=
+  LTLIBMULTITHREAD=
+  if test "$gl_use_threads" != no; then
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
@@ -12208,8 +16904,13 @@ $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
 if ${gl_cv_have_weak+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_weak=no
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  case "$host_os" in
+       cygwin*)
+                                    gl_cv_have_weak="guessing no"
+         ;;
+       *)
+         gl_cv_have_weak=no
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 extern void xyzzy ();
 #pragma weak xyzzy
@@ -12226,13 +16927,13 @@ if ac_fn_c_try_link "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-     if test $gl_cv_have_weak = maybe; then
-                     if test "$cross_compiling" = yes; then :
-                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         if test $gl_cv_have_weak = maybe; then
+                                 if test "$cross_compiling" = yes; then :
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __ELF__
-             Extensible Linking Format
-             #endif
+                 Extensible Linking Format
+                 #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -12264,14 +16965,16 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-     fi
+         fi
+         ;;
+     esac
           case " $LDFLAGS " in
        *" -static "*) gl_cv_have_weak=no ;;
      esac
                     case "$gl_cv_have_weak" in
        *yes)
          case "$host_os" in
-           freebsd* | dragonfly*)
+           freebsd* | dragonfly* | midnightbsd*)
              : > conftest1.c
              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
              cat <<EOF > conftest2.c
@@ -12301,2113 +17004,2204 @@ $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
       ;;
   esac
 
-        case "$gl_cv_have_weak" in
-          *yes) LIB_SETLOCALE_NULL= ;;
-          *)    LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
-        esac
-        ;;
-    esac
-  else
-    LIB_SETLOCALE_NULL=
-  fi
-
-
-
-
-
-
-
-
-
+    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
-$as_echo_n "checking for IPv4 sockets... " >&6; }
-if ${gl_cv_socket_ipv4+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-int
-main ()
-{
-int x = AF_INET; struct in_addr y; struct sockaddr_in z;
- if (&x && &y && &z) return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_socket_ipv4=yes
-else
-  gl_cv_socket_ipv4=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
-$as_echo "$gl_cv_socket_ipv4" >&6; }
-  if test $gl_cv_socket_ipv4 = yes; then
+      :
+    fi
+    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
 
-$as_echo "#define HAVE_IPV4 1" >>confdefs.h
+      gl_have_isoc_threads="$ac_cv_header_threads_h"
+    fi
+    if test "$gl_use_threads" = yes \
+       || test "$gl_use_threads" = posix \
+       || test "$gl_use_threads" = isoc+posix; then
 
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
-$as_echo_n "checking for IPv6 sockets... " >&6; }
-if ${gl_cv_socket_ipv6+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-int
-main ()
-{
-int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
- if (&x && &y && &z) return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_socket_ipv6=yes
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  gl_have_pthread_h=yes
 else
-  gl_cv_socket_ipv6=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  gl_have_pthread_h=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
-$as_echo "$gl_cv_socket_ipv6" >&6; }
-  if test $gl_cv_socket_ipv6 = yes; then
-
-$as_echo "#define HAVE_IPV6 1" >>confdefs.h
-
-  fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_limits_h='<'limits.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
-$as_echo_n "checking absolute name of <limits.h>... " >&6; }
-if ${gl_cv_next_limits_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-             if test $ac_cv_header_limits_h = yes; then
 
 
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
 
+int
+main ()
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:17073: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:17074: LIBPTHREAD=$LIBPTHREAD" >&5
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'limits.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_limits_h
-           gl_cv_next_limits_h='"'$gl_header'"'
-          else
-               gl_cv_next_limits_h='<'limits.h'>'
-             fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
-$as_echo "$gl_cv_next_limits_h" >&6; }
-     fi
-     NEXT_LIMITS_H=$gl_cv_next_limits_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'limits.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_limits_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
-
-
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_pthread_in_glibc=yes
+fi
+rm -f conftest*
 
+          ;;
+      esac
+      echo "$as_me:17099: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
-$as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
-if ${gl_cv_header_limits_width+:} false; then :
+      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+      # since it is defined as a macro on OSF/1.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-             #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-            #endif
-            #include <limits.h>
-            long long llm = LLONG_MAX;
-            int wb = WORD_BIT;
-            int ullw = ULLONG_WIDTH;
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
 int
 main ()
 {
-
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_limits_width=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
 else
-  gl_cv_header_limits_width=no
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
-$as_echo "$gl_cv_header_limits_width" >&6; }
-  if test "$gl_cv_header_limits_width" = yes; then
-    LIMITS_H=
-  else
-    LIMITS_H=limits.h
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
 
-   if test -n "$LIMITS_H"; then
-  GL_GENERATE_LIMITS_H_TRUE=
-  GL_GENERATE_LIMITS_H_FALSE='#'
-else
-  GL_GENERATE_LIMITS_H_TRUE='#'
-  GL_GENERATE_LIMITS_H_FALSE=
-fi
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
+             esac
+           fi
 
+fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
-$as_echo_n "checking for wint_t... " >&6; }
-if ${gt_cv_c_wint_t+:} false; then :
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.h>
-            wint_t foo = (wchar_t)'\0';
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
 int
 main ()
 {
-
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_c_wint_t=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
 else
-  gt_cv_c_wint_t=no
+  ac_cv_lib_pthread_pthread_kill=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
-$as_echo "$gt_cv_c_wint_t" >&6; }
-  if test $gt_cv_c_wint_t = yes; then
-
-$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
-
 
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
-$as_echo_n "checking whether wint_t is large enough... " >&6; }
-if ${gl_cv_type_wint_t_large_enough+:} false; then :
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.h>
-              int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
 int
 main ()
 {
-
+return pthread_kill ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_wint_t_large_enough=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_kill=yes
 else
-  gl_cv_type_wint_t_large_enough=no
+  ac_cv_lib_c_r_pthread_kill=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
-$as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
-    if test $gl_cv_type_wint_t_large_enough = no; then
-      GNULIB_OVERRIDES_WINT_T=1
-    else
-      GNULIB_OVERRIDES_WINT_T=0
-    fi
-  else
-    GNULIB_OVERRIDES_WINT_T=0
-  fi
-
 
+        fi
+      fi
+      echo "$as_me:17253: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
+$as_echo_n "checking whether POSIX threads API is available... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+$as_echo "$gl_pthread_api" >&6; }
 
 
+    if test $gl_pthread_api = yes; then
 
+$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
+    fi
 
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
+int
+main ()
+{
+sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  LIB_SCHED_YIELD=
 
+else
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
-$as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
-if ${gl_cv_c_multiarch+:} false; then :
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sched_yield=yes
+else
+  ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lrt
+else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
+if ${ac_cv_lib_posix4_sched_yield+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_c_multiarch=no
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __APPLE_CC__
-            not a universal capable compiler
-           #endif
-           typedef int dummy;
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-                        arch=
-        prev=
-        for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-          if test -n "$prev"; then
-            case $word in
-              i?86 | x86_64 | ppc | ppc64 | arm | arm64)
-                if test -z "$arch" || test "$arch" = "$word"; then
-                  arch="$word"
-                else
-                  gl_cv_c_multiarch=yes
-                fi
-                ;;
-            esac
-            prev=
-          else
-            if test "x$word" = "x-arch"; then
-              prev=arch
-            fi
-          fi
-        done
-
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix4_sched_yield=yes
+else
+  ac_cv_lib_posix4_sched_yield=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
+if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lposix4
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
-$as_echo "$gl_cv_c_multiarch" >&6; }
-  if test $gl_cv_c_multiarch = yes; then
-    APPLE_UNIVERSAL_BUILD=1
-  else
-    APPLE_UNIVERSAL_BUILD=0
-  fi
-
-
-
-
-
-
-
-
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
+fi
 
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
 
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
-  else
-    HAVE_WCHAR_H=0
+    gl_pthreadlib_body_done=done
   fi
 
+      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
+      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
+      if test $gl_pthread_api = yes; then
+        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
+          gl_threads_api='isoc+posix'
 
+$as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
 
-  if test $ac_cv_header_inttypes_h = yes; then
-    HAVE_INTTYPES_H=1
-  else
-    HAVE_INTTYPES_H=0
-  fi
-
-
+          LIBTHREAD= LTLIBTHREAD=
+        else
+          gl_threads_api=posix
 
-  if test $ac_cv_header_sys_types_h = yes; then
-    HAVE_SYS_TYPES_H=1
-  else
-    HAVE_SYS_TYPES_H=0
-  fi
+$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
 
+          if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
 
+$as_echo "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h
 
+          else
+            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
 
+$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
 
+              LIBTHREAD= LTLIBTHREAD=
+            else
+              case "$host_os" in
+                freebsd* | dragonfly* | midnightbsd*)
+                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
 
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
+                  fi
+                  ;;
+              esac
+            fi
+          fi
+        fi
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
 
 
 
+  if test -z "$gl_stdthreadlib_body_done"; then
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdint_h='<'stdint.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
-if ${gl_cv_next_stdint_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-             if test $ac_cv_header_stdint_h = yes; then
+    case "$host_os" in
+      mingw*)
+        LIBSTDTHREAD=
+        ;;
+      *)
 
 
+  if test -z "$gl_pthreadlib_body_done"; then
+    gl_pthread_api=no
+    LIBPTHREAD=
+    LIBPMULTITHREAD=
+    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  gl_have_pthread_h=yes
+else
+  gl_have_pthread_h=no
+fi
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+    if test "$gl_have_pthread_h" = yes; then
+      # Other possible tests:
+      #   -lpthreads (FSU threads, PCthreads)
+      #   -lgthreads
+      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+      # the second one only in libpthread, and lock.c needs it.
+      #
+      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+      # needs -pthread for some reason.  See:
+      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+      save_LIBS=$LIBS
+      for gl_pthread in '' '-pthread'; do
+        LIBS="$LIBS $gl_pthread"
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdint.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdint.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+#include <pthread.h>
+               pthread_mutex_t m;
+               pthread_mutexattr_t ma;
 
-           gl_header=$gl_cv_absolute_stdint_h
-           gl_cv_next_stdint_h='"'$gl_header'"'
-          else
-               gl_cv_next_stdint_h='<'stdint.h'>'
-             fi
+int
+main ()
+{
+pthread_mutex_lock (&m);
+               pthread_mutexattr_init (&ma);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=$gl_pthread
+           LIBPMULTITHREAD=$gl_pthread
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        LIBS=$save_LIBS
+        test $gl_pthread_api = yes && break
+      done
+      echo "$as_me:17479: gl_pthread_api=$gl_pthread_api" >&5
+      echo "$as_me:17480: LIBPTHREAD=$LIBPTHREAD" >&5
 
+      gl_pthread_in_glibc=no
+      # On Linux with glibc >= 2.34, libc contains the fully functional
+      # pthread functions.
+      case "$host_os" in
+        linux*)
+          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <features.h>
+             #ifdef __GNU_LIBRARY__
+              #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2)
+               Lucky user
+              #endif
+             #endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_pthread_in_glibc=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
-$as_echo "$gl_cv_next_stdint_h" >&6; }
-     fi
-     NEXT_STDINT_H=$gl_cv_next_stdint_h
+rm -f conftest*
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stdint.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdint_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+          ;;
+      esac
+      echo "$as_me:17505: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
 
+      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+      # since it is defined as a macro on OSF/1.)
+      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+        # The program links fine without libpthread. But it may actually
+        # need to link with libpthread in order to create multiple threads.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  if test $gl_pthread_in_glibc = yes; then
+             LIBPMULTITHREAD=
+           else
+             LIBPMULTITHREAD=-lpthread
+             # On Solaris and HP-UX, most pthread functions exist also in libc.
+             # Therefore pthread_in_use() needs to actually try to create a
+             # thread: pthread_create from libc will fail, whereas
+             # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
+             case "$host_os" in
+               solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
 
+$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
-  if test $ac_cv_header_stdint_h = yes; then
-    HAVE_STDINT_H=1
-  else
-    HAVE_STDINT_H=0
-  fi
+             esac
+           fi
 
+fi
 
-    if test $ac_cv_header_stdint_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
-$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
-if ${gl_cv_header_working_stdint_h+:} false; then :
+      elif test $gl_pthread_api != yes; then
+        # Some library is needed. Try libpthread and libc_r.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
+$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_header_working_stdint_h=no
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
-#if !(defined WCHAR_MIN && defined WCHAR_MAX)
-#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_kill=yes
+else
+  ac_cv_lib_pthread_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+           LIBPTHREAD=-lpthread
+           LIBPMULTITHREAD=-lpthread
+fi
 
+        if test $gl_pthread_api != yes; then
+          # For FreeBSD 4.
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
+$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
-
-
-#ifdef INT8_MAX
-int8_t a1 = INT8_MAX;
-int8_t a1min = INT8_MIN;
-#endif
-#ifdef INT16_MAX
-int16_t a2 = INT16_MAX;
-int16_t a2min = INT16_MIN;
-#endif
-#ifdef INT32_MAX
-int32_t a3 = INT32_MAX;
-int32_t a3min = INT32_MIN;
-#endif
-#ifdef INT64_MAX
-int64_t a4 = INT64_MAX;
-int64_t a4min = INT64_MIN;
-#endif
-#ifdef UINT8_MAX
-uint8_t b1 = UINT8_MAX;
-#else
-typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
-#endif
-#ifdef UINT16_MAX
-uint16_t b2 = UINT16_MAX;
-#endif
-#ifdef UINT32_MAX
-uint32_t b3 = UINT32_MAX;
-#endif
-#ifdef UINT64_MAX
-uint64_t b4 = UINT64_MAX;
-#endif
-int_least8_t c1 = INT8_C (0x7f);
-int_least8_t c1max = INT_LEAST8_MAX;
-int_least8_t c1min = INT_LEAST8_MIN;
-int_least16_t c2 = INT16_C (0x7fff);
-int_least16_t c2max = INT_LEAST16_MAX;
-int_least16_t c2min = INT_LEAST16_MIN;
-int_least32_t c3 = INT32_C (0x7fffffff);
-int_least32_t c3max = INT_LEAST32_MAX;
-int_least32_t c3min = INT_LEAST32_MIN;
-int_least64_t c4 = INT64_C (0x7fffffffffffffff);
-int_least64_t c4max = INT_LEAST64_MAX;
-int_least64_t c4min = INT_LEAST64_MIN;
-uint_least8_t d1 = UINT8_C (0xff);
-uint_least8_t d1max = UINT_LEAST8_MAX;
-uint_least16_t d2 = UINT16_C (0xffff);
-uint_least16_t d2max = UINT_LEAST16_MAX;
-uint_least32_t d3 = UINT32_C (0xffffffff);
-uint_least32_t d3max = UINT_LEAST32_MAX;
-uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
-uint_least64_t d4max = UINT_LEAST64_MAX;
-int_fast8_t e1 = INT_FAST8_MAX;
-int_fast8_t e1min = INT_FAST8_MIN;
-int_fast16_t e2 = INT_FAST16_MAX;
-int_fast16_t e2min = INT_FAST16_MIN;
-int_fast32_t e3 = INT_FAST32_MAX;
-int_fast32_t e3min = INT_FAST32_MIN;
-int_fast64_t e4 = INT_FAST64_MAX;
-int_fast64_t e4min = INT_FAST64_MIN;
-uint_fast8_t f1 = UINT_FAST8_MAX;
-uint_fast16_t f2 = UINT_FAST16_MAX;
-uint_fast32_t f3 = UINT_FAST32_MAX;
-uint_fast64_t f4 = UINT_FAST64_MAX;
-#ifdef INTPTR_MAX
-intptr_t g = INTPTR_MAX;
-intptr_t gmin = INTPTR_MIN;
-#endif
-#ifdef UINTPTR_MAX
-uintptr_t h = UINTPTR_MAX;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
 #endif
-intmax_t i = INTMAX_MAX;
-uintmax_t j = UINTMAX_MAX;
+char pthread_kill ();
+int
+main ()
+{
+return pthread_kill ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_kill=yes
+else
+  ac_cv_lib_c_r_pthread_kill=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
+  gl_pthread_api=yes
+             LIBPTHREAD=-lc_r
+             LIBPMULTITHREAD=-lc_r
+fi
 
-/* Check that SIZE_MAX has the correct type, if possible.  */
-#if 201112 <= __STDC_VERSION__
-int k = _Generic (SIZE_MAX, size_t: 0);
-#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
-       || (0x5110 <= __SUNPRO_C && !__STDC__))
-extern size_t k;
-extern __typeof__ (SIZE_MAX) k;
-#endif
+        fi
+      fi
+      echo "$as_me:17659: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
+$as_echo_n "checking whether POSIX threads API is available... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
+$as_echo "$gl_pthread_api" >&6; }
 
-#include <limits.h> /* for CHAR_BIT */
-#define TYPE_MINIMUM(t) \
-  ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
-#define TYPE_MAXIMUM(t) \
-  ((t) ((t) 0 < (t) -1 \
-        ? (t) -1 \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-struct s {
-  int check_PTRDIFF:
-      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
-      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
-      ? 1 : -1;
-  /* Detect bug in FreeBSD 6.0 / ia64.  */
-  int check_SIG_ATOMIC:
-      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
-      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
-      ? 1 : -1;
-  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
-  int check_WCHAR:
-      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
-      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
-      ? 1 : -1;
-  /* Detect bug in mingw.  */
-  int check_WINT:
-      WINT_MIN == TYPE_MINIMUM (wint_t)
-      && WINT_MAX == TYPE_MAXIMUM (wint_t)
-      ? 1 : -1;
 
-  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
-  int check_UINT8_C:
-        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
-  int check_UINT16_C:
-        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+    if test $gl_pthread_api = yes; then
+
+$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
-  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
-#ifdef UINT8_MAX
-  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
-#endif
-#ifdef UINT16_MAX
-  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
-#endif
-#ifdef UINT32_MAX
-  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
-#endif
-#ifdef UINT64_MAX
-  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
-#endif
-  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
-  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
-  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
-  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
-  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
-  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
-  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
-  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
-  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
-  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
-  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
-};
+    fi
 
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sched.h>
 int
 main ()
 {
-
+sched_yield ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-                                                    if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                         # Guess yes on native Windows.
-                 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
-                         # In general, assume it works.
-                 *)      gl_cv_header_working_stdint_h="guessing yes" ;;
-               esac
+if ac_fn_c_try_link "$LINENO"; then :
+  LIB_SCHED_YIELD=
 
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
+$as_echo_n "checking for sched_yield in -lrt... " >&6; }
+if ${ac_cv_lib_rt_sched_yield+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_sched_yield=yes
+else
+  ac_cv_lib_rt_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
+$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
+if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lrt
+else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
+$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
+if ${ac_cv_lib_posix4_sched_yield+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char sched_yield ();
+int
+main ()
+{
+return sched_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_posix4_sched_yield=yes
+else
+  ac_cv_lib_posix4_sched_yield=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
+$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
+if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
+  LIB_SCHED_YIELD=-lposix4
+fi
 
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
+fi
 
 
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 
-#include <stdio.h>
-#include <string.h>
-#define MVAL(macro) MVAL1(macro)
-#define MVAL1(expression) #expression
-static const char *macro_values[] =
-  {
-#ifdef INT8_MAX
-    MVAL (INT8_MAX),
-#endif
-#ifdef INT16_MAX
-    MVAL (INT16_MAX),
-#endif
-#ifdef INT32_MAX
-    MVAL (INT32_MAX),
-#endif
-#ifdef INT64_MAX
-    MVAL (INT64_MAX),
-#endif
-#ifdef UINT8_MAX
-    MVAL (UINT8_MAX),
-#endif
-#ifdef UINT16_MAX
-    MVAL (UINT16_MAX),
-#endif
-#ifdef UINT32_MAX
-    MVAL (UINT32_MAX),
-#endif
-#ifdef UINT64_MAX
-    MVAL (UINT64_MAX),
-#endif
-    NULL
-  };
+    gl_pthreadlib_body_done=done
+  fi
+
+        if test $ac_cv_header_threads_h = yes; then
+                                                            for ac_func in thrd_create
+do :
+  ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
+if test "x$ac_cv_func_thrd_create" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_THRD_CREATE 1
+_ACEOF
+
+fi
+done
+
+          if test $ac_cv_func_thrd_create = yes; then
+            LIBSTDTHREAD=
+          else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
+$as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
+if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lstdthreads  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char thrd_create ();
 int
 main ()
 {
-
-  const char **mv;
-  for (mv = macro_values; *mv != NULL; mv++)
-    {
-      const char *value = *mv;
-      /* Test whether it looks like a cast expression.  */
-      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
-          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
-          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
-          || strncmp (value, "((int)"/*)*/, 6) == 0
-          || strncmp (value, "((signed short)"/*)*/, 15) == 0
-          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
-        return mv - macro_values + 1;
-    }
-  return 0;
-
+return thrd_create ();
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_header_working_stdint_h=yes
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_stdthreads_thrd_create=yes
+else
+  ac_cv_lib_stdthreads_thrd_create=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
+$as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
+if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
+
+              LIBSTDTHREAD='-lstdthreads -lpthread'
+
+else
+
+                            LIBSTDTHREAD="$LIBPMULTITHREAD"
+
 fi
 
+          fi
+        else
+                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+        fi
+        ;;
+    esac
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
+$as_echo_n "checking whether ISO C threads API is available... " >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
+$as_echo "$ac_cv_header_threads_h" >&6; }
+    gl_stdthreadlib_body_done=done
+  fi
+
+        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
+        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
+        gl_threads_api=isoc
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+$as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
-$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+      fi
+    fi
+    if test $gl_threads_api = none; then
+      case "$gl_use_threads" in
+        yes | windows | win32) # The 'win32' is for backward compatibility.
+          if { case "$host_os" in
+                 mingw*) true;;
+                 *) false;;
+               esac
+             }; then
+            gl_threads_api=windows
+
+$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
+
+          fi
+          ;;
+      esac
+    fi
   fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
+$as_echo_n "checking for multithread API to use... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
+$as_echo "$gl_threads_api" >&6; }
+
+
 
-  HAVE_C99_STDINT_H=0
-  HAVE_SYS_BITYPES_H=0
-  HAVE_SYS_INTTYPES_H=0
-  STDINT_H=stdint.h
-  case "$gl_cv_header_working_stdint_h" in
-    *yes)
-      HAVE_C99_STDINT_H=1
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
-$as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
-if ${gl_cv_header_stdint_without_STDC_macros+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  gl_cv_header_stdint_without_STDC_macros=no
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
 
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#include <stdint.h>
 
 
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
 
 
-intmax_t im = INTMAX_MAX;
-int32_t i32 = INT32_C (0x7fffffff);
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is ptrdiff_t safe" >&5
+$as_echo_n "checking whether malloc is ptrdiff_t safe... " >&6; }
+if ${gl_cv_malloc_ptrdiff+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdint.h>
 
 int
 main ()
 {
+/* 64-bit ptrdiff_t is so wide that no practical platform
+               can exceed it.  */
+            #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 != 0)
+
+            /* On rare machines where size_t fits in ptrdiff_t there
+               is no problem.  */
+            #define NARROW_SIZE (SIZE_MAX <= PTRDIFF_MAX)
+
+            /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t
+               bounds even on 32-bit platforms.  We don't know which
+               non-glibc systems are safe.  */
+            #define KNOWN_SAFE (2 < __GLIBC__ + (30 <= __GLIBC_MINOR__))
+
+            #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE
+              return 0;
+            #else
+              #error "malloc might not be ptrdiff_t safe"
+              syntax error
+            #endif
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_stdint_without_STDC_macros=yes
+  gl_cv_malloc_ptrdiff=yes
+else
+  gl_cv_malloc_ptrdiff=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
-$as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_malloc_ptrdiff" >&5
+$as_echo "$gl_cv_malloc_ptrdiff" >&6; }
 
-      if test $gl_cv_header_stdint_without_STDC_macros = no; then
 
-$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
 
 
-$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
+  test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
 
-      fi
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
-$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
-if ${gl_cv_header_stdint_width+:} false; then :
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc set errno on failure" >&5
+$as_echo_n "checking whether malloc, realloc, calloc set errno on failure... " >&6; }
+if ${gl_cv_func_malloc_posix+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_header_stdint_width=no
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-              /* Work if build is not clean.  */
-              #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
-              #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-               #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-              #endif
-              #include <stdint.h>
+                                    case "$host_os" in
+        mingw*)
+          gl_cv_func_malloc_posix=no ;;
+        irix* | solaris*)
 
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
+          gl_cv_func_malloc_posix=no ;;
+        *)
+          gl_cv_func_malloc_posix=yes ;;
+      esac
 
-              int iw = UINTMAX_WIDTH;
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+$as_echo "$gl_cv_func_malloc_posix" >&6; }
+
+
+
+
+
+  if test "$gl_cv_func_malloc_posix" = yes; then
+
+$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
+
+  else
+    REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+  fi
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc (0) returns nonnull" >&5
+$as_echo_n "checking whether malloc (0) returns nonnull... " >&6; }
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+          # Guess yes on platforms where we know the result.
+          *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+          | gnu* | *-musl* | midnightbsd* \
+          | hpux* | solaris* | cygwin* | mingw* | msys* )
+            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
+          # If we don't know, obey --enable-cross-guesses.
+          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
+        esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
 
 int
 main ()
 {
-
+void *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_stdint_width=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  ac_cv_func_malloc_0_nonnull=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
-$as_echo "$gl_cv_header_stdint_width" >&6; }
-      if test "$gl_cv_header_stdint_width" = yes; then
-        STDINT_H=
-      fi
-      ;;
-    *)
-                  for ac_header in sys/inttypes.h sys/bitypes.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+  case $ac_cv_func_malloc_0_nonnull in #(
+  *yes) :
+    gl_cv_func_malloc_0_nonnull=1 ;; #(
+  *) :
+    gl_cv_func_malloc_0_nonnull=0 ;;
+esac
 
-done
 
-      if test $ac_cv_header_sys_inttypes_h = yes; then
-        HAVE_SYS_INTTYPES_H=1
-      fi
-      if test $ac_cv_header_sys_bitypes_h = yes; then
-        HAVE_SYS_BITYPES_H=1
-      fi
+cat >>confdefs.h <<_ACEOF
+#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
 
 
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
 
-  for gltype in ptrdiff_t size_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
 
-#include <limits.h>"; then :
 
-else
-  result=unknown
-fi
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
 
-fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
-    fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
 
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
 
 
-  fi
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
-$as_echo_n "checking for bit size of $gltype... " >&6; }
-if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_math_h='<'math.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
+$as_echo_n "checking absolute name of <math.h>... " >&6; }
+if ${gl_cv_next_math_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result"        "
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
 
-#include <limits.h>"; then :
+             if test $ac_cv_header_math_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'math.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-else
-  result=unknown
-fi
+          gl_header=$gl_cv_absolute_math_h
+          gl_cv_next_math_h='"'$gl_header'"'
+          else
+               gl_cv_next_math_h='<'math.h'>'
+             fi
 
-       eval gl_cv_bitsizeof_${gltype}=\$result
 
 fi
-eval ac_res=\$gl_cv_bitsizeof_${gltype}
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_bitsizeof_${gltype}
-    if test $result = unknown; then
-                                                result=0
-    fi
-    GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    cat >>confdefs.h <<_ACEOF
-#define BITSIZEOF_${GLTYPE} $result
-_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
+$as_echo "$gl_cv_next_math_h" >&6; }
+     fi
+     NEXT_MATH_H=$gl_cv_next_math_h
 
-    eval BITSIZEOF_${GLTYPE}=\$result
-  done
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'math.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_math_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
 
 
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
-$as_echo_n "checking whether $gltype is signed... " >&6; }
-if eval \${gl_cv_type_${gltype}_signed+:} false; then :
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
+$as_echo_n "checking whether NAN macro works... " >&6; }
+if ${gl_cv_header_math_nan_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
-
-            int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+#include <math.h>
 int
 main ()
 {
-
+/* Solaris 10 has a broken definition of NAN.  Other platforms
+        fail to provide NAN, or provide it only in C99 mode; this
+        test only needs to fail when NAN is provided but wrong.  */
+         float f = 1.0f;
+#ifdef NAN
+         f = NAN;
+#endif
+         return f == 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  result=yes
+  gl_cv_header_math_nan_works=yes
 else
-  result=no
+  gl_cv_header_math_nan_works=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-       eval gl_cv_type_${gltype}_signed=\$result
-
 fi
-eval ac_res=\$gl_cv_type_${gltype}_signed
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval result=\$gl_cv_type_${gltype}_signed
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    if test "$result" = yes; then
-      cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGNED_${GLTYPE} 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
+$as_echo "$gl_cv_header_math_nan_works" >&6; }
+  if test $gl_cv_header_math_nan_works = no; then
+    REPLACE_NAN=1
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
+$as_echo_n "checking whether HUGE_VAL works... " >&6; }
+if ${gl_cv_header_math_huge_val_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of HUGE_VAL.  */
+         double d = HUGE_VAL;
+         return d == 0;
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_math_huge_val_works=yes
+else
+  gl_cv_header_math_huge_val_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
+$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
+  if test $gl_cv_header_math_huge_val_works = no; then
+    REPLACE_HUGE_VAL=1
+  fi
 
-      eval HAVE_SIGNED_${GLTYPE}=1
-    else
-      eval HAVE_SIGNED_${GLTYPE}=0
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if ${gt_cv_locale_ja+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if defined __BEOS__ || defined __HAIKU__
+  return 1;
+#else
+  /* Check whether the given locale name is recognized by the system.  */
+# if defined _WIN32 && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
+     on Cygwin 1.5.x.  */
+  if (MB_CUR_MAX == 1)
+    return 1;
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  {
+    const char *p;
+    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+    for (p = buf; *p != '\0'; p++)
+      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+        return 1;
+  }
+  return 0;
+#endif
+}
+
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Note that on native Windows, the Japanese locale is
+          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
+          # cannot use it here.
+          gt_cv_locale_ja=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the AIX locale name.
+          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_ja=ja_JP
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_ja=ja_JP.EUC-JP
+            else
+              # Test for the HP-UX, OSF/1, NetBSD locale name.
+              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_ja=ja_JP.eucJP
+              else
+                # Test for the IRIX, FreeBSD locale name.
+                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_ja=ja_JP.EUC
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_ja=ja
+                  else
+                    # Special test for NetBSD 1.6.
+                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+                      gt_cv_locale_ja=ja_JP.eucJP
+                    else
+                      # None found.
+                      gt_cv_locale_ja=none
+                    fi
+                  fi
+                fi
+              fi
+            fi
+          fi
+          ;;
+      esac
     fi
-  done
-
-
-  gl_cv_type_ptrdiff_t_signed=yes
-  gl_cv_type_size_t_signed=no
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
-
-
-  for gltype in ptrdiff_t size_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
-
-              extern $gltype foo;
-              extern $gltype1 foo;
-int
-main ()
-{
+    rm -fr conftest*
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
 fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
-_ACEOF
-
-  done
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+  LOCALE_JA=$gt_cv_locale_ja
 
 
-  fi
 
 
-  for gltype in sig_atomic_t wchar_t wint_t ; do
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
-$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
-if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if ${gt_cv_locale_fr_utf8+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  eval gl_cv_type_${gltype}_suffix=no
-       eval result=\$gl_cv_type_${gltype}_signed
-       if test "$result" = yes; then
-         glsufu=
-       else
-         glsufu=u
-       fi
-       for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
-         case $glsuf in
-           '')  gltype1='int';;
-           l)   gltype1='long int';;
-           ll)  gltype1='long long int';;
-           i64) gltype1='__int64';;
-           u)   gltype1='unsigned int';;
-           ul)  gltype1='unsigned long int';;
-           ull) gltype1='unsigned long long int';;
-           ui64)gltype1='unsigned __int64';;
-         esac
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-  #include <stddef.h>
-  #include <signal.h>
-  #if HAVE_WCHAR_H
-  # include <wchar.h>
-  #endif
 
-              extern $gltype foo;
-              extern $gltype1 foo;
-int
-main ()
-{
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-  ;
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if !(defined __BEOS__ || defined __HAIKU__)
+  /* Check whether the given locale name is recognized by the system.  */
+# if defined _WIN32 && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in the abbreviation of the second month, the second
+     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+     two bytes long, with UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) < 4
+      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+    return 1;
+#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
+  /* Check whether the decimal separator is a comma.
+     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+     are nl_langinfo(RADIXCHAR) are both ".".  */
+  if (localeconv () ->decimal_point[0] != ',') return 1;
+#endif
   return 0;
 }
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval gl_cv_type_${gltype}_suffix=\$glsuf
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-         eval result=\$gl_cv_type_${gltype}_suffix
-         test "$result" != no && break
-       done
-fi
-eval ac_res=\$gl_cv_type_${gltype}_suffix
-              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
-    eval result=\$gl_cv_type_${gltype}_suffix
-    test "$result" = no && result=
-    eval ${GLTYPE}_SUFFIX=\$result
-    cat >>confdefs.h <<_ACEOF
-#define ${GLTYPE}_SUFFIX $result
-_ACEOF
-
-  done
-
-
-
-          if test $GNULIB_OVERRIDES_WINT_T = 1; then
-    BITSIZEOF_WINT_T=32
-  fi
-
-      ;;
-  esac
-
 
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=French_France.65001
+          else
+            # None found.
+            gt_cv_locale_fr_utf8=none
+          fi
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the usual locale name.
+          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr_utf8=fr_FR
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr_utf8=fr_FR.UTF-8
+            else
+              # Test for the Solaris 7 locale name.
+              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr.UTF-8
+              else
+                # None found.
+                gt_cv_locale_fr_utf8=none
+              fi
+            fi
+          fi
+          ;;
+      esac
+    fi
+    rm -fr conftest*
 
-  LIMITS_H='limits.h'
-   if test -n "$LIMITS_H"; then
-  GL_GENERATE_LIMITS_H_TRUE=
-  GL_GENERATE_LIMITS_H_FALSE='#'
-else
-  GL_GENERATE_LIMITS_H_TRUE='#'
-  GL_GENERATE_LIMITS_H_FALSE=
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
 
 
 
 
 
-
-
-   if test -n "$STDINT_H"; then
-  GL_GENERATE_STDINT_H_TRUE=
-  GL_GENERATE_STDINT_H_FALSE='#'
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if ${gt_cv_locale_zh_CN+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  GL_GENERATE_STDINT_H_TRUE='#'
-  GL_GENERATE_STDINT_H_FALSE=
-fi
-
-
-
-  GNULIB_IMAXABS=0;
-  GNULIB_IMAXDIV=0;
-  GNULIB_STRTOIMAX=0;
-  GNULIB_STRTOUMAX=0;
-    HAVE_DECL_IMAXABS=1;
-  HAVE_DECL_IMAXDIV=1;
-  HAVE_DECL_STRTOIMAX=1;
-  HAVE_DECL_STRTOUMAX=1;
-  HAVE_IMAXDIV_T=1;
-  REPLACE_STRTOIMAX=0;
-  REPLACE_STRTOUMAX=0;
-  INT32_MAX_LT_INTMAX_MAX=1;
-  INT64_MAX_EQ_LONG_MAX='defined _LP64';
-  PRIPTR_PREFIX=__PRIPTR_PREFIX;
-  UINT32_MAX_LT_UINTMAX_MAX=1;
-  UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
-
-
-
-
-
-
-
-
-
 
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
+     imitates locale dependent behaviour by looking at the environment
+     variables, and all locales use the UTF-8 encoding.  */
+#if defined __BEOS__ || defined __HAIKU__
+  return 1;
+#else
+  /* Check whether the given locale name is recognized by the system.  */
+# if defined _WIN32 && !defined __CYGWIN__
+  /* On native Windows, setlocale(category, "") looks at the system settings,
+     not at the environment variables.  Also, when an encoding suffix such
+     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+     category of the locale to "C".  */
+  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+    return 1;
+# else
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+     some unit tests fail.
+     On MirBSD 10, when an unsupported locale is specified, setlocale()
+     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
+# if HAVE_LANGINFO_CODESET
+  {
+    const char *cs = nl_langinfo (CODESET);
+    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+        || strcmp (cs, "UTF-8") == 0)
+      return 1;
+  }
+# endif
+# ifdef __CYGWIN__
+  /* On Cygwin, avoid locale names without encoding suffix, because the
+     locale_charset() function relies on the encoding suffix.  Note that
+     LC_ALL is set on the command line.  */
+  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+     This excludes the UTF-8 encoding (except on MirBSD).  */
+  {
+    const char *p;
+    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+    for (p = buf; *p != '\0'; p++)
+      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+        return 1;
+  }
+  /* Check whether a typical GB18030 multibyte sequence is recognized as a
+     single wide character.  This excludes the GB2312 and GBK encodings.  */
+  if (mblen ("\203\062\332\066", 5) != 4)
+    return 1;
+  return 0;
+#endif
+}
 
+_ACEOF
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest$ac_exeext; then
+      case "$host_os" in
+        # Handle native Windows specially, because there setlocale() interprets
+        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+        # "fr" or "fra" as "French" or "French_France.1252",
+        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+        # "ja" as "Japanese" or "Japanese_Japan.932",
+        # and similar.
+        mingw*)
+          # Test for the hypothetical native Windows locale name.
+          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=Chinese_China.54936
+          else
+            # None found.
+            gt_cv_locale_zh_CN=none
+          fi
+          ;;
+        solaris2.8)
+          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
+          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
+          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
+          gt_cv_locale_zh_CN=none
+          ;;
+        *)
+          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+          # configure script would override the LC_ALL setting. Likewise for
+          # LC_CTYPE, which is also set at the beginning of the configure script.
+          # Test for the locale name without encoding suffix.
+          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_zh_CN=zh_CN
+          else
+            # Test for the locale name with explicit encoding suffix.
+            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_zh_CN=zh_CN.GB18030
+            else
+              # None found.
+              gt_cv_locale_zh_CN=none
+            fi
+          fi
+          ;;
+      esac
+    else
+      # If there was a link error, due to mblen(), the system is so old that
+      # it certainly doesn't have a chinese locale.
+      gt_cv_locale_zh_CN=none
+    fi
+    rm -fr conftest*
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_inttypes_h='<'inttypes.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
-$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
-if ${gl_cv_next_inttypes_h+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-             if test $ac_cv_header_inttypes_h = yes; then
-
-
-
-
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <inttypes.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'inttypes.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_inttypes_h
-           gl_cv_next_inttypes_h='"'$gl_header'"'
-          else
-               gl_cv_next_inttypes_h='<'inttypes.h'>'
-             fi
-
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
-$as_echo "$gl_cv_next_inttypes_h" >&6; }
-     fi
-     NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'inttypes.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_inttypes_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
 
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
 
 
 
 
+  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+  # irrelevant for anonymous mappings.
+  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = xyes; then :
+  gl_have_mmap=yes
+else
+  gl_have_mmap=no
+fi
 
 
+  # Try to allow MAP_ANONYMOUS.
+  gl_have_mmap_anonymous=no
+  if test $gl_have_mmap = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+    I cannot identify this map
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
+  gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
 
+    if test $gl_have_mmap_anonymous != yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <sys/mman.h>
+#ifdef MAP_ANON
+    I cannot identify this map
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
+         gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
 
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+    if test $gl_have_mmap_anonymous = yes; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
-$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
-if ${gl_cv_cc_double_expbit0+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
 
-      if test "$cross_compiling" = yes; then :
+    fi
+  fi
 
-                                                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#if defined arm || defined __arm || defined __arm__
-  mixed_endianness
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "mixed_endianness" >/dev/null 2>&1; then :
-  gl_cv_cc_double_expbit0="unknown"
-else
 
-                                                         :
-if ${ac_cv_c_bigendian+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-       # Check for potential -arch flags.  It is not universal unless
-       # there are at least two -arch flags with different values.
-       ac_arch=
-       ac_prev=
-       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-        if test -n "$ac_prev"; then
-          case $ac_word in
-            i?86 | x86_64 | ppc | ppc64)
-              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-                ac_arch=$ac_word
-              else
-                ac_cv_c_bigendian=universal
-                break
-              fi
-              ;;
-          esac
-          ac_prev=
-        elif test "x$ac_word" = "x-arch"; then
-          ac_prev=arch
-        fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
+  HAVE_MBSLEN=0;
+    HAVE_EXPLICIT_BZERO=1;
+  HAVE_FFSL=1;
+  HAVE_FFSLL=1;
+  HAVE_DECL_MEMMEM=1;
+  HAVE_MEMPCPY=1;
+  HAVE_DECL_MEMRCHR=1;
+  HAVE_RAWMEMCHR=1;
+  HAVE_STPCPY=1;
+  HAVE_STPNCPY=1;
+  HAVE_STRCHRNUL=1;
+  HAVE_DECL_STRDUP=1;
+  HAVE_DECL_STRNDUP=1;
+  HAVE_DECL_STRNLEN=1;
+  HAVE_STRPBRK=1;
+  HAVE_STRSEP=1;
+  HAVE_STRCASESTR=1;
+  HAVE_DECL_STRTOK_R=1;
+  HAVE_DECL_STRERROR_R=1;
+  HAVE_STRERRORNAME_NP=1;
+  HAVE_SIGABBREV_NP=1;
+  HAVE_SIGDESCR_NP=1;
+  HAVE_DECL_STRSIGNAL=1;
+  HAVE_STRVERSCMP=1;
+  REPLACE_FFSLL=0;
+  REPLACE_MEMCHR=0;
+  REPLACE_MEMMEM=0;
+  REPLACE_STPNCPY=0;
+  REPLACE_STRCHRNUL=0;
+  REPLACE_STRDUP=0;
+  REPLACE_STRNCAT=0;
+  REPLACE_STRNDUP=0;
+  REPLACE_STRNLEN=0;
+  REPLACE_STRSTR=0;
+  REPLACE_STRCASESTR=0;
+  REPLACE_STRTOK_R=0;
+  REPLACE_STRERROR=0;
+  REPLACE_STRERROR_R=0;
+  REPLACE_STRERRORNAME_NP=0;
+  REPLACE_STRSIGNAL=0;
+  UNDEFINE_STRTOK_R=0;
 
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-               #include <sys/param.h>
 
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
+  # Detect platform-specific bugs in some versions of glibc:
+  # memchr should not dereference anything with length 0
+  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
+  # memchr should not dereference overestimated length after a match
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+  # memchr should cast the second argument to 'unsigned char'.
+  #   This bug exists in Android 4.3.
+  # Assume that memchr works on platforms that lack mprotect.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+$as_echo_n "checking whether memchr works... " >&6; }
+if ${gl_cv_func_memchr_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                           # Guess no on Android.
+          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+                           # Guess yes on native Windows.
+          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
+                           # If we don't know, obey --enable-cross-guesses.
+          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+        esac
 
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-$ac_includes_default
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+#  define MAP_FILE 0
+# endif
+#endif
+
 int
 main ()
 {
 
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
+  int result = 0;
+  char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+  const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+  const int flags = MAP_FILE | MAP_PRIVATE;
+  int fd = open ("/dev/zero", O_RDONLY, 0666);
+  if (fd >= 0)
+# endif
+    {
+      int pagesize = getpagesize ();
+      char *two_pages =
+        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+                       flags, fd, 0);
+      if (two_pages != (char *)(-1)
+          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+        fence = two_pages + pagesize;
+    }
+#endif
+  if (fence)
+    {
+      /* Test against bugs on glibc systems.  */
+      if (memchr (fence, 0, 0))
+        result |= 1;
+      strcpy (fence - 9, "12345678");
+      if (memchr (fence - 9, 0, 79) != fence - 1)
+        result |= 2;
+      if (memchr (fence - 1, 0, 3) != fence - 1)
+        result |= 4;
+      /* Test against bug on AIX 7.2.  */
+      if (memchr (fence - 4, '6', 16) != fence - 4)
+        result |= 8;
+    }
+  /* Test against bug on Android 4.3.  */
+  {
+    char input[3];
+    input[0] = 'a';
+    input[1] = 'b';
+    input[2] = 'c';
+    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
+      result |= 16;
+  }
+  return result;
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
+  gl_cv_func_memchr_works=yes
 else
-  ac_cv_c_bigendian=yes
+  gl_cv_func_memchr_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-    fi
+
 fi
-:
- case $ac_cv_c_bigendian in #(
-   yes)
-     gl_cv_cc_double_expbit0="word 0 bit 20";; #(
-   no)
-     gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
-   universal)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+$as_echo "$gl_cv_func_memchr_works" >&6; }
+  case "$gl_cv_func_memchr_works" in
+    *yes) ;;
+    *) REPLACE_MEMCHR=1 ;;
+  esac
 
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
-     ;; #(
-   *)
-     gl_cv_cc_double_expbit0="unknown" ;;
- esac
 
+  GL_GNULIB_EXPLICIT_BZERO=0
 
-fi
-rm -f conftest*
 
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_FFSL=0
 
-#include <float.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <string.h>
-#define NWORDS \
-  ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { double value; unsigned int word[NWORDS]; } memory_double;
-static unsigned int ored_words[NWORDS];
-static unsigned int anded_words[NWORDS];
-static void add_to_ored_words (double x)
-{
-  memory_double m;
-  size_t i;
-  /* Clear it first, in case sizeof (double) < sizeof (memory_double).  */
-  memset (&m, 0, sizeof (memory_double));
-  m.value = x;
-  for (i = 0; i < NWORDS; i++)
-    {
-      ored_words[i] |= m.word[i];
-      anded_words[i] &= m.word[i];
-    }
-}
-int main ()
-{
-  size_t j;
-  FILE *fp = fopen ("conftest.out", "w");
-  if (fp == NULL)
-    return 1;
-  for (j = 0; j < NWORDS; j++)
-    anded_words[j] = ~ (unsigned int) 0;
-  add_to_ored_words (0.25);
-  add_to_ored_words (0.5);
-  add_to_ored_words (1.0);
-  add_to_ored_words (2.0);
-  add_to_ored_words (4.0);
-  /* Remove bits that are common (e.g. if representation of the first mantissa
-     bit is explicit).  */
-  for (j = 0; j < NWORDS; j++)
-    ored_words[j] &= ~anded_words[j];
-  /* Now find the nonzero word.  */
-  for (j = 0; j < NWORDS; j++)
-    if (ored_words[j] != 0)
-      break;
-  if (j < NWORDS)
-    {
-      size_t i;
-      for (i = j + 1; i < NWORDS; i++)
-        if (ored_words[i] != 0)
-          {
-            fprintf (fp, "unknown");
-            return (fclose (fp) != 0);
-          }
-      for (i = 0; ; i++)
-        if ((ored_words[j] >> i) & 1)
-          {
-            fprintf (fp, "word %d bit %d", (int) j, (int) i);
-            return (fclose (fp) != 0);
-          }
-    }
-  fprintf (fp, "unknown");
-  return (fclose (fp) != 0);
-}
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_cc_double_expbit0=`cat conftest.out`
-else
-  gl_cv_cc_double_expbit0="unknown"
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-      rm -f conftest.out
+  GL_GNULIB_FFSLL=0
+
+
+
+  GL_GNULIB_MEMCHR=0
+
+
+
+  GL_GNULIB_MEMMEM=0
+
+
+
+  GL_GNULIB_MEMPCPY=0
+
+
+
+  GL_GNULIB_MEMRCHR=0
+
+
+
+  GL_GNULIB_RAWMEMCHR=0
+
+
+
+  GL_GNULIB_STPCPY=0
+
+
+
+  GL_GNULIB_STPNCPY=0
+
+
+
+  GL_GNULIB_STRCHRNUL=0
+
+
+
+  GL_GNULIB_STRDUP=0
+
+
+
+  GL_GNULIB_STRNCAT=0
+
+
+
+  GL_GNULIB_STRNDUP=0
+
+
+
+  GL_GNULIB_STRNLEN=0
+
+
+
+  GL_GNULIB_STRPBRK=0
+
+
+
+  GL_GNULIB_STRSEP=0
+
+
+
+  GL_GNULIB_STRSTR=0
+
+
+
+  GL_GNULIB_STRCASESTR=0
+
+
+
+  GL_GNULIB_STRTOK_R=0
+
+
+
+  GL_GNULIB_MBSLEN=0
+
+
+
+  GL_GNULIB_MBSNLEN=0
+
+
+
+  GL_GNULIB_MBSCHR=0
+
+
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
-$as_echo "$gl_cv_cc_double_expbit0" >&6; }
-  case "$gl_cv_cc_double_expbit0" in
-    word*bit*)
-      word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
-      bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+  GL_GNULIB_MBSRCHR=0
 
-cat >>confdefs.h <<_ACEOF
-#define DBL_EXPBIT0_WORD $word
-_ACEOF
 
 
-cat >>confdefs.h <<_ACEOF
-#define DBL_EXPBIT0_BIT $bit
-_ACEOF
+  GL_GNULIB_MBSSTR=0
 
-      ;;
-  esac
 
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
-$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
-if ${ac_cv_c_bigendian+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_bigendian=unknown
-    # See if we're dealing with a universal compiler.
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-              not a universal capable compiler
-            #endif
-            typedef int dummy;
+  GL_GNULIB_MBSCASECMP=0
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-       # Check for potential -arch flags.  It is not universal unless
-       # there are at least two -arch flags with different values.
-       ac_arch=
-       ac_prev=
-       for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
-        if test -n "$ac_prev"; then
-          case $ac_word in
-            i?86 | x86_64 | ppc | ppc64)
-              if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
-                ac_arch=$ac_word
-              else
-                ac_cv_c_bigendian=universal
-                break
-              fi
-              ;;
-          esac
-          ac_prev=
-        elif test "x$ac_word" = "x-arch"; then
-          ac_prev=arch
-        fi
-       done
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if sys/param.h defines the BYTE_ORDER macro.
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-            #include <sys/param.h>
 
-int
-main ()
-{
-#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
-                    && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
-                    && LITTLE_ENDIAN)
-             bogus endian macros
-            #endif
+  GL_GNULIB_MBSNCASECMP=0
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-               #include <sys/param.h>
 
-int
-main ()
-{
-#if BYTE_ORDER != BIG_ENDIAN
-                not big endian
-               #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
+  GL_GNULIB_MBSPCASECMP=0
 
-int
-main ()
-{
-#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
-             bogus endian macros
-            #endif
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  # It does; now see whether it defined to _BIG_ENDIAN or not.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
 
-int
-main ()
-{
-#ifndef _BIG_ENDIAN
-                not big endian
-               #endif
+  GL_GNULIB_MBSCASESTR=0
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_bigendian=yes
-else
-  ac_cv_c_bigendian=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    fi
-    if test $ac_cv_c_bigendian = unknown; then
-      # Compile a test program.
-      if test "$cross_compiling" = yes; then :
-  # Try to guess by grepping values from an object file.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-short int ascii_mm[] =
-                 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
-               short int ascii_ii[] =
-                 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
-               int use_ascii (int i) {
-                 return ascii_mm[i] + ascii_ii[i];
-               }
-               short int ebcdic_ii[] =
-                 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
-               short int ebcdic_mm[] =
-                 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
-               int use_ebcdic (int i) {
-                 return ebcdic_mm[i] + ebcdic_ii[i];
-               }
-               extern int foo;
 
-int
-main ()
-{
-return use_ascii (foo) == use_ebcdic (foo);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
-             ac_cv_c_bigendian=yes
-           fi
-           if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
-             if test "$ac_cv_c_bigendian" = unknown; then
-               ac_cv_c_bigendian=no
-             else
-               # finding both strings is unlikely to happen, but who knows?
-               ac_cv_c_bigendian=unknown
-             fi
-           fi
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
 
-            /* Are we little or big endian?  From Harbison&Steele.  */
-            union
-            {
-              long int l;
-              char c[sizeof (long int)];
-            } u;
-            u.l = 1;
-            return u.c[sizeof (long int) - 1] == 1;
+  GL_GNULIB_MBSCSPN=0
+
+
+
+  GL_GNULIB_MBSPBRK=0
+
+
+
+  GL_GNULIB_MBSSPN=0
+
+
+
+  GL_GNULIB_MBSSEP=0
+
+
+
+  GL_GNULIB_MBSTOK_R=0
+
+
+
+  GL_GNULIB_STRERROR=0
+
+
+
+  GL_GNULIB_STRERROR_R=0
+
+
+
+  GL_GNULIB_STRERRORNAME_NP=0
+
+
+
+  GL_GNULIB_SIGABBREV_NP=0
+
+
+
+  GL_GNULIB_SIGDESCR_NP=0
+
+
+
+  GL_GNULIB_STRSIGNAL=0
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_c_bigendian=no
-else
-  ac_cv_c_bigendian=yes
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
-$as_echo "$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in #(
-   yes)
-     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
-;; #(
-   no)
-      ;; #(
-   universal)
 
-$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+  GL_GNULIB_STRVERSCMP=0
 
-     ;; #(
-   *)
-     as_fn_error $? "unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
- esac
 
 
+  GL_GNULIB_MDA_MEMCCPY=1
 
-  GNULIB_LOCALECONV=0;
-  GNULIB_SETLOCALE=0;
-  GNULIB_SETLOCALE_NULL=0;
-  GNULIB_DUPLOCALE=0;
-  GNULIB_LOCALENAME=0;
-    HAVE_NEWLOCALE=1;
-  HAVE_DUPLOCALE=1;
-  HAVE_FREELOCALE=1;
-  REPLACE_LOCALECONV=0;
-  REPLACE_SETLOCALE=0;
-  REPLACE_NEWLOCALE=0;
-  REPLACE_DUPLOCALE=0;
-  REPLACE_FREELOCALE=0;
-  REPLACE_STRUCT_LCONV=0;
 
 
-    REPLACE_NULL=0;
-  HAVE_MAX_ALIGN_T=1;
-  HAVE_WCHAR_T=1;
+  GL_GNULIB_MDA_STRDUP=1
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
-$as_echo_n "checking for wchar_t... " >&6; }
-if ${gt_cv_c_wchar_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-            wchar_t foo = (wchar_t)'\0';
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_c_wchar_t=yes
+ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memmem" = xyes; then :
+  ac_have_decl=1
 else
-  gt_cv_c_wchar_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
-$as_echo "$gt_cv_c_wchar_t" >&6; }
-  if test $gt_cv_c_wchar_t = yes; then
-
-$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
 
-  fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMMEM $ac_have_decl
+_ACEOF
 
 
 
 
 
+  for ac_func in memmem
+do :
+  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMMEM 1
+_ACEOF
 
+fi
+done
 
-  STDDEF_H=
+  if test $ac_cv_func_memmem = yes; then
+    HAVE_MEMMEM=1
+  else
+    HAVE_MEMMEM=0
+  fi
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
-$as_echo_n "checking for good max_align_t... " >&6; }
-if ${gl_cv_type_max_align_t+:} false; then :
+  if test $ac_cv_have_decl_memmem = no; then
+    HAVE_DECL_MEMMEM=0
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
+$as_echo_n "checking whether memmem works... " >&6; }
+if ${gl_cv_func_memmem_works_always+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then :
+                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-            unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
-            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
-            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
-            #endif
-            typedef struct { char a; max_align_t b; } max_helper;
-            typedef struct { char a; long b; } long_helper;
-            typedef struct { char a; double b; } double_helper;
-            typedef struct { char a; long double b; } long_double_helper;
-            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
-            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
-            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
-int
-main ()
-{
+#include <string.h> /* for __GNU_LIBRARY__ */
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
+                          || __GLIBC_MINOR__ > 12)) \
+      || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
 
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_max_align_t=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_memmem_works_always="guessing yes"
 else
-  gl_cv_type_max_align_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+  gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
-$as_echo "$gl_cv_type_max_align_t" >&6; }
-  if test $gl_cv_type_max_align_t = no; then
-    HAVE_MAX_ALIGN_T=0
-    STDDEF_H=stddef.h
-  fi
+rm -f conftest*
 
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if ${gl_cv_decl_null_works+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+#include <string.h> /* for memmem */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
 
 int
 main ()
 {
 
+    int result = 0;
+    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
+      result |= 1;
+    /* Check for empty needle behavior.  */
+    {
+      const char *haystack = "AAA";
+      if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
+        result |= 2;
+    }
+    return result;
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_decl_null_works=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_memmem_works_always=yes
 else
-  gl_cv_decl_null_works=no
+  gl_cv_func_memmem_works_always=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
-  fi
 
 
-   if test -n "$STDDEF_H"; then
-  GL_GENERATE_STDDEF_H_TRUE=
-  GL_GENERATE_STDDEF_H_FALSE='#'
-else
-  GL_GENERATE_STDDEF_H_TRUE='#'
-  GL_GENERATE_STDDEF_H_FALSE=
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
+$as_echo "$gl_cv_func_memmem_works_always" >&6; }
+    case "$gl_cv_func_memmem_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
+  fi
+  :
 
-  if test -n "$STDDEF_H"; then
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if ${gl_cv_next_stddef_h+:} false; then :
-  $as_echo_n "(cached) " >&6
+ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memrchr" = xyes; then :
+  ac_have_decl=1
 else
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stddef.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_stddef_h
-           gl_cv_next_stddef_h='"'$gl_header'"'
-
-
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
-     fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stddef.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
-
-
-
-
-  fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMRCHR $ac_have_decl
+_ACEOF
 
 
 
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
-$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
-if ${gl_cv_header_locale_has_locale_t+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
+$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
+if ${gl_cv_minmax_in_limits_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <locale.h>
-            locale_t x;
+#include <limits.h>
+            int x = MIN (42, 17);
 int
 main ()
 {
@@ -14417,952 +19211,741 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_locale_has_locale_t=yes
+  gl_cv_minmax_in_limits_h=yes
 else
-  gl_cv_header_locale_has_locale_t=no
+  gl_cv_minmax_in_limits_h=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
-$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
+$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
+  if test $gl_cv_minmax_in_limits_h = yes; then
 
+$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
 
-  if test $ac_cv_header_xlocale_h = yes; then
-    HAVE_XLOCALE_H=1
-    if test $gl_cv_header_locale_has_locale_t = yes; then
-      gl_cv_header_locale_h_needs_xlocale_h=no
-    else
-      gl_cv_header_locale_h_needs_xlocale_h=yes
-    fi
-    HAVE_LOCALE_T=1
-  else
-    HAVE_XLOCALE_H=0
-    gl_cv_header_locale_h_needs_xlocale_h=no
-    if test $gl_cv_header_locale_has_locale_t = yes; then
-      HAVE_LOCALE_T=1
-    else
-      HAVE_LOCALE_T=0
-    fi
   fi
 
 
 
 
-  gl_threads_api=none
-  LIBTHREAD=
-  LTLIBTHREAD=
-  LIBMULTITHREAD=
-  LTLIBMULTITHREAD=
-  if test "$gl_use_threads" != no; then
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
-$as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
-if ${gl_cv_have_weak+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
+$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
+if ${gl_cv_minmax_in_sys_param_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_weak=no
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-extern void xyzzy ();
-#pragma weak xyzzy
+#include <sys/param.h>
+            int x = MIN (42, 17);
 int
 main ()
 {
-xyzzy();
+
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_have_weak=maybe
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-     if test $gl_cv_have_weak = maybe; then
-                     if test "$cross_compiling" = yes; then :
-                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __ELF__
-             Extensible Linking Format
-             #endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
-  gl_cv_have_weak="guessing yes"
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_minmax_in_sys_param_h=yes
 else
-  gl_cv_have_weak="guessing no"
+  gl_cv_minmax_in_sys_param_h=no
 fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
+$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
+  if test $gl_cv_minmax_in_sys_param_h = yes; then
 
+$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  fi
 
-#include <stdio.h>
-#pragma weak fputs
-int main ()
-{
-  return (fputs == NULL);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_have_weak=yes
+
+
+
+
+
+
+
+
+
+    HAVE_STRUCT_ADDRINFO=1;
+  HAVE_DECL_FREEADDRINFO=1;
+  HAVE_DECL_GAI_STRERROR=1;
+  HAVE_DECL_GETADDRINFO=1;
+  HAVE_DECL_GETNAMEINFO=1;
+  REPLACE_GAI_STRERROR=0;
+  REPLACE_GETADDRINFO=0;
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_netdb_h='<'netdb.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
+$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
+if ${gl_cv_next_netdb_h+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_weak=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-     fi
-          case " $LDFLAGS " in
-       *" -static "*) gl_cv_have_weak=no ;;
-     esac
-                    case "$gl_cv_have_weak" in
-       *yes)
-         case "$host_os" in
-           freebsd* | dragonfly*)
-             : > conftest1.c
-             $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
-             cat <<EOF > conftest2.c
-#include <pthread.h>
-#pragma weak pthread_mutexattr_gettype
-int main ()
-{
-  return (pthread_mutexattr_gettype != NULL);
-}
-EOF
-             $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \
-               || gl_cv_have_weak=no
-             rm -f conftest1.c libempty.so conftest2.c conftest
-             ;;
-         esac
-         ;;
-     esac
+             if test $ac_cv_header_netdb_h = yes; then
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
-$as_echo "$gl_cv_have_weak" >&6; }
-  case "$gl_cv_have_weak" in
-    *yes)
 
-$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
 
-      ;;
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <netdb.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
   esac
 
-    if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'netdb.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
 
-      :
-    fi
-    if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
+        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-      gl_have_isoc_threads="$ac_cv_header_threads_h"
-    fi
-    if test "$gl_use_threads" = yes \
-       || test "$gl_use_threads" = posix \
-       || test "$gl_use_threads" = isoc+posix; then
+          gl_header=$gl_cv_absolute_netdb_h
+          gl_cv_next_netdb_h='"'$gl_header'"'
+          else
+               gl_cv_next_netdb_h='<'netdb.h'>'
+             fi
 
 
-  if test -z "$gl_pthreadlib_body_done"; then
-    gl_pthread_api=no
-    LIBPTHREAD=
-    LIBPMULTITHREAD=
-    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
-    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
-    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
-  gl_have_pthread_h=yes
-else
-  gl_have_pthread_h=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
+$as_echo "$gl_cv_next_netdb_h" >&6; }
+     fi
+     NEXT_NETDB_H=$gl_cv_next_netdb_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'netdb.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_netdb_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
 
-    if test "$gl_have_pthread_h" = yes; then
-      # Other possible tests:
-      #   -lpthreads (FSU threads, PCthreads)
-      #   -lgthreads
-      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
-      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
-      # the second one only in libpthread, and lock.c needs it.
-      #
-      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
-      # needs -pthread for some reason.  See:
-      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
-      save_LIBS=$LIBS
-      for gl_pthread in '' '-pthread'; do
-        LIBS="$LIBS $gl_pthread"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-               pthread_mutex_t m;
-               pthread_mutexattr_t ma;
 
-int
-main ()
-{
-pthread_mutex_lock (&m);
-               pthread_mutexattr_init (&ma);
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=$gl_pthread
-           LIBPMULTITHREAD=$gl_pthread
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        LIBS=$save_LIBS
-        test $gl_pthread_api = yes && break
-      done
 
-      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
-      # since it is defined as a macro on OSF/1.)
-      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
-        # The program links fine without libpthread. But it may actually
-        # need to link with libpthread in order to create multiple threads.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
-int
-main ()
-{
-return pthread_kill ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
-else
-  ac_cv_lib_pthread_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  LIBPMULTITHREAD=-lpthread
-           # On Solaris and HP-UX, most pthread functions exist also in libc.
-           # Therefore pthread_in_use() needs to actually try to create a
-           # thread: pthread_create from libc will fail, whereas
-           # pthread_create will actually create a thread.
-           # On Solaris 10 or newer, this test is no longer needed, because
-           # libc contains the fully functional pthread functions.
-           case "$host_os" in
-             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
+  if test $ac_cv_header_netdb_h = yes; then
+    HAVE_NETDB_H=1
+  else
+    HAVE_NETDB_H=0
+  fi
+
+
+
 
-$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
 
-           esac
 
-fi
 
-      elif test $gl_pthread_api != yes; then
-        # Some library is needed. Try libpthread and libc_r.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+
+  GL_GNULIB_GETADDRINFO=0
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
+$as_echo_n "checking for O_CLOEXEC... " >&6; }
+if ${gl_cv_macro_O_CLOEXEC+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <fcntl.h>
+                          #ifndef O_CLOEXEC
+                            choke me;
+                          #endif
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
 int
 main ()
 {
-return pthread_kill ();
+return O_CLOEXEC;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_macro_O_CLOEXEC=yes
 else
-  ac_cv_lib_pthread_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  gl_cv_macro_O_CLOEXEC=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=-lpthread
-           LIBPMULTITHREAD=-lpthread
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
+$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
 
-        if test $gl_pthread_api != yes; then
-          # For FreeBSD 4.
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
-$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if ${gl_cv_promoted_mode_t+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char pthread_kill ();
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
 int
 main ()
 {
-return pthread_kill ();
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_r_pthread_kill=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_promoted_mode_t='int'
 else
-  ac_cv_lib_c_r_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  gl_cv_promoted_mode_t='mode_t'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
-$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-             LIBPTHREAD=-lc_r
-             LIBPMULTITHREAD=-lc_r
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
 
-        fi
-      fi
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
-$as_echo_n "checking whether POSIX threads API is available... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
-$as_echo "$gl_pthread_api" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
 
 
-    if test $gl_pthread_api = yes; then
 
-$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
 
-    fi
 
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+
+
+
+
+    HAVE_PSELECT=1;
+  REPLACE_PSELECT=0;
+  REPLACE_SELECT=0;
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
+$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
+if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sched.h>
+#include <sys/select.h>
 int
 main ()
 {
-sched_yield ();
+struct timeval b;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIB_SCHED_YIELD=
-
-else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
-  $as_echo_n "(cached) " >&6
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_sys_select_h_selfcontained=yes
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_cv_header_sys_select_h_selfcontained=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
+#include <sys/select.h>
 int
 main ()
 {
-return sched_yield ();
+int memset; int bzero;
   ;
   return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_sched_yield=yes
-else
-  ac_cv_lib_rt_sched_yield=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lrt
-else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
-$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
-if ${ac_cv_lib_posix4_sched_yield+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix4  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+}
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char sched_yield ();
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/select.h>
 int
 main ()
 {
-return sched_yield ();
+
+                  #undef memset
+                  #define memset nonexistent_memset
+                  extern
+                  #ifdef __cplusplus
+                  "C"
+                  #endif
+                  void *memset (void *, int, unsigned long);
+                  #undef bzero
+                  #define bzero nonexistent_bzero
+                  extern
+                  #ifdef __cplusplus
+                  "C"
+                  #endif
+                  void bzero (void *, unsigned long);
+                  fd_set fds;
+                  FD_ZERO (&fds);
+
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_posix4_sched_yield=yes
+
 else
-  ac_cv_lib_posix4_sched_yield=no
+  gl_cv_header_sys_select_h_selfcontained=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
-$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
-if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lposix4
+
 fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+      fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
+$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_select_h='<'sys/select.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
+$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
+if ${gl_cv_next_sys_select_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_sys_select_h = yes; then
+
+
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/select.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/select.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_select_h
+          gl_cv_next_sys_select_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_select_h='<'sys/select.h'>'
+             fi
 
 
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
+$as_echo "$gl_cv_next_sys_select_h" >&6; }
+     fi
+     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/select.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_select_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
 
 
-    gl_pthreadlib_body_done=done
+
+
+  if test $ac_cv_header_sys_select_h = yes; then
+    HAVE_SYS_SELECT_H=1
+  else
+    HAVE_SYS_SELECT_H=0
   fi
 
-      LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
-      LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
-      if test $gl_pthread_api = yes; then
-        if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
-          gl_threads_api='isoc+posix'
 
-$as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
 
-          LIBTHREAD= LTLIBTHREAD=
-        else
-          gl_threads_api=posix
 
-$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
 
-          if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
-            if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
 
-$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
+fi
 
-              LIBTHREAD= LTLIBTHREAD=
-            else
-              case "$host_os" in
-                freebsd* | dragonfly*)
-                  if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
+done
 
-$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
 
-                  fi
-                  ;;
-              esac
-            fi
-          fi
-        fi
-      fi
-    fi
-    if test $gl_threads_api = none; then
-      if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
 
 
 
-  if test -z "$gl_stdthreadlib_body_done"; then
 
 
-    case "$host_os" in
-      mingw*)
-        LIBSTDTHREAD=
-        ;;
-      *)
 
 
-  if test -z "$gl_pthreadlib_body_done"; then
-    gl_pthread_api=no
-    LIBPTHREAD=
-    LIBPMULTITHREAD=
-    # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
-    # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
-    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
-if test "x$ac_cv_header_pthread_h" = xyes; then :
-  gl_have_pthread_h=yes
-else
-  gl_have_pthread_h=no
-fi
 
 
-    if test "$gl_have_pthread_h" = yes; then
-      # Other possible tests:
-      #   -lpthreads (FSU threads, PCthreads)
-      #   -lgthreads
-      # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
-      # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
-      # the second one only in libpthread, and lock.c needs it.
-      #
-      # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
-      # needs -pthread for some reason.  See:
-      # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
-      save_LIBS=$LIBS
-      for gl_pthread in '' '-pthread'; do
-        LIBS="$LIBS $gl_pthread"
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
-               pthread_mutex_t m;
-               pthread_mutexattr_t ma;
 
-int
-main ()
-{
-pthread_mutex_lock (&m);
-               pthread_mutexattr_init (&ma);
-  ;
-  return 0;
-}
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=$gl_pthread
-           LIBPMULTITHREAD=$gl_pthread
+
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-        LIBS=$save_LIBS
-        test $gl_pthread_api = yes && break
-      done
 
-      # Test for libpthread by looking for pthread_kill. (Not pthread_self,
-      # since it is defined as a macro on OSF/1.)
-      if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
-        # The program links fine without libpthread. But it may actually
-        # need to link with libpthread in order to create multiple threads.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+done
+
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+
+   LIBSOCKET=
+  if test $HAVE_WINSOCK2_H = 1; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
+$as_echo_n "checking for WSAStartup... " >&6; }
+if ${gl_cv_func_wsastartup+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+       gl_save_LIBS="$LIBS"
+       LIBS="$LIBS -lws2_32"
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
 #endif
-char pthread_kill ();
 int
 main ()
 {
-return pthread_kill ();
+
+            WORD wVersionRequested = MAKEWORD(1, 1);
+            WSADATA wsaData;
+            int err = WSAStartup(wVersionRequested, &wsaData);
+            WSACleanup ();
+
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
+  gl_cv_func_wsastartup=yes
 else
-  ac_cv_lib_pthread_pthread_kill=no
+  gl_cv_func_wsastartup=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  LIBPMULTITHREAD=-lpthread
-           # On Solaris and HP-UX, most pthread functions exist also in libc.
-           # Therefore pthread_in_use() needs to actually try to create a
-           # thread: pthread_create from libc will fail, whereas
-           # pthread_create will actually create a thread.
-           # On Solaris 10 or newer, this test is no longer needed, because
-           # libc contains the fully functional pthread functions.
-           case "$host_os" in
-             solaris | solaris2.1-9 | solaris2.1-9.* | hpux*)
-
-$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
-
-           esac
+       LIBS="$gl_save_LIBS"
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
+$as_echo "$gl_cv_func_wsastartup" >&6; }
+    if test "$gl_cv_func_wsastartup" = "yes"; then
 
-      elif test $gl_pthread_api != yes; then
-        # Some library is needed. Try libpthread and libc_r.
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
-$as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
-if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
+$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
+
+      LIBSOCKET='-lws2_32'
+    fi
+  else
+                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
+$as_echo_n "checking for library containing setsockopt... " >&6; }
+if ${gl_cv_lib_socket+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+      gl_cv_lib_socket=
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
 #endif
-char pthread_kill ();
+char setsockopt();
 int
 main ()
 {
-return pthread_kill ();
+setsockopt();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_pthread_pthread_kill=yes
-else
-  ac_cv_lib_pthread_pthread_kill=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
-$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-           LIBPTHREAD=-lpthread
-           LIBPMULTITHREAD=-lpthread
-fi
 
-        if test $gl_pthread_api != yes; then
-          # For FreeBSD 4.
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
-$as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
-if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc_r  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  gl_save_LIBS="$LIBS"
+         LIBS="$gl_save_LIBS -lsocket"
+         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
 #endif
-char pthread_kill ();
+char setsockopt();
 int
 main ()
 {
-return pthread_kill ();
+setsockopt();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_c_r_pthread_kill=yes
-else
-  ac_cv_lib_c_r_pthread_kill=no
+  gl_cv_lib_socket="-lsocket"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
-$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
-if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
-  gl_pthread_api=yes
-             LIBPTHREAD=-lc_r
-             LIBPMULTITHREAD=-lc_r
-fi
-
-        fi
-      fi
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
-$as_echo_n "checking whether POSIX threads API is available... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
-$as_echo "$gl_pthread_api" >&6; }
-
-
-    if test $gl_pthread_api = yes; then
-
-$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
-
-    fi
-
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sched.h>
-int
-main ()
-{
-sched_yield ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  LIB_SCHED_YIELD=
-
-else
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
-$as_echo_n "checking for sched_yield in -lrt... " >&6; }
-if ${ac_cv_lib_rt_sched_yield+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         if test -z "$gl_cv_lib_socket"; then
+           LIBS="$gl_save_LIBS -lnetwork"
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
 #endif
-char sched_yield ();
+char setsockopt();
 int
 main ()
 {
-return sched_yield ();
+setsockopt();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_sched_yield=yes
-else
-  ac_cv_lib_rt_sched_yield=no
+  gl_cv_lib_socket="-lnetwork"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
-$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
-if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lrt
-else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
-$as_echo_n "checking for sched_yield in -lposix4... " >&6; }
-if ${ac_cv_lib_posix4_sched_yield+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lposix4  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+           if test -z "$gl_cv_lib_socket"; then
+             LIBS="$gl_save_LIBS -lnet"
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
+extern
 #ifdef __cplusplus
-extern "C"
+"C"
 #endif
-char sched_yield ();
+char setsockopt();
 int
 main ()
 {
-return sched_yield ();
+setsockopt();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_posix4_sched_yield=yes
-else
-  ac_cv_lib_posix4_sched_yield=no
+  gl_cv_lib_socket="-lnet"
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+           fi
+         fi
+         LIBS="$gl_save_LIBS"
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
-$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
-if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
-  LIB_SCHED_YIELD=-lposix4
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+      if test -z "$gl_cv_lib_socket"; then
+        gl_cv_lib_socket="none needed"
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
+$as_echo "$gl_cv_lib_socket" >&6; }
+    if test "$gl_cv_lib_socket" != "none needed"; then
+      LIBSOCKET="$gl_cv_lib_socket"
+    fi
+  fi
+
+
+
+
+
+
+  :
+
+
+
+
+  GL_GNULIB_PSELECT=0
+
+
+
+  GL_GNULIB_SELECT=0
+
+
+
+ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_setenv" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
 
-fi
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETENV $ac_have_decl
+_ACEOF
 
 
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
 
 
-    gl_pthreadlib_body_done=done
+
+
+  if test $ac_cv_have_decl_setenv = no; then
+    HAVE_DECL_SETENV=0
   fi
 
-        if test $ac_cv_header_threads_h = yes; then
-                                                  for ac_func in thrd_create
+
+
+
+
+  for ac_header in search.h
 do :
-  ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create"
-if test "x$ac_cv_func_thrd_create" = xyes; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_THRD_CREATE 1
+#define HAVE_SEARCH_H 1
 _ACEOF
 
 fi
-done
 
-          if test $ac_cv_func_thrd_create = yes; then
-            LIBSTDTHREAD=
-          else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
-$as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
-if ${ac_cv_lib_stdthreads_thrd_create+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lstdthreads  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+done
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char thrd_create ();
-int
-main ()
-{
-return thrd_create ();
-  ;
-  return 0;
-}
+  for ac_func in tsearch
+do :
+  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TSEARCH 1
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_stdthreads_thrd_create=yes
-else
-  ac_cv_lib_stdthreads_thrd_create=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
-$as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
-if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then :
+done
 
-              LIBSTDTHREAD='-lstdthreads -lpthread'
 
-else
 
-                            LIBSTDTHREAD="$LIBPMULTITHREAD"
 
-fi
+    HAVE_POSIX_SIGNALBLOCKING=1;
+  HAVE_PTHREAD_SIGMASK=1;
+  HAVE_RAISE=1;
+  HAVE_SIGSET_T=1;
+  HAVE_SIGINFO_T=1;
+  HAVE_SIGACTION=1;
+  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
 
-          fi
-        else
-                    LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
-        fi
-        ;;
-    esac
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
 
+  HAVE_SIGHANDLER_T=1;
+  REPLACE_PTHREAD_SIGMASK=0;
+  REPLACE_RAISE=0;
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
-$as_echo_n "checking whether ISO C threads API is available... " >&6; }
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
-$as_echo "$ac_cv_header_threads_h" >&6; }
-    gl_stdthreadlib_body_done=done
-  fi
 
-        LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
-        LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
-        gl_threads_api=isoc
+  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
+      #include <signal.h>
+      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
+      #include <sys/types.h>
 
-$as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
+"
+if test "x$ac_cv_type_sigset_t" = xyes; then :
 
-      fi
-    fi
-    if test $gl_threads_api = none; then
-      case "$gl_use_threads" in
-        yes | windows | win32) # The 'win32' is for backward compatibility.
-          if { case "$host_os" in
-                 mingw*) true;;
-                 *) false;;
-               esac
-             }; then
-            gl_threads_api=windows
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGSET_T 1
+_ACEOF
 
-$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
+gl_cv_type_sigset_t=yes
+else
+  gl_cv_type_sigset_t=no
+fi
 
-          fi
-          ;;
-      esac
-    fi
+  if test $gl_cv_type_sigset_t != yes; then
+    HAVE_SIGSET_T=0
   fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
-$as_echo_n "checking for multithread API to use... " >&6; }
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
-$as_echo "$gl_threads_api" >&6; }
 
 
 
@@ -15375,821 +19958,552 @@ $as_echo "$gl_threads_api" >&6; }
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
-$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
-if ${gl_cv_func_malloc_posix+:} false; then :
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_signal_h='<'signal.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if ${gl_cv_next_signal_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-                        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-int
-main ()
-{
-#if defined _WIN32 && ! defined __CYGWIN__
-             choke me
-             #endif
 
-  ;
-  return 0;
-}
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <signal.h>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_malloc_posix=yes
-else
-  gl_cv_func_malloc_posix=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'signal.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_signal_h
+          gl_cv_next_signal_h='"'$gl_header'"'
+
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
-$as_echo "$gl_cv_func_malloc_posix" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+     fi
+     NEXT_SIGNAL_H=$gl_cv_next_signal_h
 
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'signal.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_signal_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
 
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
-$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if ${ac_cv_func_malloc_0_nonnull+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-          # Guess yes on platforms where we know the result.
-          *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \
-          | hpux* | solaris* | cygwin* | mingw*)
-            ac_cv_func_malloc_0_nonnull="guessing yes" ;;
-          # If we don't know, obey --enable-cross-guesses.
-          *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
-        esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
 
-int
-main ()
-{
-char *p = malloc (0);
-            int result = !p;
-            free (p);
-            return result;
-  ;
-  return 0;
-}
 
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_malloc_0_nonnull=yes
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
+  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
+
 else
-  ac_cv_func_malloc_0_nonnull=no
+  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+
+
+
+
+
+
+  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_sighandler_t" = xyes; then :
+
+else
+  HAVE_SIGHANDLER_T=0
 fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
-  case "$ac_cv_func_malloc_0_nonnull" in
-    *yes)
-      gl_cv_func_malloc_0_nonnull=1
-      ;;
-    *)
-      gl_cv_func_malloc_0_nonnull=0
-      ;;
-  esac
 
 
-cat >>confdefs.h <<_ACEOF
-#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
-_ACEOF
 
 
 
 
 
 
+  GL_GNULIB_PTHREAD_SIGMASK=0
 
 
 
+  GL_GNULIB_RAISE=0
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-$as_echo_n "checking for a traditional japanese locale... " >&6; }
-if ${gt_cv_locale_ja+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  GL_GNULIB_SIGNAL_H_SIGPIPE=0
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether MB_CUR_MAX is > 1.  This excludes the dysfunctional locales
-     on Cygwin 1.5.x.  */
-  if (MB_CUR_MAX == 1)
-    return 1;
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  return 0;
-#endif
-}
 
-_ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Note that on native Windows, the Japanese locale is
-          # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
-          # cannot use it here.
-          gt_cv_locale_ja=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the AIX locale name.
-          if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_ja=ja_JP
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_ja=ja_JP.EUC-JP
-            else
-              # Test for the HP-UX, OSF/1, NetBSD locale name.
-              if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_ja=ja_JP.eucJP
-              else
-                # Test for the IRIX, FreeBSD locale name.
-                if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                  gt_cv_locale_ja=ja_JP.EUC
-                else
-                  # Test for the Solaris 7 locale name.
-                  if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                    gt_cv_locale_ja=ja
-                  else
-                    # Special test for NetBSD 1.6.
-                    if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
-                      gt_cv_locale_ja=ja_JP.eucJP
-                    else
-                      # None found.
-                      gt_cv_locale_ja=none
-                    fi
-                  fi
-                fi
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-$as_echo "$gt_cv_locale_ja" >&6; }
-  LOCALE_JA=$gt_cv_locale_ja
+  GL_GNULIB_SIGPROCMASK=0
 
 
 
+  GL_GNULIB_SIGACTION=0
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-$as_echo_n "checking for a french Unicode locale... " >&6; }
-if ${gt_cv_locale_fr_utf8+:} false; then :
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if ${ac_cv_header_stdbool_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if !(defined __BEOS__ || defined __HAIKU__)
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in the abbreviation of the second month, the second
-     character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
-     two bytes long, with UTF-8 encoding.  */
-  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-  if (strftime (buf, sizeof (buf), "%b", &t) < 4
-      || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
-    return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy.  */
-  /* Check whether the decimal separator is a comma.
-     On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
-     are nl_langinfo(RADIXCHAR) are both ".".  */
-  if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
+             #include <stdbool.h>
+
+             #ifdef __cplusplus
+              typedef bool Bool;
+             #else
+              typedef _Bool Bool;
+              #ifndef bool
+               "error: bool is not defined"
+              #endif
+              #ifndef false
+               "error: false is not defined"
+              #endif
+              #if false
+               "error: false is not 0"
+              #endif
+              #ifndef true
+               "error: true is not defined"
+              #endif
+              #if true != 1
+               "error: true is not 1"
+              #endif
+             #endif
+
+             #ifndef __bool_true_false_are_defined
+              "error: __bool_true_false_are_defined is not defined"
+             #endif
+
+             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
+
+             char a[true == 1 ? 1 : -1];
+             char b[false == 0 ? 1 : -1];
+             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+             char d[(bool) 0.5 == true ? 1 : -1];
+             /* See body of main program for 'e'.  */
+             char f[(Bool) 0.0 == false ? 1 : -1];
+             char g[true];
+             char h[sizeof (Bool)];
+             char i[sizeof s.t];
+             enum { j = false, k = true, l = false * true, m = true * 256 };
+             /* The following fails for
+                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+             Bool n[m];
+             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             /* Catch a bug in an HP-UX C compiler.  See
+                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
+              */
+             Bool q = true;
+             Bool *pq = &q;
+             bool *qq = &q;
+
+int
+main ()
+{
+
+             bool e = &s;
+             *pq |= q; *pq |= ! q;
+             *qq |= q; *qq |= ! q;
+             /* Refer to every declared value, to avoid compiler optimizations.  */
+             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+                     + !m + !n + !o + !p + !q + !pq + !qq);
+
+  ;
   return 0;
 }
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdbool_h=yes
+else
+  ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes; then :
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
-              else
-                # None found.
-                gt_cv_locale_fr_utf8=none
-              fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
+
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-$as_echo "$gt_cv_locale_fr_utf8" >&6; }
-  LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
 
 
 
 
+ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCLOSEALL $ac_have_decl
+_ACEOF
+
+
+
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-$as_echo_n "checking for a transitional chinese locale... " >&6; }
-if ${gt_cv_locale_zh_CN+:} false; then :
+  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdio_h='<'stdio.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if ${gl_cv_next_stdio_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
-  /* On BeOS and Haiku, locales are not implemented in libc.  Rather, libintl
-     imitates locale dependent behaviour by looking at the environment
-     variables, and all locales use the UTF-8 encoding.  */
-#if defined __BEOS__ || defined __HAIKU__
-  return 1;
-#else
-  /* Check whether the given locale name is recognized by the system.  */
-# if defined _WIN32 && !defined __CYGWIN__
-  /* On native Windows, setlocale(category, "") looks at the system settings,
-     not at the environment variables.  Also, when an encoding suffix such
-     as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
-     category of the locale to "C".  */
-  if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
-      || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
-    return 1;
-# else
-  if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
-  /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
-     On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
-     is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
-     On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "646". In this situation,
-     some unit tests fail.
-     On MirBSD 10, when an unsupported locale is specified, setlocale()
-     succeeds but then nl_langinfo(CODESET) is "UTF-8".  */
-# if HAVE_LANGINFO_CODESET
-  {
-    const char *cs = nl_langinfo (CODESET);
-    if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
-        || strcmp (cs, "UTF-8") == 0)
-      return 1;
-  }
-# endif
-# ifdef __CYGWIN__
-  /* On Cygwin, avoid locale names without encoding suffix, because the
-     locale_charset() function relies on the encoding suffix.  Note that
-     LC_ALL is set on the command line.  */
-  if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
-  /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
-     This excludes the UTF-8 encoding (except on MirBSD).  */
-  {
-    const char *p;
-    t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
-    if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
-    for (p = buf; *p != '\0'; p++)
-      if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
-        return 1;
-  }
-  /* Check whether a typical GB18030 multibyte sequence is recognized as a
-     single wide character.  This excludes the GB2312 and GBK encodings.  */
-  if (mblen ("\203\062\332\066", 5) != 4)
-    return 1;
-  return 0;
-#endif
-}
 
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
 _ACEOF
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=Chinese_China.54936
-          else
-            # None found.
-            gt_cv_locale_zh_CN=none
-          fi
-          ;;
-        solaris2.8)
-          # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
-          # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
-          # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
-          gt_cv_locale_zh_CN=none
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the locale name without encoding suffix.
-          if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_zh_CN=zh_CN
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_zh_CN=zh_CN.GB18030
-            else
-              # None found.
-              gt_cv_locale_zh_CN=none
-            fi
-          fi
-          ;;
-      esac
-    else
-      # If there was a link error, due to mblen(), the system is so old that
-      # it certainly doesn't have a chinese locale.
-      gt_cv_locale_zh_CN=none
-    fi
-    rm -fr conftest*
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdio.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_stdio_h
+          gl_cv_next_stdio_h='"'$gl_header'"'
+
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-$as_echo "$gt_cv_locale_zh_CN" >&6; }
-  LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
+     fi
+     NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdio.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdio_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
-$as_echo_n "checking for inline... " >&6; }
-if ${ac_cv_c_inline+:} false; then :
+
+
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
+$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
+if ${gl_cv_func_printf_attribute_flavor+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
 
+       #define __STDC_FORMAT_MACROS 1
+       #include <stdio.h>
+       #include <inttypes.h>
+       /* For non-mingw systems, compilation will trivially succeed.
+          For mingw, compilation will succeed for older mingw (system
+          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
+       #if (defined _WIN32 && ! defined __CYGWIN__) && \
+         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
+       #endif
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_inline=$ac_kw
+  gl_cv_func_printf_attribute_flavor=system
+else
+  gl_cv_func_printf_attribute_flavor=gnu
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  test "$ac_cv_c_inline" != no && break
-done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
+$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
+  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
+
+$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
+
+  fi
+
+
+
+
+
+
+
+
+
+
 
+
+
+  if test $ac_cv_have_decl_fcloseall = no; then
+    HAVE_DECL_FCLOSEALL=0
+  fi
+
+ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ecvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
-$as_echo "$ac_cv_c_inline" >&6; }
 
-case $ac_cv_c_inline in
-  inline | yes) ;;
-  *)
-    case $ac_cv_c_inline in
-      no) ac_val=;;
-      *) ac_val=$ac_cv_c_inline;;
-    esac
-    cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ECVT $ac_have_decl
 _ACEOF
-    ;;
-esac
 
+ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fcvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCVT $ac_have_decl
+_ACEOF
 
+ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
+if test "x$ac_cv_have_decl_gcvt" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GCVT $ac_have_decl
+_ACEOF
 
 
 
-  GNULIB_EXPLICIT_BZERO=0;
-  GNULIB_FFSL=0;
-  GNULIB_FFSLL=0;
-  GNULIB_MEMCHR=0;
-  GNULIB_MEMMEM=0;
-  GNULIB_MEMPCPY=0;
-  GNULIB_MEMRCHR=0;
-  GNULIB_RAWMEMCHR=0;
-  GNULIB_STPCPY=0;
-  GNULIB_STPNCPY=0;
-  GNULIB_STRCHRNUL=0;
-  GNULIB_STRDUP=0;
-  GNULIB_STRNCAT=0;
-  GNULIB_STRNDUP=0;
-  GNULIB_STRNLEN=0;
-  GNULIB_STRPBRK=0;
-  GNULIB_STRSEP=0;
-  GNULIB_STRSTR=0;
-  GNULIB_STRCASESTR=0;
-  GNULIB_STRTOK_R=0;
-  GNULIB_MBSLEN=0;
-  GNULIB_MBSNLEN=0;
-  GNULIB_MBSCHR=0;
-  GNULIB_MBSRCHR=0;
-  GNULIB_MBSSTR=0;
-  GNULIB_MBSCASECMP=0;
-  GNULIB_MBSNCASECMP=0;
-  GNULIB_MBSPCASECMP=0;
-  GNULIB_MBSCASESTR=0;
-  GNULIB_MBSCSPN=0;
-  GNULIB_MBSPBRK=0;
-  GNULIB_MBSSPN=0;
-  GNULIB_MBSSEP=0;
-  GNULIB_MBSTOK_R=0;
-  GNULIB_STRERROR=0;
-  GNULIB_STRERROR_R=0;
-  GNULIB_STRERRORNAME_NP=0;
-  GNULIB_SIGABBREV_NP=0;
-  GNULIB_SIGDESCR_NP=0;
-  GNULIB_STRSIGNAL=0;
-  GNULIB_STRVERSCMP=0;
-  HAVE_MBSLEN=0;
-    GNULIB_MDA_MEMCCPY=1;
-  GNULIB_MDA_STRDUP=1;
-    HAVE_EXPLICIT_BZERO=1;
-  HAVE_FFSL=1;
-  HAVE_FFSLL=1;
-  HAVE_DECL_MEMMEM=1;
-  HAVE_MEMPCPY=1;
-  HAVE_DECL_MEMRCHR=1;
-  HAVE_RAWMEMCHR=1;
-  HAVE_STPCPY=1;
-  HAVE_STPNCPY=1;
-  HAVE_STRCHRNUL=1;
-  HAVE_DECL_STRDUP=1;
-  HAVE_DECL_STRNDUP=1;
-  HAVE_DECL_STRNLEN=1;
-  HAVE_STRPBRK=1;
-  HAVE_STRSEP=1;
-  HAVE_STRCASESTR=1;
-  HAVE_DECL_STRTOK_R=1;
-  HAVE_DECL_STRERROR_R=1;
-  HAVE_STRERRORNAME_NP=1;
-  HAVE_SIGABBREV_NP=1;
-  HAVE_SIGDESCR_NP=1;
-  HAVE_DECL_STRSIGNAL=1;
-  HAVE_STRVERSCMP=1;
-  REPLACE_FFSLL=0;
-  REPLACE_MEMCHR=0;
-  REPLACE_MEMMEM=0;
-  REPLACE_STPNCPY=0;
-  REPLACE_STRCHRNUL=0;
-  REPLACE_STRDUP=0;
-  REPLACE_STRNCAT=0;
-  REPLACE_STRNDUP=0;
-  REPLACE_STRNLEN=0;
-  REPLACE_STRSTR=0;
-  REPLACE_STRCASESTR=0;
-  REPLACE_STRTOK_R=0;
-  REPLACE_STRERROR=0;
-  REPLACE_STRERROR_R=0;
-  REPLACE_STRERRORNAME_NP=0;
-  REPLACE_STRSIGNAL=0;
-  UNDEFINE_STRTOK_R=0;
 
 
 
 
 
 
-  # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
-  # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
-  # irrelevant for anonymous mappings.
-  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes; then :
-  gl_have_mmap=yes
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stdlib_h='<'stdlib.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if ${gl_cv_next_stdlib_h+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  gl_have_mmap=no
-fi
 
 
-  # Try to allow MAP_ANONYMOUS.
-  gl_have_mmap_anonymous=no
-  if test $gl_have_mmap = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <stdlib.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'stdlib.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_stdlib_h
+          gl_cv_next_stdlib_h='"'$gl_header'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+$as_echo "$gl_cv_next_stdlib_h" >&6; }
+     fi
+     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'stdlib.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stdlib_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+
+
+
 
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
-  gl_have_mmap_anonymous=yes
-fi
-rm -f conftest*
 
-    if test $gl_have_mmap_anonymous != yes; then
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <sys/mman.h>
-#ifdef MAP_ANON
-    I cannot identify this map
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
 
-$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
 
-         gl_have_mmap_anonymous=yes
-fi
-rm -f conftest*
 
-    fi
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-$as_echo "$gl_have_mmap_anonymous" >&6; }
-    if test $gl_have_mmap_anonymous = yes; then
 
-$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+  if test $ac_cv_have_decl_ecvt = no; then
+    HAVE_DECL_ECVT=0
+  fi
 
-    fi
+  if test $ac_cv_have_decl_fcvt = no; then
+    HAVE_DECL_FCVT=0
   fi
 
+  if test $ac_cv_have_decl_gcvt = no; then
+    HAVE_DECL_GCVT=0
+  fi
 
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
 
 
-  # Detect platform-specific bugs in some versions of glibc:
-  # memchr should not dereference anything with length 0
-  #   https://bugzilla.redhat.com/show_bug.cgi?id=499689
-  # memchr should not dereference overestimated length after a match
-  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
-  #   https://sourceware.org/bugzilla/show_bug.cgi?id=10162
-  # memchr should cast the second argument to 'unsigned char'.
-  #   This bug exists in Android 4.3.
-  # Assume that memchr works on platforms that lack mprotect.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
-$as_echo_n "checking whether memchr works... " >&6; }
-if ${gl_cv_func_memchr_works+:} false; then :
+     REPLACE_STRERROR_0=0
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
+$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
+if ${gl_cv_func_strerror_0_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                           # Guess no on Android.
-          linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
-                           # Guess yes on native Windows.
-          mingw*)          gl_cv_func_memchr_works="guessing yes" ;;
-                           # If we don't know, obey --enable-cross-guesses.
-          *)               gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
-        esac
+                        # Guess yes on glibc systems.
+         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                        # Guess yes on musl systems.
+         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
+                        # Guess yes on native Windows.
+         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
+                        # If we don't know, obey --enable-cross-guesses.
+         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
+       esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
 #include <string.h>
-#if HAVE_SYS_MMAN_H
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/mman.h>
-# ifndef MAP_FILE
-#  define MAP_FILE 0
-# endif
-#endif
+           #include <errno.h>
 
 int
 main ()
 {
-
-  int result = 0;
-  char *fence = NULL;
-#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
-# if HAVE_MAP_ANONYMOUS
-  const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
-  const int fd = -1;
-# else /* !HAVE_MAP_ANONYMOUS */
-  const int flags = MAP_FILE | MAP_PRIVATE;
-  int fd = open ("/dev/zero", O_RDONLY, 0666);
-  if (fd >= 0)
-# endif
-    {
-      int pagesize = getpagesize ();
-      char *two_pages =
-        (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
-                       flags, fd, 0);
-      if (two_pages != (char *)(-1)
-          && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
-        fence = two_pages + pagesize;
-    }
-#endif
-  if (fence)
-    {
-      /* Test against bugs on glibc systems.  */
-      if (memchr (fence, 0, 0))
-        result |= 1;
-      strcpy (fence - 9, "12345678");
-      if (memchr (fence - 9, 0, 79) != fence - 1)
-        result |= 2;
-      if (memchr (fence - 1, 0, 3) != fence - 1)
-        result |= 4;
-      /* Test against bug on AIX 7.2.  */
-      if (memchr (fence - 4, '6', 16) != fence - 4)
-        result |= 8;
-    }
-  /* Test against bug on Android 4.3.  */
-  {
-    char input[3];
-    input[0] = 'a';
-    input[1] = 'b';
-    input[2] = 'c';
-    if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
-      result |= 16;
-  }
-  return result;
-
+int result = 0;
+           char *str;
+           errno = 0;
+           str = strerror (0);
+           if (!*str) result |= 1;
+           if (errno) result |= 2;
+           if (strstr (str, "nknown") || strstr (str, "ndefined"))
+             result |= 4;
+           return result;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_memchr_works=yes
+  gl_cv_func_strerror_0_works=yes
 else
-  gl_cv_func_memchr_works=no
+  gl_cv_func_strerror_0_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
-$as_echo "$gl_cv_func_memchr_works" >&6; }
-  case "$gl_cv_func_memchr_works" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
+$as_echo "$gl_cv_func_strerror_0_works" >&6; }
+  case "$gl_cv_func_strerror_0_works" in
     *yes) ;;
-    *) REPLACE_MEMCHR=1 ;;
+    *)
+      REPLACE_STRERROR_0=1
+
+$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
+
+      ;;
   esac
 
-ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
-if test "x$ac_cv_have_decl_memmem" = xyes; then :
-  ac_have_decl=1
+
+
+
+
+
+
+
+
+
+
+
+
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
+$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
+if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_have_decl=0
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+                int strerror_r (int, char *, size_t);
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_func_strerror_r_posix_signature=yes
+else
+  gl_cv_func_strerror_r_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
+$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+                                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
+$as_echo_n "checking whether strerror_r works... " >&6; }
+if ${gl_cv_func_strerror_r_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+
+              case "$host_os" in
+                       # Guess no on AIX.
+                aix*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on HP-UX.
+                hpux*) gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess no on BSD variants.
+                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
+                       # Guess yes otherwise.
+                *)     gl_cv_func_strerror_r_works="guessing yes";;
+              esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+                  #include <string.h>
+
+int
+main ()
+{
+int result = 0;
+                  char buf[79];
+                  if (strerror_r (EACCES, buf, 0) < 0)
+                    result |= 1;
+                  errno = 0;
+                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
+                    result |= 2;
+                  strcpy (buf, "Unknown");
+                  if (strerror_r (0, buf, sizeof buf) != 0)
+                    result |= 4;
+                  if (errno)
+                    result |= 8;
+                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
+                    result |= 0x10;
+                  errno = 0;
+                  *buf = 0;
+                  if (strerror_r (-3, buf, sizeof buf) < 0)
+                    result |= 0x20;
+                  if (errno)
+                    result |= 0x40;
+                  if (!*buf)
+                    result |= 0x80;
+                  return result;
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MEMMEM $ac_have_decl
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strerror_r_works=yes
+else
+  gl_cv_func_strerror_r_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
-
-
-
-  for ac_func in memmem
-do :
-  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
-if test "x$ac_cv_func_memmem" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMMEM 1
-_ACEOF
-
 fi
-done
-
-  if test $ac_cv_func_memmem = yes; then
-    HAVE_MEMMEM=1
-  else
-    HAVE_MEMMEM=0
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+$as_echo "$gl_cv_func_strerror_r_works" >&6; }
+      else
 
-  if test $ac_cv_have_decl_memmem = no; then
-    HAVE_DECL_MEMMEM=0
-  else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
-$as_echo_n "checking whether memmem works... " >&6; }
-if ${gl_cv_func_memmem_works_always+:} false; then :
+                        if test $ac_cv_func___xpg_strerror_r = yes; then
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
+$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
+if ${gl_cv_func_strerror_r_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
-                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef __GNU_LIBRARY__
- #include <features.h>
- #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
-                          || __GLIBC_MINOR__ > 12)) \
-      || (__GLIBC__ > 2)) \
-     || defined __UCLIBC__
-  Lucky user
- #endif
-#elif defined __CYGWIN__
- #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
-  Lucky user
- #endif
-#else
-  Lucky user
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_memmem_works_always="guessing yes"
-else
-  gl_cv_func_memmem_works_always="$gl_cross_guess_normal"
-fi
-rm -f conftest*
-
+                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-#include <string.h> /* for memmem */
-#define P "_EF_BF_BD"
-#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
-#define NEEDLE P P P P P
+#include <errno.h>
+                    #include <string.h>
+                    extern
+                    #ifdef __cplusplus
+                    "C"
+                    #endif
+                    int __xpg_strerror_r(int, char *, size_t);
 
 int
 main ()
 {
-
-    int result = 0;
-    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
-      result |= 1;
-    /* Check for empty needle behavior.  */
-    {
-      const char *haystack = "AAA";
-      if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
-        result |= 2;
-    }
-    return result;
+int result = 0;
+                    char buf[256] = "^";
+                    char copy[256];
+                    char *str = strerror (-1);
+                    strcpy (copy, str);
+                    if (__xpg_strerror_r (-2, buf, 1) == 0)
+                      result |= 1;
+                    if (*buf)
+                      result |= 2;
+                    __xpg_strerror_r (-2, buf, 256);
+                    if (strcmp (str, copy))
+                      result |= 4;
+                    return result;
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_memmem_works_always=yes
+  gl_cv_func_strerror_r_works=yes
 else
-  gl_cv_func_memmem_works_always=no
+  gl_cv_func_strerror_r_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
-$as_echo "$gl_cv_func_memmem_works_always" >&6; }
-    case "$gl_cv_func_memmem_works_always" in
-      *yes) ;;
-      *)
-        REPLACE_MEMMEM=1
-        ;;
-    esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
+$as_echo "$gl_cv_func_strerror_r_works" >&6; }
+        fi
+      fi
+    fi
   fi
-  :
 
-ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_memrchr" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MEMRCHR $ac_have_decl
+#define HAVE_DECL_STRERROR_R $ac_have_decl
 _ACEOF
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
-$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
-if ${gl_cv_minmax_in_limits_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <limits.h>
-            int x = MIN (42, 17);
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_minmax_in_limits_h=yes
-else
-  gl_cv_minmax_in_limits_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
-$as_echo "$gl_cv_minmax_in_limits_h" >&6; }
-  if test $gl_cv_minmax_in_limits_h = yes; then
 
-$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
 
-  fi
 
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
-$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
-if ${gl_cv_minmax_in_sys_param_h+:} false; then :
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_string_h='<'string.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+$as_echo_n "checking absolute name of <string.h>... " >&6; }
+if ${gl_cv_next_string_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/param.h>
-            int x = MIN (42, 17);
-int
-main ()
-{
-
-  ;
-  return 0;
-}
+#include <string.h>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_minmax_in_sys_param_h=yes
-else
-  gl_cv_minmax_in_sys_param_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'string.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_string_h
+          gl_cv_next_string_h='"'$gl_header'"'
+
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
-$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
-  if test $gl_cv_minmax_in_sys_param_h = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+$as_echo "$gl_cv_next_string_h" >&6; }
+     fi
+     NEXT_STRING_H=$gl_cv_next_string_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'string.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_string_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
 
-$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
 
-  fi
 
 
 
@@ -16418,182 +20802,200 @@ $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
 
 
 
-  GNULIB_GETADDRINFO=0;
-    HAVE_STRUCT_ADDRINFO=1;
-  HAVE_DECL_FREEADDRINFO=1;
-  HAVE_DECL_GAI_STRERROR=1;
-  HAVE_DECL_GETADDRINFO=1;
-  HAVE_DECL_GETNAMEINFO=1;
-  REPLACE_GAI_STRERROR=0;
-  REPLACE_GETADDRINFO=0;
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
-$as_echo_n "checking for O_CLOEXEC... " >&6; }
-if ${gl_cv_macro_O_CLOEXEC+:} false; then :
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_strings_h='<'strings.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
+$as_echo_n "checking absolute name of <strings.h>... " >&6; }
+if ${gl_cv_next_strings_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <fcntl.h>
-                          #ifndef O_CLOEXEC
-                            choke me;
-                          #endif
 
-int
-main ()
-{
-return O_CLOEXEC;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_macro_O_CLOEXEC=yes
-else
-  gl_cv_macro_O_CLOEXEC=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
-$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
+             if test $ac_cv_header_strings_h = yes; then
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
-$as_echo_n "checking for promoted mode_t type... " >&6; }
-if ${gl_cv_promoted_mode_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
-  ;
-  return 0;
-}
+#include <strings.h>
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_promoted_mode_t='int'
-else
-  gl_cv_promoted_mode_t='mode_t'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
-$as_echo "$gl_cv_promoted_mode_t" >&6; }
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'strings.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
 
-cat >>confdefs.h <<_ACEOF
-#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
-_ACEOF
+        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_strings_h
+          gl_cv_next_strings_h='"'$gl_header'"'
+          else
+               gl_cv_next_strings_h='<'strings.h'>'
+             fi
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
+$as_echo "$gl_cv_next_strings_h" >&6; }
+     fi
+     NEXT_STRINGS_H=$gl_cv_next_strings_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'strings.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_strings_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_strings_h = yes; then
+    HAVE_STRINGS_H=1
+  else
+    HAVE_STRINGS_H=0
+  fi
 
 
 
 
 
-  GNULIB_PSELECT=0;
-  GNULIB_SELECT=0;
-    HAVE_PSELECT=1;
-  REPLACE_PSELECT=0;
-  REPLACE_SELECT=0;
 
+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
-$as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
-if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
+  if test $REPLACE_MEMCHR = 1; then
+    REPLACE_STRSTR=1
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if ${gl_cv_func_strstr_works_always+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  if test "$cross_compiling" = yes; then :
+                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
-int
-main ()
-{
-struct timeval b;
-  ;
-  return 0;
-}
+
+#include <string.h> /* for __GNU_LIBRARY__ */
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_sys_select_h_selfcontained=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_works_always="guessing yes"
 else
-  gl_cv_header_sys_select_h_selfcontained=no
+  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-                        if test $gl_cv_header_sys_select_h_selfcontained = yes; then
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/select.h>
-int
-main ()
-{
-int memset; int bzero;
-  ;
-  return 0;
-}
+rm -f conftest*
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
+
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
+
+#include <string.h> /* for __GNU_LIBRARY__, strstr */
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
+  Unlucky user
+ #endif
+#endif
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
 int
 main ()
 {
-
-                  #undef memset
-                  #define memset nonexistent_memset
-                  extern
-                  #ifdef __cplusplus
-                  "C"
-                  #endif
-                  void *memset (void *, int, unsigned long);
-                  #undef bzero
-                  #define bzero nonexistent_bzero
-                  extern
-                  #ifdef __cplusplus
-                  "C"
-                  #endif
-                  void bzero (void *, unsigned long);
-                  fd_set fds;
-                  FD_ZERO (&fds);
+return !!strstr (HAYSTACK, NEEDLE);
 
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_works_always=yes
 else
-  gl_cv_header_sys_select_h_selfcontained=no
+  gl_cv_func_strstr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
+
 
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    case "$gl_cv_func_strstr_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
 
+ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
-$as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOK_R $ac_have_decl
+_ACEOF
+
+
+
+
+
 
 
 
@@ -16604,22 +21006,22 @@ $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_select_h='<'sys/select.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
-$as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
-if ${gl_cv_next_sys_select_h+:} false; then :
+       gl_cv_next_sys_random_h='<'sys/random.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
+$as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
+if ${gl_cv_next_sys_random_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_sys_select_h = yes; then
+             if test $ac_cv_header_sys_random_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/select.h>
+#include <sys/random.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -16635,7 +21037,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/select.h' \
+  gl_header_literal_regex=`echo 'sys/random.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -16644,65 +21046,48 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_select_h
-           gl_cv_next_sys_select_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_sys_random_h
+          gl_cv_next_sys_random_h='"'$gl_header'"'
           else
-               gl_cv_next_sys_select_h='<'sys/select.h'>'
+               gl_cv_next_sys_random_h='<'sys/random.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
-$as_echo "$gl_cv_next_sys_select_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
+$as_echo "$gl_cv_next_sys_random_h" >&6; }
      fi
-     NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
+     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/select.h'>'
+       gl_next_as_first_directive='<'sys/random.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_select_h
+       gl_next_as_first_directive=$gl_cv_next_sys_random_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_sys_select_h = yes; then
-    HAVE_SYS_SELECT_H=1
+  if test $ac_cv_header_sys_random_h = yes; then
+    HAVE_SYS_RANDOM_H=1
   else
-    HAVE_SYS_SELECT_H=0
+    HAVE_SYS_RANDOM_H=0
   fi
 
 
 
+  if test $ac_cv_header_sys_random_h = yes; then
+    UNISTD_H_HAVE_SYS_RANDOM_H=1
+  fi
 
 
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    for ac_header in winsock2.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
-
-fi
-
-done
 
-  fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
 
 
 
 
 
 
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    for ac_header in winsock2.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
 
-fi
 
-done
+$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
 
-  fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
 
-   LIBSOCKET=
-  if test $HAVE_WINSOCK2_H = 1; then
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WSAStartup" >&5
-$as_echo_n "checking for WSAStartup... " >&6; }
-if ${gl_cv_func_wsastartup+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-       gl_save_LIBS="$LIBS"
-       LIBS="$LIBS -lws2_32"
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-int
-main ()
-{
 
-            WORD wVersionRequested = MAKEWORD(1, 1);
-            WSADATA wsaData;
-            int err = WSAStartup(wVersionRequested, &wsaData);
-            WSACleanup ();
 
-  ;
-  return 0;
-}
 
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_wsastartup=yes
-else
-  gl_cv_func_wsastartup=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-       LIBS="$gl_save_LIBS"
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
-$as_echo "$gl_cv_func_wsastartup" >&6; }
-    if test "$gl_cv_func_wsastartup" = "yes"; then
 
-$as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
 
-      LIBSOCKET='-lws2_32'
-    fi
-  else
-                                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
-$as_echo_n "checking for library containing setsockopt... " >&6; }
-if ${gl_cv_lib_socket+:} false; then :
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_types_h='<'sys/types.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
+$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
+if ${gl_cv_next_sys_types_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-      gl_cv_lib_socket=
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main ()
-{
-setsockopt();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
 
-else
-  gl_save_LIBS="$LIBS"
-         LIBS="$gl_save_LIBS -lsocket"
-         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main ()
-{
-setsockopt();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_lib_socket="-lsocket"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-         if test -z "$gl_cv_lib_socket"; then
-           LIBS="$gl_save_LIBS -lnetwork"
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main ()
-{
-setsockopt();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_lib_socket="-lnetwork"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-           if test -z "$gl_cv_lib_socket"; then
-             LIBS="$gl_save_LIBS -lnet"
-             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-extern
-#ifdef __cplusplus
-"C"
-#endif
-char setsockopt();
-int
-main ()
-{
-setsockopt();
-  ;
-  return 0;
-}
+#include <sys/types.h>
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_lib_socket="-lnet"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-           fi
-         fi
-         LIBS="$gl_save_LIBS"
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/types.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_types_h
+          gl_cv_next_sys_types_h='"'$gl_header'"'
+
 
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-      if test -z "$gl_cv_lib_socket"; then
-        gl_cv_lib_socket="none needed"
-      fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
+$as_echo "$gl_cv_next_sys_types_h" >&6; }
+     fi
+     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/types.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
-$as_echo "$gl_cv_lib_socket" >&6; }
-    if test "$gl_cv_lib_socket" != "none needed"; then
-      LIBSOCKET="$gl_cv_lib_socket"
-    fi
-  fi
 
 
 
 
 
 
-  :
 
 
-ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_setenv" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SETENV $ac_have_decl
-_ACEOF
 
 
+    WINDOWS_STAT_INODES=0
 
 
 
 
-  if test $ac_cv_have_decl_setenv = no; then
-    HAVE_DECL_SETENV=0
-  fi
 
 
 
 
 
-  for ac_header in search.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
-if test "x$ac_cv_header_search_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_SEARCH_H 1
-_ACEOF
 
-fi
 
-done
 
-  for ac_func in tsearch
-do :
-  ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
-if test "x$ac_cv_func_tsearch" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TSEARCH 1
-_ACEOF
 
-fi
-done
 
 
 
 
-  GNULIB_PTHREAD_SIGMASK=0;
-  GNULIB_RAISE=0;
-  GNULIB_SIGNAL_H_SIGPIPE=0;
-  GNULIB_SIGPROCMASK=0;
-  GNULIB_SIGACTION=0;
-    HAVE_POSIX_SIGNALBLOCKING=1;
-  HAVE_PTHREAD_SIGMASK=1;
-  HAVE_RAISE=1;
-  HAVE_SIGSET_T=1;
-  HAVE_SIGINFO_T=1;
-  HAVE_SIGACTION=1;
-  HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
 
-  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
 
-  HAVE_SIGHANDLER_T=1;
-  REPLACE_PTHREAD_SIGMASK=0;
-  REPLACE_RAISE=0;
 
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
+$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
+if ${gl_cv_next_sys_uio_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-  ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
-      #include <signal.h>
-      /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>.  */
-      #include <sys/types.h>
+             if test $ac_cv_header_sys_uio_h = yes; then
 
-"
-if test "x$ac_cv_type_sigset_t" = xyes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_SIGSET_T 1
+
+
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/uio.h>
 _ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
+
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/uio.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
+
+        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
+
+          gl_header=$gl_cv_absolute_sys_uio_h
+          gl_cv_next_sys_uio_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
+             fi
+
 
-gl_cv_type_sigset_t=yes
-else
-  gl_cv_type_sigset_t=no
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
+$as_echo "$gl_cv_next_sys_uio_h" >&6; }
+     fi
+     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
 
-  if test $gl_cv_type_sigset_t != yes; then
-    HAVE_SIGSET_T=0
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/uio.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_sys_uio_h = yes; then
+    HAVE_SYS_UIO_H=1
+  else
+    HAVE_SYS_UIO_H=0
   fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
-$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
-if ${ac_cv_header_stdbool_h+:} false; then :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
+if ${gl_cv_next_sys_wait_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+
+             if test $ac_cv_header_sys_wait_h = yes; then
+
+
+
+
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#include <sys/wait.h>
+_ACEOF
+                case "$host_os" in
+    aix*) gl_absname_cpp="$ac_cpp -C" ;;
+    *)    gl_absname_cpp="$ac_cpp" ;;
+  esac
 
-             #include <stdbool.h>
+  case "$host_os" in
+    mingw*)
+                                          gl_dirsep_regex='[/\\]'
+      ;;
+    *)
+      gl_dirsep_regex='\/'
+      ;;
+  esac
+      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+  gl_header_literal_regex=`echo 'sys/wait.h' \
+                           | sed -e "$gl_make_literal_regex_sed"`
+  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
+      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
+      s|^/[^/]|//&|
+      p
+      q
+    }'
 
-             #ifdef __cplusplus
-              typedef bool Bool;
-             #else
-              typedef _Bool Bool;
-              #ifndef bool
-               "error: bool is not defined"
-              #endif
-              #ifndef false
-               "error: false is not defined"
-              #endif
-              #if false
-               "error: false is not 0"
-              #endif
-              #ifndef true
-               "error: true is not defined"
-              #endif
-              #if true != 1
-               "error: true is not 1"
-              #endif
-             #endif
+        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+  sed -n "$gl_absolute_header_sed"`
 
-             #ifndef __bool_true_false_are_defined
-              "error: __bool_true_false_are_defined is not defined"
-             #endif
+          gl_header=$gl_cv_absolute_sys_wait_h
+          gl_cv_next_sys_wait_h='"'$gl_header'"'
+          else
+               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+$as_echo "$gl_cv_next_sys_wait_h" >&6; }
+     fi
+     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+
+     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+       gl_next_as_first_directive='<'sys/wait.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
 
-             struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
 
-             char a[true == 1 ? 1 : -1];
-             char b[false == 0 ? 1 : -1];
-             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-             char d[(bool) 0.5 == true ? 1 : -1];
-             /* See body of main program for 'e'.  */
-             char f[(Bool) 0.0 == false ? 1 : -1];
-             char g[true];
-             char h[sizeof (Bool)];
-             char i[sizeof s.t];
-             enum { j = false, k = true, l = false * true, m = true * 256 };
-             /* The following fails for
-                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-             Bool n[m];
-             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-             char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-             /* Catch a bug in an HP-UX C compiler.  See
-                https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-                https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
-              */
-             Bool q = true;
-             Bool *pq = &q;
-             bool *qq = &q;
 
-int
-main ()
-{
 
-             bool e = &s;
-             *pq |= q; *pq |= ! q;
-             *qq |= q; *qq |= ! q;
-             /* Refer to every declared value, to avoid compiler optimizations.  */
-             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                     + !m + !n + !o + !p + !q + !pq + !qq);
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdbool_h=yes
-else
-  ac_cv_header_stdbool_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
-$as_echo "$ac_cv_header_stdbool_h" >&6; }
-   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = xyes; then :
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE__BOOL 1
-_ACEOF
 
 
-fi
 
 
-ac_fn_c_check_decl "$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fcloseall" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FCLOSEALL $ac_have_decl
-_ACEOF
 
-ac_fn_c_check_decl "$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
-if test "x$ac_cv_have_decl_ecvt" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ECVT $ac_have_decl
-_ACEOF
+  GL_GNULIB_WAITPID=0
 
-ac_fn_c_check_decl "$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
-if test "x$ac_cv_have_decl_fcvt" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FCVT $ac_have_decl
-_ACEOF
 
-ac_fn_c_check_decl "$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
-if test "x$ac_cv_have_decl_gcvt" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_GCVT $ac_have_decl
-_ACEOF
+    HAVE_DECL_LOCALTIME_R=1;
+  HAVE_NANOSLEEP=1;
+  HAVE_STRPTIME=1;
+  HAVE_TIMEGM=1;
+  HAVE_TIMESPEC_GET=1;
+  HAVE_TIMESPEC_GETRES=1;
+    HAVE_TIMEZONE_T=0;
+        REPLACE_CTIME=GNULIB_PORTCHECK;
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_MKTIME=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_STRFTIME=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+  REPLACE_TZSET=GNULIB_PORTCHECK;
 
-ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strdup" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
+      : ${GNULIB_GETTIMEOFDAY=0};
+        REPLACE_GMTIME=0;
+  REPLACE_LOCALTIME=0;
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRDUP $ac_have_decl
-_ACEOF
 
 
-     REPLACE_STRERROR_0=0
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
-$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
-if ${gl_cv_func_strerror_0_works+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
   $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                        # Guess yes on glibc systems.
-         *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on musl systems.
-         *-musl*)       gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # Guess yes on native Windows.
-         mingw*)        gl_cv_func_strerror_0_works="guessing yes" ;;
-                        # If we don't know, obey --enable-cross-guesses.
-         *)             gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
-       esac
-
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
-           #include <errno.h>
+#include <time.h>
 
 int
 main ()
 {
-int result = 0;
-           char *str;
-           errno = 0;
-           str = strerror (0);
-           if (!*str) result |= 1;
-           if (errno) result |= 2;
-           if (strstr (str, "nknown") || strstr (str, "ndefined"))
-             result |= 4;
-           return result;
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strerror_0_works=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_time_h=yes
 else
-  gl_cv_func_strerror_0_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_sys_struct_timespec_in_time_h=no
 fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
-$as_echo "$gl_cv_func_strerror_0_works" >&6; }
-  case "$gl_cv_func_strerror_0_works" in
-    *yes) ;;
-    *)
-      REPLACE_STRERROR_0=1
-
-$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
-
-      ;;
-  esac
-
-
-
-
-
-
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
 
-  if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
-$as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
-if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
-                int strerror_r (int, char *, size_t);
+#include <sys/time.h>
 
 int
 main ()
 {
-
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_strerror_r_posix_signature=yes
+  gl_cv_sys_struct_timespec_in_sys_time_h=yes
 else
-  gl_cv_func_strerror_r_posix_signature=no
+  gl_cv_sys_struct_timespec_in_sys_time_h=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
-$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
-      if test $gl_cv_func_strerror_r_posix_signature = yes; then
-                                                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
-$as_echo_n "checking whether strerror_r works... " >&6; }
-if ${gl_cv_func_strerror_r_works+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
+$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
+if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
   $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-
-              case "$host_os" in
-                       # Guess no on AIX.
-                aix*)  gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess no on HP-UX.
-                hpux*) gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess no on BSD variants.
-                *bsd*)  gl_cv_func_strerror_r_works="guessing no";;
-                       # Guess yes otherwise.
-                *)     gl_cv_func_strerror_r_works="guessing yes";;
-              esac
-
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <errno.h>
-                  #include <string.h>
+#include <pthread.h>
 
 int
 main ()
 {
-int result = 0;
-                  char buf[79];
-                  if (strerror_r (EACCES, buf, 0) < 0)
-                    result |= 1;
-                  errno = 0;
-                  if (strerror_r (EACCES, buf, sizeof buf) != 0)
-                    result |= 2;
-                  strcpy (buf, "Unknown");
-                  if (strerror_r (0, buf, sizeof buf) != 0)
-                    result |= 4;
-                  if (errno)
-                    result |= 8;
-                  if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
-                    result |= 0x10;
-                  errno = 0;
-                  *buf = 0;
-                  if (strerror_r (-3, buf, sizeof buf) < 0)
-                    result |= 0x20;
-                  if (errno)
-                    result |= 0x40;
-                  if (!*buf)
-                    result |= 0x80;
-                  return result;
-
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strerror_r_works=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_pthread_h=yes
 else
-  gl_cv_func_strerror_r_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_sys_struct_timespec_in_pthread_h=no
 fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-$as_echo "$gl_cv_func_strerror_r_works" >&6; }
-      else
-
-                        if test $ac_cv_func___xpg_strerror_r = yes; then
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
-$as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
-if ${gl_cv_func_strerror_r_works+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
+$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
+if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
   $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-                                  gl_cv_func_strerror_r_works="$gl_cross_guess_normal"
-
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <errno.h>
-                    #include <string.h>
-                    extern
-                    #ifdef __cplusplus
-                    "C"
-                    #endif
-                    int __xpg_strerror_r(int, char *, size_t);
+#include <unistd.h>
 
 int
 main ()
 {
-int result = 0;
-                    char buf[256] = "^";
-                    char copy[256];
-                    char *str = strerror (-1);
-                    strcpy (copy, str);
-                    if (__xpg_strerror_r (-2, buf, 1) == 0)
-                      result |= 1;
-                    if (*buf)
-                      result |= 2;
-                    __xpg_strerror_r (-2, buf, 256);
-                    if (strcmp (str, copy))
-                      result |= 4;
-                    return result;
-
+static struct timespec x; x.tv_sec = x.tv_nsec;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strerror_r_works=yes
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_unistd_h=yes
 else
-  gl_cv_func_strerror_r_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+  gl_cv_sys_struct_timespec_in_unistd_h=no
 fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-$as_echo "$gl_cv_func_strerror_r_works" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
+        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
+          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
         fi
       fi
     fi
   fi
 
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
 
 
 
@@ -17404,11 +21544,11 @@ _ACEOF
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_string_h='<'string.h'>'
+       gl_cv_next_time_h='<'time.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
-$as_echo_n "checking absolute name of <string.h>... " >&6; }
-if ${gl_cv_next_string_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if ${gl_cv_next_time_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
@@ -17416,7 +21556,7 @@ else
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <string.h>
+#include <time.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17432,7 +21572,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'string.h' \
+  gl_header_literal_regex=`echo 'time.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -17441,40 +21581,135 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_string_h
-           gl_cv_next_string_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_time_h
+          gl_cv_next_time_h='"'$gl_header'"'
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
-$as_echo "$gl_cv_next_string_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
      fi
-     NEXT_STRING_H=$gl_cv_next_string_h
+     NEXT_TIME_H=$gl_cv_next_time_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'string.h'>'
+       gl_next_as_first_directive='<'time.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_string_h
+       gl_next_as_first_directive=$gl_cv_next_time_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
+$as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
+if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+int
+main ()
+{
+static int x = TIME_UTC; x++;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_time_h_has_TIME_UTC=yes
+else
+  gl_cv_time_h_has_TIME_UTC=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
+$as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
+  if test $gl_cv_time_h_has_TIME_UTC = yes; then
+    TIME_H_DEFINES_TIME_UTC=1
+  else
+    TIME_H_DEFINES_TIME_UTC=0
+  fi
+
+
+
 
+  GL_GNULIB_CTIME=0
 
 
 
+  GL_GNULIB_MKTIME=0
 
 
 
+  GL_GNULIB_LOCALTIME=0
 
 
 
+  GL_GNULIB_NANOSLEEP=0
 
 
 
+  GL_GNULIB_STRFTIME=0
+
+
+
+  GL_GNULIB_STRPTIME=0
+
+
+
+  GL_GNULIB_TIMEGM=0
+
+
+
+  GL_GNULIB_TIMESPEC_GET=0
+
+
+
+  GL_GNULIB_TIMESPEC_GETRES=0
+
+
+
+  GL_GNULIB_TIME_R=0
+
+
+
+  GL_GNULIB_TIME_RZ=0
+
+
+
+  GL_GNULIB_TZSET=0
+
+
+
+  GL_GNULIB_MDA_TZSET=1
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
+if test "x$ac_cv_have_decl_execvpe" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_EXECVPE $ac_have_decl
+_ACEOF
+
 
 
 
@@ -17488,22 +21723,22 @@ $as_echo "$gl_cv_next_string_h" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_strings_h='<'strings.h'>'
+       gl_cv_next_unistd_h='<'unistd.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
-$as_echo_n "checking absolute name of <strings.h>... " >&6; }
-if ${gl_cv_next_strings_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
+if ${gl_cv_next_unistd_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_strings_h = yes; then
+             if test $ac_cv_header_unistd_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <strings.h>
+#include <unistd.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17519,7 +21754,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'strings.h' \
+  gl_header_literal_regex=`echo 'unistd.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -17528,38 +21763,38 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_strings_h
-           gl_cv_next_strings_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_unistd_h
+          gl_cv_next_unistd_h='"'$gl_header'"'
           else
-               gl_cv_next_strings_h='<'strings.h'>'
+               gl_cv_next_unistd_h='<'unistd.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
-$as_echo "$gl_cv_next_strings_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+$as_echo "$gl_cv_next_unistd_h" >&6; }
      fi
-     NEXT_STRINGS_H=$gl_cv_next_strings_h
+     NEXT_UNISTD_H=$gl_cv_next_unistd_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'strings.h'>'
+       gl_next_as_first_directive='<'unistd.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_strings_h
+       gl_next_as_first_directive=$gl_cv_next_unistd_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_strings_h = yes; then
-    HAVE_STRINGS_H=1
+  if test $ac_cv_header_unistd_h = yes; then
+    HAVE_UNISTD_H=1
   else
-    HAVE_STRINGS_H=0
+    HAVE_UNISTD_H=0
   fi
 
 
@@ -17567,117 +21802,37 @@ $as_echo "$gl_cv_next_strings_h" >&6; }
 
 
 
-ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strnlen" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRNLEN $ac_have_decl
-_ACEOF
-
-
-
-
-  if test $REPLACE_MEMCHR = 1; then
-    REPLACE_STRSTR=1
-  else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
-$as_echo_n "checking whether strstr works... " >&6; }
-if ${gl_cv_func_strstr_works_always+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#ifdef __GNU_LIBRARY__
- #include <features.h>
- #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
-     || defined __UCLIBC__
-  Lucky user
- #endif
-#elif defined __CYGWIN__
- #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
-  Lucky user
- #endif
-#else
-  Lucky user
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_strstr_works_always="guessing yes"
-else
-  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
-fi
-rm -f conftest*
 
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <string.h> /* for strstr */
-#ifdef __GNU_LIBRARY__
- #include <features.h>
- #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
-  Unlucky user
- #endif
-#endif
-#define P "_EF_BF_BD"
-#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
-#define NEEDLE P P P P P
 
-int
-main ()
-{
-return !!strstr (HAYSTACK, NEEDLE);
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strstr_works_always=yes
-else
-  gl_cv_func_strstr_works_always=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
-$as_echo "$gl_cv_func_strstr_works_always" >&6; }
-    case "$gl_cv_func_strstr_works_always" in
-      *yes) ;;
-      *)
-        REPLACE_STRSTR=1
-        ;;
-    esac
+  if test $ac_cv_have_decl_execvpe = no; then
+    HAVE_DECL_EXECVPE=0
   fi
 
-ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strtok_r" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRTOK_R $ac_have_decl
+#define HAVE_DECL_UNSETENV $ac_have_decl
 _ACEOF
 
 
 
 
 
+  if test $ac_cv_header_crtdefs_h = yes; then
+    HAVE_CRTDEFS_H=1
+  else
+    HAVE_CRTDEFS_H=0
+  fi
 
 
 
@@ -17686,12 +21841,6 @@ _ACEOF
 
 
 
-$as_echo "#define _USE_STD_STAT 1" >>confdefs.h
-
-
-
-
-
 
 
 
@@ -17699,19 +21848,22 @@ $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_types_h='<'sys/types.h'>'
+       gl_cv_next_wchar_h='<'wchar.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
-$as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
-if ${gl_cv_next_sys_types_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
+if ${gl_cv_next_wchar_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+             if test $ac_cv_header_wchar_h = yes; then
+
+
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/types.h>
+#include <wchar.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17727,7 +21879,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/types.h' \
+  gl_header_literal_regex=`echo 'wchar.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -17736,40 +21888,52 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_types_h
-           gl_cv_next_sys_types_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_wchar_h
+          gl_cv_next_wchar_h='"'$gl_header'"'
+          else
+               gl_cv_next_wchar_h='<'wchar.h'>'
+             fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
-$as_echo "$gl_cv_next_sys_types_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+$as_echo "$gl_cv_next_wchar_h" >&6; }
      fi
-     NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
+     NEXT_WCHAR_H=$gl_cv_next_wchar_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/types.h'>'
+       gl_next_as_first_directive='<'wchar.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_types_h
+       gl_next_as_first_directive=$gl_cv_next_wchar_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
 
 
 
 
+  if test $ac_cv_header_wchar_h = yes; then
+    HAVE_WCHAR_H=1
+  else
+    HAVE_WCHAR_H=0
+  fi
 
 
 
 
 
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
 
 
 
-    WINDOWS_STAT_INODES=0
 
 
 
@@ -17777,171 +21941,54 @@ $as_echo "$gl_cv_next_sys_types_h" >&6; }
 
 
 
+  ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
+      #include <wchar.h>
 
-  GNULIB_WAITPID=0;
+"
+if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCSDUP $ac_have_decl
+_ACEOF
 
+  if test $ac_cv_have_decl_wcsdup = no; then
+    HAVE_DECL_WCSDUP=0
+  fi
 
 
-  GNULIB_CTIME=0;
-  GNULIB_MKTIME=0;
-  GNULIB_LOCALTIME=0;
-  GNULIB_NANOSLEEP=0;
-  GNULIB_STRFTIME=0;
-  GNULIB_STRPTIME=0;
-  GNULIB_TIMEGM=0;
-  GNULIB_TIMESPEC_GET=0;
-  GNULIB_TIME_R=0;
-  GNULIB_TIME_RZ=0;
-  GNULIB_TZSET=0;
-    GNULIB_MDA_TZSET=1;
-    HAVE_DECL_LOCALTIME_R=1;
-  HAVE_NANOSLEEP=1;
-  HAVE_STRPTIME=1;
-  HAVE_TIMEGM=1;
-  HAVE_TIMESPEC_GET=1;
-    HAVE_TIMEZONE_T=0;
-        REPLACE_CTIME=GNULIB_PORTCHECK;
-  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
-  REPLACE_MKTIME=GNULIB_PORTCHECK;
-  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
-  REPLACE_STRFTIME=GNULIB_PORTCHECK;
-  REPLACE_TIMEGM=GNULIB_PORTCHECK;
-  REPLACE_TZSET=GNULIB_PORTCHECK;
+    HAVE_ISWBLANK=1;
+  HAVE_WCTYPE_T=1;
+  HAVE_WCTRANS_T=1;
+  REPLACE_ISWBLANK=0;
+  REPLACE_ISWDIGIT=0;
+  REPLACE_ISWXDIGIT=0;
 
-      : ${GNULIB_GETTIMEOFDAY=0};
-        REPLACE_GMTIME=0;
-  REPLACE_LOCALTIME=0;
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
-$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
 
-int
-main ()
-{
-static struct timespec x; x.tv_sec = x.tv_nsec;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timespec_in_time_h=yes
-else
-  gl_cv_sys_struct_timespec_in_time_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
 
-  TIME_H_DEFINES_STRUCT_TIMESPEC=0
-  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
-  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
-  UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
-  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
-    TIME_H_DEFINES_STRUCT_TIMESPEC=1
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
-$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/time.h>
 
-int
-main ()
-{
-static struct timespec x; x.tv_sec = x.tv_nsec;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timespec_in_sys_time_h=yes
-else
-  gl_cv_sys_struct_timespec_in_sys_time_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
-    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
-      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
-    else
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
-$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <pthread.h>
 
-int
-main ()
-{
-static struct timespec x; x.tv_sec = x.tv_nsec;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timespec_in_pthread_h=yes
-else
-  gl_cv_sys_struct_timespec_in_pthread_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
-      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
-        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
-      else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
-$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
-if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
 
-int
-main ()
-{
-static struct timespec x; x.tv_sec = x.tv_nsec;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timespec_in_unistd_h=yes
-else
-  gl_cv_sys_struct_timespec_in_unistd_h=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
-$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
-        if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
-          UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
-        fi
-      fi
-    fi
+
+  if test $ac_cv_func_iswcntrl = yes; then
+    HAVE_ISWCNTRL=1
+  else
+    HAVE_ISWCNTRL=0
   fi
 
 
 
+  if test $gt_cv_c_wint_t = yes; then
+    HAVE_WINT_T=1
+  else
+    HAVE_WINT_T=0
+  fi
 
 
 
@@ -17956,19 +22003,22 @@ $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_time_h='<'time.h'>'
+       gl_cv_next_wctype_h='<'wctype.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
-$as_echo_n "checking absolute name of <time.h>... " >&6; }
-if ${gl_cv_next_time_h+:} false; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if ${gl_cv_next_wctype_h+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
+             if test $ac_cv_header_wctype_h = yes; then
+
+
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <time.h>
+#include <wctype.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -17984,7 +22034,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'time.h' \
+  gl_header_literal_regex=`echo 'wctype.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -17993,121 +22043,338 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_time_h
-           gl_cv_next_time_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_wctype_h
+          gl_cv_next_wctype_h='"'$gl_header'"'
+          else
+               gl_cv_next_wctype_h='<'wctype.h'>'
+             fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
-$as_echo "$gl_cv_next_time_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
      fi
-     NEXT_TIME_H=$gl_cv_next_time_h
+     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'time.h'>'
+       gl_next_as_first_directive='<'wctype.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_time_h
+       gl_next_as_first_directive=$gl_cv_next_wctype_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
-
-
-
-
+     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
-$as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
-if ${gl_cv_time_h_has_TIME_UTC+:} false; then :
+  if test $ac_cv_header_wctype_h = yes; then
+    if test $ac_cv_func_iswcntrl = yes; then
+                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if ${gl_cv_func_iswcntrl_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <time.h>
 
+          if test "$cross_compiling" = yes; then :
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+                          #if __GNU_LIBRARY__ == 1
+                          Linux libc5 i18n is broken.
+                          #endif
 int
 main ()
 {
-static int x = TIME_UTC; x++;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_time_h_has_TIME_UTC=yes
+  gl_cv_func_iswcntrl_works="guessing yes"
 else
-  gl_cv_time_h_has_TIME_UTC=no
+  gl_cv_func_iswcntrl_works="guessing no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+               #include <wchar.h>
+               #include <wctype.h>
+               int main () { return iswprint ('x') == 0; }
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_iswcntrl_works=yes
+else
+  gl_cv_func_iswcntrl_works=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
-$as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
-  if test $gl_cv_time_h_has_TIME_UTC = yes; then
-    TIME_H_DEFINES_TIME_UTC=1
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+    fi
+    HAVE_WCTYPE_H=1
   else
-    TIME_H_DEFINES_TIME_UTC=0
+    HAVE_WCTYPE_H=0
+  fi
+
+
+  if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+    REPLACE_ISWCNTRL=1
+  else
+    case "$gl_cv_func_iswcntrl_works" in
+      *yes) REPLACE_ISWCNTRL=0 ;;
+      *)    REPLACE_ISWCNTRL=1 ;;
+    esac
   fi
 
 
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+        :
+  fi
+
+  if test $REPLACE_ISWCNTRL = 1; then
+    REPLACE_TOWLOWER=1
+  else
+    for ac_func in towlower
+do :
+  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
+if test "x$ac_cv_func_towlower" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_TOWLOWER 1
+_ACEOF
 
+fi
+done
 
-ac_fn_c_check_decl "$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
-if test "x$ac_cv_have_decl_execvpe" = xyes; then :
+    if test $ac_cv_func_towlower = yes; then
+      REPLACE_TOWLOWER=0
+    else
+      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
+          #if HAVE_WCTYPE_H
+          # include <wctype.h>
+          #endif
+
+"
+if test "x$ac_cv_have_decl_towlower" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_EXECVPE $ac_have_decl
+#define HAVE_DECL_TOWLOWER $ac_have_decl
 _ACEOF
 
-ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
-if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
-  ac_have_decl=1
+      if test $ac_cv_have_decl_towlower = yes; then
+                                REPLACE_TOWLOWER=1
+      else
+        REPLACE_TOWLOWER=0
+      fi
+    fi
+  fi
+
+
+  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
+        :
+  fi
+
+          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
+$as_echo_n "checking for wctype_t... " >&6; }
+if ${gl_cv_type_wctype_t+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  ac_have_decl=0
-fi
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+            #if HAVE_WCTYPE_H
+            # include <wctype.h>
+            #endif
+            wctype_t a;
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_UNSETENV $ac_have_decl
+int
+main ()
+{
+
+  ;
+  return 0;
+}
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctype_t=yes
+else
+  gl_cv_type_wctype_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
+$as_echo "$gl_cv_type_wctype_t" >&6; }
+  if test $gl_cv_type_wctype_t = no; then
+    HAVE_WCTYPE_T=0
+  fi
 
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
+$as_echo_n "checking for wctrans_t... " >&6; }
+if ${gl_cv_type_wctrans_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <wchar.h>
+            #include <wctype.h>
+            wctrans_t a;
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_wctrans_t=yes
+else
+  gl_cv_type_wctrans_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-  if test $ac_cv_header_crtdefs_h = yes; then
-    HAVE_CRTDEFS_H=1
-  else
-    HAVE_CRTDEFS_H=0
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
+$as_echo "$gl_cv_type_wctrans_t" >&6; }
+  if test $gl_cv_type_wctrans_t = no; then
+    HAVE_WCTRANS_T=0
   fi
 
 
 
-  GNULIB_ISWBLANK=0;
-  GNULIB_ISWDIGIT=0;
-  GNULIB_ISWXDIGIT=0;
-  GNULIB_WCTYPE=0;
-  GNULIB_ISWCTYPE=0;
-  GNULIB_WCTRANS=0;
-  GNULIB_TOWCTRANS=0;
-    HAVE_ISWBLANK=1;
-  HAVE_WCTYPE_T=1;
-  HAVE_WCTRANS_T=1;
-  REPLACE_ISWBLANK=0;
-  REPLACE_ISWDIGIT=0;
-  REPLACE_ISWXDIGIT=0;
 
 
 
 
+  GL_GNULIB_ISWBLANK=0
+
+
+
+  GL_GNULIB_ISWDIGIT=0
+
+
+
+  GL_GNULIB_ISWXDIGIT=0
+
+
+
+  GL_GNULIB_WCTYPE=0
+
+
+
+  GL_GNULIB_ISWCTYPE=0
+
+
+
+  GL_GNULIB_WCTRANS=0
+
+
+
+  GL_GNULIB_TOWCTRANS=0
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler option to allow warnings" >&5
+$as_echo_n "checking for C compiler option to allow warnings... " >&6; }
+if ${gl_cv_cc_wallow+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f conftest*
+     echo 'int dummy;' > conftest.c
+     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+     { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null
+                         if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+       gl_cv_cc_wallow='-Wno-error'
+     else
+       gl_cv_cc_wallow=none
+     fi
+     rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_wallow" >&5
+$as_echo "$gl_cv_cc_wallow" >&6; }
+  case "$gl_cv_cc_wallow" in
+    none) GL_CFLAG_ALLOW_WARNINGS='' ;;
+    *)    GL_CFLAG_ALLOW_WARNINGS="$gl_cv_cc_wallow" ;;
+  esac
+
+
+
+
+      GL_CFLAG_GNULIB_WARNINGS=''
+  if test -n "$GL_CFLAG_ALLOW_WARNINGS"; then
+                                                                        cat > conftest.c <<\EOF
+      #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wno-cast-qual
+      -Wno-conversion
+      -Wno-float-equal
+      -Wno-sign-compare
+      -Wno-undef
+      -Wno-unused-function
+      -Wno-unused-parameter
+      #endif
+      #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wno-float-conversion
+      #endif
+      #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wimplicit-fallthrough
+      #endif
+      #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wno-pedantic
+      #endif
+      #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+      -Wno-sign-conversion
+      -Wno-type-limits
+      #endif
+      #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
+      -Wno-unsuffixed-float-constants
+      #endif
+EOF
+    gl_command="$CC $CFLAGS $CPPFLAGS -E conftest.c > conftest.out"
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$gl_command\""; } >&5
+  (eval $gl_command) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+      gl_options=`grep -v '#' conftest.out`
+      for word in $gl_options; do
+        GL_CFLAG_GNULIB_WARNINGS="$GL_CFLAG_GNULIB_WARNINGS $word"
+      done
+    fi
+    rm -f conftest.c conftest.out
+  fi
 
 
 
 
 
 
-  gl_source_base='import'
-
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
+  gl_source_base='import'
+  gl_source_base_prefix=
 
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_ACCEPT_TRUE=
+  GL_COND_OBJ_ACCEPT_FALSE='#'
+else
+  GL_COND_OBJ_ACCEPT_TRUE='#'
+  GL_COND_OBJ_ACCEPT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_ACCEPT_TRUE}" && test -z "${GL_COND_OBJ_ACCEPT_FALSE}"; then
+    GL_COND_OBJ_ACCEPT_TRUE='#'
+    GL_COND_OBJ_ACCEPT_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS accept.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_ACCEPT=1
+          GL_GNULIB_ACCEPT=1
 
 
 
@@ -18201,23 +22477,14 @@ $as_echo "$gl_cv_rpl_alloca" >&6; }
 
 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
 
-      ALLOCA_H=alloca.h
+      GL_GENERATE_ALLOCA_H=true
     else
-                  ALLOCA_H=
+                  GL_GENERATE_ALLOCA_H=false
     fi
   else
-    ALLOCA_H=alloca.h
+    GL_GENERATE_ALLOCA_H=true
   fi
 
-   if test -n "$ALLOCA_H"; then
-  GL_GENERATE_ALLOCA_H_TRUE=
-  GL_GENERATE_ALLOCA_H_FALSE='#'
-else
-  GL_GENERATE_ALLOCA_H_TRUE='#'
-  GL_GENERATE_ALLOCA_H_FALSE=
-fi
-
-
   if test $ac_cv_working_alloca_h = yes; then
     HAVE_ALLOCA_H=1
   else
 
 
 
-  if test $ac_cv_header_arpa_inet_h = yes; then
-    HAVE_ARPA_INET_H=1
-  else
-    HAVE_ARPA_INET_H=0
-  fi
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
-$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
-if ${gl_cv_next_arpa_inet_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-             if test $ac_cv_header_arpa_inet_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <arpa/inet.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
+  case "$GL_GENERATE_ALLOCA_H" in
+    false) ALLOCA_H='' ;;
+    true)
+                  if test -z "$ALLOCA_H"; then
+        ALLOCA_H="${gl_source_base_prefix}alloca.h"
+      fi
       ;;
+    *) echo "*** GL_GENERATE_ALLOCA_H is not set correctly" 1>&2; exit 1 ;;
   esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'arpa/inet.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_arpa_inet_h
-           gl_cv_next_arpa_inet_h='"'$gl_header'"'
-          else
-               gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
-             fi
 
 
+     if $GL_GENERATE_ALLOCA_H; then
+  GL_GENERATE_ALLOCA_H_TRUE=
+  GL_GENERATE_ALLOCA_H_FALSE='#'
+else
+  GL_GENERATE_ALLOCA_H_TRUE='#'
+  GL_GENERATE_ALLOCA_H_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
-$as_echo "$gl_cv_next_arpa_inet_h" >&6; }
-     fi
-     NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'arpa/inet.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
-
-
-
-
-
-
-
+:
+    if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
+    GL_GENERATE_ALLOCA_H_TRUE='#'
+    GL_GENERATE_ALLOCA_H_FALSE='#'
+  fi
 
 
-  if test $ac_cv_header_sys_socket_h = yes; then
-    HAVE_WS2TCPIP_H=0
-  else
-    if test $ac_cv_header_ws2tcpip_h = yes; then
-      HAVE_WS2TCPIP_H=1
-    else
-      HAVE_WS2TCPIP_H=0
-    fi
-  fi
 
 
 
@@ -18337,24 +22531,33 @@ $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_BIND_TRUE=
+  GL_COND_OBJ_BIND_FALSE='#'
+else
+  GL_COND_OBJ_BIND_TRUE='#'
+  GL_COND_OBJ_BIND_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_BIND_TRUE}" && test -z "${GL_COND_OBJ_BIND_FALSE}"; then
+    GL_COND_OBJ_BIND_TRUE='#'
+    GL_COND_OBJ_BIND_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS bind.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_BIND=1
+          GL_GNULIB_BIND=1
 
 
 
@@ -18479,27 +22682,42 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; }
     esac
   fi
 
-  if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+
+     if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+  GL_COND_OBJ_BTOWC_TRUE=
+  GL_COND_OBJ_BTOWC_FALSE='#'
+else
+  GL_COND_OBJ_BTOWC_TRUE='#'
+  GL_COND_OBJ_BTOWC_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_BTOWC_TRUE}" && test -z "${GL_COND_OBJ_BTOWC_FALSE}"; then
+    GL_COND_OBJ_BTOWC_TRUE='#'
+    GL_COND_OBJ_BTOWC_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_BTOWC_TRUE"; then :
 
 
+  :
 
 
+fi
+
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_BTOWC=1
+
+          GL_GNULIB_BTOWC=1
 
 
 
@@ -18585,37 +22803,46 @@ $as_echo "$gl_cv___builtin_expect" >&6; }
     esac
   fi
 
-  if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
 
+     if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
+  GL_COND_OBJ_CANONICALIZE_LGPL_TRUE=
+  GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
+else
+  GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
+  GL_COND_OBJ_CANONICALIZE_LGPL_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_TRUE}" && test -z "${GL_COND_OBJ_CANONICALIZE_LGPL_FALSE}"; then
+    GL_COND_OBJ_CANONICALIZE_LGPL_TRUE='#'
+    GL_COND_OBJ_CANONICALIZE_LGPL_FALSE='#'
+  fi
 
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_CANONICALIZE_LGPL 1
+_ACEOF
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
 
-  fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_CANONICALIZE_LGPL 1
-_ACEOF
 
 
 
 
+          GL_GNULIB_CANONICALIZE_FILE_NAME=1
 
 
 
-          GNULIB_CANONICALIZE_FILE_NAME=1
 
 
+$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
 
 
 
-$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
 
 
 
@@ -18624,7 +22851,8 @@ $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
 
 
 
-          GNULIB_REALPATH=1
+
+          GL_GNULIB_REALPATH=1
 
 
 
@@ -18639,7 +22867,11 @@ $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
 
 
 
-          GNULIB_CHDIR=1
+
+
+
+
+          GL_GNULIB_CHDIR=1
 
 
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
 
-  if test $gl_cv_have_unlimited_file_name_length = no; then
-
-
-
-
-
-
-
 
-  gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
-
-    :
+     if test $gl_cv_have_unlimited_file_name_length = no; then
+  GL_COND_OBJ_CHDIR_LONG_TRUE=
+  GL_COND_OBJ_CHDIR_LONG_FALSE='#'
+else
+  GL_COND_OBJ_CHDIR_LONG_TRUE='#'
+  GL_COND_OBJ_CHDIR_LONG_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CHDIR_LONG_TRUE}" && test -z "${GL_COND_OBJ_CHDIR_LONG_FALSE}"; then
+    GL_COND_OBJ_CHDIR_LONG_TRUE='#'
+    GL_COND_OBJ_CHDIR_LONG_FALSE='#'
   fi
 
-  if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
-
-
-
-
-
+  if test -z "$GL_COND_OBJ_CHDIR_LONG_TRUE"; then :
 
+    :
 
+fi
 
-  gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
 
+     if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
+  GL_COND_OBJ_CHOWN_TRUE=
+  GL_COND_OBJ_CHOWN_FALSE='#'
+else
+  GL_COND_OBJ_CHOWN_TRUE='#'
+  GL_COND_OBJ_CHOWN_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CHOWN_TRUE}" && test -z "${GL_COND_OBJ_CHOWN_FALSE}"; then
+    GL_COND_OBJ_CHOWN_TRUE='#'
+    GL_COND_OBJ_CHOWN_FALSE='#'
   fi
-  if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
-
-
 
 
+     if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
+  GL_COND_OBJ_FCHOWN_STUB_TRUE=
+  GL_COND_OBJ_FCHOWN_STUB_FALSE='#'
+else
+  GL_COND_OBJ_FCHOWN_STUB_TRUE='#'
+  GL_COND_OBJ_FCHOWN_STUB_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FCHOWN_STUB_TRUE}" && test -z "${GL_COND_OBJ_FCHOWN_STUB_FALSE}"; then
+    GL_COND_OBJ_FCHOWN_STUB_TRUE='#'
+    GL_COND_OBJ_FCHOWN_STUB_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_CHOWN=1
+          GL_GNULIB_CHOWN=1
 
 
 
@@ -18817,7 +23063,7 @@ if test "$ac_res" != no; then :
                     LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
 fi
 
-    for ac_func in clock_gettime clock_settime
+    for ac_func in clock_getres clock_gettime clock_settime
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -18891,24 +23137,30 @@ done
     fi
 
 
-  if test $REPLACE_CLOSE = 1; then
-
-
-
 
+     if test $REPLACE_CLOSE = 1; then
+  GL_COND_OBJ_CLOSE_TRUE=
+  GL_COND_OBJ_CLOSE_FALSE='#'
+else
+  GL_COND_OBJ_CLOSE_TRUE='#'
+  GL_COND_OBJ_CLOSE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CLOSE_TRUE}" && test -z "${GL_COND_OBJ_CLOSE_FALSE}"; then
+    GL_COND_OBJ_CLOSE_TRUE='#'
+    GL_COND_OBJ_CLOSE_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_CLOSE=1
+          GL_GNULIB_CLOSE=1
 
 
 
@@ -18954,131 +23206,71 @@ done
       REPLACE_CLOSEDIR=1;;
   esac
 
-  if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
 
+     if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
+  GL_COND_OBJ_CLOSEDIR_TRUE=
+  GL_COND_OBJ_CLOSEDIR_FALSE='#'
+else
+  GL_COND_OBJ_CLOSEDIR_TRUE='#'
+  GL_COND_OBJ_CLOSEDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CLOSEDIR_TRUE}" && test -z "${GL_COND_OBJ_CLOSEDIR_FALSE}"; then
+    GL_COND_OBJ_CLOSEDIR_TRUE='#'
+    GL_COND_OBJ_CLOSEDIR_FALSE='#'
   fi
 
 
 
 
 
-          GNULIB_CLOSEDIR=1
-
-
-
 
 
-$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
 
 
 
+          GL_GNULIB_CLOSEDIR=1
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
+$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS connect.$ac_objext"
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_CONNECT_TRUE=
+  GL_COND_OBJ_CONNECT_FALSE='#'
+else
+  GL_COND_OBJ_CONNECT_TRUE='#'
+  GL_COND_OBJ_CONNECT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_CONNECT_TRUE}" && test -z "${GL_COND_OBJ_CONNECT_FALSE}"; then
+    GL_COND_OBJ_CONNECT_TRUE='#'
+    GL_COND_OBJ_CONNECT_FALSE='#'
   fi
 
 
 
 
 
-          GNULIB_CONNECT=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_ctype_h='<'ctype.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
-$as_echo_n "checking absolute name of <ctype.h>... " >&6; }
-if ${gl_cv_next_ctype_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'ctype.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_ctype_h
-           gl_cv_next_ctype_h='"'$gl_header'"'
 
+          GL_GNULIB_CONNECT=1
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
-$as_echo "$gl_cv_next_ctype_h" >&6; }
-     fi
-     NEXT_CTYPE_H=$gl_cv_next_ctype_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'ctype.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_ctype_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
+
+
+
+$as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
+
 
 
 
@@ -19205,91 +23397,6 @@ $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_dirent_h='<'dirent.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
-$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
-if ${gl_cv_next_dirent_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-             if test $ac_cv_header_dirent_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <dirent.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'dirent.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_dirent_h
-           gl_cv_next_dirent_h='"'$gl_header'"'
-          else
-               gl_cv_next_dirent_h='<'dirent.h'>'
-             fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
-$as_echo "$gl_cv_next_dirent_h" >&6; }
-     fi
-     NEXT_DIRENT_H=$gl_cv_next_dirent_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'dirent.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_dirent_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
-
-
-
-
-  if test $ac_cv_header_dirent_h = yes; then
-    HAVE_DIRENT_H=1
-  else
-    HAVE_DIRENT_H=0
-  fi
-
-
-
-
-
-
-
-
-
-
-
   for ac_func in dirfd
 do :
   ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
@@ -19355,17 +23462,21 @@ $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
 ;;
   esac
 
-  if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \
-     || test $REPLACE_DIRFD = 1; then
-
-
-
-
-
-
 
+     if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1; then
+  GL_COND_OBJ_DIRFD_TRUE=
+  GL_COND_OBJ_DIRFD_FALSE='#'
+else
+  GL_COND_OBJ_DIRFD_TRUE='#'
+  GL_COND_OBJ_DIRFD_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_DIRFD_TRUE}" && test -z "${GL_COND_OBJ_DIRFD_FALSE}"; then
+    GL_COND_OBJ_DIRFD_TRUE='#'
+    GL_COND_OBJ_DIRFD_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
+  if test -z "$GL_COND_OBJ_DIRFD_TRUE"; then :
 
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
@@ -19416,13 +23527,18 @@ _ACEOF
   fi
 
 
-  fi
+
+fi
+
+
+
 
 
 
 
 
-          GNULIB_DIRFD=1
+
+          GL_GNULIB_DIRFD=1
 
 
 
@@ -19545,25 +23661,35 @@ $as_echo "$gl_cv_func_dup_works" >&6; }
       ;;
   esac
 
-  if test $REPLACE_DUP = 1; then
-
 
+     if test $REPLACE_DUP = 1; then
+  GL_COND_OBJ_DUP_TRUE=
+  GL_COND_OBJ_DUP_FALSE='#'
+else
+  GL_COND_OBJ_DUP_TRUE='#'
+  GL_COND_OBJ_DUP_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_DUP_TRUE}" && test -z "${GL_COND_OBJ_DUP_FALSE}"; then
+    GL_COND_OBJ_DUP_TRUE='#'
+    GL_COND_OBJ_DUP_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_DUP_TRUE"; then :
 
+    :
 
+fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_DUP=1
+          GL_GNULIB_DUP=1
 
 
 
@@ -19710,25 +23836,35 @@ done
     fi
 
 
-  if test $REPLACE_DUP2 = 1; then
-
 
+     if test $REPLACE_DUP2 = 1; then
+  GL_COND_OBJ_DUP2_TRUE=
+  GL_COND_OBJ_DUP2_FALSE='#'
+else
+  GL_COND_OBJ_DUP2_TRUE='#'
+  GL_COND_OBJ_DUP2_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_DUP2_TRUE}" && test -z "${GL_COND_OBJ_DUP2_FALSE}"; then
+    GL_COND_OBJ_DUP2_TRUE='#'
+    GL_COND_OBJ_DUP2_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_DUP2_TRUE"; then :
 
 
 
+fi
 
 
-  gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
 
 
-  fi
 
 
 
 
 
-          GNULIB_DUP2=1
+          GL_GNULIB_DUP2=1
 
 
 
@@ -19744,7 +23880,11 @@ $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
 
 
 
-          GNULIB_ENVIRON=1
+
+
+
+
+          GL_GNULIB_ENVIRON=1
 
 
 
@@ -19756,6 +23896,39 @@ $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
 
 
 
+
+
+
+  case "$GL_GENERATE_ERRNO_H" in
+    false) ERRNO_H='' ;;
+    true)
+                  if test -z "$ERRNO_H"; then
+        ERRNO_H="${gl_source_base_prefix}errno.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_ERRNO_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_ERRNO_H; then
+  GL_GENERATE_ERRNO_H_TRUE=
+  GL_GENERATE_ERRNO_H_FALSE='#'
+else
+  GL_GENERATE_ERRNO_H_TRUE='#'
+  GL_GENERATE_ERRNO_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
+    GL_GENERATE_ERRNO_H_TRUE='#'
+    GL_GENERATE_ERRNO_H_FALSE='#'
+  fi
+
+
+
+
+
+
+
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
 $as_echo_n "checking for error_at_line... " >&6; }
 if ${ac_cv_lib_error_at_line+:} false; then :
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
 $as_echo "$ac_cv_lib_error_at_line" >&6; }
 
-  if test $ac_cv_lib_error_at_line = no; then
-
-
-
-
 
+     if test "$ac_cv_lib_error_at_line" = no; then
+  GL_COND_OBJ_ERROR_TRUE=
+  GL_COND_OBJ_ERROR_FALSE='#'
+else
+  GL_COND_OBJ_ERROR_TRUE='#'
+  GL_COND_OBJ_ERROR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_ERROR_TRUE}" && test -z "${GL_COND_OBJ_ERROR_FALSE}"; then
+    GL_COND_OBJ_ERROR_TRUE='#'
+    GL_COND_OBJ_ERROR_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_ERROR_TRUE"; then :
 
 
-  gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
 
 
 
   :
 
-  fi
+
+fi
 
 
 
@@ -19813,17 +23994,6 @@ $as_echo "$ac_cv_lib_error_at_line" >&6; }
 
   if test $HAVE_FCHDIR = 0; then
 
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
-
-    :
-
 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
 
                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
@@ -19882,11 +24052,34 @@ $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
   fi
 
 
+     if test $HAVE_FCHDIR = 0; then
+  GL_COND_OBJ_FCHDIR_TRUE=
+  GL_COND_OBJ_FCHDIR_FALSE='#'
+else
+  GL_COND_OBJ_FCHDIR_TRUE='#'
+  GL_COND_OBJ_FCHDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FCHDIR_TRUE}" && test -z "${GL_COND_OBJ_FCHDIR_FALSE}"; then
+    GL_COND_OBJ_FCHDIR_TRUE='#'
+    GL_COND_OBJ_FCHDIR_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_FCHDIR_TRUE"; then :
+
+    :
+
+fi
+
+
 
 
 
 
-          GNULIB_FCHDIR=1
+
+
+
+          GL_GNULIB_FCHDIR=1
 
 
 
@@ -20106,106 +24299,36 @@ $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
     fi
 
 
-  if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
 
+     if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
+  GL_COND_OBJ_FCNTL_TRUE=
+  GL_COND_OBJ_FCNTL_FALSE='#'
+else
+  GL_COND_OBJ_FCNTL_TRUE='#'
+  GL_COND_OBJ_FCNTL_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FCNTL_TRUE}" && test -z "${GL_COND_OBJ_FCNTL_FALSE}"; then
+    GL_COND_OBJ_FCNTL_TRUE='#'
+    GL_COND_OBJ_FCNTL_FALSE='#'
   fi
 
 
 
 
 
-          GNULIB_FCNTL=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_fcntl_h='<'fcntl.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
-$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
-if ${gl_cv_next_fcntl_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <fcntl.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'fcntl.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_fcntl_h
-           gl_cv_next_fcntl_h='"'$gl_header'"'
 
+          GL_GNULIB_FCNTL=1
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
-$as_echo "$gl_cv_next_fcntl_h" >&6; }
-     fi
-     NEXT_FCNTL_H=$gl_cv_next_fcntl_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'fcntl.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_fcntl_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
 
 
 
+$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
 
 
 
@@ -20319,24 +24442,30 @@ $as_echo "$gl_cv_func_fdopendir_works" >&6; }
     esac
   fi
 
-  if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
-
-
-
 
+     if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
+  GL_COND_OBJ_FDOPENDIR_TRUE=
+  GL_COND_OBJ_FDOPENDIR_FALSE='#'
+else
+  GL_COND_OBJ_FDOPENDIR_TRUE='#'
+  GL_COND_OBJ_FDOPENDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FDOPENDIR_TRUE}" && test -z "${GL_COND_OBJ_FDOPENDIR_FALSE}"; then
+    GL_COND_OBJ_FDOPENDIR_TRUE='#'
+    GL_COND_OBJ_FDOPENDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_FDOPENDIR=1
+          GL_GNULIB_FDOPENDIR=1
 
 
 
@@ -20392,24 +24521,30 @@ $as_echo "$gl_cv_func_ffs" >&6; }
     HAVE_FFS=0
   fi
 
-  if test $HAVE_FFS = 0; then
-
-
-
 
+     if test $HAVE_FFS = 0; then
+  GL_COND_OBJ_FFS_TRUE=
+  GL_COND_OBJ_FFS_FALSE='#'
+else
+  GL_COND_OBJ_FFS_TRUE='#'
+  GL_COND_OBJ_FFS_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FFS_TRUE}" && test -z "${GL_COND_OBJ_FFS_FALSE}"; then
+    GL_COND_OBJ_FFS_TRUE='#'
+    GL_COND_OBJ_FFS_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS ffs.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_FFS=1
+          GL_GNULIB_FFS=1
 
 
 
@@ -20467,16 +24602,16 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
 
 
 
-  FLOAT_H=
+  GL_GENERATE_FLOAT_H=false
   REPLACE_FLOAT_LDBL=0
   case "$host_os" in
     aix* | beos* | openbsd* | mirbsd* | irix*)
-      FLOAT_H=float.h
+      GL_GENERATE_FLOAT_H=true
       ;;
     freebsd* | dragonfly*)
       case "$host_cpu" in
         i[34567]86 )
-          FLOAT_H=float.h
+          GL_GENERATE_FLOAT_H=true
           ;;
         x86_64 )
           # On x86_64 systems, the C compiler may still be generating
@@ -20493,7 +24628,7 @@ _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
 
 else
-  FLOAT_H=float.h
+  GL_GENERATE_FLOAT_H=true
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
           ;;
@@ -20502,14 +24637,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     linux*)
       case "$host_cpu" in
         powerpc*)
-          FLOAT_H=float.h
+          GL_GENERATE_FLOAT_H=true
           ;;
       esac
       ;;
   esac
   case "$host_os" in
     aix* | freebsd* | dragonfly* | linux*)
-      if test -n "$FLOAT_H"; then
+      if $GL_GENERATE_FLOAT_H; then
         REPLACE_FLOAT_LDBL=1
       fi
       ;;
@@ -20576,11 +24711,11 @@ $as_echo "$gl_cv_func_itold_works" >&6; }
   case "$gl_cv_func_itold_works" in
     *no)
       REPLACE_ITOLD=1
-                  FLOAT_H=float.h
+                  GL_GENERATE_FLOAT_H=true
       ;;
   esac
 
-  if test -n "$FLOAT_H"; then
+  if $GL_GENERATE_FLOAT_H; then
 
 
 
@@ -20630,8 +24765,8 @@ _ACEOF
         gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_float_h
-           gl_cv_next_float_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_float_h
+          gl_cv_next_float_h='"'$gl_header'"'
 
 
 fi
@@ -20654,29 +24789,34 @@ $as_echo "$gl_cv_next_float_h" >&6; }
 
   fi
 
-   if test -n "$FLOAT_H"; then
-  GL_GENERATE_FLOAT_H_TRUE=
-  GL_GENERATE_FLOAT_H_FALSE='#'
-else
-  GL_GENERATE_FLOAT_H_TRUE='#'
-  GL_GENERATE_FLOAT_H_FALSE=
-fi
-
-
-
-  if test $REPLACE_FLOAT_LDBL = 1; then
-
-
 
 
 
 
 
+  case "$GL_GENERATE_FLOAT_H" in
+    false) FLOAT_H='' ;;
+    true)
+                  if test -z "$FLOAT_H"; then
+        FLOAT_H="${gl_source_base_prefix}float.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_FLOAT_H is not set correctly" 1>&2; exit 1 ;;
+  esac
 
-  gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
 
+     if $GL_GENERATE_FLOAT_H; then
+  GL_GENERATE_FLOAT_H_TRUE=
+  GL_GENERATE_FLOAT_H_FALSE='#'
+else
+  GL_GENERATE_FLOAT_H_TRUE='#'
+  GL_GENERATE_FLOAT_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
+    GL_GENERATE_FLOAT_H_TRUE='#'
+    GL_GENERATE_FLOAT_H_FALSE='#'
   fi
-  if test $REPLACE_ITOLD = 1; then
 
 
 
 
 
 
+     if test $REPLACE_FLOAT_LDBL = 1; then
+  GL_COND_OBJ_FLOAT_TRUE=
+  GL_COND_OBJ_FLOAT_FALSE='#'
+else
+  GL_COND_OBJ_FLOAT_TRUE='#'
+  GL_COND_OBJ_FLOAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FLOAT_TRUE}" && test -z "${GL_COND_OBJ_FLOAT_FALSE}"; then
+    GL_COND_OBJ_FLOAT_TRUE='#'
+    GL_COND_OBJ_FLOAT_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
 
+     if test $REPLACE_ITOLD = 1; then
+  GL_COND_OBJ_ITOLD_TRUE=
+  GL_COND_OBJ_ITOLD_FALSE='#'
+else
+  GL_COND_OBJ_ITOLD_TRUE='#'
+  GL_COND_OBJ_ITOLD_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_ITOLD_TRUE}" && test -z "${GL_COND_OBJ_ITOLD_FALSE}"; then
+    GL_COND_OBJ_ITOLD_TRUE='#'
+    GL_COND_OBJ_ITOLD_FALSE='#'
   fi
 
 
 
 
+
      gl_fnmatch_required_lowercase=`
     echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
   `
@@ -20830,17 +24993,45 @@ $as_echo "$ac_res" >&6; }
   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
 
-  FNMATCH_H='fnmatch.h'
-   if test -n "$FNMATCH_H"; then
+
+
+
+
+  GL_GENERATE_FNMATCH_H=true
+
+  fi
+
+
+
+
+
+  case "$GL_GENERATE_FNMATCH_H" in
+    false) FNMATCH_H='' ;;
+    true)
+                  if test -z "$FNMATCH_H"; then
+        FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_FNMATCH_H; then
   GL_GENERATE_FNMATCH_H_TRUE=
   GL_GENERATE_FNMATCH_H_FALSE='#'
 else
   GL_GENERATE_FNMATCH_H_TRUE='#'
   GL_GENERATE_FNMATCH_H_FALSE=
 fi
+:
+    if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
+    GL_GENERATE_FNMATCH_H_TRUE='#'
+    GL_GENERATE_FNMATCH_H_FALSE='#'
+  fi
+
+
 
 
-  fi
 
   if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
 
 
 
 
-          GNULIB_FNMATCH=1
+
+
+
+
+          GL_GNULIB_FNMATCH=1
 
 
 
@@ -20905,6 +25100,44 @@ _ACEOF
 
 
 
+
+
+
+
+
+
+  case "$GL_GENERATE_FNMATCH_H" in
+    false) FNMATCH_H='' ;;
+    true)
+                  if test -z "$FNMATCH_H"; then
+        FNMATCH_H="${gl_source_base_prefix}fnmatch.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_FNMATCH_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_FNMATCH_H; then
+  GL_GENERATE_FNMATCH_H_TRUE=
+  GL_GENERATE_FNMATCH_H_FALSE='#'
+else
+  GL_GENERATE_FNMATCH_H_TRUE='#'
+  GL_GENERATE_FNMATCH_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
+    GL_GENERATE_FNMATCH_H_TRUE='#'
+    GL_GENERATE_FNMATCH_H_FALSE='#'
+  fi
+
+
+
+
+
+
+
+
+
                           { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
 if ${gl_cv_func_free_preserves_errno+:} false; then :
 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
 
   case $gl_cv_func_free_preserves_errno in
-   *yes) ;;
+   *yes)
+
+$as_echo "#define HAVE_FREE_POSIX 1" >>confdefs.h
+
+    ;;
    *) REPLACE_FREE=1 ;;
   esac
 
-  if test $REPLACE_FREE = 1; then
-
 
+     if test $REPLACE_FREE = 1; then
+  GL_COND_OBJ_FREE_TRUE=
+  GL_COND_OBJ_FREE_FALSE='#'
+else
+  GL_COND_OBJ_FREE_TRUE='#'
+  GL_COND_OBJ_FREE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FREE_TRUE}" && test -z "${GL_COND_OBJ_FREE_FALSE}"; then
+    GL_COND_OBJ_FREE_TRUE='#'
+    GL_COND_OBJ_FREE_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_FREE_TRUE"; then :
 
+    :
 
+fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS free.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_FREE_POSIX=1
+          GL_GNULIB_FREE_POSIX=1
 
 
 
@@ -20990,7 +25237,11 @@ $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
 
 
 
-          GNULIB_FREXP=1
+
+
+
+
+          GL_GNULIB_FREXP=1
 
 
 
@@ -21018,7 +25269,11 @@ $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
 
 
 
-          GNULIB_FREXPL=1
+
+
+
+
+          GL_GNULIB_FREXPL=1
 
 
 
@@ -21056,16 +25311,21 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
     fi
 
 
-  if test $REPLACE_FSTAT = 1; then
-
-
-
-
-
-
 
+     if test $REPLACE_FSTAT = 1; then
+  GL_COND_OBJ_FSTAT_TRUE=
+  GL_COND_OBJ_FSTAT_FALSE='#'
+else
+  GL_COND_OBJ_FSTAT_TRUE='#'
+  GL_COND_OBJ_FSTAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FSTAT_TRUE}" && test -z "${GL_COND_OBJ_FSTAT_FALSE}"; then
+    GL_COND_OBJ_FSTAT_TRUE='#'
+    GL_COND_OBJ_FSTAT_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
+  if test -z "$GL_COND_OBJ_FSTAT_TRUE"; then :
 
     case "$host_os" in
       mingw*)
@@ -21086,13 +25346,18 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
 
   :
 
-  fi
+
+fi
+
+
+
+
 
 
 
 
 
-          GNULIB_FSTAT=1
+          GL_GNULIB_FSTAT=1
 
 
 
@@ -21170,24 +25435,30 @@ $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
     esac
   fi
 
-  if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
-
-
-
 
+     if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
+  GL_COND_OBJ_FSTATAT_TRUE=
+  GL_COND_OBJ_FSTATAT_FALSE='#'
+else
+  GL_COND_OBJ_FSTATAT_TRUE='#'
+  GL_COND_OBJ_FSTATAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_FSTATAT_TRUE}" && test -z "${GL_COND_OBJ_FSTATAT_FALSE}"; then
+    GL_COND_OBJ_FSTATAT_TRUE='#'
+    GL_COND_OBJ_FSTATAT_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_FSTATAT=1
+          GL_GNULIB_FSTATAT=1
 
 
 
@@ -21521,10 +25792,8 @@ else
      ac_clean_files="$ac_clean_files confdir-14B---"
           if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                   # Guess yes on musl systems.
-          *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k="guessing yes" ;;
-                   # Guess no otherwise, even on glibc systems.
-          *)       gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
+             # Guess no otherwise, even on glibc systems and musl systems.
+          *) gl_cv_func_getcwd_succeeds_beyond_4k="guessing no"
         esac
 
 else
@@ -21650,7 +25919,7 @@ _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
   gl_cv_func_getcwd_succeeds_beyond_4k=yes
 else
-                                                  ret=$?
+                                                          ret=$?
         if test $ret -ge 128 || test $ret = 4; then
           gl_cv_func_getcwd_succeeds_beyond_4k=no
         else
@@ -21707,28 +25976,38 @@ $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
     REPLACE_GETCWD=1
   fi
 
-  if test $REPLACE_GETCWD = 1; then
-
 
+     if test $REPLACE_GETCWD = 1; then
+  GL_COND_OBJ_GETCWD_TRUE=
+  GL_COND_OBJ_GETCWD_FALSE='#'
+else
+  GL_COND_OBJ_GETCWD_TRUE='#'
+  GL_COND_OBJ_GETCWD_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETCWD_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_FALSE}"; then
+    GL_COND_OBJ_GETCWD_TRUE='#'
+    GL_COND_OBJ_GETCWD_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GETCWD_TRUE"; then :
 
 
 
 
+  :
 
-  gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
 
+fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_GETCWD 1
+_ACEOF
 
-  :
 
-  fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_GETCWD 1
-_ACEOF
 
 
 
@@ -21736,7 +26015,7 @@ _ACEOF
 
 
 
-          GNULIB_GETCWD=1
+          GL_GNULIB_GETCWD=1
 
 
 
@@ -21758,24 +26037,30 @@ $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
     ;;
   esac
 
-  if test $REPLACE_GETCWD = 1; then
-
-
-
 
+     if test $REPLACE_GETCWD = 1; then
+  GL_COND_OBJ_GETCWD_LGPL_TRUE=
+  GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
+else
+  GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
+  GL_COND_OBJ_GETCWD_LGPL_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETCWD_LGPL_TRUE}" && test -z "${GL_COND_OBJ_GETCWD_LGPL_FALSE}"; then
+    GL_COND_OBJ_GETCWD_LGPL_TRUE='#'
+    GL_COND_OBJ_GETCWD_LGPL_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_GETCWD=1
+          GL_GNULIB_GETCWD=1
 
 
 
@@ -21887,16 +26172,21 @@ $as_echo "$gl_cv_func_working_getdelim" >&6; }
     HAVE_DECL_GETDELIM=0
   fi
 
-  if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
-
-
-
-
-
-
 
+     if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
+  GL_COND_OBJ_GETDELIM_TRUE=
+  GL_COND_OBJ_GETDELIM_FALSE='#'
+else
+  GL_COND_OBJ_GETDELIM_TRUE='#'
+  GL_COND_OBJ_GETDELIM_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETDELIM_TRUE}" && test -z "${GL_COND_OBJ_GETDELIM_FALSE}"; then
+    GL_COND_OBJ_GETDELIM_TRUE='#'
+    GL_COND_OBJ_GETDELIM_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
+  if test -z "$GL_COND_OBJ_GETDELIM_TRUE"; then :
 
 
   for ac_func in flockfile funlockfile
@@ -21923,13 +26213,18 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-  fi
+
+fi
+
+
+
+
 
 
 
 
 
-          GNULIB_GETDELIM=1
+          GL_GNULIB_GETDELIM=1
 
 
 
@@ -22007,25 +26302,35 @@ $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
     HAVE_GETDTABLESIZE=0
   fi
 
-  if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
-
 
+     if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
+  GL_COND_OBJ_GETDTABLESIZE_TRUE=
+  GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
+else
+  GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
+  GL_COND_OBJ_GETDTABLESIZE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETDTABLESIZE_TRUE}" && test -z "${GL_COND_OBJ_GETDTABLESIZE_FALSE}"; then
+    GL_COND_OBJ_GETDTABLESIZE_TRUE='#'
+    GL_COND_OBJ_GETDTABLESIZE_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GETDTABLESIZE_TRUE"; then :
 
+    :
 
+fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_GETDTABLESIZE=1
+          GL_GNULIB_GETDTABLESIZE=1
 
 
 
@@ -22144,27 +26449,37 @@ $as_echo "$am_cv_func_working_getline" >&6; }
       ;;
   esac
 
-  if test $REPLACE_GETLINE = 1; then
-
 
+     if test $REPLACE_GETLINE = 1; then
+  GL_COND_OBJ_GETLINE_TRUE=
+  GL_COND_OBJ_GETLINE_FALSE='#'
+else
+  GL_COND_OBJ_GETLINE_TRUE='#'
+  GL_COND_OBJ_GETLINE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETLINE_TRUE}" && test -z "${GL_COND_OBJ_GETLINE_FALSE}"; then
+    GL_COND_OBJ_GETLINE_TRUE='#'
+    GL_COND_OBJ_GETLINE_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GETLINE_TRUE"; then :
 
 
+  :
 
 
+fi
 
-  gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_GETLINE=1
+          GL_GNULIB_GETLINE=1
 
 
 
@@ -22256,27 +26571,37 @@ $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
     esac
   fi
 
-  if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
-
 
+     if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then
+  GL_COND_OBJ_GETLOGIN_R_TRUE=
+  GL_COND_OBJ_GETLOGIN_R_FALSE='#'
+else
+  GL_COND_OBJ_GETLOGIN_R_TRUE='#'
+  GL_COND_OBJ_GETLOGIN_R_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETLOGIN_R_TRUE}" && test -z "${GL_COND_OBJ_GETLOGIN_R_FALSE}"; then
+    GL_COND_OBJ_GETLOGIN_R_TRUE='#'
+    GL_COND_OBJ_GETLOGIN_R_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GETLOGIN_R_TRUE"; then :
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext"
+fi
 
 
 
 
-  fi
 
 
 
 
 
-          GNULIB_GETLOGIN_R=1
+          GL_GNULIB_GETLOGIN_R=1
 
 
 
@@ -22483,24 +26808,30 @@ $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
   esac
 
 
-  if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
-
-
-
 
+     if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then
+  GL_COND_OBJ_GETRANDOM_TRUE=
+  GL_COND_OBJ_GETRANDOM_FALSE='#'
+else
+  GL_COND_OBJ_GETRANDOM_TRUE='#'
+  GL_COND_OBJ_GETRANDOM_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETRANDOM_TRUE}" && test -z "${GL_COND_OBJ_GETRANDOM_FALSE}"; then
+    GL_COND_OBJ_GETRANDOM_TRUE='#'
+    GL_COND_OBJ_GETRANDOM_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_GETRANDOM=1
+          GL_GNULIB_GETRANDOM=1
 
 
 
@@ -22596,25 +26927,35 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
 
-  if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
-
 
+     if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
+  GL_COND_OBJ_GETTIMEOFDAY_TRUE=
+  GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
+else
+  GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
+  GL_COND_OBJ_GETTIMEOFDAY_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GETTIMEOFDAY_TRUE}" && test -z "${GL_COND_OBJ_GETTIMEOFDAY_FALSE}"; then
+    GL_COND_OBJ_GETTIMEOFDAY_TRUE='#'
+    GL_COND_OBJ_GETTIMEOFDAY_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GETTIMEOFDAY_TRUE"; then :
 
+    :
 
+fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_GETTIMEOFDAY=1
+          GL_GNULIB_GETTIMEOFDAY=1
 
 
 
@@ -22714,6 +27055,66 @@ $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
       esac
     fi
 
+    if test $REPLACE_GLOB = 0; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob NOTDIR*/ omits symlink to nondir" >&5
+$as_echo_n "checking whether glob NOTDIR*/ omits symlink to nondir... " >&6; }
+if ${gl_cv_glob_omit_nondir_symlinks+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test $cross_compiling != yes; then
+           if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-file
+           then
+             gl_cv_glob_omit_nondir_symlinks=maybe
+           else
+             # If we can't make a symlink, then we cannot test this issue.  Be
+             # pessimistic about this.
+             gl_cv_glob_omit_nondir_symlinks=no
+           fi
+           if test $gl_cv_glob_omit_nondir_symlinks = maybe; then
+             if test "$cross_compiling" = yes; then :
+                  :
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+                    #include <glob.h>
+int
+main ()
+{
+glob_t found;
+                    if (glob ("conf*-globtest/", 0, NULL, &found) != GLOB_NOMATCH)
+                      return 1;
+                    globfree (&found);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_glob_omit_nondir_symlinks=yes
+else
+  gl_cv_glob_omit_nondir_symlinks=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+           fi
+           rm -f conf$$-globtest
+         else
+           gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal"
+         fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_omit_nondir_symlinks" >&5
+$as_echo "$gl_cv_glob_omit_nondir_symlinks" >&6; }
+      case "$gl_cv_glob_omit_nondir_symlinks" in
+        *yes) ;;
+        *) REPLACE_GLOB=1 ;;
+      esac
+    fi
+
   fi
 
   if test $ac_cv_func_glob_pattern_p = no; then
@@ -22727,69 +27128,137 @@ $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
   if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
 
 
-  GLOB_H='glob.h'
-   if test -n "$GLOB_H"; then
+
+
+
+
+  GL_GENERATE_GLOB_H=true
+
+  fi
+
+
+
+
+
+  case "$GL_GENERATE_GLOB_H" in
+    false) GLOB_H='' ;;
+    true)
+                  if test -z "$GLOB_H"; then
+        GLOB_H="${gl_source_base_prefix}glob.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_GLOB_H; then
   GL_GENERATE_GLOB_H_TRUE=
   GL_GENERATE_GLOB_H_FALSE='#'
 else
   GL_GENERATE_GLOB_H_TRUE='#'
   GL_GENERATE_GLOB_H_FALSE=
 fi
+:
+    if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
+    GL_GENERATE_GLOB_H_TRUE='#'
+    GL_GENERATE_GLOB_H_FALSE='#'
+  fi
+
 
 
-  fi
 
-  if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
 
 
+     if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then
+  GL_COND_OBJ_GLOB_TRUE=
+  GL_COND_OBJ_GLOB_FALSE='#'
+else
+  GL_COND_OBJ_GLOB_TRUE='#'
+  GL_COND_OBJ_GLOB_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GLOB_TRUE}" && test -z "${GL_COND_OBJ_GLOB_FALSE}"; then
+    GL_COND_OBJ_GLOB_TRUE='#'
+    GL_COND_OBJ_GLOB_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_GLOB_TRUE"; then :
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext"
 
 
+fi
 
+     if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
+  GL_COND_OBJ_GLOB_PATTERN_P_TRUE=
+  GL_COND_OBJ_GLOB_PATTERN_P_FALSE='#'
+else
+  GL_COND_OBJ_GLOB_PATTERN_P_TRUE='#'
+  GL_COND_OBJ_GLOB_PATTERN_P_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_GLOB_PATTERN_P_TRUE}" && test -z "${GL_COND_OBJ_GLOB_PATTERN_P_FALSE}"; then
+    GL_COND_OBJ_GLOB_PATTERN_P_TRUE='#'
+    GL_COND_OBJ_GLOB_PATTERN_P_FALSE='#'
+  fi
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext"
 
 
 
 
+          GL_GNULIB_GLOB=1
 
 
-  fi
-  if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then
 
 
 
+$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_GLOB=1
 
 
+  case "$GL_GENERATE_GLOB_H" in
+    false) GLOB_H='' ;;
+    true)
+                  if test -z "$GLOB_H"; then
+        GLOB_H="${gl_source_base_prefix}glob.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_GLOB_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
 
+     if $GL_GENERATE_GLOB_H; then
+  GL_GENERATE_GLOB_H_TRUE=
+  GL_GENERATE_GLOB_H_FALSE='#'
+else
+  GL_GENERATE_GLOB_H_TRUE='#'
+  GL_GENERATE_GLOB_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
+    GL_GENERATE_GLOB_H_TRUE='#'
+    GL_GENERATE_GLOB_H_FALSE='#'
+  fi
 
 
-$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
 
 
 
@@ -22947,301 +27416,47 @@ else
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_INET_NTOP $ac_have_decl
-_ACEOF
-
-    if test $ac_cv_have_decl_inet_ntop = no; then
-      HAVE_DECL_INET_NTOP=0
-    fi
-  fi
-
-
-  if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext"
-
-
-
-
-  fi
-
-
-
-
-
-          GNULIB_INET_NTOP=1
-
-
-
-
-
-
-
-  PRIPTR_PREFIX=
-  if test -n "$STDINT_H"; then
-            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-         #ifdef _WIN64
-         LLP64
-         #endif
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  PRIPTR_PREFIX='"l"'
-else
-  PRIPTR_PREFIX='"ll"'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  else
-        for glpfx in '' l ll I64; do
-      case $glpfx in
-        '')  gltype1='int';;
-        l)   gltype1='long int';;
-        ll)  gltype1='long long int';;
-        I64) gltype1='__int64';;
-      esac
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdint.h>
-           extern intptr_t foo;
-           extern $gltype1 foo;
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  PRIPTR_PREFIX='"'$glpfx'"'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      test -n "$PRIPTR_PREFIX" && break
-    done
-  fi
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
-$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
-if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
-
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
-
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
-
-            #if defined INT32_MAX && defined INTMAX_MAX
-             #define CONDITION (INT32_MAX < INTMAX_MAX)
-            #else
-             #define CONDITION (sizeof (int) < sizeof (long long int))
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
-else
-  gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
-$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
-  if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
-    INT32_MAX_LT_INTMAX_MAX=1;
-  else
-    INT32_MAX_LT_INTMAX_MAX=0;
-  fi
-
-
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
-$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
-if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
+#define HAVE_DECL_INET_NTOP $ac_have_decl
+_ACEOF
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+    if test $ac_cv_have_decl_inet_ntop = no; then
+      HAVE_DECL_INET_NTOP=0
+    fi
+  fi
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
 
-            #if defined INT64_MAX
-             #define CONDITION (INT64_MAX == LONG_MAX)
-            #else
-             #define CONDITION (sizeof (long long int) == sizeof (long int))
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+     if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
+  GL_COND_OBJ_INET_NTOP_TRUE=
+  GL_COND_OBJ_INET_NTOP_FALSE='#'
 else
-  gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
+  GL_COND_OBJ_INET_NTOP_TRUE='#'
+  GL_COND_OBJ_INET_NTOP_FALSE=
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
-$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
-  if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
-    INT64_MAX_EQ_LONG_MAX=1;
-  else
-    INT64_MAX_EQ_LONG_MAX=0;
+:
+    if test -z "${GL_COND_OBJ_INET_NTOP_TRUE}" && test -z "${GL_COND_OBJ_INET_NTOP_FALSE}"; then
+    GL_COND_OBJ_INET_NTOP_TRUE='#'
+    GL_COND_OBJ_INET_NTOP_FALSE='#'
   fi
 
+  if test -z "$GL_COND_OBJ_INET_NTOP_TRUE"; then :
 
-  else
-    INT64_MAX_EQ_LONG_MAX=-1
-  fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
-$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
-if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
 
-            #if defined UINT32_MAX && defined UINTMAX_MAX
-             #define CONDITION (UINT32_MAX < UINTMAX_MAX)
-            #else
-             #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
-else
-  gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
-$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
-  if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
-    UINT32_MAX_LT_UINTMAX_MAX=1;
-  else
-    UINT32_MAX_LT_UINTMAX_MAX=0;
-  fi
 
 
-  if test $APPLE_UNIVERSAL_BUILD = 0; then
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
-$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
-if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Work also in C++ mode.  */
-            #define __STDC_LIMIT_MACROS 1
 
-            /* Work if build is not clean.  */
-            #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 
-            #include <limits.h>
-            #if HAVE_STDINT_H
-             #include <stdint.h>
-            #endif
 
-            #if defined UINT64_MAX
-             #define CONDITION (UINT64_MAX == ULONG_MAX)
-            #else
-             #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
-            #endif
-            int test[CONDITION ? 1 : -1];
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
-else
-  gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
-$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
-  if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
-    UINT64_MAX_EQ_ULONG_MAX=1;
-  else
-    UINT64_MAX_EQ_ULONG_MAX=0;
-  fi
 
 
-  else
-    UINT64_MAX_EQ_ULONG_MAX=-1
-  fi
+          GL_GNULIB_INET_NTOP=1
+
 
 
 
@@ -23250,11 +27465,7 @@ $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
 
 
 
-  if test $ac_cv_func_isblank = no; then
-    HAVE_ISBLANK=0
-  fi
 
-  if test $HAVE_ISBLANK = 0; then
 
 
 
@@ -23262,12 +27473,26 @@ $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
 
 
 
+  if test $ac_cv_func_isblank = no; then
+    HAVE_ISBLANK=0
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
 
+     if test $HAVE_ISBLANK = 0; then
+  GL_COND_OBJ_ISBLANK_TRUE=
+  GL_COND_OBJ_ISBLANK_FALSE='#'
+else
+  GL_COND_OBJ_ISBLANK_TRUE='#'
+  GL_COND_OBJ_ISBLANK_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_ISBLANK_TRUE}" && test -z "${GL_COND_OBJ_ISBLANK_FALSE}"; then
+    GL_COND_OBJ_ISBLANK_TRUE='#'
+    GL_COND_OBJ_ISBLANK_FALSE='#'
   fi
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define GNULIB_ISBLANK 1
 _ACEOF
@@ -23278,7 +27503,11 @@ _ACEOF
 
 
 
-          GNULIB_ISBLANK=1
+
+
+
+
+          GL_GNULIB_ISBLANK=1
 
 
 
@@ -23752,135 +27981,51 @@ $as_echo "#define HAVE___INLINE 1" >>confdefs.h
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS listen.$ac_objext"
-
-  fi
-
-
-
-
-
-          GNULIB_LISTEN=1
-
 
 
 
-
-$as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
-
-
-
-
-
-
-    LOCALCHARSET_TESTS_ENVIRONMENT=
-
-
-
-
-
-
-
-
-
-
-
-  case "$host_os" in
-    solaris*)
-
-$as_echo "#define _LCONV_C99 1" >>confdefs.h
-
+  case "$GL_GENERATE_LIMITS_H" in
+    false) LIMITS_H='' ;;
+    true)
+                  if test -z "$LIMITS_H"; then
+        LIMITS_H="${gl_source_base_prefix}limits.h"
+      fi
       ;;
+    *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
   esac
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
-$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
-if ${gl_cv_header_locale_h_posix2001+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <locale.h>
-            int x = LC_MESSAGES;
-            int y = sizeof (((struct lconv *) 0)->decimal_point);
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_locale_h_posix2001=yes
+     if $GL_GENERATE_LIMITS_H; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
 else
-  gl_cv_header_locale_h_posix2001=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
-$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
+:
+    if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+    GL_GENERATE_LIMITS_H_TRUE='#'
+    GL_GENERATE_LIMITS_H_FALSE='#'
+  fi
+
+
 
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
-$as_echo_n "checking whether struct lconv is properly defined... " >&6; }
-if ${gl_cv_sys_struct_lconv_ok+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <locale.h>
-            struct lconv l;
-            int x = sizeof (l.decimal_point);
-            int y = sizeof (l.int_p_cs_precedes);
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_lconv_ok=yes
-else
-  gl_cv_sys_struct_lconv_ok=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
-$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
-  if test $gl_cv_sys_struct_lconv_ok = no; then
-            case "$host_os" in
-      mingw*)
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#ifdef _MSC_VER
- Special
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Special" >/dev/null 2>&1; then :
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_LISTEN_TRUE=
+  GL_COND_OBJ_LISTEN_FALSE='#'
 else
-  REPLACE_STRUCT_LCONV=1
+  GL_COND_OBJ_LISTEN_TRUE='#'
+  GL_COND_OBJ_LISTEN_FALSE=
 fi
-rm -f conftest*
-
-        ;;
-      *) REPLACE_STRUCT_LCONV=1 ;;
-    esac
+:
+    if test -z "${GL_COND_OBJ_LISTEN_TRUE}" && test -z "${GL_COND_OBJ_LISTEN_FALSE}"; then
+    GL_COND_OBJ_LISTEN_TRUE='#'
+    GL_COND_OBJ_LISTEN_FALSE='#'
   fi
 
 
@@ -23891,68 +28036,23 @@ rm -f conftest*
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_locale_h='<'locale.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
-$as_echo_n "checking absolute name of <locale.h>... " >&6; }
-if ${gl_cv_next_locale_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
+          GL_GNULIB_LISTEN=1
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <locale.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'locale.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_locale_h
-           gl_cv_next_locale_h='"'$gl_header'"'
+$as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
-$as_echo "$gl_cv_next_locale_h" >&6; }
-     fi
-     NEXT_LOCALE_H=$gl_cv_next_locale_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'locale.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_locale_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
 
 
 
+    LOCALCHARSET_TESTS_ENVIRONMENT=
+
+
 
 
 
@@ -24197,46 +28297,46 @@ _ACEOF
     HAVE_LSTAT=0
   fi
 
-  if test $REPLACE_LSTAT = 1; then
-
-
-
-
-
-
 
+     if test $REPLACE_LSTAT = 1; then
+  GL_COND_OBJ_LSTAT_TRUE=
+  GL_COND_OBJ_LSTAT_FALSE='#'
+else
+  GL_COND_OBJ_LSTAT_TRUE='#'
+  GL_COND_OBJ_LSTAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_LSTAT_TRUE}" && test -z "${GL_COND_OBJ_LSTAT_FALSE}"; then
+    GL_COND_OBJ_LSTAT_TRUE='#'
+    GL_COND_OBJ_LSTAT_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
+  if test -z "$GL_COND_OBJ_LSTAT_TRUE"; then :
 
     :
-  fi
 
+fi
 
 
 
 
-          GNULIB_LSTAT=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
+          GL_GNULIB_LSTAT=1
 
 
 
 
 
+$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
 
-  if test $gl_cv_func_malloc_posix = yes; then
 
-$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
-  else
-    REPLACE_MALLOC=1
-  fi
 
-  if test $REPLACE_MALLOC = 1; then
+  if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
 
 
 
@@ -24253,165 +28353,25 @@ $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
 
 
 
-          GNULIB_MALLOC_POSIX=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_math_h='<'math.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
-$as_echo_n "checking absolute name of <math.h>... " >&6; }
-if ${gl_cv_next_math_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-             if test $ac_cv_header_math_h = yes; then
 
+          GL_GNULIB_MALLOC_POSIX=1
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'math.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_math_h
-           gl_cv_next_math_h='"'$gl_header'"'
-          else
-               gl_cv_next_math_h='<'math.h'>'
-             fi
+$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
-$as_echo "$gl_cv_next_math_h" >&6; }
-     fi
-     NEXT_MATH_H=$gl_cv_next_math_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'math.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_math_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
-$as_echo_n "checking whether NAN macro works... " >&6; }
-if ${gl_cv_header_math_nan_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
-int
-main ()
-{
-/* Solaris 10 has a broken definition of NAN.  Other platforms
-        fail to provide NAN, or provide it only in C99 mode; this
-        test only needs to fail when NAN is provided but wrong.  */
-         float f = 1.0f;
-#ifdef NAN
-         f = NAN;
-#endif
-         return f == 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_math_nan_works=yes
-else
-  gl_cv_header_math_nan_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
-$as_echo "$gl_cv_header_math_nan_works" >&6; }
-  if test $gl_cv_header_math_nan_works = no; then
-    REPLACE_NAN=1
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
-$as_echo_n "checking whether HUGE_VAL works... " >&6; }
-if ${gl_cv_header_math_huge_val_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <math.h>
-int
-main ()
-{
-/* Solaris 10 has a broken definition of HUGE_VAL.  */
-         double d = HUGE_VAL;
-         return d == 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_math_huge_val_works=yes
-else
-  gl_cv_header_math_huge_val_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
-$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
-  if test $gl_cv_header_math_huge_val_works = no; then
-    REPLACE_HUGE_VAL=1
-  fi
 
 
 
@@ -25237,8 +29197,13 @@ $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
 if ${gl_cv_have_weak+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_weak=no
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  case "$host_os" in
+       cygwin*)
+                                    gl_cv_have_weak="guessing no"
+         ;;
+       *)
+         gl_cv_have_weak=no
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 extern void xyzzy ();
 #pragma weak xyzzy
@@ -25255,13 +29220,13 @@ if ac_fn_c_try_link "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-     if test $gl_cv_have_weak = maybe; then
-                     if test "$cross_compiling" = yes; then :
-                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         if test $gl_cv_have_weak = maybe; then
+                                 if test "$cross_compiling" = yes; then :
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __ELF__
-             Extensible Linking Format
-             #endif
+                 Extensible Linking Format
+                 #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -25293,14 +29258,16 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-     fi
+         fi
+         ;;
+     esac
           case " $LDFLAGS " in
        *" -static "*) gl_cv_have_weak=no ;;
      esac
                     case "$gl_cv_have_weak" in
        *yes)
          case "$host_os" in
-           freebsd* | dragonfly*)
+           freebsd* | dragonfly* | midnightbsd*)
              : > conftest1.c
              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
              cat <<EOF > conftest2.c
@@ -25341,16 +29308,21 @@ $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   fi
 
 
-  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
-
-
-
-
-
-
 
+     if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+  GL_COND_OBJ_MBRTOWC_TRUE=
+  GL_COND_OBJ_MBRTOWC_FALSE='#'
+else
+  GL_COND_OBJ_MBRTOWC_TRUE='#'
+  GL_COND_OBJ_MBRTOWC_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MBRTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBRTOWC_FALSE}"; then
+    GL_COND_OBJ_MBRTOWC_TRUE='#'
+    GL_COND_OBJ_MBRTOWC_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+  if test -z "$GL_COND_OBJ_MBRTOWC_TRUE"; then :
 
     if test $REPLACE_MBSTATE_T = 1; then
 
@@ -25424,6 +29396,11 @@ extern __attribute__((__visibility__("hidden"))) int hiddenvar;
               extern __attribute__((__visibility__("default"))) int exportedvar;
               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
               void dummyfunc (void) {}
 
 int
@@ -25464,13 +29441,23 @@ _ACEOF
 
   :
 
-  fi
+
+fi
+
+
+
+
+
+
+
 
 
 
 
 
-          GNULIB_MBRTOWC=1
+
+
+          GL_GNULIB_MBRTOWC=1
 
 
 
@@ -25695,27 +29682,42 @@ _ACEOF
     fi
   fi
 
-  if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+     if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+  GL_COND_OBJ_MBSINIT_TRUE=
+  GL_COND_OBJ_MBSINIT_FALSE='#'
+else
+  GL_COND_OBJ_MBSINIT_TRUE='#'
+  GL_COND_OBJ_MBSINIT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MBSINIT_TRUE}" && test -z "${GL_COND_OBJ_MBSINIT_FALSE}"; then
+    GL_COND_OBJ_MBSINIT_TRUE='#'
+    GL_COND_OBJ_MBSINIT_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_MBSINIT_TRUE"; then :
 
 
+  :
 
 
+fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_MBSINIT=1
+
+
+          GL_GNULIB_MBSINIT=1
 
 
 
@@ -26046,37 +30048,52 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
     fi
   fi
 
-  if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
 
+     if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
+  GL_COND_OBJ_MBSRTOWCS_TRUE=
+  GL_COND_OBJ_MBSRTOWCS_FALSE='#'
+else
+  GL_COND_OBJ_MBSRTOWCS_TRUE='#'
+  GL_COND_OBJ_MBSRTOWCS_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MBSRTOWCS_TRUE}" && test -z "${GL_COND_OBJ_MBSRTOWCS_FALSE}"; then
+    GL_COND_OBJ_MBSRTOWCS_TRUE='#'
+    GL_COND_OBJ_MBSRTOWCS_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_MBSRTOWCS_TRUE"; then :
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
 
 
+  :
 
 
+fi
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_MBSRTOWCS=1
+
+
+
+
+          GL_GNULIB_MBSRTOWCS=1
 
 
 
@@ -26108,47 +30125,62 @@ done
     fi
   fi
 
-  if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
-
-
-
-
-
-
 
+     if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then
+  GL_COND_OBJ_MBTOWC_TRUE=
+  GL_COND_OBJ_MBTOWC_FALSE='#'
+else
+  GL_COND_OBJ_MBTOWC_TRUE='#'
+  GL_COND_OBJ_MBTOWC_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MBTOWC_TRUE}" && test -z "${GL_COND_OBJ_MBTOWC_FALSE}"; then
+    GL_COND_OBJ_MBTOWC_TRUE='#'
+    GL_COND_OBJ_MBTOWC_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
+  if test -z "$GL_COND_OBJ_MBTOWC_TRUE"; then :
 
 
   :
 
-  fi
-
 
+fi
 
 
 
-          GNULIB_MBTOWC=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
 
+          GL_GNULIB_MBTOWC=1
 
 
 
-  if test $REPLACE_MEMCHR = 1; then
 
 
+$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
 
 
 
 
 
+     if test $REPLACE_MEMCHR = 1; then
+  GL_COND_OBJ_MEMCHR_TRUE=
+  GL_COND_OBJ_MEMCHR_FALSE='#'
+else
+  GL_COND_OBJ_MEMCHR_TRUE='#'
+  GL_COND_OBJ_MEMCHR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MEMCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMCHR_FALSE}"; then
+    GL_COND_OBJ_MEMCHR_TRUE='#'
+    GL_COND_OBJ_MEMCHR_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
+  if test -z "$GL_COND_OBJ_MEMCHR_TRUE"; then :
 
 
   for ac_header in bp-sym.h
 done
 
 
-  fi
+
+fi
+
+
+
+
+
 
 
 
 
 
-          GNULIB_MEMCHR=1
+
+
+
+
+          GL_GNULIB_MEMCHR=1
 
 
 
@@ -26323,6 +30365,7 @@ else
                                       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#include <string.h> /* for __GNU_LIBRARY__ */
 #ifdef __GNU_LIBRARY__
  #include <features.h>
  #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
@@ -26417,7 +30460,16 @@ $as_echo "$gl_cv_func_memmem_works_always" >&6; }
 
 
 
-          GNULIB_MEMMEM=1
+
+
+
+
+
+
+
+
+
+          GL_GNULIB_MEMMEM=1
 
 
 
@@ -26448,27 +30500,42 @@ done
     HAVE_MEMPCPY=0
   fi
 
-  if test $HAVE_MEMPCPY = 0; then
 
+     if test $HAVE_MEMPCPY = 0; then
+  GL_COND_OBJ_MEMPCPY_TRUE=
+  GL_COND_OBJ_MEMPCPY_FALSE='#'
+else
+  GL_COND_OBJ_MEMPCPY_TRUE='#'
+  GL_COND_OBJ_MEMPCPY_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_MEMPCPY_FALSE}"; then
+    GL_COND_OBJ_MEMPCPY_TRUE='#'
+    GL_COND_OBJ_MEMPCPY_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_MEMPCPY_TRUE"; then :
+
+
+  :
 
 
+fi
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_MEMPCPY=1
+
+          GL_GNULIB_MEMPCPY=1
 
 
 
 done
 
 
-  if test $ac_cv_func_memrchr = no; then
 
+     if test $ac_cv_func_memrchr = no; then
+  GL_COND_OBJ_MEMRCHR_TRUE=
+  GL_COND_OBJ_MEMRCHR_FALSE='#'
+else
+  GL_COND_OBJ_MEMRCHR_TRUE='#'
+  GL_COND_OBJ_MEMRCHR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MEMRCHR_TRUE}" && test -z "${GL_COND_OBJ_MEMRCHR_FALSE}"; then
+    GL_COND_OBJ_MEMRCHR_TRUE='#'
+    GL_COND_OBJ_MEMRCHR_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_MEMRCHR_TRUE"; then :
+
+    :
+
+fi
 
 
 
@@ -26508,16 +30592,14 @@ done
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_MEMRCHR=1
+
+          GL_GNULIB_MEMRCHR=1
 
 
 
@@ -26666,24 +30748,30 @@ $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
       ;;
   esac
 
-  if test $REPLACE_MKDIR = 1; then
-
-
-
 
+     if test $REPLACE_MKDIR = 1; then
+  GL_COND_OBJ_MKDIR_TRUE=
+  GL_COND_OBJ_MKDIR_FALSE='#'
+else
+  GL_COND_OBJ_MKDIR_TRUE='#'
+  GL_COND_OBJ_MKDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MKDIR_TRUE}" && test -z "${GL_COND_OBJ_MKDIR_FALSE}"; then
+    GL_COND_OBJ_MKDIR_TRUE='#'
+    GL_COND_OBJ_MKDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_MKDIR=1
+          GL_GNULIB_MKDIR=1
 
 
 
@@ -26710,26 +30798,36 @@ done
     HAVE_MKDTEMP=0
   fi
 
-  if test $HAVE_MKDTEMP = 0; then
-
 
+     if test $HAVE_MKDTEMP = 0; then
+  GL_COND_OBJ_MKDTEMP_TRUE=
+  GL_COND_OBJ_MKDTEMP_FALSE='#'
+else
+  GL_COND_OBJ_MKDTEMP_TRUE='#'
+  GL_COND_OBJ_MKDTEMP_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MKDTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKDTEMP_FALSE}"; then
+    GL_COND_OBJ_MKDTEMP_TRUE='#'
+    GL_COND_OBJ_MKDTEMP_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_MKDTEMP_TRUE"; then :
 
+    :
 
 
+fi
 
 
-  gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
 
-    :
 
-  fi
 
 
 
 
 
-          GNULIB_MKDTEMP=1
+          GL_GNULIB_MKDTEMP=1
 
 
 
@@ -26749,20 +30847,26 @@ $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
     HAVE_MKOSTEMP=0
   fi
 
-  if test $HAVE_MKOSTEMP = 0; then
-
-
-
-
-
 
+     if test $HAVE_MKOSTEMP = 0; then
+  GL_COND_OBJ_MKOSTEMP_TRUE=
+  GL_COND_OBJ_MKOSTEMP_FALSE='#'
+else
+  GL_COND_OBJ_MKOSTEMP_TRUE='#'
+  GL_COND_OBJ_MKOSTEMP_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MKOSTEMP_TRUE}" && test -z "${GL_COND_OBJ_MKOSTEMP_FALSE}"; then
+    GL_COND_OBJ_MKOSTEMP_TRUE='#'
+    GL_COND_OBJ_MKOSTEMP_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_MKOSTEMP_TRUE"; then :
 
-  gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext"
 
 
 
-  fi
+fi
 
 
 cat >>confdefs.h <<_ACEOF
@@ -26775,44 +30879,52 @@ _ACEOF
 
 
 
-          GNULIB_MKOSTEMP=1
-
-
-
 
 
-$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
-
 
 
+          GL_GNULIB_MKOSTEMP=1
 
-  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
 
 
 
 
+$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
 
+     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+  GL_COND_OBJ_MSVC_INVAL_TRUE=
+  GL_COND_OBJ_MSVC_INVAL_FALSE='#'
+else
+  GL_COND_OBJ_MSVC_INVAL_TRUE='#'
+  GL_COND_OBJ_MSVC_INVAL_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MSVC_INVAL_TRUE}" && test -z "${GL_COND_OBJ_MSVC_INVAL_FALSE}"; then
+    GL_COND_OBJ_MSVC_INVAL_TRUE='#'
+    GL_COND_OBJ_MSVC_INVAL_FALSE='#'
   fi
 
-  if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
-
-
-
-
-
-
 
 
-  gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
-
+     if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
+  GL_COND_OBJ_MSVC_NOTHROW_TRUE=
+  GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
+else
+  GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
+  GL_COND_OBJ_MSVC_NOTHROW_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_MSVC_NOTHROW_TRUE}" && test -z "${GL_COND_OBJ_MSVC_NOTHROW_FALSE}"; then
+    GL_COND_OBJ_MSVC_NOTHROW_TRUE='#'
+    GL_COND_OBJ_MSVC_NOTHROW_FALSE='#'
   fi
 
 
+
 cat >>confdefs.h <<_ACEOF
 #define GNULIB_MSVC_NOTHROW 1
 _ACEOF
@@ -26827,90 +30939,6 @@ _ACEOF
 
 
 
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_netdb_h='<'netdb.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
-$as_echo_n "checking absolute name of <netdb.h>... " >&6; }
-if ${gl_cv_next_netdb_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-             if test $ac_cv_header_netdb_h = yes; then
-
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <netdb.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'netdb.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_netdb_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_netdb_h
-           gl_cv_next_netdb_h='"'$gl_header'"'
-          else
-               gl_cv_next_netdb_h='<'netdb.h'>'
-             fi
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
-$as_echo "$gl_cv_next_netdb_h" >&6; }
-     fi
-     NEXT_NETDB_H=$gl_cv_next_netdb_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'netdb.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_netdb_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_NETDB_H=$gl_next_as_first_directive
-
-
-
-
-  if test $ac_cv_header_netdb_h = yes; then
-    HAVE_NETDB_H=1
-  else
-    HAVE_NETDB_H=0
-  fi
-
-
-
-
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
@@ -26939,9 +30967,9 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
   if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
-    NETINET_IN_H=''
+    GL_GENERATE_NETINET_IN_H=false
   else
-    NETINET_IN_H='netinet/in.h'
+    GL_GENERATE_NETINET_IN_H=true
     for ac_header in netinet/in.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
@@ -27007,8 +31035,8 @@ _ACEOF
         gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_netinet_in_h
-           gl_cv_next_netinet_in_h='"'$gl_header'"'
+          gl_header=$gl_cv_absolute_netinet_in_h
+          gl_cv_next_netinet_in_h='"'$gl_header'"'
           else
                gl_cv_next_netinet_in_h='<'netinet/in.h'>'
              fi
@@ -27040,13 +31068,36 @@ $as_echo "$gl_cv_next_netinet_in_h" >&6; }
 
   fi
 
-   if test -n "$NETINET_IN_H"; then
+
+
+
+
+  case "$GL_GENERATE_NETINET_IN_H" in
+    false) NETINET_IN_H='' ;;
+    true)
+                  if test -z "$NETINET_IN_H"; then
+        NETINET_IN_H="${gl_source_base_prefix}netinet/in.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_NETINET_IN_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_NETINET_IN_H; then
   GL_GENERATE_NETINET_IN_H_TRUE=
   GL_GENERATE_NETINET_IN_H_FALSE='#'
 else
   GL_GENERATE_NETINET_IN_H_TRUE='#'
   GL_GENERATE_NETINET_IN_H_FALSE=
 fi
+:
+    if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
+    GL_GENERATE_NETINET_IN_H_TRUE='#'
+    GL_GENERATE_NETINET_IN_H_FALSE='#'
+  fi
+
+
+
 
 
 
@@ -27152,28 +31203,38 @@ $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
 
 
 
-  if test $REPLACE_OPEN = 1; then
-
 
+     if test $REPLACE_OPEN = 1; then
+  GL_COND_OBJ_OPEN_TRUE=
+  GL_COND_OBJ_OPEN_FALSE='#'
+else
+  GL_COND_OBJ_OPEN_TRUE='#'
+  GL_COND_OBJ_OPEN_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_OPEN_TRUE}" && test -z "${GL_COND_OBJ_OPEN_FALSE}"; then
+    GL_COND_OBJ_OPEN_TRUE='#'
+    GL_COND_OBJ_OPEN_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_OPEN_TRUE"; then :
 
 
 
+  :
 
 
-  gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
+fi
 
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_OPEN=1
+          GL_GNULIB_OPEN=1
 
 
 
@@ -27203,34 +31264,44 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
     ;;
   esac
 
-  if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
-
 
+     if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
+  GL_COND_OBJ_OPENAT_TRUE=
+  GL_COND_OBJ_OPENAT_FALSE='#'
+else
+  GL_COND_OBJ_OPENAT_TRUE='#'
+  GL_COND_OBJ_OPENAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_OPENAT_TRUE}" && test -z "${GL_COND_OBJ_OPENAT_FALSE}"; then
+    GL_COND_OBJ_OPENAT_TRUE='#'
+    GL_COND_OBJ_OPENAT_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_OPENAT_TRUE"; then :
 
 
 
+  :
 
 
-  gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
+fi
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_OPENAT 1
+_ACEOF
 
-  :
 
-  fi
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_OPENAT 1
-_ACEOF
 
 
 
 
 
 
-          GNULIB_OPENAT=1
+          GL_GNULIB_OPENAT=1
 
 
 
@@ -27276,24 +31347,30 @@ done
       REPLACE_OPENDIR=1;;
   esac
 
-  if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
-
-
-
 
+     if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
+  GL_COND_OBJ_OPENDIR_TRUE=
+  GL_COND_OBJ_OPENDIR_FALSE='#'
+else
+  GL_COND_OBJ_OPENDIR_TRUE='#'
+  GL_COND_OBJ_OPENDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_OPENDIR_TRUE}" && test -z "${GL_COND_OBJ_OPENDIR_FALSE}"; then
+    GL_COND_OBJ_OPENDIR_TRUE='#'
+    GL_COND_OBJ_OPENDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_OPENDIR=1
+          GL_GNULIB_OPENDIR=1
 
 
 
@@ -27314,24 +31391,30 @@ $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
     HAVE_PIPE=0
   fi
 
-  if test $HAVE_PIPE = 0; then
-
-
-
 
+     if test $HAVE_PIPE = 0; then
+  GL_COND_OBJ_PIPE_TRUE=
+  GL_COND_OBJ_PIPE_FALSE='#'
+else
+  GL_COND_OBJ_PIPE_TRUE='#'
+  GL_COND_OBJ_PIPE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_PIPE_TRUE}" && test -z "${GL_COND_OBJ_PIPE_FALSE}"; then
+    GL_COND_OBJ_PIPE_TRUE='#'
+    GL_COND_OBJ_PIPE_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS pipe.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_PIPE=1
+          GL_GNULIB_PIPE=1
 
 
 
@@ -27360,8 +31443,25 @@ done
     HAVE_RAWMEMCHR=0
   fi
 
-  if test $HAVE_RAWMEMCHR = 0; then
 
+     if test $HAVE_RAWMEMCHR = 0; then
+  GL_COND_OBJ_RAWMEMCHR_TRUE=
+  GL_COND_OBJ_RAWMEMCHR_FALSE='#'
+else
+  GL_COND_OBJ_RAWMEMCHR_TRUE='#'
+  GL_COND_OBJ_RAWMEMCHR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_RAWMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_RAWMEMCHR_FALSE}"; then
+    GL_COND_OBJ_RAWMEMCHR_TRUE='#'
+    GL_COND_OBJ_RAWMEMCHR_FALSE='#'
+  fi
+
+  if test -z "$GL_COND_OBJ_RAWMEMCHR_TRUE"; then :
+
+    :
+
+fi
 
 
 
@@ -27369,16 +31469,14 @@ done
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
 
-    :
-  fi
 
 
 
 
 
-          GNULIB_RAWMEMCHR=1
+
+          GL_GNULIB_RAWMEMCHR=1
 
 
 
@@ -27406,24 +31504,30 @@ done
     HAVE_READDIR=0
   fi
 
-  if test $HAVE_READDIR = 0; then
-
-
-
 
+     if test $HAVE_READDIR = 0; then
+  GL_COND_OBJ_READDIR_TRUE=
+  GL_COND_OBJ_READDIR_FALSE='#'
+else
+  GL_COND_OBJ_READDIR_TRUE='#'
+  GL_COND_OBJ_READDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_READDIR_TRUE}" && test -z "${GL_COND_OBJ_READDIR_FALSE}"; then
+    GL_COND_OBJ_READDIR_TRUE='#'
+    GL_COND_OBJ_READDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_READDIR=1
+          GL_GNULIB_READDIR=1
 
 
 
@@ -27590,27 +31694,37 @@ $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
     esac
   fi
 
-  if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
-
 
+     if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
+  GL_COND_OBJ_READLINK_TRUE=
+  GL_COND_OBJ_READLINK_FALSE='#'
+else
+  GL_COND_OBJ_READLINK_TRUE='#'
+  GL_COND_OBJ_READLINK_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_READLINK_TRUE}" && test -z "${GL_COND_OBJ_READLINK_FALSE}"; then
+    GL_COND_OBJ_READLINK_TRUE='#'
+    GL_COND_OBJ_READLINK_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_READLINK_TRUE"; then :
 
 
+  :
 
 
+fi
 
-  gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_READLINK=1
+          GL_GNULIB_READLINK=1
 
 
 
@@ -27623,15 +31737,11 @@ $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
 
 
 
-  if test $gl_cv_func_malloc_posix = yes; then
-
-$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
-
-  else
-    REPLACE_REALLOC=1
+  if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+    REPLACE_REALLOC_FOR_REALLOC_POSIX=1
   fi
 
-  if test $REPLACE_REALLOC = 1; then
+  if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
 
 
 
@@ -27648,7 +31758,11 @@ $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
 
 
 
-          GNULIB_REALLOC_POSIX=1
+
+
+
+
+          GL_GNULIB_REALLOC_POSIX=1
 
 
 
@@ -27968,24 +32082,30 @@ $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
       ;;
   esac
 
-  if test $REPLACE_RENAME = 1; then
-
-
-
 
+     if test $REPLACE_RENAME = 1; then
+  GL_COND_OBJ_RENAME_TRUE=
+  GL_COND_OBJ_RENAME_FALSE='#'
+else
+  GL_COND_OBJ_RENAME_TRUE='#'
+  GL_COND_OBJ_RENAME_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_RENAME_TRUE}" && test -z "${GL_COND_OBJ_RENAME_FALSE}"; then
+    GL_COND_OBJ_RENAME_TRUE='#'
+    GL_COND_OBJ_RENAME_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_RENAME=1
+          GL_GNULIB_RENAME=1
 
 
 
@@ -28013,24 +32133,30 @@ done
     HAVE_REWINDDIR=0
   fi
 
-  if test $HAVE_REWINDDIR = 0; then
-
-
-
 
+     if test $HAVE_REWINDDIR = 0; then
+  GL_COND_OBJ_REWINDDIR_TRUE=
+  GL_COND_OBJ_REWINDDIR_FALSE='#'
+else
+  GL_COND_OBJ_REWINDDIR_TRUE='#'
+  GL_COND_OBJ_REWINDDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_REWINDDIR_TRUE}" && test -z "${GL_COND_OBJ_REWINDDIR_FALSE}"; then
+    GL_COND_OBJ_REWINDDIR_TRUE='#'
+    GL_COND_OBJ_REWINDDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_REWINDDIR=1
+          GL_GNULIB_REWINDDIR=1
 
 
 
@@ -28112,24 +32238,30 @@ $as_echo "$gl_cv_func_rmdir_works" >&6; }
       ;;
   esac
 
-  if test $REPLACE_RMDIR = 1; then
-
-
-
 
+     if test $REPLACE_RMDIR = 1; then
+  GL_COND_OBJ_RMDIR_TRUE=
+  GL_COND_OBJ_RMDIR_FALSE='#'
+else
+  GL_COND_OBJ_RMDIR_TRUE='#'
+  GL_COND_OBJ_RMDIR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_RMDIR_TRUE}" && test -z "${GL_COND_OBJ_RMDIR_FALSE}"; then
+    GL_COND_OBJ_RMDIR_TRUE='#'
+    GL_COND_OBJ_RMDIR_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_RMDIR=1
+          GL_GNULIB_RMDIR=1
 
 
 
@@ -28146,6 +32278,7 @@ $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
 
 
 
+
   if test "$ac_cv_header_winsock2_h" = yes; then
     REPLACE_SELECT=1
   else
@@ -28297,24 +32430,30 @@ rm -f core conftest.err conftest.$ac_objext \
   fi
 
 
-  if test $REPLACE_SELECT = 1; then
-
-
-
 
+     if test $REPLACE_SELECT = 1; then
+  GL_COND_OBJ_SELECT_TRUE=
+  GL_COND_OBJ_SELECT_FALSE='#'
+else
+  GL_COND_OBJ_SELECT_TRUE='#'
+  GL_COND_OBJ_SELECT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SELECT_TRUE}" && test -z "${GL_COND_OBJ_SELECT_FALSE}"; then
+    GL_COND_OBJ_SELECT_TRUE='#'
+    GL_COND_OBJ_SELECT_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS select.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_SELECT=1
+          GL_GNULIB_SELECT=1
 
 
 
@@ -28395,24 +32534,30 @@ $as_echo "$gl_cv_func_setenv_works" >&6; }
     esac
   fi
 
-  if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
-
-
-
 
+     if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
+  GL_COND_OBJ_SETENV_TRUE=
+  GL_COND_OBJ_SETENV_FALSE='#'
+else
+  GL_COND_OBJ_SETENV_TRUE='#'
+  GL_COND_OBJ_SETENV_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SETENV_TRUE}" && test -z "${GL_COND_OBJ_SETENV_FALSE}"; then
+    GL_COND_OBJ_SETENV_TRUE='#'
+    GL_COND_OBJ_SETENV_FALSE='#'
+  fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_SETENV=1
+          GL_GNULIB_SETENV=1
 
 
 
@@ -28434,7 +32579,7 @@ if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then :
 else
   case "$host_os" in
        # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
-       *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+       *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
          gl_cv_func_setlocale_null_all_mtsafe=no ;;
        # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
        *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
@@ -28475,7 +32620,7 @@ else
        openbsd* | aix*)
          gl_cv_func_setlocale_null_one_mtsafe=no ;;
        # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
-       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+       *-gnu* | gnu* | *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
          gl_cv_func_setlocale_null_one_mtsafe=yes ;;
        # If we don't know, obey --enable-cross-guesses.
        *)
@@ -28514,8 +32659,13 @@ $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
 if ${gl_cv_have_weak+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_have_weak=no
-          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  case "$host_os" in
+       cygwin*)
+                                    gl_cv_have_weak="guessing no"
+         ;;
+       *)
+         gl_cv_have_weak=no
+                  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 extern void xyzzy ();
 #pragma weak xyzzy
@@ -28532,13 +32682,13 @@ if ac_fn_c_try_link "$LINENO"; then :
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-     if test $gl_cv_have_weak = maybe; then
-                     if test "$cross_compiling" = yes; then :
-                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+         if test $gl_cv_have_weak = maybe; then
+                                 if test "$cross_compiling" = yes; then :
+                              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __ELF__
-             Extensible Linking Format
-             #endif
+                 Extensible Linking Format
+                 #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
@@ -28570,14 +32720,16 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-     fi
+         fi
+         ;;
+     esac
           case " $LDFLAGS " in
        *" -static "*) gl_cv_have_weak=no ;;
      esac
                     case "$gl_cv_have_weak" in
        *yes)
          case "$host_os" in
-           freebsd* | dragonfly*)
+           freebsd* | dragonfly* | midnightbsd*)
              : > conftest1.c
              $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1
              cat <<EOF > conftest2.c
@@ -28618,16 +32770,21 @@ $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
   fi
 
 
-  if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
-
-
-
-
-
-
 
+     if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+  GL_COND_OBJ_SETLOCALE_LOCK_TRUE=
+  GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
+else
+  GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
+  GL_COND_OBJ_SETLOCALE_LOCK_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SETLOCALE_LOCK_TRUE}" && test -z "${GL_COND_OBJ_SETLOCALE_LOCK_FALSE}"; then
+    GL_COND_OBJ_SETLOCALE_LOCK_TRUE='#'
+    GL_COND_OBJ_SETLOCALE_LOCK_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext"
+  if test -z "$GL_COND_OBJ_SETLOCALE_LOCK_TRUE"; then :
 
 
 
@@ -28680,6 +32837,11 @@ extern __attribute__((__visibility__("hidden"))) int hiddenvar;
               extern __attribute__((__visibility__("default"))) int exportedvar;
               extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
               extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+              void dummyfunc (void);
+              int hiddenvar;
+              int exportedvar;
+              int hiddenfunc (void) { return 51; }
+              int exportedfunc (void) { return 1225736919; }
               void dummyfunc (void) {}
 
 int
@@ -28715,136 +32877,61 @@ _ACEOF
 
 
 
-  fi
-
-
-
 
+fi
 
-          GNULIB_SETLOCALE_NULL=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
 
 
 
+          GL_GNULIB_SETLOCALE_NULL=1
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
 
 
 
 
+$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS setsockopt.$ac_objext"
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_SETSOCKOPT_TRUE=
+  GL_COND_OBJ_SETSOCKOPT_FALSE='#'
+else
+  GL_COND_OBJ_SETSOCKOPT_TRUE='#'
+  GL_COND_OBJ_SETSOCKOPT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_SETSOCKOPT_TRUE}" && test -z "${GL_COND_OBJ_SETSOCKOPT_FALSE}"; then
+    GL_COND_OBJ_SETSOCKOPT_TRUE='#'
+    GL_COND_OBJ_SETSOCKOPT_FALSE='#'
   fi
 
 
 
 
 
-          GNULIB_SETSOCKOPT=1
-
-
-
-
 
-$as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_signal_h='<'signal.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
-$as_echo_n "checking absolute name of <signal.h>... " >&6; }
-if ${gl_cv_next_signal_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-
-
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <signal.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'signal.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_signal_h
-           gl_cv_next_signal_h='"'$gl_header'"'
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
-$as_echo "$gl_cv_next_signal_h" >&6; }
-     fi
-     NEXT_SIGNAL_H=$gl_cv_next_signal_h
+          GL_GNULIB_SETSOCKOPT=1
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'signal.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_signal_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
 
 
 
 
+$as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
 
-# AIX declares sig_atomic_t to already include volatile, and C89 compilers
-# then choke on 'volatile sig_atomic_t'.  C99 requires that it compile.
-  ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
-#include <signal.h>
 
-"
-if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
 
-else
-  HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
-fi
 
 
 
 
 
 
-  ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
-#include <signal.h>
 
-"
-if test "x$ac_cv_type_sighandler_t" = xyes; then :
 
+     if test "$ac_cv_header_winsock2_h" = yes; then
+  GL_COND_OBJ_SOCKET_TRUE=
+  GL_COND_OBJ_SOCKET_FALSE='#'
 else
-  HAVE_SIGHANDLER_T=0
+  GL_COND_OBJ_SOCKET_TRUE='#'
+  GL_COND_OBJ_SOCKET_FALSE=
 fi
+:
+    if test -z "${GL_COND_OBJ_SOCKET_TRUE}" && test -z "${GL_COND_OBJ_SOCKET_FALSE}"; then
+    GL_COND_OBJ_SOCKET_TRUE='#'
+    GL_COND_OBJ_SOCKET_FALSE='#'
+  fi
 
-
+  # When this module is used, sockets may actually occur as file descriptors,
+  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
 
 
 
 
 
   if test "$ac_cv_header_winsock2_h" = yes; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS socket.$ac_objext"
-
+    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
   fi
-  # When this module is used, sockets may actually occur as file descriptors,
-  # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
 
 
 
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
-  fi
 
 
 
 
 
-          GNULIB_SOCKET=1
+
+          GL_GNULIB_SOCKET=1
 
 
 
@@ -29080,16 +33160,21 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
       ;;
   esac
 
-  if test $REPLACE_STAT = 1; then
-
-
-
-
-
-
 
+     if test $REPLACE_STAT = 1; then
+  GL_COND_OBJ_STAT_TRUE=
+  GL_COND_OBJ_STAT_FALSE='#'
+else
+  GL_COND_OBJ_STAT_TRUE='#'
+  GL_COND_OBJ_STAT_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STAT_TRUE}" && test -z "${GL_COND_OBJ_STAT_FALSE}"; then
+    GL_COND_OBJ_STAT_TRUE='#'
+    GL_COND_OBJ_STAT_FALSE='#'
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
+  if test -z "$GL_COND_OBJ_STAT_TRUE"; then :
 
     case "$host_os" in
       mingw*)
@@ -29110,13 +33195,18 @@ $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
 
   :
 
-  fi
+
+fi
+
+
 
 
 
 
 
-          GNULIB_STAT=1
+
+
+          GL_GNULIB_STAT=1
 
 
 
@@ -29272,7 +33362,8 @@ if ${gl_cv_header_working_stdalign_h+:} false; then :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdalign.h>
+#include <stdint.h>
+            #include <stdalign.h>
             #include <stddef.h>
 
             /* Test that alignof yields a result consistent with offsetof.
@@ -29291,6 +33382,7 @@ else
             /* Test _Alignas only on platforms where gnulib can help.  */
             #if \
                 ((defined __cplusplus && 201103 <= __cplusplus) \
+                 || (__TINYC__ && defined __attribute__) \
                  || (defined __APPLE__ && defined __MACH__ \
                      ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
                      : __GNUC__) \
 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
 
   if test $gl_cv_header_working_stdalign_h = yes; then
-    STDALIGN_H=''
+    GL_GENERATE_STDALIGN_H=false
   else
-    STDALIGN_H='stdalign.h'
+    GL_GENERATE_STDALIGN_H=true
   fi
 
 
-   if test -n "$STDALIGN_H"; then
+
+
+
+  case "$GL_GENERATE_STDALIGN_H" in
+    false) STDALIGN_H='' ;;
+    true)
+                  if test -z "$STDALIGN_H"; then
+        STDALIGN_H="${gl_source_base_prefix}stdalign.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_STDALIGN_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_STDALIGN_H; then
   GL_GENERATE_STDALIGN_H_TRUE=
   GL_GENERATE_STDALIGN_H_FALSE='#'
 else
   GL_GENERATE_STDALIGN_H_TRUE='#'
   GL_GENERATE_STDALIGN_H_FALSE=
 fi
+:
+    if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
+    GL_GENERATE_STDALIGN_H_TRUE='#'
+    GL_GENERATE_STDALIGN_H_FALSE='#'
+  fi
+
+
+
+
 
 
 
     case "$host_os" in
       solaris*)
         if test -z "$GCC"; then
-          STDBOOL_H='stdbool.h'
+          GL_GENERATE_STDBOOL_H=true
         else
-          STDBOOL_H=''
+          GL_GENERATE_STDBOOL_H=false
         fi
         ;;
       *)
-        STDBOOL_H=''
+        GL_GENERATE_STDBOOL_H=false
         ;;
     esac
   else
-    STDBOOL_H='stdbool.h'
+    GL_GENERATE_STDBOOL_H=true
+  fi
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
   fi
 
-   if test -n "$STDBOOL_H"; then
+
+
+
+
+
+  case "$GL_GENERATE_STDBOOL_H" in
+    false) STDBOOL_H='' ;;
+    true)
+                  if test -z "$STDBOOL_H"; then
+        STDBOOL_H="${gl_source_base_prefix}stdbool.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_STDBOOL_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_STDBOOL_H; then
   GL_GENERATE_STDBOOL_H_TRUE=
   GL_GENERATE_STDBOOL_H_FALSE='#'
 else
   GL_GENERATE_STDBOOL_H_TRUE='#'
   GL_GENERATE_STDBOOL_H_FALSE=
 fi
-
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
+:
+    if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
+    GL_GENERATE_STDBOOL_H_TRUE='#'
+    GL_GENERATE_STDBOOL_H_FALSE='#'
   fi
 
 
 
 
 
-  STDDEF_H=
 
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
-$as_echo_n "checking for good max_align_t... " >&6; }
-if ${gl_cv_type_max_align_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-            unsigned int s = sizeof (max_align_t);
-            #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
-            int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
-            int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
-            #endif
-            typedef struct { char a; max_align_t b; } max_helper;
-            typedef struct { char a; long b; } long_helper;
-            typedef struct { char a; double b; } double_helper;
-            typedef struct { char a; long double b; } long_double_helper;
-            int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
-            int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
-            int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_max_align_t=yes
-else
-  gl_cv_type_max_align_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
-$as_echo "$gl_cv_type_max_align_t" >&6; }
-  if test $gl_cv_type_max_align_t = no; then
-    HAVE_MAX_ALIGN_T=0
-    STDDEF_H=stddef.h
-  fi
 
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
-  fi
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if ${gl_cv_decl_null_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_decl_null_works=yes
-else
-  gl_cv_decl_null_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
-  fi
+  case "$GL_GENERATE_STDDEF_H" in
+    false) STDDEF_H='' ;;
+    true)
+                  if test -z "$STDDEF_H"; then
+        STDDEF_H="${gl_source_base_prefix}stddef.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_STDDEF_H is not set correctly" 1>&2; exit 1 ;;
+  esac
 
 
-   if test -n "$STDDEF_H"; then
+     if $GL_GENERATE_STDDEF_H; then
   GL_GENERATE_STDDEF_H_TRUE=
   GL_GENERATE_STDDEF_H_FALSE='#'
 else
   GL_GENERATE_STDDEF_H_TRUE='#'
   GL_GENERATE_STDDEF_H_FALSE=
 fi
+:
+    if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
+    GL_GENERATE_STDDEF_H_TRUE='#'
+    GL_GENERATE_STDDEF_H_FALSE='#'
+  fi
 
-  if test -n "$STDDEF_H"; then
 
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if ${gl_cv_next_stddef_h+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+
+  case "$GL_GENERATE_STDINT_H" in
+    false) STDINT_H='' ;;
+    true)
+                  if test -z "$STDINT_H"; then
+        STDINT_H="${gl_source_base_prefix}stdint.h"
+      fi
+      ;;
+    *) echo "*** GL_GENERATE_STDINT_H is not set correctly" 1>&2; exit 1 ;;
+  esac
+
+
+     if $GL_GENERATE_STDINT_H; then
+  GL_GENERATE_STDINT_H_TRUE=
+  GL_GENERATE_STDINT_H_FALSE='#'
 else
+  GL_GENERATE_STDINT_H_TRUE='#'
+  GL_GENERATE_STDINT_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
+    GL_GENERATE_STDINT_H_TRUE='#'
+    GL_GENERATE_STDINT_H_FALSE='#'
+  fi
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
+
+
+
+
+
+  case "$GL_GENERATE_LIMITS_H" in
+    false) LIMITS_H='' ;;
+    true)
+                  if test -z "$LIMITS_H"; then
+        LIMITS_H="${gl_source_base_prefix}limits.h"
+      fi
       ;;
+    *) echo "*** GL_GENERATE_LIMITS_H is not set correctly" 1>&2; exit 1 ;;
   esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stddef.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stddef_h
-           gl_cv_next_stddef_h='"'$gl_header'"'
+     if $GL_GENERATE_LIMITS_H; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
+:
+    if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
+    GL_GENERATE_LIMITS_H_TRUE='#'
+    GL_GENERATE_LIMITS_H_FALSE='#'
+  fi
+
+
+
+
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
-     fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stddef.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
 
 
 
+
+
+
+     if test $REPLACE_STDIO_READ_FUNCS = 1; then
+  GL_COND_OBJ_STDIO_READ_TRUE=
+  GL_COND_OBJ_STDIO_READ_FALSE='#'
+else
+  GL_COND_OBJ_STDIO_READ_TRUE='#'
+  GL_COND_OBJ_STDIO_READ_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STDIO_READ_TRUE}" && test -z "${GL_COND_OBJ_STDIO_READ_FALSE}"; then
+    GL_COND_OBJ_STDIO_READ_TRUE='#'
+    GL_COND_OBJ_STDIO_READ_FALSE='#'
+  fi
+
+
+     if test $REPLACE_STDIO_WRITE_FUNCS = 1; then
+  GL_COND_OBJ_STDIO_WRITE_TRUE=
+  GL_COND_OBJ_STDIO_WRITE_FALSE='#'
+else
+  GL_COND_OBJ_STDIO_WRITE_TRUE='#'
+  GL_COND_OBJ_STDIO_WRITE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STDIO_WRITE_TRUE}" && test -z "${GL_COND_OBJ_STDIO_WRITE_FALSE}"; then
+    GL_COND_OBJ_STDIO_WRITE_TRUE='#'
+    GL_COND_OBJ_STDIO_WRITE_FALSE='#'
   fi
 
 
 
 
-  $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
 
 
 
 
 
 
+          GL_GNULIB_FSCANF=1
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdio_h='<'stdio.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
-$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
-if ${gl_cv_next_stdio_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
+$as_echo "#define GNULIB_TEST_FSCANF 1" >>confdefs.h
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_FSCANF 1
 _ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdio.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stdio_h
-           gl_cv_next_stdio_h='"'$gl_header'"'
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
-$as_echo "$gl_cv_next_stdio_h" >&6; }
-     fi
-     NEXT_STDIO_H=$gl_cv_next_stdio_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stdio.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdio_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
 
 
 
 
 
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
-$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
-if ${gl_cv_func_printf_attribute_flavor+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+          GL_GNULIB_SCANF=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_SCANF 1" >>confdefs.h
+
+
 
-       #define __STDC_FORMAT_MACROS 1
-       #include <stdio.h>
-       #include <inttypes.h>
-       /* For non-mingw systems, compilation will trivially succeed.
-          For mingw, compilation will succeed for older mingw (system
-          printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
-       #if (defined _WIN32 && ! defined __CYGWIN__) && \
-         (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
-       extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
-       #endif
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_SCANF 1
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_printf_attribute_flavor=system
-else
-  gl_cv_func_printf_attribute_flavor=gnu
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
-$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
-  if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
 
-$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
 
-  fi
 
-      GNULIB_FSCANF=1
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_FSCANF 1
-_ACEOF
 
 
-  GNULIB_SCANF=1
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_SCANF 1
-_ACEOF
 
 
-  GNULIB_FGETC=1
-  GNULIB_GETC=1
-  GNULIB_GETCHAR=1
-  GNULIB_FGETS=1
-  GNULIB_FREAD=1
+          GL_GNULIB_FGETC=1
 
 
-      GNULIB_FPRINTF=1
-  GNULIB_PRINTF=1
-  GNULIB_VFPRINTF=1
-  GNULIB_VPRINTF=1
-  GNULIB_FPUTC=1
-  GNULIB_PUTC=1
-  GNULIB_PUTCHAR=1
-  GNULIB_FPUTS=1
-  GNULIB_PUTS=1
-  GNULIB_FWRITE=1
 
 
 
+$as_echo "#define GNULIB_TEST_FGETC 1" >>confdefs.h
 
 
 
@@ -29708,224 +33727,94 @@ _ACEOF
 
 
 
-  if test $ac_cv_have_decl_fcloseall = no; then
-    HAVE_DECL_FCLOSEALL=0
-  fi
 
 
 
 
 
+          GL_GNULIB_GETC=1
 
 
 
 
 
+$as_echo "#define GNULIB_TEST_GETC 1" >>confdefs.h
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdlib_h='<'stdlib.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
-$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
-if ${gl_cv_next_stdlib_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdlib.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stdlib_h
-           gl_cv_next_stdlib_h='"'$gl_header'"'
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
-$as_echo "$gl_cv_next_stdlib_h" >&6; }
-     fi
-     NEXT_STDLIB_H=$gl_cv_next_stdlib_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stdlib.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdlib_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
 
 
+          GL_GNULIB_GETCHAR=1
 
 
 
 
 
+$as_echo "#define GNULIB_TEST_GETCHAR 1" >>confdefs.h
 
 
 
 
 
-  if test $ac_cv_have_decl_ecvt = no; then
-    HAVE_DECL_ECVT=0
-  fi
 
-  if test $ac_cv_have_decl_fcvt = no; then
-    HAVE_DECL_FCVT=0
-  fi
 
-  if test $ac_cv_have_decl_gcvt = no; then
-    HAVE_DECL_GCVT=0
-  fi
 
 
 
 
 
-  for ac_func in strchrnul
-do :
-  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
-if test "x$ac_cv_func_strchrnul" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STRCHRNUL 1
-_ACEOF
+          GL_GNULIB_FGETS=1
 
-fi
-done
 
-  if test $ac_cv_func_strchrnul = no; then
-    HAVE_STRCHRNUL=0
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
-$as_echo_n "checking whether strchrnul works... " >&6; }
-if ${gl_cv_func_strchrnul_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#if defined __CYGWIN__
- #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
-  Lucky user
- #endif
-#else
-  Lucky user
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_strchrnul_works="guessing yes"
-else
-  gl_cv_func_strchrnul_works="guessing no"
-fi
-rm -f conftest*
 
+$as_echo "#define GNULIB_TEST_FGETS 1" >>confdefs.h
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <string.h> /* for strchrnul */
 
-int
-main ()
-{
-const char *buf = "a";
-      return strchrnul (buf, 'b') != buf + 1;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strchrnul_works=yes
-else
-  gl_cv_func_strchrnul_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
-$as_echo "$gl_cv_func_strchrnul_works" >&6; }
-    case "$gl_cv_func_strchrnul_works" in
-      *yes) ;;
-      *) REPLACE_STRCHRNUL=1 ;;
-    esac
-  fi
 
-  if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
 
 
 
 
 
+          GL_GNULIB_FREAD=1
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
 
-    :
-  fi
 
+$as_echo "#define GNULIB_TEST_FREAD 1" >>confdefs.h
 
 
 
 
-          GNULIB_STRCHRNUL=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
 
 
 
+          GL_GNULIB_FPRINTF=1
 
 
 
-  if test $gl_cv_func_malloc_posix != yes; then
-    REPLACE_STRDUP=1
-  fi
 
-  if test $ac_cv_have_decl_strdup = no; then
-    HAVE_DECL_STRDUP=0
-  fi
 
-  if test $REPLACE_STRDUP = 1; then
+$as_echo "#define GNULIB_TEST_FPRINTF 1" >>confdefs.h
 
 
 
@@ -29934,22 +33823,19 @@ $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
 
-    :
-  fi
 
 
 
+          GL_GNULIB_PRINTF=1
 
 
-          GNULIB_STRDUP=1
 
 
 
+$as_echo "#define GNULIB_TEST_PRINTF 1" >>confdefs.h
 
 
-$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
 
 
 
@@ -29960,64 +33846,15 @@ $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
 
 
 
-  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
-$as_echo_n "checking for working strerror function... " >&6; }
-if ${gl_cv_func_working_strerror+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                          # Guess yes on glibc systems.
-           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
-                          # Guess yes on musl systems.
-           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
-                          # If we don't know, obey --enable-cross-guesses.
-           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
-         esac
+          GL_GNULIB_VFPRINTF=1
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
 
-int
-main ()
-{
-if (!*strerror (-2)) return 1;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_working_strerror=yes
-else
-  gl_cv_func_working_strerror=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
-$as_echo "$gl_cv_func_working_strerror" >&6; }
-    case "$gl_cv_func_working_strerror" in
-      *yes) ;;
-      *)
-                        REPLACE_STRERROR=1
-        ;;
-    esac
 
-                  case "$gl_cv_func_strerror_r_works" in
-        *no) REPLACE_STRERROR=1 ;;
-      esac
+$as_echo "#define GNULIB_TEST_VFPRINTF 1" >>confdefs.h
 
-  else
-            REPLACE_STRERROR=1
-  fi
 
-  if test $REPLACE_STRERROR = 1; then
 
 
 
@@ -30026,134 +33863,92 @@ $as_echo "$gl_cv_func_working_strerror" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
 
-  fi
 
+          GL_GNULIB_VPRINTF=1
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_STRERROR 1
-_ACEOF
 
 
 
 
+$as_echo "#define GNULIB_TEST_VPRINTF 1" >>confdefs.h
 
 
 
-          GNULIB_STRERROR=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
 
 
 
 
+          GL_GNULIB_FPUTC=1
 
-  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
 
 
 
 
+$as_echo "#define GNULIB_TEST_FPUTC 1" >>confdefs.h
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
 
 
 
 
 
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    for ac_header in winsock2.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
 
-fi
 
-done
 
-  fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
+          GL_GNULIB_PUTC=1
 
 
-  fi
 
 
 
+$as_echo "#define GNULIB_TEST_PUTC 1" >>confdefs.h
 
 
 
 
-  if test $ac_cv_have_decl_strerror_r = no; then
-    HAVE_DECL_STRERROR_R=0
-  fi
 
-  if test $ac_cv_func_strerror_r = yes; then
-    if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
-      if test $gl_cv_func_strerror_r_posix_signature = yes; then
-        case "$gl_cv_func_strerror_r_works" in
-                    *no) REPLACE_STRERROR_R=1 ;;
-        esac
-      else
-                REPLACE_STRERROR_R=1
-      fi
-    else
-                  REPLACE_STRERROR_R=1
-    fi
-  fi
 
-  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
 
 
 
 
 
 
+          GL_GNULIB_PUTCHAR=1
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
 
 
 
+$as_echo "#define GNULIB_TEST_PUTCHAR 1" >>confdefs.h
 
 
 
-  fi
 
 
 
 
 
-          GNULIB_STRERROR_R=1
 
 
 
 
+          GL_GNULIB_FPUTS=1
 
-$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
 
 
 
 
+$as_echo "#define GNULIB_TEST_FPUTS 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_STRERROR_R_POSIX 1
-_ACEOF
 
 
 
@@ -30165,132 +33960,84 @@ _ACEOF
 
 
 
+          GL_GNULIB_PUTS=1
 
 
 
-  if test $ac_cv_have_decl_strnlen = no; then
-    HAVE_DECL_STRNLEN=0
-  else
 
-         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
-$as_echo_n "checking for working strnlen... " >&6; }
-if ${ac_cv_func_strnlen_working+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  # Guess no on AIX systems, yes otherwise.
-               case "$host_os" in
-                 aix*) ac_cv_func_strnlen_working=no;;
-                 *)    ac_cv_func_strnlen_working=yes;;
-               esac
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$ac_includes_default
-int
-main ()
-{
 
-#define S "foobar"
-#define S_LEN (sizeof S - 1)
+$as_echo "#define GNULIB_TEST_PUTS 1" >>confdefs.h
 
-  /* At least one implementation is buggy: that of AIX 4.3 would
-     give strnlen (S, 1) == 3.  */
 
-  int i;
-  for (i = 0; i < S_LEN + 1; ++i)
-    {
-      int expected = i <= S_LEN ? i : S_LEN;
-      if (strnlen (S, i) != expected)
-       return 1;
-    }
-  return 0;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  ac_cv_func_strnlen_working=yes
-else
-  ac_cv_func_strnlen_working=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
-$as_echo "$ac_cv_func_strnlen_working" >&6; }
-test $ac_cv_func_strnlen_working = no && :
 
 
-    if test $ac_cv_func_strnlen_working = no; then
-      REPLACE_STRNLEN=1
-    fi
-  fi
 
-  if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
 
 
 
 
 
+          GL_GNULIB_FWRITE=1
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
 
-    :
-  fi
 
+$as_echo "#define GNULIB_TEST_FWRITE 1" >>confdefs.h
 
 
 
 
-          GNULIB_STRNLEN=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
 
 
 
 
 
-  if test $REPLACE_STRSTR = 0; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
-$as_echo_n "checking whether strstr works in linear time... " >&6; }
-if ${gl_cv_func_strstr_linear+:} false; then :
+  for ac_func in strchrnul
+do :
+  ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
+if test "x$ac_cv_func_strchrnul" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCHRNUL 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_strchrnul = no; then
+    HAVE_STRCHRNUL=0
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
+$as_echo_n "checking whether strchrnul works... " >&6; }
+if ${gl_cv_func_strchrnul_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
-                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
-     && !(defined __i386__ || defined __x86_64__) \
-     && !defined __UCLIBC__
-  Lucky user
- #endif
-#endif
-#ifdef __CYGWIN__
+#if defined __CYGWIN__
  #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
   Lucky user
  #endif
+#else
+  Lucky user
 #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_strstr_linear="guessing yes"
+  gl_cv_func_strchrnul_works="guessing yes"
 else
-  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
+  gl_cv_func_strchrnul_works="guessing no"
 fi
 rm -f conftest*
 
@@ -30299,55 +34046,22 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#ifdef __MVS__
-/* z/OS does not deliver signals while strstr() is running (thanks to
-   restrictions on its LE runtime), which prevents us from limiting the
-   running time of this test.  */
-# error "This test does not work properly on z/OS"
-#endif
-#include <signal.h> /* for signal */
-#include <string.h> /* for strstr */
-#include <stdlib.h> /* for malloc */
-#include <unistd.h> /* for alarm */
-static void quit (int sig) { _exit (sig + 128); }
+#include <string.h> /* for strchrnul */
 
 int
 main ()
 {
-
-    int result = 0;
-    size_t m = 1000000;
-    char *haystack = (char *) malloc (2 * m + 2);
-    char *needle = (char *) malloc (m + 2);
-    /* Failure to compile this test due to missing alarm is okay,
-       since all such platforms (mingw) also have quadratic strstr.  */
-    signal (SIGALRM, quit);
-    alarm (5);
-    /* Check for quadratic performance.  */
-    if (haystack && needle)
-      {
-        memset (haystack, 'A', 2 * m);
-        haystack[2 * m] = 'B';
-        haystack[2 * m + 1] = 0;
-        memset (needle, 'A', m);
-        needle[m] = 'B';
-        needle[m + 1] = 0;
-        if (!strstr (haystack, needle))
-          result |= 1;
-      }
-    /* Free allocated memory, in case some sanitizer is watching.  */
-    free (haystack);
-    free (needle);
-    return result;
+const char *buf = "a";
+      return strchrnul (buf, 'b') != buf + 1;
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strstr_linear=yes
+  gl_cv_func_strchrnul_works=yes
 else
-  gl_cv_func_strstr_linear=no
+  gl_cv_func_strchrnul_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
-$as_echo "$gl_cv_func_strstr_linear" >&6; }
-    case "$gl_cv_func_strstr_linear" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
+$as_echo "$gl_cv_func_strchrnul_works" >&6; }
+    case "$gl_cv_func_strchrnul_works" in
       *yes) ;;
-      *)
-        REPLACE_STRSTR=1
-        ;;
+      *) REPLACE_STRCHRNUL=1 ;;
     esac
   fi
 
-  if test $REPLACE_STRSTR = 1; then
 
+     if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
+  GL_COND_OBJ_STRCHRNUL_TRUE=
+  GL_COND_OBJ_STRCHRNUL_FALSE='#'
+else
+  GL_COND_OBJ_STRCHRNUL_TRUE='#'
+  GL_COND_OBJ_STRCHRNUL_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STRCHRNUL_TRUE}" && test -z "${GL_COND_OBJ_STRCHRNUL_FALSE}"; then
+    GL_COND_OBJ_STRCHRNUL_TRUE='#'
+    GL_COND_OBJ_STRCHRNUL_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_STRCHRNUL_TRUE"; then :
 
+    :
 
+fi
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
-  fi
 
 
 
-  if test $REPLACE_MEMCHR = 1; then
-    REPLACE_STRSTR=1
-  else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
-$as_echo_n "checking whether strstr works... " >&6; }
-if ${gl_cv_func_strstr_works_always+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#ifdef __GNU_LIBRARY__
- #include <features.h>
- #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
-     || defined __UCLIBC__
-  Lucky user
- #endif
-#elif defined __CYGWIN__
- #include <cygwin/version.h>
- #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
-  Lucky user
- #endif
-#else
-  Lucky user
-#endif
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_strstr_works_always="guessing yes"
-else
-  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
-fi
-rm -f conftest*
 
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#include <string.h> /* for strstr */
-#ifdef __GNU_LIBRARY__
- #include <features.h>
- #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
-  Unlucky user
- #endif
-#endif
-#define P "_EF_BF_BD"
-#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
-#define NEEDLE P P P P P
 
-int
-main ()
-{
-return !!strstr (HAYSTACK, NEEDLE);
+          GL_GNULIB_STRCHRNUL=1
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strstr_works_always=yes
-else
-  gl_cv_func_strstr_works_always=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
+
+
+$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
+
+
+
+
+
+
+  if test $gl_cv_func_malloc_posix != yes; then
+    REPLACE_STRDUP=1
+  fi
+
+  if test $ac_cv_have_decl_strdup = no; then
+    HAVE_DECL_STRDUP=0
+  fi
+
+
+     if test $REPLACE_STRDUP = 1; then
+  GL_COND_OBJ_STRDUP_TRUE=
+  GL_COND_OBJ_STRDUP_FALSE='#'
+else
+  GL_COND_OBJ_STRDUP_TRUE='#'
+  GL_COND_OBJ_STRDUP_FALSE=
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
-$as_echo "$gl_cv_func_strstr_works_always" >&6; }
-    case "$gl_cv_func_strstr_works_always" in
-      *yes) ;;
-      *)
-        REPLACE_STRSTR=1
-        ;;
-    esac
+:
+    if test -z "${GL_COND_OBJ_STRDUP_TRUE}" && test -z "${GL_COND_OBJ_STRDUP_FALSE}"; then
+    GL_COND_OBJ_STRDUP_TRUE='#'
+    GL_COND_OBJ_STRDUP_FALSE='#'
   fi
 
-  if test $REPLACE_STRSTR = 1; then
+  if test -z "$GL_COND_OBJ_STRDUP_TRUE"; then :
 
+    :
 
+fi
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_STRSTR=1
 
 
+          GL_GNULIB_STRDUP=1
 
 
 
-$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
 
 
+$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
 
 
 
 
 
-     for ac_func in strtok_r
-do :
-  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
-if test "x$ac_cv_func_strtok_r" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_STRTOK_R 1
-_ACEOF
 
-fi
-done
 
-  if test $ac_cv_func_strtok_r = yes; then
-    HAVE_STRTOK_R=1
-                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
-$as_echo_n "checking whether strtok_r works... " >&6; }
-if ${gl_cv_func_strtok_r_works+:} false; then :
+
+
+
+  if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if ${gl_cv_func_working_strerror+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
   case "$host_os" in
-                           # Guess no on glibc systems.
-            *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
-                           # Guess yes on native Windows.
-            mingw*)        gl_cv_func_strtok_r_works="guessing yes" ;;
-            *)             gl_cv_func_strtok_r_works="guessing yes" ;;
-          esac
+                          # Guess yes on glibc systems.
+           *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+                          # Guess yes on musl systems.
+           *-musl*)       gl_cv_func_working_strerror="guessing yes" ;;
+                          # If we don't know, obey --enable-cross-guesses.
+           *)             gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
+         esac
 
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-              #ifndef __OPTIMIZE__
-              # define __OPTIMIZE__ 1
-              #endif
-              #undef __OPTIMIZE_SIZE__
-              #undef __NO_INLINE__
-              #include <stdlib.h>
-              #include <string.h>
+#include <string.h>
 
 int
 main ()
 {
-static const char dummy[] = "\177\01a";
-              char delimiters[] = "xxxxxxxx";
-              char *save_ptr = (char *) dummy;
-              strtok_r (delimiters, "x", &save_ptr);
-              strtok_r (NULL, "x", &save_ptr);
-              return 0;
-
+if (!*strerror (-2)) return 1;
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_strtok_r_works=yes
+  gl_cv_func_working_strerror=yes
 else
-  gl_cv_func_strtok_r_works=no
+  gl_cv_func_working_strerror=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
-$as_echo "$gl_cv_func_strtok_r_works" >&6; }
-    case "$gl_cv_func_strtok_r_works" in
-      *no)
-                                UNDEFINE_STRTOK_R=1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+                        REPLACE_STRERROR=1
         ;;
     esac
+
+                  case "$gl_cv_func_strerror_r_works" in
+        *no) REPLACE_STRERROR=1 ;;
+      esac
+
   else
-    HAVE_STRTOK_R=0
+            REPLACE_STRERROR=1
   fi
 
-  if test $ac_cv_have_decl_strtok_r = no; then
-    HAVE_DECL_STRTOK_R=0
+
+     if test $REPLACE_STRERROR = 1; then
+  GL_COND_OBJ_STRERROR_TRUE=
+  GL_COND_OBJ_STRERROR_FALSE='#'
+else
+  GL_COND_OBJ_STRERROR_TRUE='#'
+  GL_COND_OBJ_STRERROR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STRERROR_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_FALSE}"; then
+    GL_COND_OBJ_STRERROR_TRUE='#'
+    GL_COND_OBJ_STRERROR_FALSE='#'
   fi
 
-  if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
 
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_STRERROR 1
+_ACEOF
 
 
 
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext"
 
 
-  :
 
-  fi
 
 
 
 
 
-          GNULIB_STRTOK_R=1
 
 
+          GL_GNULIB_STRERROR=1
 
 
 
-$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
 
 
+$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
 
 
 
 
 
 
+     if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+  GL_COND_OBJ_STRERROR_OVERRIDE_TRUE=
+  GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
+else
+  GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
+  GL_COND_OBJ_STRERROR_OVERRIDE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_TRUE}" && test -z "${GL_COND_OBJ_STRERROR_OVERRIDE_FALSE}"; then
+    GL_COND_OBJ_STRERROR_OVERRIDE_TRUE='#'
+    GL_COND_OBJ_STRERROR_OVERRIDE_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_STRERROR_OVERRIDE_TRUE"; then :
 
 
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_random_h='<'sys/random.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
-$as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
-if ${gl_cv_next_sys_random_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
 
-             if test $ac_cv_header_sys_random_h = yes; then
+fi
+
+done
 
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/random.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
+fi
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/random.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_random_h
-           gl_cv_next_sys_random_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_random_h='<'sys/random.h'>'
-             fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
-$as_echo "$gl_cv_next_sys_random_h" >&6; }
-     fi
-     NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h
+  if test $ac_cv_have_decl_strerror_r = no; then
+    HAVE_DECL_STRERROR_R=0
+  fi
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/random.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_random_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive
+  if test $ac_cv_func_strerror_r = yes; then
+    if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
+      if test $gl_cv_func_strerror_r_posix_signature = yes; then
+        case "$gl_cv_func_strerror_r_works" in
+                    *no) REPLACE_STRERROR_R=1 ;;
+        esac
+      else
+                REPLACE_STRERROR_R=1
+      fi
+    else
+                  REPLACE_STRERROR_R=1
+    fi
+  fi
 
+  if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then :
 
 
 
-  if test $ac_cv_header_sys_random_h = yes; then
-    HAVE_SYS_RANDOM_H=1
-  else
-    HAVE_SYS_RANDOM_H=0
-  fi
 
 
 
-  if test $ac_cv_header_sys_random_h = yes; then
-    UNISTD_H_HAVE_SYS_RANDOM_H=1
-  fi
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
 
 
 
@@ -30705,6 +34372,7 @@ $as_echo "$gl_cv_next_sys_random_h" >&6; }
 
 
 
+fi
 
 
 
@@ -30718,71 +34386,28 @@ $as_echo "$gl_cv_next_sys_random_h" >&6; }
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
-$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
-if ${gl_cv_next_sys_stat_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-             if test $ac_cv_header_sys_stat_h = yes; then
+          GL_GNULIB_STRERROR_R=1
 
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/stat.h>
+
+$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_STRERROR_R_POSIX 1
 _ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/stat.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_stat_h
-           gl_cv_next_sys_stat_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
-             fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
-$as_echo "$gl_cv_next_sys_stat_h" >&6; }
-     fi
-     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/stat.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
 
 
 
@@ -30791,7 +34416,6 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; }
 
 
 
-    WINDOWS_STAT_TIMESPEC=0
 
 
 
@@ -30800,26 +34424,92 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; }
 
 
 
-      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
-     #include <sys/stat.h>
-"
-if test "x$ac_cv_type_nlink_t" = xyes; then :
 
+
+
+
+
+  if test $ac_cv_have_decl_strnlen = no; then
+    HAVE_DECL_STRNLEN=0
+  else
+
+         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+$as_echo_n "checking for working strnlen... " >&6; }
+if ${ac_cv_func_strnlen_working+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  # Guess no on AIX systems, yes otherwise.
+               case "$host_os" in
+                 aix*) ac_cv_func_strnlen_working=no;;
+                 *)    ac_cv_func_strnlen_working=yes;;
+               esac
 else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
 
-$as_echo "#define nlink_t int" >>confdefs.h
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
 
-fi
+  /* At least one implementation is buggy: that of AIX 4.3 would
+     give strnlen (S, 1) == 3.  */
 
+  int i;
+  for (i = 0; i < S_LEN + 1; ++i)
+    {
+      int expected = i <= S_LEN ? i : S_LEN;
+      if (strnlen (S, i) != expected)
+       return 1;
+    }
+  return 0;
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strnlen_working=yes
+else
+  ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+$as_echo "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no && :
 
 
+    if test $ac_cv_func_strnlen_working = no; then
+      REPLACE_STRNLEN=1
+    fi
+  fi
 
 
+     if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+  GL_COND_OBJ_STRNLEN_TRUE=
+  GL_COND_OBJ_STRNLEN_FALSE='#'
+else
+  GL_COND_OBJ_STRNLEN_TRUE='#'
+  GL_COND_OBJ_STRNLEN_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STRNLEN_TRUE}" && test -z "${GL_COND_OBJ_STRNLEN_FALSE}"; then
+    GL_COND_OBJ_STRNLEN_TRUE='#'
+    GL_COND_OBJ_STRNLEN_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_STRNLEN_TRUE"; then :
 
+    :
 
+fi
 
 
 
 
 
 
+          GL_GNULIB_STRNLEN=1
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_uio_h='<'sys/uio.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
-$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
-if ${gl_cv_next_sys_uio_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-             if test $ac_cv_header_sys_uio_h = yes; then
 
 
+$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/uio.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/uio.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_uio_h
-           gl_cv_next_sys_uio_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_uio_h='<'sys/uio.h'>'
-             fi
+  if test $REPLACE_STRSTR = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
+$as_echo_n "checking whether strstr works in linear time... " >&6; }
+if ${gl_cv_func_strstr_linear+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !(defined __i386__ || defined __x86_64__) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_linear="guessing yes"
+else
+  gl_cv_func_strstr_linear="$gl_cross_guess_normal"
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
-$as_echo "$gl_cv_next_sys_uio_h" >&6; }
-     fi
-     NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
+rm -f conftest*
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/uio.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_uio_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
 
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#ifdef __MVS__
+/* z/OS does not deliver signals while strstr() is running (thanks to
+   restrictions on its LE runtime), which prevents us from limiting the
+   running time of this test.  */
+# error "This test does not work properly on z/OS"
+#endif
+#include <signal.h> /* for signal */
+#include <string.h> /* for strstr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { _exit (sig + 128); }
 
+int
+main ()
+{
 
-  if test $ac_cv_header_sys_uio_h = yes; then
-    HAVE_SYS_UIO_H=1
-  else
-    HAVE_SYS_UIO_H=0
-  fi
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also have quadratic strstr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strstr (haystack, needle))
+          result |= 1;
+      }
+    /* Free allocated memory, in case some sanitizer is watching.  */
+    free (haystack);
+    free (needle);
+    return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_linear=yes
+else
+  gl_cv_func_strstr_linear=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
+$as_echo "$gl_cv_func_strstr_linear" >&6; }
+    case "$gl_cv_func_strstr_linear" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
 
+  if test $REPLACE_STRSTR = 1; then
 
 
 
@@ -30921,77 +34650,96 @@ $as_echo "$gl_cv_next_sys_uio_h" >&6; }
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
+  fi
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_wait_h='<'sys/wait.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
-$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
-if ${gl_cv_next_sys_wait_h+:} false; then :
+  if test $REPLACE_MEMCHR = 1; then
+    REPLACE_STRSTR=1
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if ${gl_cv_func_strstr_works_always+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  if test "$cross_compiling" = yes; then :
+                                                    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-             if test $ac_cv_header_sys_wait_h = yes; then
-
+#include <string.h> /* for __GNU_LIBRARY__ */
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_works_always="guessing yes"
+else
+  gl_cv_func_strstr_works_always="$gl_cross_guess_normal"
+fi
+rm -f conftest*
 
 
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/wait.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/wait.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_wait_h
-           gl_cv_next_sys_wait_h='"'$gl_header'"'
-          else
-               gl_cv_next_sys_wait_h='<'sys/wait.h'>'
-             fi
+#include <string.h> /* for __GNU_LIBRARY__, strstr */
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
+  Unlucky user
+ #endif
+#endif
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
 
+int
+main ()
+{
+return !!strstr (HAYSTACK, NEEDLE);
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
-$as_echo "$gl_cv_next_sys_wait_h" >&6; }
-     fi
-     NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/wait.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_wait_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    case "$gl_cv_func_strstr_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
 
+  if test $REPLACE_STRSTR = 1; then
 
 
 
@@ -31000,18 +34748,16 @@ $as_echo "$gl_cv_next_sys_wait_h" >&6; }
 
 
 
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
+  fi
 
 
 
-  :
 
 
 
 
-cat >>confdefs.h <<_ACEOF
-#define GNULIB_TEMPNAME 1
-_ACEOF
 
 
 
@@ -31019,155 +34765,123 @@ _ACEOF
 
 
 
+          GL_GNULIB_STRSTR=1
 
 
 
 
 
-      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
-         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
-         been included before.  */
-      #if defined __MINGW32__
-      # include <unistd.h>
-      #endif
-      #include <time.h>
+$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
 
-"
-if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_LOCALTIME_R $ac_have_decl
-_ACEOF
 
-  if test $ac_cv_have_decl_localtime_r = no; then
-    HAVE_DECL_LOCALTIME_R=0
-  fi
 
 
-  if test $ac_cv_func_localtime_r = yes; then
-    HAVE_LOCALTIME_R=1
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
-$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
-if ${gl_cv_time_r_posix+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* mingw's <time.h> provides the functions asctime_r, ctime_r,
-                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
-                 been included before.  */
-              #if defined __MINGW32__
-              # include <unistd.h>
-              #endif
-              #include <time.h>
 
-int
-main ()
-{
-/* We don't need to append 'restrict's to the argument types,
-                 even though the POSIX signature has the 'restrict's,
-                 since C99 says they can't affect type compatibility.  */
-              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
-              if (ptr) return 0;
-              /* Check the return type is a pointer.
-                 On HP-UX 10 it is 'int'.  */
-              *localtime_r (0, 0);
-  ;
-  return 0;
-}
 
+     for ac_func in strtok_r
+do :
+  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
+if test "x$ac_cv_func_strtok_r" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOK_R 1
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_time_r_posix=yes
-else
-  gl_cv_time_r_posix=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
-$as_echo "$gl_cv_time_r_posix" >&6; }
-    if test $gl_cv_time_r_posix = yes; then
-      REPLACE_LOCALTIME_R=0
-    else
-      REPLACE_LOCALTIME_R=1
-    fi
-  else
-    HAVE_LOCALTIME_R=0
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
-$as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
-if ${gl_cv_func_localtime_r_inline+:} false; then :
+done
+
+  if test $ac_cv_func_strtok_r = yes; then
+    HAVE_STRTOK_R=1
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
+$as_echo_n "checking whether strtok_r works... " >&6; }
+if ${gl_cv_func_strtok_r_works+:} false; then :
   $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                           # Guess no on glibc systems.
+            *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;;
+                           # Guess yes on native Windows.
+            mingw*)        gl_cv_func_strtok_r_works="guessing yes" ;;
+            *)             gl_cv_func_strtok_r_works="guessing yes" ;;
+          esac
+
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-/* mingw's <time.h> provides the functions asctime_r, ctime_r,
-                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
-                 been included before.  */
-              #if defined __MINGW32__
-              # include <unistd.h>
+
+              #ifndef __OPTIMIZE__
+              # define __OPTIMIZE__ 1
               #endif
-              #include <time.h>
+              #undef __OPTIMIZE_SIZE__
+              #undef __NO_INLINE__
+              #include <stdlib.h>
+              #include <string.h>
 
 int
 main ()
 {
-time_t a;
-              struct tm r;
-              localtime_r (&a, &r);
+static const char dummy[] = "\177\01a";
+              char delimiters[] = "xxxxxxxx";
+              char *save_ptr = (char *) dummy;
+              strtok_r (delimiters, "x", &save_ptr);
+              strtok_r (NULL, "x", &save_ptr);
+              return 0;
 
   ;
   return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  gl_cv_func_localtime_r_inline=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strtok_r_works=yes
 else
-  gl_cv_func_localtime_r_inline=no
+  gl_cv_func_strtok_r_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
-$as_echo "$gl_cv_func_localtime_r_inline" >&6; }
-    if test $gl_cv_func_localtime_r_inline = yes; then
-      REPLACE_LOCALTIME_R=1
-    fi
-  fi
-
-  if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
-
 
-  :
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
+$as_echo "$gl_cv_func_strtok_r_works" >&6; }
+    case "$gl_cv_func_strtok_r_works" in
+      *no)
+                                UNDEFINE_STRTOK_R=1
+        ;;
+    esac
+  else
+    HAVE_STRTOK_R=0
   fi
 
+  if test $ac_cv_have_decl_strtok_r = no; then
+    HAVE_DECL_STRTOK_R=0
+  fi
 
 
+     if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then
+  GL_COND_OBJ_STRTOK_R_TRUE=
+  GL_COND_OBJ_STRTOK_R_FALSE='#'
+else
+  GL_COND_OBJ_STRTOK_R_TRUE='#'
+  GL_COND_OBJ_STRTOK_R_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_STRTOK_R_TRUE}" && test -z "${GL_COND_OBJ_STRTOK_R_FALSE}"; then
+    GL_COND_OBJ_STRTOK_R_TRUE='#'
+    GL_COND_OBJ_STRTOK_R_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_STRTOK_R_TRUE"; then :
 
-          GNULIB_TIME_R=1
 
+  :
 
 
+fi
 
 
-$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
 
 
 
@@ -31180,83 +34894,26 @@ $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
 
 
 
+          GL_GNULIB_STRTOK_R=1
 
 
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_unistd_h='<'unistd.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
-$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
-if ${gl_cv_next_unistd_h+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
 
-             if test $ac_cv_header_unistd_h = yes; then
 
+$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
 
 
 
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <unistd.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'unistd.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
 
-        gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_unistd_h
-           gl_cv_next_unistd_h='"'$gl_header'"'
-          else
-               gl_cv_next_unistd_h='<'unistd.h'>'
-             fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
-$as_echo "$gl_cv_next_unistd_h" >&6; }
-     fi
-     NEXT_UNISTD_H=$gl_cv_next_unistd_h
 
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'unistd.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_unistd_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_unistd_h = yes; then
-    HAVE_UNISTD_H=1
-  else
-    HAVE_UNISTD_H=0
-  fi
 
 
 
@@ -31270,9 +34927,6 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
 
 
 
-  if test $ac_cv_have_decl_execvpe = no; then
-    HAVE_DECL_EXECVPE=0
-  fi
 
 
 
@@ -31280,135 +34934,24 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
 
 
 
-  if test $ac_cv_have_decl_unsetenv = no; then
-    HAVE_DECL_UNSETENV=0
-  fi
-  for ac_func in unsetenv
-do :
-  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
-if test "x$ac_cv_func_unsetenv" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UNSETENV 1
-_ACEOF
 
-fi
-done
 
-  if test $ac_cv_func_unsetenv = no; then
-    HAVE_UNSETENV=0
-  else
-    HAVE_UNSETENV=1
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
-$as_echo_n "checking for unsetenv() return type... " >&6; }
-if ${gt_cv_func_unsetenv_ret+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-#undef _BSD
-#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
-#include <stdlib.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-int unsetenv (const char *name);
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_func_unsetenv_ret='int'
-else
-  gt_cv_func_unsetenv_ret='void'
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
-$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
-    if test $gt_cv_func_unsetenv_ret = 'void'; then
 
-$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
 
-      REPLACE_UNSETENV=1
-    fi
 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
-$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
-if ${gl_cv_func_unsetenv_works+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "$cross_compiling" = yes; then :
-  case "$host_os" in
-                    # Guess yes on glibc systems.
-            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
-                    # If we don't know, obey --enable-cross-guesses.
-            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
-          esac
 
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-            #include <stdlib.h>
-            #include <errno.h>
-            extern char **environ;
 
 
-$gl_mda_defines
 
-int
-main ()
-{
 
-            char entry1[] = "a=1";
-            char entry2[] = "b=2";
-            char *env[] = { entry1, entry2, NULL };
-            if (putenv ((char *) "a=1")) return 1;
-            if (putenv (entry2)) return 2;
-            entry2[0] = 'a';
-            unsetenv ("a");
-            if (getenv ("a")) return 3;
-            if (!unsetenv ("") || errno != EINVAL) return 4;
-            entry2[0] = 'b';
-            environ = env;
-            if (!getenv ("a")) return 5;
-            entry2[0] = 'a';
-            unsetenv ("a");
-            if (getenv ("a")) return 6;
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_unsetenv_works=yes
-else
-  gl_cv_func_unsetenv_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
-$as_echo "$gl_cv_func_unsetenv_works" >&6; }
-    case "$gl_cv_func_unsetenv_works" in
-      *yes) ;;
-      *)
-        REPLACE_UNSETENV=1
-        ;;
-    esac
-  fi
 
-  if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
 
 
 
@@ -31417,25 +34960,25 @@ $as_echo "$gl_cv_func_unsetenv_works" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
 
 
+  :
 
 
 
-  fi
 
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_TEMPNAME 1
+_ACEOF
 
 
 
 
-          GNULIB_UNSETENV=1
 
 
 
 
 
-$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
@@ -31443,101 +34986,144 @@ $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
 
 
 
+      ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+         gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+         been included before.  */
+      #if defined __MINGW32__
+      # include <unistd.h>
+      #endif
+      #include <time.h>
 
+"
+if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_LOCALTIME_R $ac_have_decl
+_ACEOF
 
+  if test $ac_cv_have_decl_localtime_r = no; then
+    HAVE_DECL_LOCALTIME_R=0
+  fi
 
 
+  if test $ac_cv_func_localtime_r = yes; then
+    HAVE_LOCALTIME_R=1
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
+$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
+if ${gl_cv_time_r_posix+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
 
+int
+main ()
+{
+/* We don't need to append 'restrict's to the argument types,
+                 even though the POSIX signature has the 'restrict's,
+                 since C99 says they can't affect type compatibility.  */
+              struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
+              if (ptr) return 0;
+              /* Check the return type is a pointer.
+                 On HP-UX 10 it is 'int'.  */
+              *localtime_r (0, 0);
+  ;
+  return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_time_r_posix=yes
+else
+  gl_cv_time_r_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_wchar_h='<'wchar.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
-$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
-if ${gl_cv_next_wchar_h+:} false; then :
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
+$as_echo "$gl_cv_time_r_posix" >&6; }
+    if test $gl_cv_time_r_posix = yes; then
+      REPLACE_LOCALTIME_R=0
+    else
+      REPLACE_LOCALTIME_R=1
+    fi
+  else
+    HAVE_LOCALTIME_R=0
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
+$as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
+if ${gl_cv_func_localtime_r_inline+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-             if test $ac_cv_header_wchar_h = yes; then
-
-
-
-
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
-
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'wchar.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
+/* mingw's <time.h> provides the functions asctime_r, ctime_r,
+                 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
+                 been included before.  */
+              #if defined __MINGW32__
+              # include <unistd.h>
+              #endif
+              #include <time.h>
 
-           gl_header=$gl_cv_absolute_wchar_h
-           gl_cv_next_wchar_h='"'$gl_header'"'
-          else
-               gl_cv_next_wchar_h='<'wchar.h'>'
-             fi
+int
+main ()
+{
+time_t a;
+              struct tm r;
+              localtime_r (&a, &r);
 
+  ;
+  return 0;
+}
 
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gl_cv_func_localtime_r_inline=yes
+else
+  gl_cv_func_localtime_r_inline=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
-$as_echo "$gl_cv_next_wchar_h" >&6; }
-     fi
-     NEXT_WCHAR_H=$gl_cv_next_wchar_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'wchar.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_wchar_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
-
-
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
-  else
-    HAVE_WCHAR_H=0
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
+$as_echo "$gl_cv_func_localtime_r_inline" >&6; }
+    if test $gl_cv_func_localtime_r_inline = yes; then
+      REPLACE_LOCALTIME_R=1
+    fi
   fi
 
 
+     if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
+  GL_COND_OBJ_TIME_R_TRUE=
+  GL_COND_OBJ_TIME_R_FALSE='#'
+else
+  GL_COND_OBJ_TIME_R_TRUE='#'
+  GL_COND_OBJ_TIME_R_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_TIME_R_TRUE}" && test -z "${GL_COND_OBJ_TIME_R_FALSE}"; then
+    GL_COND_OBJ_TIME_R_TRUE='#'
+    GL_COND_OBJ_TIME_R_FALSE='#'
+  fi
 
+  if test -z "$GL_COND_OBJ_TIME_R_TRUE"; then :
 
 
-  if test $gt_cv_c_wint_t = yes; then
-    HAVE_WINT_T=1
-  else
-    HAVE_WINT_T=0
-  fi
-
+  :
 
 
+fi
 
 
 
@@ -31545,42 +35131,20 @@ $as_echo "$gl_cv_next_wchar_h" >&6; }
 
 
 
-  ac_fn_c_check_decl "$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
-      #include <wchar.h>
 
-"
-if test "x$ac_cv_have_decl_wcsdup" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
-fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_WCSDUP $ac_have_decl
-_ACEOF
+          GL_GNULIB_TIME_R=1
 
-  if test $ac_cv_have_decl_wcsdup = no; then
-    HAVE_DECL_WCSDUP=0
-  fi
 
 
 
 
+$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
 
 
-  if test $ac_cv_func_iswcntrl = yes; then
-    HAVE_ISWCNTRL=1
-  else
-    HAVE_ISWCNTRL=0
-  fi
 
 
 
-  if test $gt_cv_c_wint_t = yes; then
-    HAVE_WINT_T=1
-  else
-    HAVE_WINT_T=0
-  fi
 
 
 
@@ -31592,120 +35156,117 @@ _ACEOF
 
 
 
+  if test $ac_cv_have_decl_unsetenv = no; then
+    HAVE_DECL_UNSETENV=0
+  fi
+  for ac_func in unsetenv
+do :
+  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNSETENV 1
+_ACEOF
 
+fi
+done
 
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_wctype_h='<'wctype.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
-$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
-if ${gl_cv_next_wctype_h+:} false; then :
+  if test $ac_cv_func_unsetenv = no; then
+    HAVE_UNSETENV=0
+  else
+    HAVE_UNSETENV=1
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+$as_echo_n "checking for unsetenv() return type... " >&6; }
+if ${gt_cv_func_unsetenv_ret+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-
-             if test $ac_cv_header_wctype_h = yes; then
-
-
-
-
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wctype.h>
-_ACEOF
-                case "$host_os" in
-    aix*) gl_absname_cpp="$ac_cpp -C" ;;
-    *)    gl_absname_cpp="$ac_cpp" ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
-                                          gl_dirsep_regex='[/\\]'
-      ;;
-    *)
-      gl_dirsep_regex='\/'
-      ;;
-  esac
-      gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'wctype.h' \
-                           | sed -e "$gl_make_literal_regex_sed"`
-  gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
-      s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
-      s|^/[^/]|//&|
-      p
-      q
-    }'
-
-        gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-  sed -n "$gl_absolute_header_sed"`
-
-           gl_header=$gl_cv_absolute_wctype_h
-           gl_cv_next_wctype_h='"'$gl_header'"'
-          else
-               gl_cv_next_wctype_h='<'wctype.h'>'
-             fi
+#undef _BSD
+#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+int unsetenv (const char *name);
 
+int
+main ()
+{
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_func_unsetenv_ret='int'
+else
+  gt_cv_func_unsetenv_ret='void'
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
-$as_echo "$gl_cv_next_wctype_h" >&6; }
-     fi
-     NEXT_WCTYPE_H=$gl_cv_next_wctype_h
-
-     if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'wctype.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_wctype_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
+    if test $gt_cv_func_unsetenv_ret = 'void'; then
 
+$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
 
+      REPLACE_UNSETENV=1
+    fi
 
-  if test $ac_cv_header_wctype_h = yes; then
-    if test $ac_cv_func_iswcntrl = yes; then
-                  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
-$as_echo_n "checking whether iswcntrl works... " >&6; }
-if ${gl_cv_func_iswcntrl_works+:} false; then :
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
+$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
+if ${gl_cv_func_unsetenv_works+:} false; then :
   $as_echo_n "(cached) " >&6
 else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                    # Guess yes on glibc systems.
+            *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
+                    # If we don't know, obey --enable-cross-guesses.
+            *)      gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;;
+          esac
 
-          if test "$cross_compiling" = yes; then :
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdlib.h>
-                          #if __GNU_LIBRARY__ == 1
-                          Linux libc5 i18n is broken.
-                          #endif
+
+            #include <stdlib.h>
+            #include <errno.h>
+            extern char **environ;
+
+
+$gl_mda_defines
+
 int
 main ()
 {
 
+            char entry1[] = "a=1";
+            char entry2[] = "b=2";
+            char *env[] = { entry1, entry2, NULL };
+            if (putenv ((char *) "a=1")) return 1;
+            if (putenv (entry2)) return 2;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 3;
+            if (!unsetenv ("") || errno != EINVAL) return 4;
+            entry2[0] = 'b';
+            environ = env;
+            if (!getenv ("a")) return 5;
+            entry2[0] = 'a';
+            unsetenv ("a");
+            if (getenv ("a")) return 6;
+
   ;
   return 0;
 }
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_func_iswcntrl_works="guessing yes"
-else
-  gl_cv_func_iswcntrl_works="guessing no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-               #include <wchar.h>
-               #include <wctype.h>
-               int main () { return iswprint ('x') == 0; }
-
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_iswcntrl_works=yes
+  gl_cv_func_unsetenv_works=yes
 else
-  gl_cv_func_iswcntrl_works=no
+  gl_cv_func_unsetenv_works=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
-$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
-    fi
-    HAVE_WCTYPE_H=1
-  else
-    HAVE_WCTYPE_H=0
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+$as_echo "$gl_cv_func_unsetenv_works" >&6; }
+    case "$gl_cv_func_unsetenv_works" in
+      *yes) ;;
+      *)
+        REPLACE_UNSETENV=1
+        ;;
+    esac
   fi
 
 
-  if test $GNULIB_OVERRIDES_WINT_T = 1; then
-    REPLACE_ISWCNTRL=1
-  else
-    case "$gl_cv_func_iswcntrl_works" in
-      *yes) REPLACE_ISWCNTRL=0 ;;
-      *)    REPLACE_ISWCNTRL=1 ;;
-    esac
+     if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
+  GL_COND_OBJ_UNSETENV_TRUE=
+  GL_COND_OBJ_UNSETENV_FALSE='#'
+else
+  GL_COND_OBJ_UNSETENV_TRUE='#'
+  GL_COND_OBJ_UNSETENV_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_UNSETENV_TRUE}" && test -z "${GL_COND_OBJ_UNSETENV_FALSE}"; then
+    GL_COND_OBJ_UNSETENV_TRUE='#'
+    GL_COND_OBJ_UNSETENV_FALSE='#'
   fi
 
+  if test -z "$GL_COND_OBJ_UNSETENV_TRUE"; then :
+
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
-        :
-  fi
 
-  if test $REPLACE_ISWCNTRL = 1; then
-    REPLACE_TOWLOWER=1
-  else
-    for ac_func in towlower
-do :
-  ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
-if test "x$ac_cv_func_towlower" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_TOWLOWER 1
-_ACEOF
 
-fi
-done
 
-    if test $ac_cv_func_towlower = yes; then
-      REPLACE_TOWLOWER=0
-    else
-      ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
-          #if HAVE_WCTYPE_H
-          # include <wctype.h>
-          #endif
 
-"
-if test "x$ac_cv_have_decl_towlower" = xyes; then :
-  ac_have_decl=1
-else
-  ac_have_decl=0
 fi
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_TOWLOWER $ac_have_decl
-_ACEOF
 
-      if test $ac_cv_have_decl_towlower = yes; then
-                                REPLACE_TOWLOWER=1
-      else
-        REPLACE_TOWLOWER=0
-      fi
-    fi
-  fi
 
 
-  if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
-        :
-  fi
 
-          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
-$as_echo_n "checking for wctype_t... " >&6; }
-if ${gl_cv_type_wctype_t+:} false; then :
+
+
+
+
+          GL_GNULIB_UNSETENV=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
+$as_echo_n "checking for variable-length arrays... " >&6; }
+if ${ac_cv_c_vararrays+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.h>
-            #if HAVE_WCTYPE_H
-            # include <wctype.h>
-            #endif
-            wctype_t a;
-
-int
-main ()
-{
+#ifdef __STDC_NO_VLA__
+        defined
+        #endif
 
-  ;
-  return 0;
-}
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_wctype_t=yes
-else
-  gl_cv_type_wctype_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
-$as_echo "$gl_cv_type_wctype_t" >&6; }
-  if test $gl_cv_type_wctype_t = no; then
-    HAVE_WCTYPE_T=0
-  fi
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
-$as_echo_n "checking for wctrans_t... " >&6; }
-if ${gl_cv_type_wctrans_t+:} false; then :
-  $as_echo_n "(cached) " >&6
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "defined" >/dev/null 2>&1; then :
+  ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <wchar.h>
-            #include <wctype.h>
-            wctrans_t a;
+/* Test for VLA support.  This test is partly inspired
+                  from examples in the C standard.  Use at least two VLA
+                  functions to detect the GCC 3.4.3 bug described in:
+                  https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
+                  */
+               #ifdef __STDC_NO_VLA__
+                syntax error;
+               #else
+                 extern int n;
+                 int B[100];
+                 int fvla (int m, int C[m][m]);
+
+                 int
+                 simple (int count, int all[static count])
+                 {
+                   return all[count - 1];
+                 }
+
+                 int
+                 fvla (int m, int C[m][m])
+                 {
+                   typedef int VLA[m][m];
+                   VLA x;
+                   int D[m];
+                   static int (*q)[m] = &B;
+                   int (*s)[n] = q;
+                   return C && &x[0][0] == &D[0] && &D[0] == s[0];
+                 }
+               #endif
 
 int
 main ()
@@ -31837,41 +35383,29 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_type_wctrans_t=yes
+  ac_cv_c_vararrays=yes
 else
-  gl_cv_type_wctrans_t=no
+  ac_cv_c_vararrays=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
-$as_echo "$gl_cv_type_wctrans_t" >&6; }
-  if test $gl_cv_type_wctrans_t = no; then
-    HAVE_WCTRANS_T=0
-  fi
-
-
-
-
-
-
-  case "$host_os" in
-    mingw*)
-
-
+rm -f conftest*
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
+$as_echo "$ac_cv_c_vararrays" >&6; }
+  if test "$ac_cv_c_vararrays" = yes; then
 
+$as_echo "#define HAVE_C_VARARRAYS 1" >>confdefs.h
 
+  elif test "$ac_cv_c_vararrays" = no; then
 
+$as_echo "#define __STDC_NO_VLA__ 1" >>confdefs.h
 
+  fi
 
-  gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext"
 
-      ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
 
 
 
@@ -31880,13 +35414,8 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext"
 
-      ;;
-  esac
 
-  case "$host_os" in
-    mingw*)
 
 
 
@@ -31895,25 +35424,65 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext"
 
-      ;;
-  esac
+     if case "$host_os" in mingw*) true;; *) false;; esac; then
+  GL_COND_OBJ_WINDOWS_MUTEX_TRUE=
+  GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
+else
+  GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
+  GL_COND_OBJ_WINDOWS_MUTEX_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WINDOWS_MUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_MUTEX_FALSE}"; then
+    GL_COND_OBJ_WINDOWS_MUTEX_TRUE='#'
+    GL_COND_OBJ_WINDOWS_MUTEX_FALSE='#'
+  fi
 
-  case "$host_os" in
-    mingw*)
 
 
+     if case "$host_os" in mingw*) true;; *) false;; esac; then
+  GL_COND_OBJ_WINDOWS_ONCE_TRUE=
+  GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
+else
+  GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
+  GL_COND_OBJ_WINDOWS_ONCE_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WINDOWS_ONCE_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_ONCE_FALSE}"; then
+    GL_COND_OBJ_WINDOWS_ONCE_TRUE='#'
+    GL_COND_OBJ_WINDOWS_ONCE_FALSE='#'
+  fi
 
 
 
+     if case "$host_os" in mingw*) true;; *) false;; esac; then
+  GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE=
+  GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
+else
+  GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
+  GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE}"; then
+    GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE='#'
+    GL_COND_OBJ_WINDOWS_RECMUTEX_FALSE='#'
+  fi
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext"
+     if case "$host_os" in mingw*) true;; *) false;; esac; then
+  GL_COND_OBJ_WINDOWS_RWLOCK_TRUE=
+  GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
+else
+  GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
+  GL_COND_OBJ_WINDOWS_RWLOCK_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_TRUE}" && test -z "${GL_COND_OBJ_WINDOWS_RWLOCK_FALSE}"; then
+    GL_COND_OBJ_WINDOWS_RWLOCK_TRUE='#'
+    GL_COND_OBJ_WINDOWS_RWLOCK_FALSE='#'
+  fi
 
-      ;;
-  esac
 
 
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
@@ -31949,8 +35518,19 @@ $as_echo "$gl_cv_func_wmemchr" >&6; }
     HAVE_WMEMCHR=0
   fi
 
-  if test $HAVE_WMEMCHR = 0; then
 
+     if test $HAVE_WMEMCHR = 0; then
+  GL_COND_OBJ_WMEMCHR_TRUE=
+  GL_COND_OBJ_WMEMCHR_FALSE='#'
+else
+  GL_COND_OBJ_WMEMCHR_TRUE='#'
+  GL_COND_OBJ_WMEMCHR_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WMEMCHR_TRUE}" && test -z "${GL_COND_OBJ_WMEMCHR_FALSE}"; then
+    GL_COND_OBJ_WMEMCHR_TRUE='#'
+    GL_COND_OBJ_WMEMCHR_FALSE='#'
+  fi
 
 
 
@@ -31958,15 +35538,15 @@ $as_echo "$gl_cv_func_wmemchr" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_WMEMCHR=1
+
+
+          GL_GNULIB_WMEMCHR=1
 
 
 
@@ -31988,7 +35568,19 @@ $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
     HAVE_WMEMPCPY=0
   fi
 
-  if test $HAVE_WMEMPCPY = 0; then
+
+     if test $HAVE_WMEMPCPY = 0; then
+  GL_COND_OBJ_WMEMPCPY_TRUE=
+  GL_COND_OBJ_WMEMPCPY_FALSE='#'
+else
+  GL_COND_OBJ_WMEMPCPY_TRUE='#'
+  GL_COND_OBJ_WMEMPCPY_FALSE=
+fi
+:
+    if test -z "${GL_COND_OBJ_WMEMPCPY_TRUE}" && test -z "${GL_COND_OBJ_WMEMPCPY_FALSE}"; then
+    GL_COND_OBJ_WMEMPCPY_TRUE='#'
+    GL_COND_OBJ_WMEMPCPY_FALSE='#'
+  fi
 
 
 
@@ -31997,15 +35589,14 @@ $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext"
 
-  fi
 
 
 
 
 
-          GNULIB_WMEMPCPY=1
+
+          GL_GNULIB_WMEMPCPY=1
 
 
 
@@ -32025,6 +35616,8 @@ $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
 
 
 
+
+
   gltests_libdeps=
   gltests_ltlibdeps=
 
@@ -32037,7 +35630,10 @@ $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
 
 
 
+
+
   gl_source_base='tests'
+  gl_source_base_prefix=
   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
 
   gl_module_indicator_condition=$gltests_WITNESS
@@ -32050,6 +35646,9 @@ $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
 
 
 
+
+
+
   LIBGNU_LIBDEPS="$gl_libdeps"
 
   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
@@ -33145,99 +36744,61 @@ if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
   as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
-if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
 
-if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
-  as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
 
     gl_libobjs=
     gl_ltlibobjs=
+    gl_libobjdeps=
     if test -n "$gl_LIBOBJS"; then
       # Remove the extension.
       sed_drop_objext='s/\.o$//;s/\.obj$//'
+      sed_dirname1='s,//*,/,g'
+      sed_dirname2='s,\(.\)/$,\1,'
+      sed_dirname3='s,^[^/]*$,.,'
+      sed_dirname4='s,\(.\)/[^/]*$,\1,'
+      sed_basename1='s,.*/,,'
       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
         gl_libobjs="$gl_libobjs $i.$ac_objext"
         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+        i_base=`echo "$i" | sed -e "$sed_basename1"`
+        gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
       done
     fi
     gl_LIBOBJS=$gl_libobjs
 
     gl_LTLIBOBJS=$gl_ltlibobjs
 
+    gl_LIBOBJDEPS=$gl_libobjdeps
+
 
 
     gltests_libobjs=
     gltests_ltlibobjs=
+    gltests_libobjdeps=
     if test -n "$gltests_LIBOBJS"; then
       # Remove the extension.
       sed_drop_objext='s/\.o$//;s/\.obj$//'
+      sed_dirname1='s,//*,/,g'
+      sed_dirname2='s,\(.\)/$,\1,'
+      sed_dirname3='s,^[^/]*$,.,'
+      sed_dirname4='s,\(.\)/[^/]*$,\1,'
+      sed_basename1='s,.*/,,'
       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+        i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+        i_base=`echo "$i" | sed -e "$sed_basename1"`
+        gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Po"
       done
     fi
     gltests_LIBOBJS=$gltests_libobjs
 
     gltests_LTLIBOBJS=$gltests_ltlibobjs
 
+    gltests_LIBOBJDEPS=$gltests_libobjdeps
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
 $as_echo_n "checking that generated files are newer than configure... " >&6; }