diff -Nru tar-1.26/debian/changelog tar-1.26/debian/changelog --- tar-1.26/debian/changelog 2012-03-30 19:57:24.000000000 -0500 +++ tar-1.26/debian/changelog 2014-04-29 12:14:42.000000000 -0500 @@ -1,3 +1,11 @@ +tar (1.26-4ubuntu1.12.04.1) precise-updates; urgency=medium + + * implement xattr support (LP: #1313550) + - implement-xattrs: backport 1.27 changes implementing xattr support. + - debian/control: add libattr1-dev to build-deps + + -- Serge Hallyn Tue, 29 Apr 2014 17:03:10 +0000 + tar (1.26-4ubuntu1) precise; urgency=low * Build-depend on gettext:any, since we only need it to run tools at diff -Nru tar-1.26/debian/control tar-1.26/debian/control --- tar-1.26/debian/control 2012-03-30 19:55:54.000000000 -0500 +++ tar-1.26/debian/control 2014-04-29 12:14:39.000000000 -0500 @@ -4,7 +4,7 @@ Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Bdale Garbee Uploaders: Carl Worth -Build-Depends: debhelper (>> 5), gettext:any, autoconf, autotools-dev +Build-Depends: debhelper (>> 5), gettext:any, autoconf, autotools-dev, libattr1-dev Standards-Version: 3.9.2 Vcs-Git: git://git.gag.com/debian/tar Vcs-Browser: http://git.gag.com/?p=debian/tar diff -Nru tar-1.26/debian/.gitignore tar-1.26/debian/.gitignore --- tar-1.26/debian/.gitignore 2011-11-21 03:31:10.000000000 -0600 +++ tar-1.26/debian/.gitignore 1969-12-31 18:00:00.000000000 -0600 @@ -1,8 +0,0 @@ -files -tar.1 -tar.debhelper.log -tar.postinst.debhelper -tar.postrm.debhelper -tar.substvars -tar - diff -Nru tar-1.26/debian/patches/implement-xattrs tar-1.26/debian/patches/implement-xattrs --- tar-1.26/debian/patches/implement-xattrs 1969-12-31 18:00:00.000000000 -0600 +++ tar-1.26/debian/patches/implement-xattrs 2014-04-29 17:15:01.000000000 -0500 @@ -0,0 +1,65279 @@ +Index: tar-1.26/acinclude.m4 +=================================================================== +--- tar-1.26.orig/acinclude.m4 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/acinclude.m4 2014-04-29 17:14:50.002704544 +0000 +@@ -24,3 +24,28 @@ + [tar_compr_var=m4_if($2,,$1,$2)]) + AC_DEFINE_UNQUOTED(tar_compr_define, "$tar_compr_var", + [Define to the program name of ]$1[ compressor program])]) ++ ++# Provide , if necessary ++ ++AC_DEFUN([TAR_HEADERS_ATTR_XATTR_H], ++[ ++ AC_ARG_WITH([xattrs], ++ AS_HELP_STRING([--without-xattrs], [don't use linux extended attributes]), ++ [], [with_xattrs=maybe] ++ ) ++ ++ AC_CHECK_HEADERS([attr/xattr.h]) ++ AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes]) ++ if test "$ac_cv_header_attr_xattr_h" = yes; then ++ AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \ ++ setxattr fsetxattr lsetxattr \ ++ listxattr flistxattr llistxattr, ++ # only when functions are present ++ AC_DEFINE([HAVE_ATTR_XATTR_H], [1], ++ [define to 1 if we have header]) ++ if test "$with_xattrs" != no; then ++ AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.]) ++ fi ++ ) ++ fi ++]) +Index: tar-1.26/configure.ac +=================================================================== +--- tar-1.26.orig/configure.ac 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/configure.ac 2014-04-29 17:14:50.002704544 +0000 +@@ -90,6 +90,8 @@ + # paxutils modules + tar_PAXUTILS + ++TAR_HEADERS_ATTR_XATTR_H ++ + AC_CHECK_FUNCS_ONCE([fchmod fchown fsync lstat mkfifo readlink symlink]) + AC_CHECK_DECLS([getgrgid],,, [#include ]) + AC_CHECK_DECLS([getpwuid],,, [#include ]) +Index: tar-1.26/gnu/file-has-acl.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/gnu/file-has-acl.c 2014-04-29 17:14:50.002704544 +0000 +@@ -0,0 +1,920 @@ ++/* -*- buffer-read-only: t -*- vi: set ro: */ ++/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ ++/* Test whether a file has a nontrivial access control list. ++ ++ Copyright (C) 2002-2003, 2005-2013 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */ ++ ++/* Without this pragma, gcc 4.7.0 20120126 may suggest that the ++ file_has_acl function might be candidate for attribute 'const' */ ++#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ ++# pragma GCC diagnostic ignored "-Wsuggest-attribute=const" ++#endif ++ ++#include ++ ++#include "acl.h" ++ ++#include "acl-internal.h" ++ ++ ++#if USE_ACL && HAVE_ACL_GET_FILE ++ ++# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ ++ ++/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED. ++ Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial. */ ++int ++acl_extended_nontrivial (acl_t acl) ++{ ++ /* acl is non-trivial if it is non-empty. */ ++ return (acl_entries (acl) > 0); ++} ++ ++# else /* Linux, FreeBSD, IRIX, Tru64 */ ++ ++/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS. ++ Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. ++ Return -1 and set errno upon failure to determine it. */ ++int ++acl_access_nontrivial (acl_t acl) ++{ ++ /* acl is non-trivial if it has some entries other than for "user::", ++ "group::", and "other::". Normally these three should be present ++ at least, allowing us to write ++ return (3 < acl_entries (acl)); ++ but the following code is more robust. */ ++# if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD */ ++ ++ acl_entry_t ace; ++ int got_one; ++ ++ for (got_one = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace); ++ got_one > 0; ++ got_one = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace)) ++ { ++ acl_tag_t tag; ++ if (acl_get_tag_type (ace, &tag) < 0) ++ return -1; ++ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER)) ++ return 1; ++ } ++ return got_one; ++ ++# else /* IRIX, Tru64 */ ++# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */ ++ /* Don't use acl_get_entry: it is undocumented. */ ++ ++ int count = acl->acl_cnt; ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ acl_entry_t ace = &acl->acl_entry[i]; ++ acl_tag_t tag = ace->ae_tag; ++ ++ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ ++ || tag == ACL_OTHER_OBJ)) ++ return 1; ++ } ++ return 0; ++ ++# endif ++# if HAVE_ACL_FREE_TEXT /* Tru64 */ ++ /* Don't use acl_get_entry: it takes only one argument and does not work. */ ++ ++ int count = acl->acl_num; ++ acl_entry_t ace; ++ ++ for (ace = acl->acl_first; count > 0; ace = ace->next, count--) ++ { ++ acl_tag_t tag; ++ acl_perm_t perm; ++ ++ tag = ace->entry->acl_type; ++ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER)) ++ return 1; ++ ++ perm = ace->entry->acl_perm; ++ /* On Tru64, perm can also contain non-standard bits such as ++ PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */ ++ if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0) ++ return 1; ++ } ++ return 0; ++ ++# endif ++# endif ++} ++ ++# endif ++ ++ ++#elif USE_ACL && HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */ ++ ++/* Test an ACL retrieved with GETACL. ++ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_nontrivial (int count, aclent_t *entries) ++{ ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ aclent_t *ace = &entries[i]; ++ ++ /* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat(). ++ If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat(). ++ We don't need to check ace->a_id in these cases. */ ++ if (!(ace->a_type == USER_OBJ ++ || ace->a_type == GROUP_OBJ ++ || ace->a_type == OTHER_OBJ ++ /* Note: Cygwin does not return a CLASS_OBJ ("mask:") entry ++ sometimes. */ ++ || ace->a_type == CLASS_OBJ)) ++ return 1; ++ } ++ return 0; ++} ++ ++# ifdef ACE_GETACL ++ ++/* A shortcut for a bitmask. */ ++# define NEW_ACE_WRITEA_DATA (NEW_ACE_WRITE_DATA | NEW_ACE_APPEND_DATA) ++ ++/* Test an ACL retrieved with ACE_GETACL. ++ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_ace_nontrivial (int count, ace_t *entries) ++{ ++ int i; ++ ++ /* The flags in the ace_t structure changed in a binary incompatible way ++ when ACL_NO_TRIVIAL etc. were introduced in version 1.15. ++ How to distinguish the two conventions at runtime? ++ In the old convention, usually three ACEs have a_flags = ACE_OWNER / ++ ACE_GROUP / ACE_OTHER, in the range 0x0100..0x0400. In the new ++ convention, these values are not used. */ ++ int old_convention = 0; ++ ++ for (i = 0; i < count; i++) ++ if (entries[i].a_flags & (OLD_ACE_OWNER | OLD_ACE_GROUP | OLD_ACE_OTHER)) ++ { ++ old_convention = 1; ++ break; ++ } ++ ++ if (old_convention) ++ /* Running on Solaris 10. */ ++ for (i = 0; i < count; i++) ++ { ++ ace_t *ace = &entries[i]; ++ ++ /* Note: ++ If ace->a_flags = ACE_OWNER, ace->a_who is the st_uid from stat(). ++ If ace->a_flags = ACE_GROUP, ace->a_who is the st_gid from stat(). ++ We don't need to check ace->a_who in these cases. */ ++ if (!(ace->a_type == OLD_ALLOW ++ && (ace->a_flags == OLD_ACE_OWNER ++ || ace->a_flags == OLD_ACE_GROUP ++ || ace->a_flags == OLD_ACE_OTHER))) ++ return 1; ++ } ++ else ++ { ++ /* Running on Solaris 10 (newer version) or Solaris 11. */ ++ unsigned int access_masks[6] = ++ { ++ 0, /* owner@ deny */ ++ 0, /* owner@ allow */ ++ 0, /* group@ deny */ ++ 0, /* group@ allow */ ++ 0, /* everyone@ deny */ ++ 0 /* everyone@ allow */ ++ }; ++ ++ for (i = 0; i < count; i++) ++ { ++ ace_t *ace = &entries[i]; ++ unsigned int index1; ++ unsigned int index2; ++ ++ if (ace->a_type == NEW_ACE_ACCESS_ALLOWED_ACE_TYPE) ++ index1 = 1; ++ else if (ace->a_type == NEW_ACE_ACCESS_DENIED_ACE_TYPE) ++ index1 = 0; ++ else ++ return 1; ++ ++ if (ace->a_flags == NEW_ACE_OWNER) ++ index2 = 0; ++ else if (ace->a_flags == (NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP)) ++ index2 = 2; ++ else if (ace->a_flags == NEW_ACE_EVERYONE) ++ index2 = 4; ++ else ++ return 1; ++ ++ access_masks[index1 + index2] |= ace->a_access_mask; ++ } ++ ++ /* The same bit shouldn't be both allowed and denied. */ ++ if (access_masks[0] & access_masks[1]) ++ return 1; ++ if (access_masks[2] & access_masks[3]) ++ return 1; ++ if (access_masks[4] & access_masks[5]) ++ return 1; ++ ++ /* Check minimum masks. */ ++ if ((NEW_ACE_WRITE_NAMED_ATTRS ++ | NEW_ACE_WRITE_ATTRIBUTES ++ | NEW_ACE_WRITE_ACL ++ | NEW_ACE_WRITE_OWNER) ++ & ~ access_masks[1]) ++ return 1; ++ access_masks[1] &= ~(NEW_ACE_WRITE_NAMED_ATTRS ++ | NEW_ACE_WRITE_ATTRIBUTES ++ | NEW_ACE_WRITE_ACL ++ | NEW_ACE_WRITE_OWNER); ++ if ((NEW_ACE_READ_NAMED_ATTRS ++ | NEW_ACE_READ_ATTRIBUTES ++ | NEW_ACE_READ_ACL ++ | NEW_ACE_SYNCHRONIZE) ++ & ~ access_masks[5]) ++ return 1; ++ access_masks[5] &= ~(NEW_ACE_READ_NAMED_ATTRS ++ | NEW_ACE_READ_ATTRIBUTES ++ | NEW_ACE_READ_ACL ++ | NEW_ACE_SYNCHRONIZE); ++ ++ /* Check the allowed or denied bits. */ ++ switch ((access_masks[0] | access_masks[1]) ++ & ~(NEW_ACE_READ_NAMED_ATTRS ++ | NEW_ACE_READ_ATTRIBUTES ++ | NEW_ACE_READ_ACL ++ | NEW_ACE_SYNCHRONIZE)) ++ { ++ case 0: ++ case NEW_ACE_READ_DATA: ++ case NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ break; ++ default: ++ return 1; ++ } ++ switch ((access_masks[2] | access_masks[3]) ++ & ~(NEW_ACE_READ_NAMED_ATTRS ++ | NEW_ACE_READ_ATTRIBUTES ++ | NEW_ACE_READ_ACL ++ | NEW_ACE_SYNCHRONIZE)) ++ { ++ case 0: ++ case NEW_ACE_READ_DATA: ++ case NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ break; ++ default: ++ return 1; ++ } ++ switch ((access_masks[4] | access_masks[5]) ++ & ~(NEW_ACE_WRITE_NAMED_ATTRS ++ | NEW_ACE_WRITE_ATTRIBUTES ++ | NEW_ACE_WRITE_ACL ++ | NEW_ACE_WRITE_OWNER)) ++ { ++ case 0: ++ case NEW_ACE_READ_DATA: ++ case NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA: ++ case NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ case NEW_ACE_READ_DATA | NEW_ACE_WRITEA_DATA | NEW_ACE_EXECUTE: ++ break; ++ default: ++ return 1; ++ } ++ ++ /* Check that the NEW_ACE_WRITE_DATA and NEW_ACE_APPEND_DATA bits are ++ either both allowed or both denied. */ ++ if (((access_masks[0] & NEW_ACE_WRITE_DATA) != 0) ++ != ((access_masks[0] & NEW_ACE_APPEND_DATA) != 0)) ++ return 1; ++ if (((access_masks[2] & NEW_ACE_WRITE_DATA) != 0) ++ != ((access_masks[2] & NEW_ACE_APPEND_DATA) != 0)) ++ return 1; ++ if (((access_masks[4] & NEW_ACE_WRITE_DATA) != 0) ++ != ((access_masks[4] & NEW_ACE_APPEND_DATA) != 0)) ++ return 1; ++ } ++ ++ return 0; ++} ++ ++# endif ++ ++#elif USE_ACL && HAVE_GETACL /* HP-UX */ ++ ++/* Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb) ++{ ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ struct acl_entry *ace = &entries[i]; ++ ++ if (!((ace->uid == sb->st_uid && ace->gid == ACL_NSGROUP) ++ || (ace->uid == ACL_NSUSER && ace->gid == sb->st_gid) ++ || (ace->uid == ACL_NSUSER && ace->gid == ACL_NSGROUP))) ++ return 1; ++ } ++ return 0; ++} ++ ++# if HAVE_ACLV_H /* HP-UX >= 11.11 */ ++ ++/* Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++aclv_nontrivial (int count, struct acl *entries) ++{ ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ struct acl *ace = &entries[i]; ++ ++ /* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat(). ++ If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat(). ++ We don't need to check ace->a_id in these cases. */ ++ if (!(ace->a_type == USER_OBJ /* no need to check ace->a_id here */ ++ || ace->a_type == GROUP_OBJ /* no need to check ace->a_id here */ ++ || ace->a_type == CLASS_OBJ ++ || ace->a_type == OTHER_OBJ)) ++ return 1; ++ } ++ return 0; ++} ++ ++# endif ++ ++#elif USE_ACL && (HAVE_ACLX_GET || HAVE_STATACL) /* AIX */ ++ ++/* Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_nontrivial (struct acl *a) ++{ ++ /* The normal way to iterate through an ACL is like this: ++ struct acl_entry *ace; ++ for (ace = a->acl_ext; ace != acl_last (a); ace = acl_nxt (ace)) ++ { ++ struct ace_id *aei; ++ switch (ace->ace_type) ++ { ++ case ACC_PERMIT: ++ case ACC_DENY: ++ case ACC_SPECIFY: ++ ...; ++ } ++ for (aei = ace->ace_id; aei != id_last (ace); aei = id_nxt (aei)) ++ ... ++ } ++ */ ++ return (acl_last (a) != a->acl_ext ? 1 : 0); ++} ++ ++# if HAVE_ACLX_GET && defined ACL_AIX_WIP /* newer AIX */ ++ ++/* Return 1 if the given ACL is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_nfs4_nontrivial (nfs4_acl_int_t *a) ++{ ++# if 1 /* let's try this first */ ++ return (a->aclEntryN > 0 ? 1 : 0); ++# else ++ int count = a->aclEntryN; ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ nfs4_ace_int_t *ace = &a->aclEntry[i]; ++ ++ if (!((ace->flags & ACE4_ID_SPECIAL) != 0 ++ && (ace->aceWho.special_whoid == ACE4_WHO_OWNER ++ || ace->aceWho.special_whoid == ACE4_WHO_GROUP ++ || ace->aceWho.special_whoid == ACE4_WHO_EVERYONE) ++ && ace->aceType == ACE4_ACCESS_ALLOWED_ACE_TYPE ++ && ace->aceFlags == 0 ++ && (ace->aceMask & ~(ACE4_READ_DATA | ACE4_LIST_DIRECTORY ++ | ACE4_WRITE_DATA | ACE4_ADD_FILE ++ | ACE4_EXECUTE)) == 0)) ++ return 1; ++ } ++ return 0; ++# endif ++} ++ ++# endif ++ ++#elif USE_ACL && HAVE_ACLSORT /* NonStop Kernel */ ++ ++/* Test an ACL retrieved with ACL_GET. ++ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial. ++ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */ ++int ++acl_nontrivial (int count, struct acl *entries) ++{ ++ int i; ++ ++ for (i = 0; i < count; i++) ++ { ++ struct acl *ace = &entries[i]; ++ ++ /* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat(). ++ If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat(). ++ We don't need to check ace->a_id in these cases. */ ++ if (!(ace->a_type == USER_OBJ /* no need to check ace->a_id here */ ++ || ace->a_type == GROUP_OBJ /* no need to check ace->a_id here */ ++ || ace->a_type == CLASS_OBJ ++ || ace->a_type == OTHER_OBJ)) ++ return 1; ++ } ++ return 0; ++} ++ ++#endif ++ ++ ++/* Return 1 if NAME has a nontrivial access control list, 0 if NAME ++ only has no or a base access control list, and -1 (setting errno) ++ on error. SB must be set to the stat buffer of NAME, obtained ++ through stat() or lstat(). */ ++ ++int ++file_has_acl (char const *name, struct stat const *sb) ++{ ++#if USE_ACL ++ if (! S_ISLNK (sb->st_mode)) ++ { ++# if HAVE_ACL_GET_FILE ++ ++ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ ++ /* Linux, FreeBSD, Mac OS X, IRIX, Tru64 */ ++ int ret; ++ ++ if (HAVE_ACL_EXTENDED_FILE) /* Linux */ ++ { ++ /* On Linux, acl_extended_file is an optimized function: It only ++ makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for ++ ACL_TYPE_DEFAULT. */ ++ ret = acl_extended_file (name); ++ } ++ else /* FreeBSD, Mac OS X, IRIX, Tru64 */ ++ { ++# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ ++ /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS) ++ and acl_get_file (name, ACL_TYPE_DEFAULT) ++ always return NULL / EINVAL. There is no point in making ++ these two useless calls. The real ACL is retrieved through ++ acl_get_file (name, ACL_TYPE_EXTENDED). */ ++ acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED); ++ if (acl) ++ { ++ ret = acl_extended_nontrivial (acl); ++ acl_free (acl); ++ } ++ else ++ ret = -1; ++# else /* FreeBSD, IRIX, Tru64 */ ++ acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS); ++ if (acl) ++ { ++ int saved_errno; ++ ++ ret = acl_access_nontrivial (acl); ++ saved_errno = errno; ++ acl_free (acl); ++ errno = saved_errno; ++# if HAVE_ACL_FREE_TEXT /* Tru64 */ ++ /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always ++ returns NULL with errno not set. There is no point in ++ making this call. */ ++# else /* FreeBSD, IRIX */ ++ /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS) ++ and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory ++ either both succeed or both fail; it depends on the ++ file system. Therefore there is no point in making the second ++ call if the first one already failed. */ ++ if (ret == 0 && S_ISDIR (sb->st_mode)) ++ { ++ acl = acl_get_file (name, ACL_TYPE_DEFAULT); ++ if (acl) ++ { ++ ret = (0 < acl_entries (acl)); ++ acl_free (acl); ++ } ++ else ++ ret = -1; ++ } ++# endif ++ } ++ else ++ ret = -1; ++# endif ++ } ++ if (ret < 0) ++ return - acl_errno_valid (errno); ++ return ret; ++ ++# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin, not HP-UX */ ++ ++# if defined ACL_NO_TRIVIAL ++ ++ /* Solaris 10 (newer version), which has additional API declared in ++ (acl_t) and implemented in libsec (acl_set, acl_trivial, ++ acl_fromtext, ...). */ ++ return acl_trivial (name); ++ ++# else /* Solaris, Cygwin, general case */ ++ ++ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions ++ of Unixware. The acl() call returns the access and default ACL both ++ at once. */ ++ { ++ /* Initially, try to read the entries into a stack-allocated buffer. ++ Use malloc if it does not fit. */ ++ enum ++ { ++ alloc_init = 4000 / sizeof (aclent_t), /* >= 3 */ ++ alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t)) ++ }; ++ aclent_t buf[alloc_init]; ++ size_t alloc = alloc_init; ++ aclent_t *entries = buf; ++ aclent_t *malloced = NULL; ++ int count; ++ ++ for (;;) ++ { ++ count = acl (name, GETACL, alloc, entries); ++ if (count < 0 && errno == ENOSPC) ++ { ++ /* Increase the size of the buffer. */ ++ free (malloced); ++ if (alloc > alloc_max / 2) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ alloc = 2 * alloc; /* <= alloc_max */ ++ entries = malloced = ++ (aclent_t *) malloc (alloc * sizeof (aclent_t)); ++ if (entries == NULL) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ continue; ++ } ++ break; ++ } ++ if (count < 0) ++ { ++ if (errno == ENOSYS || errno == ENOTSUP) ++ ; ++ else ++ { ++ int saved_errno = errno; ++ free (malloced); ++ errno = saved_errno; ++ return -1; ++ } ++ } ++ else if (count == 0) ++ ; ++ else ++ { ++ /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cygwin ++ returns only 3 entries for files with no ACL. But this is safe: ++ If there are more than 4 entries, there cannot be only the ++ "user::", "group::", "other:", and "mask:" entries. */ ++ if (count > 4) ++ { ++ free (malloced); ++ return 1; ++ } ++ ++ if (acl_nontrivial (count, entries)) ++ { ++ free (malloced); ++ return 1; ++ } ++ } ++ free (malloced); ++ } ++ ++# ifdef ACE_GETACL ++ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4 ++ file systems (whereas the other ones are used in UFS file systems). */ ++ { ++ /* Initially, try to read the entries into a stack-allocated buffer. ++ Use malloc if it does not fit. */ ++ enum ++ { ++ alloc_init = 4000 / sizeof (ace_t), /* >= 3 */ ++ alloc_max = MIN (INT_MAX, SIZE_MAX / sizeof (ace_t)) ++ }; ++ ace_t buf[alloc_init]; ++ size_t alloc = alloc_init; ++ ace_t *entries = buf; ++ ace_t *malloced = NULL; ++ int count; ++ ++ for (;;) ++ { ++ count = acl (name, ACE_GETACL, alloc, entries); ++ if (count < 0 && errno == ENOSPC) ++ { ++ /* Increase the size of the buffer. */ ++ free (malloced); ++ if (alloc > alloc_max / 2) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ alloc = 2 * alloc; /* <= alloc_max */ ++ entries = malloced = (ace_t *) malloc (alloc * sizeof (ace_t)); ++ if (entries == NULL) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ continue; ++ } ++ break; ++ } ++ if (count < 0) ++ { ++ if (errno == ENOSYS || errno == EINVAL) ++ ; ++ else ++ { ++ int saved_errno = errno; ++ free (malloced); ++ errno = saved_errno; ++ return -1; ++ } ++ } ++ else if (count == 0) ++ ; ++ else ++ { ++ /* In the old (original Solaris 10) convention: ++ If there are more than 3 entries, there cannot be only the ++ ACE_OWNER, ACE_GROUP, ACE_OTHER entries. ++ In the newer Solaris 10 and Solaris 11 convention: ++ If there are more than 6 entries, there cannot be only the ++ ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with ++ NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with ++ NEW_ACE_ACCESS_DENIED_ACE_TYPE. */ ++ if (count > 6) ++ { ++ free (malloced); ++ return 1; ++ } ++ ++ if (acl_ace_nontrivial (count, entries)) ++ { ++ free (malloced); ++ return 1; ++ } ++ } ++ free (malloced); ++ } ++# endif ++ ++ return 0; ++# endif ++ ++# elif HAVE_GETACL /* HP-UX */ ++ ++ { ++ struct acl_entry entries[NACLENTRIES]; ++ int count; ++ ++ count = getacl (name, NACLENTRIES, entries); ++ ++ if (count < 0) ++ { ++ /* ENOSYS is seen on newer HP-UX versions. ++ EOPNOTSUPP is typically seen on NFS mounts. ++ ENOTSUP was seen on Quantum StorNext file systems (cvfs). */ ++ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTSUP) ++ ; ++ else ++ return -1; ++ } ++ else if (count == 0) ++ return 0; ++ else /* count > 0 */ ++ { ++ if (count > NACLENTRIES) ++ /* If NACLENTRIES cannot be trusted, use dynamic memory ++ allocation. */ ++ abort (); ++ ++ /* If there are more than 3 entries, there cannot be only the ++ (uid,%), (%,gid), (%,%) entries. */ ++ if (count > 3) ++ return 1; ++ ++ { ++ struct stat statbuf; ++ ++ if (stat (name, &statbuf) < 0) ++ return -1; ++ ++ return acl_nontrivial (count, entries, &statbuf); ++ } ++ } ++ } ++ ++# if HAVE_ACLV_H /* HP-UX >= 11.11 */ ++ ++ { ++ struct acl entries[NACLVENTRIES]; ++ int count; ++ ++ count = acl ((char *) name, ACL_GET, NACLVENTRIES, entries); ++ ++ if (count < 0) ++ { ++ /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23. ++ EINVAL is seen on NFS in HP-UX 11.31. */ ++ if (errno == ENOSYS || errno == EOPNOTSUPP || errno == EINVAL) ++ ; ++ else ++ return -1; ++ } ++ else if (count == 0) ++ return 0; ++ else /* count > 0 */ ++ { ++ if (count > NACLVENTRIES) ++ /* If NACLVENTRIES cannot be trusted, use dynamic memory ++ allocation. */ ++ abort (); ++ ++ /* If there are more than 4 entries, there cannot be only the ++ four base ACL entries. */ ++ if (count > 4) ++ return 1; ++ ++ return aclv_nontrivial (count, entries); ++ } ++ } ++ ++# endif ++ ++# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */ ++ ++ acl_type_t type; ++ char aclbuf[1024]; ++ void *acl = aclbuf; ++ size_t aclsize = sizeof (aclbuf); ++ mode_t mode; ++ ++ for (;;) ++ { ++ /* The docs say that type being 0 is equivalent to ACL_ANY, but it ++ is not true, in AIX 5.3. */ ++ type.u64 = ACL_ANY; ++ if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >= 0) ++ break; ++ if (errno == ENOSYS) ++ return 0; ++ if (errno != ENOSPC) ++ { ++ if (acl != aclbuf) ++ { ++ int saved_errno = errno; ++ free (acl); ++ errno = saved_errno; ++ } ++ return -1; ++ } ++ aclsize = 2 * aclsize; ++ if (acl != aclbuf) ++ free (acl); ++ acl = malloc (aclsize); ++ if (acl == NULL) ++ { ++ errno = ENOMEM; ++ return -1; ++ } ++ } ++ ++ if (type.u64 == ACL_AIXC) ++ { ++ int result = acl_nontrivial ((struct acl *) acl); ++ if (acl != aclbuf) ++ free (acl); ++ return result; ++ } ++ else if (type.u64 == ACL_NFS4) ++ { ++ int result = acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl); ++ if (acl != aclbuf) ++ free (acl); ++ return result; ++ } ++ else ++ { ++ /* A newer type of ACL has been introduced in the system. ++ We should better support it. */ ++ if (acl != aclbuf) ++ free (acl); ++ errno = EINVAL; ++ return -1; ++ } ++ ++# elif HAVE_STATACL /* older AIX */ ++ ++ union { struct acl a; char room[4096]; } u; ++ ++ if (statacl (name, STX_NORMAL, &u.a, sizeof (u)) < 0) ++ return -1; ++ ++ return acl_nontrivial (&u.a); ++ ++# elif HAVE_ACLSORT /* NonStop Kernel */ ++ ++ { ++ struct acl entries[NACLENTRIES]; ++ int count; ++ ++ count = acl ((char *) name, ACL_GET, NACLENTRIES, entries); ++ ++ if (count < 0) ++ { ++ if (errno == ENOSYS || errno == ENOTSUP) ++ ; ++ else ++ return -1; ++ } ++ else if (count == 0) ++ return 0; ++ else /* count > 0 */ ++ { ++ if (count > NACLENTRIES) ++ /* If NACLENTRIES cannot be trusted, use dynamic memory ++ allocation. */ ++ abort (); ++ ++ /* If there are more than 4 entries, there cannot be only the ++ four base ACL entries. */ ++ if (count > 4) ++ return 1; ++ ++ return acl_nontrivial (count, entries); ++ } ++ } ++ ++# endif ++ } ++#endif ++ ++ return 0; ++} +Index: tar-1.26/lib/Makefile.am +=================================================================== +--- tar-1.26.orig/lib/Makefile.am 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/lib/Makefile.am 2014-04-29 17:14:50.002704544 +0000 +@@ -28,11 +28,23 @@ + CLEANFILES = rmt-command.h rmt-command.h-t + INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu + +-noinst_HEADERS = system.h system-ioctl.h rmt.h paxlib.h stdopen.h ++noinst_HEADERS = system.h system-ioctl.h rmt.h paxlib.h stdopen.h xattr-at.h + libtar_a_SOURCES = \ + paxerror.c paxexit-status.c paxlib.h paxnames.c \ + prepargs.c prepargs.h \ + rtapelib.c \ + rmt.h \ + stdopen.c stdopen.h \ +- system.h system-ioctl.h ++ system.h system-ioctl.h xattr-at.c ++ ++if !TAR_COND_XATTR_H ++BUILT_SOURCES += attr/xattr.h ++attr/xattr.h: attr-xattr.in.h $(top_builddir)/config.status ++ $(AM_V_at)$(MKDIR_P) attr ++ $(AM_V_GEN)rm -f $@-t $@ && \ ++ cp $(srcdir)/attr-xattr.in.h attr/xattr.h ++endif ++ ++MOSTLYCLEANFILES = attr/xattr.h ++ ++EXTRA_DIST = attr-xattr.in.h +Index: tar-1.26/lib/attr-xattr.in.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/lib/attr-xattr.in.h 2014-04-29 17:14:50.002704544 +0000 +@@ -0,0 +1,60 @@ ++/* Replacement for platforms that lack it. ++ Copyright 2012-2013 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef TAR_ATTR_XATTR_H ++#define TAR_ATTR_XATTR_H ++#include ++#ifndef ENOATTR ++# define ENOATTR ENODATA /* No such attribute */ ++#endif ++ ++/* setting */ ++static inline int setxattr (const char *path, const char *name, const void ++ *value, size_t size, int flags) ++{ errno = ENOTSUP; return -1; } ++ ++static inline int lsetxattr (const char *path, const char *name, const void ++ *value, size_t size, int flags) ++{ errno = ENOTSUP; return -1; } ++ ++static inline int fsetxattr (int filedes, const char *name, const void *value, ++ size_t size, int flags) ++{ errno = ENOTSUP; return -1; } ++ ++ ++/* getting */ ++static inline ssize_t getxattr (const char *path, const char *name, void *value, ++ size_t size) ++{ errno = ENOTSUP; return -1; } ++static inline ssize_t lgetxattr (const char *path, const char *name, void ++ *value, size_t size) ++{ errno = ENOTSUP; return -1; } ++static inline ssize_t fgetxattr (int filedes, const char *name, void *value, ++ size_t size) ++{ errno = ENOTSUP; return -1; } ++ ++ ++/* listing */ ++static inline ssize_t listxattr (const char *path, char *list, size_t size) ++{ errno = ENOTSUP; return -1; } ++ ++static inline ssize_t llistxattr (const char *path, char *list, size_t size) ++{ errno = ENOTSUP; return -1; } ++ ++static inline ssize_t flistxattr (int filedes, char *list, size_t size) ++{ errno = ENOTSUP; return -1; } ++ ++#endif +Index: tar-1.26/lib/xattr-at.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/lib/xattr-at.c 2014-04-29 17:14:50.002704544 +0000 +@@ -0,0 +1,110 @@ ++/* openat-style fd-relative functions for operating with extended file ++ attributes. ++ ++ Copyright 2012-2013 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#include ++ ++#include "xattr-at.h" ++#include "openat.h" ++ ++#include ++#include ++#include ++#include ++ ++#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */ ++#include "save-cwd.h" ++ ++#include "openat-priv.h" ++ ++/* setxattrat */ ++#define AT_FUNC_NAME setxattrat ++#define AT_FUNC_F1 setxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, const void *value \ ++ , size_t size, int flags ++#define AT_FUNC_POST_FILE_ARGS , name, value, size, flags ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* lsetxattrat */ ++#define AT_FUNC_NAME lsetxattrat ++#define AT_FUNC_F1 lsetxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, const void *value \ ++ , size_t size, int flags ++#define AT_FUNC_POST_FILE_ARGS , name, value, size, flags ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* getxattrat */ ++#define AT_FUNC_NAME getxattrat ++#define AT_FUNC_RESULT ssize_t ++#define AT_FUNC_F1 getxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, void *value \ ++ , size_t size ++#define AT_FUNC_POST_FILE_ARGS , name, value, size ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_RESULT ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* lgetxattrat */ ++#define AT_FUNC_NAME lgetxattrat ++#define AT_FUNC_RESULT ssize_t ++#define AT_FUNC_F1 lgetxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , const char *name, void *value \ ++ , size_t size ++#define AT_FUNC_POST_FILE_ARGS , name, value, size ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_RESULT ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* listxattrat */ ++#define AT_FUNC_NAME listxattrat ++#define AT_FUNC_RESULT ssize_t ++#define AT_FUNC_F1 listxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , char *list , size_t size ++#define AT_FUNC_POST_FILE_ARGS , list , size ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_RESULT ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* llistxattrat */ ++#define AT_FUNC_NAME llistxattrat ++#define AT_FUNC_RESULT ssize_t ++#define AT_FUNC_F1 llistxattr ++#define AT_FUNC_POST_FILE_PARAM_DECLS , char *list , size_t size ++#define AT_FUNC_POST_FILE_ARGS , list , size ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_RESULT ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS +Index: tar-1.26/src/Makefile.am +=================================================================== +--- tar-1.26.orig/src/Makefile.am 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/Makefile.am 2014-04-29 17:14:50.002704544 +0000 +@@ -20,7 +20,7 @@ + + bin_PROGRAMS = tar + +-noinst_HEADERS = arith.h common.h tar.h ++noinst_HEADERS = arith.h common.h tar.h xattrs.h + tar_SOURCES = \ + buffer.c\ + checkpoint.c\ +@@ -42,10 +42,11 @@ + unlink.c\ + update.c\ + utf8.c\ +- warning.c ++ warning.c\ ++ xattrs.c + + INCLUDES = -I$(top_srcdir)/gnu -I../ -I../gnu -I$(top_srcdir)/lib -I../lib + + LDADD = ../lib/libtar.a ../gnu/libgnu.a $(LIBINTL) $(LIBICONV) + +-tar_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) ++tar_LDADD = $(LIBS) $(LDADD) $(LIB_CLOCK_GETTIME) $(LIB_EACCESS) +Index: tar-1.26/src/common.h +=================================================================== +--- tar-1.26.orig/src/common.h 2014-04-29 17:14:15.000000000 +0000 ++++ tar-1.26/src/common.h 2014-04-29 17:14:50.006704541 +0000 +@@ -91,6 +91,11 @@ + + GLOBAL enum subcommand subcommand_option; + ++#define READ_LIKE_SUBCOMMAND \ ++ (subcommand_option == EXTRACT_SUBCOMMAND \ ++ || subcommand_option == DIFF_SUBCOMMAND \ ++ || subcommand_option == LIST_SUBCOMMAND) ++ + /* Selected format for output archive. */ + GLOBAL enum archive_format archive_format; + +@@ -253,6 +258,9 @@ + /* If positive, preserve permissions when extracting. */ + GLOBAL int same_permissions_option; + ++/* If positive, save the user and root xattrs. */ ++GLOBAL int xattrs_option; ++ + /* When set, strip the given number of file name components from the file name + before extracting */ + GLOBAL size_t strip_name_components; +@@ -707,6 +715,9 @@ + + void update_archive (void); + ++/* Module attrs.c. */ ++#include "xattrs.h" ++ + /* Module xheader.c. */ + + void xheader_decode (struct tar_stat_info *stat); +@@ -727,6 +738,12 @@ + bool xheader_keyword_deleted_p (const char *kw); + char *xheader_format_name (struct tar_stat_info *st, const char *fmt, + size_t n); ++void xheader_xattr_init (struct tar_stat_info *st); ++void xheader_xattr_free (struct xattr_array *vals, size_t sz); ++void xheader_xattr_copy (const struct tar_stat_info *st, ++ struct xattr_array **vals, size_t *sz); ++void xheader_xattr_add (struct tar_stat_info *st, ++ const char *key, const char *val, size_t len); + + /* Module system.c */ + +@@ -807,6 +824,7 @@ + #define WARN_UNKNOWN_KEYWORD 0x00020000 + #define WARN_XDEV 0x00040000 + #define WARN_DECOMPRESS_PROGRAM 0x00080000 ++#define WARN_XATTR_WRITE 0x00100000 + + /* The warnings composing WARN_VERBOSE_WARNINGS are enabled by default + in verbose mode */ +Index: tar-1.26/src/create.c +=================================================================== +--- tar-1.26.orig/src/create.c 2014-04-29 17:14:15.000000000 +0000 ++++ tar-1.26/src/create.c 2014-04-29 22:04:59.128245798 +0000 +@@ -938,6 +938,20 @@ + GNAME_TO_CHARS (st->gname, header->header.gname); + } + ++ if (archive_format == POSIX_FORMAT) ++ { ++ if (xattrs_option > 0) ++ { ++ size_t scan_xattr = 0; ++ struct xattr_array *xattr_map = st->xattr_map; ++ ++ while (scan_xattr < st->xattr_map_size) ++ { ++ xheader_store (xattr_map[scan_xattr].xkey, st, &scan_xattr); ++ ++scan_xattr; ++ } ++ } ++ } + return header; + } + +@@ -1713,6 +1727,8 @@ + bool ok; + struct stat final_stat; + ++ xattrs_xattrs_get (parentfd, name, st, fd); ++ + if (is_dir) + { + const char *tag_file_name; +@@ -1831,6 +1847,8 @@ + if (NAME_FIELD_SIZE - (archive_format == OLDGNU_FORMAT) < size) + write_long_link (st); + ++ xattrs_xattrs_get (parentfd, name, st, 0); ++ + block_ordinal = current_block_ordinal (); + st->stat.st_size = 0; /* force 0 size on symlink */ + header = start_header (st); +@@ -1848,13 +1866,16 @@ + return; + } + #endif +- else if (S_ISCHR (st->stat.st_mode)) ++ else if (S_ISCHR (st->stat.st_mode)) { + type = CHRTYPE; +- else if (S_ISBLK (st->stat.st_mode)) ++ xattrs_xattrs_get (parentfd, name, st, 0); ++ } else if (S_ISBLK (st->stat.st_mode)) { + type = BLKTYPE; +- else if (S_ISFIFO (st->stat.st_mode)) ++ xattrs_xattrs_get (parentfd, name, st, 0); ++ } else if (S_ISFIFO (st->stat.st_mode)) { + type = FIFOTYPE; +- else if (S_ISSOCK (st->stat.st_mode)) ++ xattrs_xattrs_get (parentfd, name, st, 0); ++ } else if (S_ISSOCK (st->stat.st_mode)) + { + WARNOPT (WARN_FILE_IGNORED, + (0, 0, _("%s: socket ignored"), quotearg_colon (p))); +Index: tar-1.26/src/extract.c +=================================================================== +--- tar-1.26.orig/src/extract.c 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/extract.c 2014-04-29 17:14:50.006704541 +0000 +@@ -97,6 +97,10 @@ + /* Directory that the name is relative to. */ + int change_dir; + ++ /* extended attributes*/ ++ size_t xattr_map_size; ++ struct xattr_array *xattr_map; ++ + /* Length and contents of name. */ + size_t file_name_len; + char file_name[1]; +@@ -134,6 +138,9 @@ + hard-linked together. */ + struct string_list *sources; + ++ size_t xattr_map_size; ++ struct xattr_array *xattr_map; ++ + /* The desired target of the desired link. */ + char target[1]; + }; +@@ -360,6 +367,9 @@ + st->stat.st_mode & ~ current_umask, + 0 < same_permissions_option && ! interdir ? MODE_ALL : MODE_RWX, + fd, current_mode, current_mode_mask, typeflag, atflag); ++ /* these three calls must be done *after* fd_chown() call because fd_chown ++ causes that linux capabilities becomes cleared. */ ++ xattrs_xattrs_set (st, file_name, typeflag, 1); + } + + /* For each entry H in the leading prefix of entries in HEAD that do +@@ -431,6 +441,13 @@ + data->atflag = atflag; + data->after_links = 0; + data->change_dir = chdir_current; ++ if (st) ++ xheader_xattr_copy (st, &data->xattr_map, &data->xattr_map_size); ++ else ++ { ++ data->xattr_map = NULL; ++ data->xattr_map_size = 0; ++ } + strcpy (data->file_name, file_name); + delayed_set_stat_head = data; + if (must_be_dot_or_slash (file_name)) +@@ -673,6 +690,40 @@ + return RECOVER_NO; + } + ++/* Restore stat extended attributes (xattr) for FILE_NAME, using information ++ given in *ST. Restore before extraction because they may affect file layout ++ (e.g. on Lustre distributed parallel filesystem - setting info about how many ++ servers is this file striped over, stripe size, mirror copies, etc. ++ in advance dramatically improves the following performance of reading and ++ writing a file). If not restoring permissions, invert the INVERT_PERMISSIONS ++ bits from the file's current permissions. TYPEFLAG specifies the type of the ++ file. FILE_CREATED indicates set_xattr has created the file */ ++static int ++set_xattr (char const *file_name, struct tar_stat_info const *st, ++ mode_t invert_permissions, char typeflag, int *file_created) ++{ ++ int status = 0; ++ ++#ifdef HAVE_XATTRS ++ bool interdir_made = false; ++ ++ if ((xattrs_option > 0) && st->xattr_map_size) ++ { ++ mode_t mode = current_stat_info.stat.st_mode & MODE_RWX & ~ current_umask; ++ ++ do ++ status = mknodat (chdir_fd, file_name, mode ^ invert_permissions, 0); ++ while (status && maybe_recoverable ((char *)file_name, false, ++ &interdir_made)); ++ ++ xattrs_xattrs_set (st, file_name, typeflag, 0); ++ *file_created = 1; ++ } ++#endif ++ ++ return(status); ++} ++ + /* Fix the statuses of all directories whose statuses need fixing, and + which are not ancestors of FILE_NAME. If AFTER_LINKS is + nonzero, do this for all such directories; otherwise, stop at the +@@ -733,12 +784,15 @@ + sb.stat.st_gid = data->gid; + sb.atime = data->atime; + sb.mtime = data->mtime; ++ sb.xattr_map = data->xattr_map; ++ sb.xattr_map_size = data->xattr_map_size; + set_stat (data->file_name, &sb, + -1, current_mode, current_mode_mask, + DIRTYPE, data->interdir, data->atflag); + } + + delayed_set_stat_head = data->next; ++ xheader_xattr_free (data->xattr_map, data->xattr_map_size); + free (data); + } + } +@@ -854,7 +908,7 @@ + + static int + open_output_file (char const *file_name, int typeflag, mode_t mode, +- mode_t *current_mode, mode_t *current_mode_mask) ++ int file_created, mode_t *current_mode, mode_t *current_mode_mask) + { + int fd; + bool overwriting_old_files = old_files_option == OVERWRITE_OLD_FILES; +@@ -864,6 +918,10 @@ + ? O_TRUNC | (dereference_option ? 0 : O_NOFOLLOW) + : O_EXCL)); + ++ /* File might be created in set_xattr. So clear O_EXCL to avoid open() fail */ ++ if (file_created) ++ openflag = openflag & ~O_EXCL; ++ + if (typeflag == CONTTYPE) + { + static int conttype_diagnosed; +@@ -934,6 +992,8 @@ + bool interdir_made = false; + mode_t mode = (current_stat_info.stat.st_mode & MODE_RWX + & ~ (0 < same_owner_option ? S_IRWXG | S_IRWXO : 0)); ++ mode_t invert_permissions = 0 < same_owner_option ? mode & (S_IRWXG | S_IRWXO) ++ : 0; + mode_t current_mode = 0; + mode_t current_mode_mask = 0; + +@@ -950,7 +1010,16 @@ + } + else + { +- while ((fd = open_output_file (file_name, typeflag, mode, ++ int file_created = 0; ++ if (set_xattr (file_name, ¤t_stat_info, invert_permissions, ++ typeflag, &file_created)) ++ { ++ skip_member (); ++ open_error (file_name); ++ return 1; ++ } ++ ++ while ((fd = open_output_file (file_name, typeflag, mode, file_created, + ¤t_mode, ¤t_mode_mask)) + < 0) + { +@@ -1091,6 +1160,7 @@ + + strlen (file_name) + 1); + p->sources->next = 0; + strcpy (p->sources->string, file_name); ++ xheader_xattr_copy (¤t_stat_info, &p->xattr_map, &p->xattr_map_size); + strcpy (p->target, current_stat_info.link_name); + + h = delayed_set_stat_head; +@@ -1525,6 +1595,8 @@ + st1.stat.st_gid = ds->gid; + st1.atime = ds->atime; + st1.mtime = ds->mtime; ++ st1.xattr_map = ds->xattr_map; ++ st1.xattr_map_size = ds->xattr_map_size; + set_stat (source, &st1, -1, 0, 0, SYMTYPE, + false, AT_SYMLINK_NOFOLLOW); + valid_source = source; +@@ -1539,6 +1611,7 @@ + sources = next; + } + ++ xheader_xattr_free (ds->xattr_map, ds->xattr_map_size); + { + struct delayed_link *next = ds->next; + free (ds); +Index: tar-1.26/src/list.c +=================================================================== +--- tar-1.26.orig/src/list.c 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/list.c 2014-04-29 17:14:50.006704541 +0000 +@@ -604,6 +604,8 @@ + assign_string (&stat_info->gname, + header->header.gname[0] ? header->header.gname : NULL); + ++ xheader_xattr_init (stat_info); ++ + if (format == OLDGNU_FORMAT && incremental_option) + { + stat_info->atime.tv_sec = TIME_FROM_HEADER (header->oldgnu_header.atime); +@@ -1064,7 +1066,7 @@ + simple_print_header (struct tar_stat_info *st, union block *blk, + off_t block_ordinal) + { +- char modes[11]; ++ char modes[12]; + char const *time_stamp; + int time_stamp_len; + char *temp_name; +@@ -1156,6 +1158,9 @@ + + pax_decode_mode (st->stat.st_mode, modes + 1); + ++ /* extended attributes: GNU `ls -l'-like preview */ ++ xattrs_print_char (st, modes + 10); ++ + /* Time stamp. */ + + time_stamp = tartime (st->mtime, full_time_option); +@@ -1301,6 +1306,7 @@ + } + } + fflush (stdlis); ++ xattrs_print (st); + } + + +Index: tar-1.26/src/tar.c +=================================================================== +--- tar-1.26.orig/src/tar.c 2014-04-29 17:14:15.000000000 +0000 ++++ tar-1.26/src/tar.c 2014-04-29 17:14:50.006704541 +0000 +@@ -304,6 +304,7 @@ + NO_UNQUOTE_OPTION, + NO_WILDCARDS_MATCH_SLASH_OPTION, + NO_WILDCARDS_OPTION, ++ NO_XATTR_OPTION, + NULL_OPTION, + NUMERIC_OWNER_OPTION, + OCCURRENCE_OPTION, +@@ -340,7 +341,10 @@ + VOLNO_FILE_OPTION, + WARNING_OPTION, + WILDCARDS_MATCH_SLASH_OPTION, +- WILDCARDS_OPTION ++ WILDCARDS_OPTION, ++ XATTR_OPTION, ++ XATTR_EXCLUDE, ++ XATTR_INCLUDE + }; + + const char *argp_program_version = "tar (" PACKAGE_NAME ") " VERSION; +@@ -525,6 +529,19 @@ + N_("cancel the effect of --delay-directory-restore option"), GRID+1 }, + #undef GRID + ++#define GRID 55 ++ {NULL, 0, NULL, 0, ++ N_("Handling of extended file attributes:"), GRID }, ++ {"xattrs", XATTR_OPTION, 0, 0, ++ N_("Enable extended attributes support"), GRID+1 }, ++ {"no-xattrs", NO_XATTR_OPTION, 0, 0, ++ N_("Disable extended attributes support"), GRID+1 }, ++ {"xattrs-include", XATTR_INCLUDE, N_("MASK"), 0, ++ N_("specify the include pattern for xattr keys"), GRID+1 }, ++ {"xattrs-exclude", XATTR_EXCLUDE, N_("MASK"), 0, ++ N_("specify the exclude pattern for xattr keys"), GRID+1 }, ++#undef GRID ++ + #define GRID 60 + {NULL, 0, NULL, 0, + N_("Device selection and switching:"), GRID }, +@@ -2079,6 +2096,20 @@ + same_permissions_option = -1; + break; + ++ case XATTR_OPTION: ++ set_archive_format ("posix"); ++ xattrs_option = 1; ++ break; ++ ++ case NO_XATTR_OPTION: ++ xattrs_option = -1; ++ break; ++ ++ case XATTR_INCLUDE: ++ case XATTR_EXCLUDE: ++ xattrs_mask_add (arg, (key == XATTR_INCLUDE)); ++ break; ++ + case RECURSION_OPTION: + recursion_option = FNM_LEADING_DIR; + break; +@@ -2461,6 +2492,11 @@ + || subcommand_option != LIST_SUBCOMMAND)) + USAGE_ERROR ((0, 0, _("--pax-option can be used only on POSIX archives"))); + ++ if ((xattrs_option > 0) ++ && archive_format != POSIX_FORMAT ++ && !READ_LIKE_SUBCOMMAND) ++ USAGE_ERROR ((0, 0, _("--xattrs can be used only on POSIX archives"))); ++ + /* If ready to unlink hierarchies, so we are for simpler files. */ + if (recursive_unlink_option) + old_files_option = UNLINK_FIRST_OLD_FILES; +@@ -2681,6 +2717,7 @@ + /* Dispose of allocated memory, and return. */ + + free (archive_name_array); ++ xattrs_clear_setup (); + name_term (); + + if (exit_status == TAREXIT_FAILURE) +@@ -2725,6 +2762,7 @@ + tar_stat_destroy (struct tar_stat_info *st) + { + tar_stat_close (st); ++ xheader_xattr_free (st->xattr_map, st->xattr_map_size); + free (st->orig_file_name); + free (st->file_name); + free (st->link_name); +Index: tar-1.26/src/tar.h +=================================================================== +--- tar-1.26.orig/src/tar.h 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/tar.h 2014-04-29 17:14:50.010704536 +0000 +@@ -276,6 +276,14 @@ + uintmax_t string_length; + }; + ++/* Information about xattrs for a file. */ ++struct xattr_array ++ { ++ char *xkey; ++ char *xval_ptr; ++ size_t xval_len; ++ }; ++ + struct tar_stat_info + { + char *orig_file_name; /* name of file read from the archive header */ +@@ -309,6 +317,9 @@ + size_t sparse_map_size; /* Size of the sparse map */ + struct sp_array *sparse_map; + ++ size_t xattr_map_size; /* Size of the xattr map */ ++ struct xattr_array *xattr_map; ++ + /* Extended headers */ + struct xheader xhdr; + +Index: tar-1.26/src/warning.c +=================================================================== +--- tar-1.26.orig/src/warning.c 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/warning.c 2014-04-29 17:14:50.010704536 +0000 +@@ -42,6 +42,7 @@ + "unknown-keyword", + "xdev", + "decompress-program", ++ "xattr-write", + NULL + }; + +@@ -66,7 +67,8 @@ + WARN_UNKNOWN_CAST, + WARN_UNKNOWN_KEYWORD, + WARN_XDEV, +- WARN_DECOMPRESS_PROGRAM ++ WARN_DECOMPRESS_PROGRAM, ++ WARN_XATTR_WRITE + }; + + ARGMATCH_VERIFY (warning_args, warning_types); +Index: tar-1.26/src/xattrs.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/src/xattrs.c 2014-04-29 17:14:50.010704536 +0000 +@@ -0,0 +1,601 @@ ++/* Support for extended attributes. ++ ++ Copyright (C) 2006-2013 Free Software Foundation, Inc. ++ ++ This file is part of GNU tar. ++ ++ GNU tar is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ GNU tar is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ Written by James Antill, on 2006-07-27. */ ++ ++#include ++#include ++ ++#include ++#include ++ ++#include "common.h" ++ ++#include "xattr-at.h" ++ ++struct xattrs_mask_map ++{ ++ const char **masks; ++ size_t size; ++ size_t used; ++}; ++ ++/* list of fnmatch patterns */ ++static struct ++{ ++ /* lists of fnmatch patterns */ ++ struct xattrs_mask_map incl; ++ struct xattrs_mask_map excl; ++} xattrs_setup; ++ ++/* disable posix acls when problem found in gnulib script m4/acl.m4 */ ++#if ! USE_ACL ++# undef HAVE_POSIX_ACLS ++#endif ++ ++#ifdef HAVE_POSIX_ACLS ++# include "acl.h" ++# include ++#endif ++ ++#ifdef HAVE_POSIX_ACLS ++ ++/* acl-at wrappers, TODO: move to gnulib in future? */ ++static acl_t acl_get_file_at (int, const char *, acl_type_t); ++static int acl_set_file_at (int, const char *, acl_type_t, acl_t); ++static int file_has_acl_at (int, char const *, struct stat const *); ++ ++/* acl_get_file_at */ ++#define AT_FUNC_NAME acl_get_file_at ++#define AT_FUNC_RESULT acl_t ++#define AT_FUNC_FAIL (acl_t)NULL ++#define AT_FUNC_F1 acl_get_file ++#define AT_FUNC_POST_FILE_PARAM_DECLS , acl_type_t type ++#define AT_FUNC_POST_FILE_ARGS , type ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_RESULT ++#undef AT_FUNC_FAIL ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* acl_set_file_at */ ++#define AT_FUNC_NAME acl_set_file_at ++#define AT_FUNC_F1 acl_set_file ++#define AT_FUNC_POST_FILE_PARAM_DECLS , acl_type_t type, acl_t acl ++#define AT_FUNC_POST_FILE_ARGS , type, acl ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* gnulib file_has_acl_at */ ++#define AT_FUNC_NAME file_has_acl_at ++#define AT_FUNC_F1 file_has_acl ++#define AT_FUNC_POST_FILE_PARAM_DECLS , struct stat const *st ++#define AT_FUNC_POST_FILE_ARGS , st ++#include "at-func.c" ++#undef AT_FUNC_NAME ++#undef AT_FUNC_F1 ++#undef AT_FUNC_POST_FILE_PARAM_DECLS ++#undef AT_FUNC_POST_FILE_ARGS ++ ++/* convert unix permissions into an ACL ... needed due to "default" ACLs */ ++static acl_t ++perms2acl (int perms) ++{ ++ char val[] = "user::---,group::---,other::---"; ++ /* 0123456789 123456789 123456789 123456789 */ ++ ++ /* user */ ++ if (perms & 0400) ++ val[6] = 'r'; ++ if (perms & 0200) ++ val[7] = 'w'; ++ if (perms & 0100) ++ val[8] = 'x'; ++ ++ /* group */ ++ if (perms & 0040) ++ val[17] = 'r'; ++ if (perms & 0020) ++ val[18] = 'w'; ++ if (perms & 0010) ++ val[19] = 'x'; ++ ++ /* other */ ++ if (perms & 0004) ++ val[28] = 'r'; ++ if (perms & 0002) ++ val[29] = 'w'; ++ if (perms & 0001) ++ val[30] = 'x'; ++ ++ return acl_from_text (val); ++} ++ ++static char * ++skip_to_ext_fields (char *ptr) ++{ ++ /* skip tag name (user/group/default/mask) */ ++ ptr += strcspn (ptr, ":,\n"); ++ ++ if (*ptr != ':') ++ return ptr; ++ ++ptr; ++ ++ ptr += strcspn (ptr, ":,\n"); /* skip user/group name */ ++ ++ if (*ptr != ':') ++ return ptr; ++ ++ptr; ++ ++ ptr += strcspn (ptr, ":,\n"); /* skip perms */ ++ ++ return ptr; ++} ++ ++/* The POSIX draft allows extra fields after the three main ones. Star ++ uses this to add a fourth field for user/group which is the numeric ID. ++ This function removes such extra fields by overwriting them with the ++ characters that follow. */ ++static char * ++fixup_extra_acl_fields (char *ptr) ++{ ++ char *src = ptr; ++ char *dst = ptr; ++ ++ while (*src) ++ { ++ const char *old = src; ++ size_t len = 0; ++ ++ src = skip_to_ext_fields (src); ++ len = src - old; ++ if (old != dst) ++ memmove (dst, old, len); ++ dst += len; ++ ++ if (*src == ':') /* We have extra fields, skip them all */ ++ src += strcspn (src, "\n,"); ++ ++ if ((*src == '\n') || (*src == ',')) ++ *dst++ = *src++; /* also done when dst == src, but that's ok */ ++ } ++ if (src != dst) ++ *dst = 0; ++ ++ return ptr; ++} ++ ++/* "system.posix_acl_access" */ ++static void ++xattrs__acls_set (struct tar_stat_info const *st, ++ char const *file_name, int type, ++ char *ptr, size_t len, bool def) ++{ ++ acl_t acl; ++ ++ if (ptr) ++ { ++ /* assert (strlen (ptr) == len); */ ++ ptr = fixup_extra_acl_fields (ptr); ++ ++ acl = acl_from_text (ptr); ++ acls_option = 1; ++ } ++ else if (acls_option > 0) ++ acl = perms2acl (st->stat.st_mode); ++ else ++ return; /* don't call acl functions unless we first hit an ACL, or ++ --acls was passed explicitly */ ++ ++ if (!acl) ++ { ++ call_arg_warn ("acl_from_text", file_name); ++ return; ++ } ++ ++ if (acl_set_file_at (chdir_fd, file_name, type, acl) == -1) ++ /* warn even if filesystem does not support acls */ ++ WARNOPT (WARN_XATTR_WRITE, ++ (0, errno, ++ _ ("acl_set_file_at: Cannot set POSIX ACLs for file '%s'"), ++ file_name)); ++ ++ acl_free (acl); ++} ++ ++static void ++xattrs__acls_get_a (int parentfd, const char *file_name, ++ struct tar_stat_info *st, ++ char **ret_ptr, size_t * ret_len) ++{ ++ char *val = NULL; ++ ssize_t len; ++ acl_t acl; ++ ++ if (!(acl = acl_get_file_at (parentfd, file_name, ACL_TYPE_ACCESS))) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_get_file_at", file_name); ++ return; ++ } ++ ++ val = acl_to_text (acl, &len); ++ acl_free (acl); ++ ++ if (!val) ++ { ++ call_arg_warn ("acl_to_text", file_name); ++ return; ++ } ++ ++ *ret_ptr = xstrdup (val); ++ *ret_len = len; ++ ++ acl_free (val); ++} ++ ++/* "system.posix_acl_default" */ ++static void ++xattrs__acls_get_d (int parentfd, char const *file_name, ++ struct tar_stat_info *st, ++ char **ret_ptr, size_t * ret_len) ++{ ++ char *val = NULL; ++ ssize_t len; ++ acl_t acl; ++ ++ if (!(acl = acl_get_file_at (parentfd, file_name, ACL_TYPE_DEFAULT))) ++ { ++ if (errno != ENOTSUP) ++ call_arg_warn ("acl_get_file_at", file_name); ++ return; ++ } ++ ++ val = acl_to_text (acl, &len); ++ acl_free (acl); ++ ++ if (!val) ++ { ++ call_arg_warn ("acl_to_text", file_name); ++ return; ++ } ++ ++ *ret_ptr = xstrdup (val); ++ *ret_len = len; ++ ++ acl_free (val); ++} ++#endif /* HAVE_POSIX_ACLS */ ++ ++static void ++acls_one_line (const char *prefix, char delim, ++ const char *aclstring, size_t len) ++{ ++ /* support both long and short text representation of posix acls */ ++ struct obstack stk; ++ int pref_len = strlen (prefix); ++ const char *oldstring = aclstring; ++ int pos = 0; ++ ++ if (!aclstring || !len) ++ return; ++ ++ obstack_init (&stk); ++ while (pos <= len) ++ { ++ int move = strcspn (aclstring, ",\n"); ++ if (!move) ++ break; ++ ++ if (oldstring != aclstring) ++ obstack_1grow (&stk, delim); ++ ++ obstack_grow (&stk, prefix, pref_len); ++ obstack_grow (&stk, aclstring, move); ++ ++ aclstring += move + 1; ++ } ++ ++ obstack_1grow (&stk, '\0'); ++ ++ fprintf (stdlis, "%s", (char *) obstack_finish (&stk)); ++ ++ obstack_free (&stk, NULL); ++} ++ ++static void ++mask_map_realloc (struct xattrs_mask_map *map) ++{ ++ if (map->used == map->size) ++ { ++ if (map->size == 0) ++ map->size = 4; ++ map->masks = x2nrealloc (map->masks, &map->size, sizeof (map->masks[0])); ++ } ++} ++ ++void ++xattrs_mask_add (const char *mask, bool incl) ++{ ++ struct xattrs_mask_map *mask_map = ++ incl ? &xattrs_setup.incl : &xattrs_setup.excl; ++ /* ensure there is enough space */ ++ mask_map_realloc (mask_map); ++ /* just assign pointers -- we silently expect that pointer "mask" is valid ++ through the whole program (pointer to argv array) */ ++ mask_map->masks[mask_map->used++] = mask; ++} ++ ++static void ++clear_mask_map (struct xattrs_mask_map *mask_map) ++{ ++ if (mask_map->size) ++ free (mask_map->masks); ++} ++ ++void ++xattrs_clear_setup (void) ++{ ++ clear_mask_map (&xattrs_setup.incl); ++ clear_mask_map (&xattrs_setup.excl); ++} ++ ++/* get all xattrs from file given by FILE_NAME or FD (when non-zero). This ++ includes all the user.*, security.*, system.*, etc. available domains */ ++void ++xattrs_xattrs_get (int parentfd, char const *file_name, ++ struct tar_stat_info *st, int fd) ++{ ++ if (xattrs_option > 0) ++ { ++#ifndef HAVE_XATTRS ++ static int done = 0; ++ if (!done) ++ WARN ((0, 0, _("XATTR support is not available"))); ++ done = 1; ++#else ++ static size_t xsz = 1024; ++ static char *xatrs = NULL; ++ ssize_t xret = -1; ++ ++ if (!xatrs) ++ xatrs = x2nrealloc (xatrs, &xsz, 1); ++ ++ while (((fd == 0) ? ++ ((xret = ++ llistxattrat (parentfd, file_name, xatrs, xsz)) == -1) : ++ ((xret = flistxattr (fd, xatrs, xsz)) == -1)) ++ && (errno == ERANGE)) ++ { ++ xatrs = x2nrealloc (xatrs, &xsz, 1); ++ } ++ ++ if (xret == -1) ++ call_arg_warn ((fd == 0) ? "llistxattrat" : "flistxattr", file_name); ++ else ++ { ++ const char *attr = xatrs; ++ static size_t asz = 1024; ++ static char *val = NULL; ++ ++ if (!val) ++ val = x2nrealloc (val, &asz, 1); ++ ++ while (xret > 0) ++ { ++ size_t len = strlen (attr); ++ ssize_t aret = 0; ++ ++ /* Archive all xattrs during creation, decide at extraction time ++ * which ones are of interest/use for the target filesystem. */ ++ while (((fd == 0) ++ ? ((aret = lgetxattrat (parentfd, file_name, attr, ++ val, asz)) == -1) ++ : ((aret = fgetxattr (fd, attr, val, asz)) == -1)) ++ && (errno == ERANGE)) ++ { ++ val = x2nrealloc (val, &asz, 1); ++ } ++ ++ if (aret != -1) ++ xheader_xattr_add (st, attr, val, aret); ++ else if (errno != ENOATTR) ++ call_arg_warn ((fd == 0) ? "lgetxattrat" ++ : "fgetxattr", file_name); ++ ++ attr += len + 1; ++ xret -= len + 1; ++ } ++ } ++#endif ++ } ++} ++ ++#ifdef HAVE_XATTRS ++static void ++xattrs__fd_set (struct tar_stat_info const *st, ++ char const *file_name, char typeflag, ++ const char *attr, const char *ptr, size_t len) ++{ ++ if (ptr) ++ { ++ const char *sysname = "setxattrat"; ++ int ret = -1; ++ ++ if (typeflag != SYMTYPE) ++ ret = setxattrat (chdir_fd, file_name, attr, ptr, len, 0); ++ else ++ { ++ sysname = "lsetxattr"; ++ ret = lsetxattrat (chdir_fd, file_name, attr, ptr, len, 0); ++ } ++ ++ if (ret == -1) ++ WARNOPT (WARN_XATTR_WRITE, ++ (0, errno, ++ _("%s: Cannot set '%s' extended attribute for file '%s'"), ++ sysname, attr, file_name)); ++ } ++} ++#endif ++ ++static bool ++xattrs_matches_mask (const char *kw, struct xattrs_mask_map *mm) ++{ ++ int i; ++ ++ if (!mm->size) ++ return false; ++ ++ for (i = 0; i < mm->used; i++) ++ if (fnmatch (mm->masks[i], kw, 0) == 0) ++ return true; ++ ++ return false; ++} ++ ++#define USER_DOT_PFX "user." ++ ++static bool ++xattrs_kw_included (const char *kw, bool archiving) ++{ ++ if (xattrs_setup.incl.size) ++ return xattrs_matches_mask (kw, &xattrs_setup.incl); ++ else if (archiving) ++ return true; ++ else ++ return strncmp (kw, USER_DOT_PFX, sizeof (USER_DOT_PFX) - 1) == 0; ++} ++ ++static bool ++xattrs_kw_excluded (const char *kw, bool archiving) ++{ ++ return xattrs_setup.excl.size ? ++ xattrs_matches_mask (kw, &xattrs_setup.excl) : false; ++} ++ ++/* Check whether the xattr with keyword KW should be discarded from list of ++ attributes that are going to be archived/excluded (set ARCHIVING=true for ++ archiving, false for excluding) */ ++static bool ++xattrs_masked_out (const char *kw, bool archiving) ++{ ++ return xattrs_kw_included (kw, archiving) ? ++ xattrs_kw_excluded (kw, archiving) : true; ++} ++ ++void ++xattrs_xattrs_set (struct tar_stat_info const *st, ++ char const *file_name, char typeflag, int later_run) ++{ ++ if (xattrs_option > 0) ++ { ++#ifndef HAVE_XATTRS ++ static int done = 0; ++ if (!done) ++ WARN ((0, 0, _("XATTR support is not available"))); ++ done = 1; ++#else ++ size_t scan = 0; ++ ++ if (!st->xattr_map_size) ++ return; ++ ++ for (; scan < st->xattr_map_size; ++scan) ++ { ++ char *keyword = st->xattr_map[scan].xkey; ++ keyword += strlen ("SCHILY.xattr."); ++ ++ /* TODO: this 'later_run' workaround is temporary solution -> once ++ capabilities should become fully supported by it's API and there ++ should exist something like xattrs_capabilities_set() call. ++ For a regular files: all extended attributes are restored during ++ the first run except 'security.capability' which is restored in ++ 'later_run == 1'. */ ++ if (typeflag == REGTYPE ++ && later_run == !!strcmp (keyword, "security.capability")) ++ continue; ++ ++ if (xattrs_masked_out (keyword, false /* extracting */ )) ++ /* we don't want to restore this keyword */ ++ continue; ++ ++ xattrs__fd_set (st, file_name, typeflag, keyword, ++ st->xattr_map[scan].xval_ptr, ++ st->xattr_map[scan].xval_len); ++ } ++#endif ++ } ++} ++ ++void ++xattrs_print_char (struct tar_stat_info const *st, char *output) ++{ ++ int i; ++ ++ if (verbose_option < 2) ++ { ++ *output = 0; ++ return; ++ } ++ ++ if (xattrs_option > 0 ) ++ { ++ /* placeholders */ ++ *output = ' '; ++ output[1] = 0; ++ } ++ ++ if (xattrs_option > 0 && st->xattr_map_size) ++ for (i = 0; i < st->xattr_map_size; ++i) ++ { ++ char *keyword = st->xattr_map[i].xkey + strlen ("SCHILY.xattr."); ++ if (!xattrs_masked_out (keyword, false /* like extracting */ )) ++ { ++ *output = '*'; ++ break; ++ } ++ } ++} ++ ++void ++xattrs_print (struct tar_stat_info const *st) ++{ ++ if (verbose_option < 3) ++ return; ++ ++ /* xattrs */ ++ if (xattrs_option && st->xattr_map_size) ++ { ++ int i; ++ ++ for (i = 0; i < st->xattr_map_size; ++i) ++ { ++ char *keyword = st->xattr_map[i].xkey + strlen ("SCHILY.xattr."); ++ if (!xattrs_masked_out (keyword, false /* like extracting */ )) ++ fprintf (stdlis, " x: %lu %s\n", ++ (unsigned long) st->xattr_map[i].xval_len, keyword); ++ } ++ } ++} +Index: tar-1.26/src/xattrs.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/src/xattrs.h 2014-04-29 17:14:50.010704536 +0000 +@@ -0,0 +1,50 @@ ++/* Support for extended attributes. ++ ++ Copyright (C) 2006-2013 Free Software Foundation, Inc. ++ ++ This file is part of GNU tar. ++ ++ GNU tar is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ GNU tar is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . ++ ++ Written by James Antill, on 2006-07-27. */ ++ ++#ifndef GUARD_XATTTRS_H ++#define GUARD_XATTTRS_H ++ ++/* Add include/exclude fnmatch pattern for xattr key domain. Set INCL parameter ++ to true/false if you want to add include/exclude pattern */ ++extern void xattrs_mask_add (const char *mask, bool incl); ++ ++/* clear helping structures when tar finishes */ ++extern void xattrs_clear_setup (void); ++ ++extern void xattrs_acls_get (int parentfd, char const *file_name, ++ struct tar_stat_info *st, int fd, int xisfile); ++extern void xattrs_selinux_get (int parentfd, char const *file_name, ++ struct tar_stat_info *st, int fd); ++extern void xattrs_xattrs_get (int parentfd, char const *file_name, ++ struct tar_stat_info *st, int fd); ++ ++extern void xattrs_acls_set (struct tar_stat_info const *st, ++ char const *file_name, char typeflag); ++extern void xattrs_selinux_set (struct tar_stat_info const *st, ++ char const *file_name, char typeflag); ++extern void xattrs_xattrs_set (struct tar_stat_info const *st, ++ char const *file_name, char typeflag, ++ int later_run); ++ ++extern void xattrs_print_char (struct tar_stat_info const *st, char *output); ++extern void xattrs_print (struct tar_stat_info const *st); ++ ++#endif /* GUARD_XATTTRS_H */ +Index: tar-1.26/src/xheader.c +=================================================================== +--- tar-1.26.orig/src/xheader.c 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/src/xheader.c 2014-04-29 22:06:17.196206806 +0000 +@@ -460,6 +460,117 @@ + } + } + ++void ++xheader_xattr_init (struct tar_stat_info *st) ++{ ++ st->xattr_map = NULL; ++ st->xattr_map_size = 0; ++} ++ ++void ++xheader_xattr_free (struct xattr_array *xattr_map, size_t xattr_map_size) ++{ ++ size_t scan = 0; ++ ++ while (scan < xattr_map_size) ++ { ++ free (xattr_map[scan].xkey); ++ free (xattr_map[scan].xval_ptr); ++ ++ ++scan; ++ } ++ free (xattr_map); ++} ++ ++static void ++xheader_xattr__add (struct xattr_array **xattr_map, ++ size_t *xattr_map_size, ++ const char *key, const char *val, size_t len) ++{ ++ size_t pos = (*xattr_map_size)++; ++ ++ *xattr_map = xrealloc (*xattr_map, ++ *xattr_map_size * sizeof(struct xattr_array)); ++ (*xattr_map)[pos].xkey = xstrdup (key); ++ (*xattr_map)[pos].xval_ptr = xmemdup (val, len + 1); ++ (*xattr_map)[pos].xval_len = len; ++} ++ ++/* This is reversal function for xattr_encode_keyword. See comment for ++ xattr_encode_keyword() for more info. */ ++static void ++xattr_decode_keyword (char *keyword) ++{ ++ char *kpr, *kpl; /* keyword pointer left/right */ ++ kpr = kpl = keyword; ++ ++ for (;;) ++ { ++ if (*kpr == '%') ++ { ++ if (kpr[1] == '3' && kpr[2] == 'D') ++ { ++ *kpl = '='; ++ kpr += 3; ++ kpl ++; ++ continue; ++ } ++ else if (kpr[1] == '2' && kpr[2] == '5') ++ { ++ *kpl = '%'; ++ kpr += 3; ++ kpl ++; ++ continue; ++ } ++ } ++ ++ *kpl = *kpr; ++ ++ if (*kpr == 0) ++ break; ++ ++ kpr++; ++ kpl++; ++ } ++} ++ ++void ++xheader_xattr_add (struct tar_stat_info *st, ++ const char *key, const char *val, size_t len) ++{ ++ size_t klen = strlen (key); ++ char *xkey = xmalloc (strlen("SCHILY.xattr.") + klen + 1); ++ char *tmp = xkey; ++ ++ tmp = stpcpy (tmp, "SCHILY.xattr."); ++ stpcpy (tmp, key); ++ ++ xheader_xattr__add (&st->xattr_map, &st->xattr_map_size, xkey, val, len); ++ ++ free (xkey); ++} ++ ++void ++xheader_xattr_copy (const struct tar_stat_info *st, ++ struct xattr_array **xattr_map, size_t *xattr_map_size) ++{ ++ size_t scan = 0; ++ ++ *xattr_map = NULL; ++ *xattr_map_size = 0; ++ ++ while (scan < st->xattr_map_size) ++ { ++ char *key = st->xattr_map[scan].xkey; ++ char *val = st->xattr_map[scan].xval_ptr; ++ size_t len = st->xattr_map[scan].xval_len; ++ ++ xheader_xattr__add(xattr_map, xattr_map_size, key, val, len); ++ ++ ++scan; ++ } ++} ++ + + /* General Interface */ + +@@ -473,6 +584,7 @@ + struct xheader *, void const *data); + void (*decoder) (struct tar_stat_info *, char const *, char const *, size_t); + int flags; ++ bool prefix; /* select handler comparing prefix only */ + }; + + /* This declaration must be extern, because ISO C99 section 6.9.2 +@@ -489,8 +601,17 @@ + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if (strcmp (p->keyword, keyword) == 0) +- return p; ++ if (p->prefix) ++ { ++ if (strncmp (p->keyword, keyword, strlen(p->keyword)) == 0) ++ return p; ++ } ++ else ++ { ++ if (strcmp (p->keyword, keyword) == 0) ++ return p; ++ } ++ + return NULL; + } + +@@ -500,7 +621,8 @@ + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if ((p->flags & XHDR_PROTECTED) && fnmatch (pattern, p->keyword, 0) == 0) ++ if (!p->prefix && (p->flags & XHDR_PROTECTED) ++ && fnmatch (pattern, p->keyword, 0) == 0) + return true; + return false; + } +@@ -511,7 +633,8 @@ + struct xhdr_tab const *p; + + for (p = xhdr_tab; p->keyword; p++) +- if ((p->flags & XHDR_PROTECTED) && strcmp (p->keyword, keyword) == 0) ++ if (!p->prefix && (p->flags & XHDR_PROTECTED) ++ && strcmp (p->keyword, keyword) == 0) + return true; + return false; + } +@@ -1228,6 +1351,36 @@ + } + + static void ++xattr_coder (struct tar_stat_info const *st, char const *keyword, ++ struct xheader *xhdr, void const *data) ++{ ++ struct xattr_array *xattr_map = st->xattr_map; ++ const size_t *off = data; ++ xheader_print_n (xhdr, keyword, ++ xattr_map[*off].xval_ptr, xattr_map[*off].xval_len); ++} ++ ++static void ++xattr_decoder (struct tar_stat_info *st, ++ char const *keyword, char const *arg, size_t size) ++{ ++ char *xstr, *xkey; ++ ++ /* copy keyword */ ++ size_t klen_raw = strlen (keyword); ++ xkey = alloca (klen_raw + 1); ++ memcpy (xkey, keyword, klen_raw + 1) /* including null-terminating */; ++ ++ /* copy value */ ++ xstr = alloca (size + 1); ++ memcpy (xstr, arg, size + 1); /* separator included, for GNU tar '\n' */; ++ ++ xattr_decode_keyword (xkey); ++ ++ xheader_xattr_add (st, xkey + strlen("SCHILY.xattr."), xstr, size); ++} ++ ++static void + sparse_size_coder (struct tar_stat_info const *st, char const *keyword, + struct xheader *xhdr, void const *data) + { +@@ -1506,53 +1659,53 @@ + } + + struct xhdr_tab const xhdr_tab[] = { +- { "atime", atime_coder, atime_decoder, 0 }, +- { "comment", dummy_coder, dummy_decoder, 0 }, +- { "charset", dummy_coder, dummy_decoder, 0 }, +- { "ctime", ctime_coder, ctime_decoder, 0 }, +- { "gid", gid_coder, gid_decoder, 0 }, +- { "gname", gname_coder, gname_decoder, 0 }, +- { "linkpath", linkpath_coder, linkpath_decoder, 0 }, +- { "mtime", mtime_coder, mtime_decoder, 0 }, +- { "path", path_coder, path_decoder, 0 }, +- { "size", size_coder, size_decoder, 0 }, +- { "uid", uid_coder, uid_decoder, 0 }, +- { "uname", uname_coder, uname_decoder, 0 }, ++ { "atime", atime_coder, atime_decoder, 0, false }, ++ { "comment", dummy_coder, dummy_decoder, 0, false }, ++ { "charset", dummy_coder, dummy_decoder, 0, false }, ++ { "ctime", ctime_coder, ctime_decoder, 0, false }, ++ { "gid", gid_coder, gid_decoder, 0, false }, ++ { "gname", gname_coder, gname_decoder, 0, false }, ++ { "linkpath", linkpath_coder, linkpath_decoder, 0, false }, ++ { "mtime", mtime_coder, mtime_decoder, 0, false }, ++ { "path", path_coder, path_decoder, 0, false }, ++ { "size", size_coder, size_decoder, 0, false }, ++ { "uid", uid_coder, uid_decoder, 0, false }, ++ { "uname", uname_coder, uname_decoder, 0, false }, + + /* Sparse file handling */ + { "GNU.sparse.name", path_coder, path_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + { "GNU.sparse.major", sparse_major_coder, sparse_major_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + { "GNU.sparse.minor", sparse_minor_coder, sparse_minor_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + { "GNU.sparse.realsize", sparse_size_coder, sparse_size_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + { "GNU.sparse.numblocks", sparse_numblocks_coder, sparse_numblocks_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + + /* tar 1.14 - 1.15.90 keywords. */ + { "GNU.sparse.size", sparse_size_coder, sparse_size_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + /* tar 1.14 - 1.15.1 keywords. Multiple instances of these appeared in 'x' + headers, and each of them was meaningful. It confilcted with POSIX specs, + which requires that "when extended header records conflict, the last one + given in the header shall take precedence." */ + { "GNU.sparse.offset", sparse_offset_coder, sparse_offset_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + { "GNU.sparse.numbytes", sparse_numbytes_coder, sparse_numbytes_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + /* tar 1.15.90 keyword, introduced to remove the above-mentioned conflict. */ + { "GNU.sparse.map", NULL /* Unused, see pax_dump_header() */, +- sparse_map_decoder, 0 }, ++ sparse_map_decoder, 0, false }, + + { "GNU.dumpdir", dumpdir_coder, dumpdir_decoder, +- XHDR_PROTECTED }, ++ XHDR_PROTECTED, false }, + + /* Keeps the tape/volume label. May be present only in the global headers. + Equivalent to GNUTYPE_VOLHDR. */ + { "GNU.volume.label", volume_label_coder, volume_label_decoder, +- XHDR_PROTECTED | XHDR_GLOBAL }, ++ XHDR_PROTECTED | XHDR_GLOBAL, false }, + + /* These may be present in a first global header of the archive. + They provide the same functionality as GNUTYPE_MULTIVOL header. +@@ -1561,11 +1714,16 @@ + GNU.volume.offset keeps the offset of the start of this volume, + otherwise kept in oldgnu_header.offset. */ + { "GNU.volume.filename", volume_label_coder, volume_filename_decoder, +- XHDR_PROTECTED | XHDR_GLOBAL }, ++ XHDR_PROTECTED | XHDR_GLOBAL, false }, + { "GNU.volume.size", volume_size_coder, volume_size_decoder, +- XHDR_PROTECTED | XHDR_GLOBAL }, ++ XHDR_PROTECTED | XHDR_GLOBAL, false }, + { "GNU.volume.offset", volume_offset_coder, volume_offset_decoder, +- XHDR_PROTECTED | XHDR_GLOBAL }, ++ XHDR_PROTECTED | XHDR_GLOBAL, false }, ++ ++ /* We are storing all extended attributes using this rule even if some of them ++ were stored by some previous rule (duplicates) -- we just have to make sure ++ they are restored *only once* during extraction later on. */ ++ { "SCHILY.xattr", xattr_coder, xattr_decoder, 0, true }, + + { NULL, NULL, NULL, 0 } + }; +Index: tar-1.26/configure +=================================================================== +--- tar-1.26.orig/configure 2011-08-17 17:38:55.000000000 +0000 ++++ tar-1.26/configure 2014-04-29 20:41:56.501452777 +0000 +@@ -1,20 +1,24 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.63 for GNU tar 1.26. ++# Generated by GNU Autoconf 2.68 for GNU tar 1.26. + # + # Report bugs to . + # ++# + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software ++# Foundation, Inc. ++# ++# + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which +@@ -22,23 +26,15 @@ + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- + as_nl=' + ' + export as_nl +@@ -46,7 +42,13 @@ + as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo + as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++# Prefer a ksh shell builtin over an external printf program on Solaris, ++# but without wasting forks for bash or zsh. ++if test -z "$BASH_VERSION$ZSH_VERSION" \ ++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='print -r --' ++ as_echo_n='print -rn --' ++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' + else +@@ -57,7 +59,7 @@ + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; +- case $arg in ++ case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; +@@ -80,13 +82,6 @@ + } + fi + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false +-fi +- + + # IFS + # We need space, tab and new line, in precisely that order. Quoting is +@@ -96,15 +91,16 @@ + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +-case $0 in ++as_myself= ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -116,12 +112,16 @@ + fi + if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' +@@ -133,330 +133,307 @@ + LANGUAGE=C + export LANGUAGE + +-# Required to use basename. +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi +- +-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then +- as_basename=basename +-else +- as_basename=false +-fi +- +- +-# Name of the executable. +-as_me=`$as_basename -- "$0" || +-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ +- X"$0" : 'X\(//\)$' \| \ +- X"$0" : 'X\(/\)' \| . 2>/dev/null || +-$as_echo X/"$0" | +- sed '/^.*\/\([^/][^/]*\)\/*$/{ +- s//\1/ +- q +- } +- /^X\/\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\/\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- + # CDPATH. +-$as_unset CDPATH +- ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + if test "x$CONFIG_SHELL" = x; then +- if (eval ":") 2>/dev/null; then +- as_have_required=yes ++ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : ++ emulate sh ++ NULLCMD=: ++ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which ++ # is contrary to our usage. Disable this feature. ++ alias -g '\${1+\"\$@\"}'='\"\$@\"' ++ setopt NO_GLOB_SUBST + else +- as_have_required=no ++ case \`(set -o) 2>/dev/null\` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; ++esac + fi +- +- if test $as_have_required = yes && (eval ": +-(as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} ++" ++ as_required="as_fn_return () { (exit \$1); } ++as_fn_success () { as_fn_return 0; } ++as_fn_failure () { as_fn_return 1; } ++as_fn_ret_success () { return 0; } ++as_fn_ret_failure () { return 1; } + + exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi +- +-if as_func_ret_success; then +- : +-else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi +- +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : ++as_fn_success || { exitcode=1; echo as_fn_success failed.; } ++as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } ++as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } ++as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } ++if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : ++ ++else ++ exitcode=1; echo positional parameters were not saved. ++fi ++test x\$exitcode = x0 || exit 1" ++ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO ++ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO ++ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && ++ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 ++test \$(( 1 + 1 )) = 2 || exit 1" ++ if (eval "$as_required") 2>/dev/null; then : ++ as_have_required=yes + else +- exitcode=1 +- echo positional parameters were not saved. ++ as_have_required=no + fi ++ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +-test \$exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=\$LINENO +- as_lineno_2=\$LINENO +- test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && +- test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +-") 2> /dev/null; then +- : + else +- as_candidate_shells= +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++as_found=false + for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- case $as_dir in ++ as_found=: ++ case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do +- as_candidate_shells="$as_candidate_shells $as_dir/$as_base" ++ # Try only shells that exist, to save several forks. ++ as_shell=$as_dir/$as_base ++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ CONFIG_SHELL=$as_shell as_have_required=yes ++ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : ++ break 2 ++fi ++fi + done;; + esac ++ as_found=false + done ++$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && ++ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : ++ CONFIG_SHELL=$SHELL as_have_required=yes ++fi; } + IFS=$as_save_IFS + + +- for as_shell in $as_candidate_shells $SHELL; do +- # Try only shells that exist, to save several forks. +- if { test -f "$as_shell" || test -f "$as_shell.exe"; } && +- { ("$as_shell") 2> /dev/null <<\_ASEOF +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +- emulate sh +- NULLCMD=: +- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +- setopt NO_GLOB_SUBST +-else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; +-esac +- +-fi +- +- +-: +-_ASEOF +-}; then +- CONFIG_SHELL=$as_shell +- as_have_required=yes +- if { "$as_shell" 2> /dev/null <<\_ASEOF +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +- emulate sh +- NULLCMD=: +- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which +- # is contrary to our usage. Disable this feature. +- alias -g '${1+"$@"}'='"$@"' +- setopt NO_GLOB_SUBST +-else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; +-esac +- +-fi +- +- +-: +-(as_func_return () { +- (exit $1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} +- +-exitcode=0 +-if as_func_success; then +- : +-else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. +-fi +- +-if as_func_ret_success; then +- : +-else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. +-fi +- +-if ( set x; as_func_ret_success y && test x = "$1" ); then +- : +-else +- exitcode=1 +- echo positional parameters were not saved. ++ if test "x$CONFIG_SHELL" != x; then : ++ # We cannot yet assume a decent shell, so we have to provide a ++ # neutralization value for shells without unset; and this also ++ # works around shells that cannot unset nonexistent variables. ++ # Preserve -v and -x to the replacement shell. ++ BASH_ENV=/dev/null ++ ENV=/dev/null ++ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++ export CONFIG_SHELL ++ case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++ esac ++ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + fi + +-test $exitcode = 0) || { (exit 1); exit 1; } +- +-( +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } +- +-_ASEOF +-}; then +- break ++ if test x$as_have_required = xno; then : ++ $as_echo "$0: This script requires a shell more modern than all" ++ $as_echo "$0: the shells that I found on your system." ++ if test x${ZSH_VERSION+set} = xset ; then ++ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" ++ $as_echo "$0: be upgraded to zsh 4.3.4 or later." ++ else ++ $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-tar@gnu.org ++$0: about your system, including any error possibly output ++$0: before this message. Then install a modern shell, or ++$0: manually run the script under such a shell if you do ++$0: have one." ++ fi ++ exit 1 + fi +- + fi +- +- done +- +- if test "x$CONFIG_SHELL" != x; then +- for as_var in BASH_ENV ENV +- do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +- done +- export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + fi ++SHELL=${CONFIG_SHELL-/bin/sh} ++export SHELL ++# Unset more variables known to interfere with behavior of common tools. ++CLICOLOR_FORCE= GREP_OPTIONS= ++unset CLICOLOR_FORCE GREP_OPTIONS + ++## --------------------- ## ++## M4sh Shell Functions. ## ++## --------------------- ## ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_mkdir_p ++# ------------- ++# Create "$as_dir" as a directory, including parents if necessary. ++as_fn_mkdir_p () ++{ + +- if test $as_have_required = no; then +- echo This script requires a shell more modern than all the +- echo shells that I found on your system. Please install a +- echo modern shell, or manually run the script under such a +- echo shell if you do have one. +- { (exit 1); exit 1; } +-fi +- ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || eval $as_mkdir_p || { ++ as_dirs= ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break ++ done ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + +-fi + +-fi ++} # as_fn_mkdir_p ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' ++else ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append + ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith + + +-(eval "as_func_return () { +- (exit \$1) +-} +-as_func_success () { +- as_func_return 0 +-} +-as_func_failure () { +- as_func_return 1 +-} +-as_func_ret_success () { +- return 0 +-} +-as_func_ret_failure () { +- return 1 +-} ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with STATUS, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 ++ fi ++ $as_echo "$as_me: error: $2" >&2 ++ as_fn_exit $as_status ++} # as_fn_error + +-exitcode=0 +-if as_func_success; then +- : ++if expr a : '\(a\)' >/dev/null 2>&1 && ++ test "X`expr 00001 : '.*\(...\)'`" = X001; then ++ as_expr=expr + else +- exitcode=1 +- echo as_func_success failed. +-fi +- +-if as_func_failure; then +- exitcode=1 +- echo as_func_failure succeeded. ++ as_expr=false + fi + +-if as_func_ret_success; then +- : ++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then ++ as_basename=basename + else +- exitcode=1 +- echo as_func_ret_success failed. +-fi +- +-if as_func_ret_failure; then +- exitcode=1 +- echo as_func_ret_failure succeeded. ++ as_basename=false + fi + +-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then +- : ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname + else +- exitcode=1 +- echo positional parameters were not saved. ++ as_dirname=false + fi + +-test \$exitcode = 0") || { +- echo No shell found that supports shell functions. +- echo Please tell bug-autoconf@gnu.org about your system, +- echo including any error possibly output before this message. +- echo This can help us improve future autoconf versions. +- echo Configuration will now proceed without shell functions. +-} ++as_me=`$as_basename -- "$0" || ++$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ ++ X"$0" : 'X\(//\)$' \| \ ++ X"$0" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X/"$0" | ++ sed '/^.*\/\([^/][^/]*\)\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\/\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` + ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) ++ as_lineno_1=$LINENO as_lineno_1a=$LINENO ++ as_lineno_2=$LINENO as_lineno_2a=$LINENO ++ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && ++ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { ++ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= +@@ -473,8 +450,7 @@ + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || +- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } ++ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the +@@ -484,29 +460,18 @@ + exit + } + +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi +- + ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in ++case `echo -n x` in #((((( + -n*) +- case `echo 'x\c'` in ++ case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; ++ xy) ECHO_C='\c';; ++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ++ ECHO_T=' ';; + esac;; + *) + ECHO_N='-n';; + esac +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi + + rm -f conf$$ conf$$.exe conf$$.file + if test -d conf$$.dir; then +@@ -536,7 +501,7 @@ + rmdir conf$$.dir 2>/dev/null + + if mkdir -p . 2>/dev/null; then +- as_mkdir_p=: ++ as_mkdir_p='mkdir -p "$as_dir"' + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +@@ -555,10 +520,10 @@ + if test -d "$1"; then + test -d "$1/."; + else +- case $1 in ++ case $1 in #( + -*)set "./$1";; + esac; +- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +@@ -572,11 +537,11 @@ + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +- +-exec 7<&0 &1 ++test -n "$DJDIR" || exec 7<&0 &1 + + # Name of the host. +-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +@@ -591,7 +556,6 @@ + subdirs= + MFLAGS= + MAKEFLAGS= +-SHELL=${CONFIG_SHELL-/bin/sh} + + # Identity of this package. + PACKAGE_NAME='GNU tar' +@@ -599,6 +563,7 @@ + PACKAGE_VERSION='1.26' + PACKAGE_STRING='GNU tar 1.26' + PACKAGE_BUGREPORT='bug-tar@gnu.org' ++PACKAGE_URL='http://www.gnu.org/software/tar/' + + ac_unique_file="src/tar.c" + # Factoring default headers for most tests. +@@ -674,6 +639,8 @@ + DEFAULT_ARCHIVE + DEFAULT_ARCHIVE_FORMAT + LIBOBJS ++TAR_COND_XATTR_H_FALSE ++TAR_COND_XATTR_H_TRUE + DEFAULT_RMT_COMMAND + DEFAULT_RMT_DIR + PU_RMT_PROG +@@ -1332,6 +1299,7 @@ + am__fastdepCC_FALSE + am__fastdepCC_TRUE + CCDEPMODE ++am__nodep + AMDEPBACKSLASH + AMDEP_FALSE + AMDEP_TRUE +@@ -1347,6 +1315,8 @@ + CC + AM_BACKSLASH + AM_DEFAULT_VERBOSITY ++AM_DEFAULT_V ++AM_V + am__untar + am__tar + AMTAR +@@ -1400,6 +1370,7 @@ + program_transform_name + prefix + exec_prefix ++PACKAGE_URL + PACKAGE_BUGREPORT + PACKAGE_STRING + PACKAGE_VERSION +@@ -1418,6 +1389,7 @@ + with_packager_version + with_packager_bug_reports + with_rmt ++with_xattrs + with_compress + with_gzip + with_bzip2 +@@ -1510,8 +1482,9 @@ + fi + + case $ac_option in +- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +- *) ac_optarg=yes ;; ++ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *=) ac_optarg= ;; ++ *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +@@ -1556,8 +1529,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1583,8 +1555,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1788,8 +1759,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1805,8 +1775,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1836,17 +1805,17 @@ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) { $as_echo "$as_me: error: unrecognized option: $ac_option +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ++ -*) as_fn_error $? "unrecognized option: \`$ac_option' ++Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. +- expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && +- { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 +- { (exit 1); exit 1; }; } ++ case $ac_envvar in #( ++ '' | [0-9]* | *[!_$as_cr_alnum]* ) ++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; ++ esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + +@@ -1855,7 +1824,7 @@ + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ++ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +@@ -1863,15 +1832,13 @@ + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- { $as_echo "$as_me: error: missing argument to $ac_option" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "missing argument to $ac_option" + fi + + if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; +- fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 +- { (exit 1); exit 1; }; } ;; ++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac + fi +@@ -1894,8 +1861,7 @@ + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +- { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -1909,8 +1875,8 @@ + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. +- If a cross compiler is detected then cross compile mode will be used." >&2 ++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +@@ -1925,11 +1891,9 @@ + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +- { $as_echo "$as_me: error: working directory cannot be determined" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. +@@ -1968,13 +1932,11 @@ + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +- { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 +- { (exit 1); exit 1; }; } ++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +@@ -2014,7 +1976,7 @@ + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +- -q, --quiet, --silent do not print \`checking...' messages ++ -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +@@ -2100,6 +2062,7 @@ + Packager info for bug reports (URL/e-mail/...) + --with-rmt=FILE Use FILE as the default `rmt' program. Do not build + included copy of `rmt'. ++ --without-xattrs don't use linux extended attributes + --with-compress=PROG use PROG as compress compressor program + --with-gzip=PROG use PROG as gzip compressor program + --with-bzip2=PROG use PROG as bzip2 compressor program +@@ -2119,10 +2082,11 @@ + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l +- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory +- YACC The `Yet Another C Compiler' implementation to use. Defaults to +- the first program found out of: `bison -y', `byacc', `yacc'. ++ YACC The `Yet Another Compiler Compiler' implementation to use. ++ Defaults to the first program found out of: `bison -y', `byacc', ++ `yacc'. + YFLAGS The list of arguments that will be passed by default to $YACC. + This script will default YFLAGS to the empty string to avoid a + default value of `-d' given by some make applications. +@@ -2146,6 +2110,8 @@ + it to find libraries and programs with nonstandard names/locations. + + Report bugs to . ++GNU tar home page: . ++General help using GNU software: . + _ACEOF + ac_status=$? + fi +@@ -2209,194 +2175,878 @@ + if $ac_init_version; then + cat <<\_ACEOF + GNU tar configure 1.26 +-generated by GNU Autoconf 2.63 ++generated by GNU Autoconf 2.68 + +-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF + exit + fi +-cat >config.log <<_ACEOF +-This file contains any messages produced by compilers while +-running configure, to aid debugging if configure makes a mistake. + +-It was created by GNU tar $as_me 1.26, which was +-generated by GNU Autoconf 2.63. Invocation command line was ++## ------------------------ ## ++## Autoconf initialization. ## ++## ------------------------ ## ++ ++# ac_fn_c_try_compile LINENO ++# -------------------------- ++# Try to compile conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext ++ if { { ac_try="$ac_compile" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compile") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest.$ac_objext; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + +- $ $0 $@ ++ ac_retval=1 ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + +-_ACEOF +-exec 5>>config.log ++} # ac_fn_c_try_compile ++ ++# ac_fn_c_try_cpp LINENO ++# ---------------------- ++# Try to preprocess conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_cpp () + { +-cat <<_ASUNAME +-## --------- ## +-## Platform. ## +-## --------- ## ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_cpp conftest.$ac_ext" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } > conftest.i && { ++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || ++ test ! -s conftest.err ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + +-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +-uname -m = `(uname -m) 2>/dev/null || echo unknown` +-uname -r = `(uname -r) 2>/dev/null || echo unknown` +-uname -s = `(uname -s) 2>/dev/null || echo unknown` +-uname -v = `(uname -v) 2>/dev/null || echo unknown` ++ ac_retval=1 ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + +-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +-/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ++} # ac_fn_c_try_cpp + +-/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +-/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +-/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +-/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ++# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists, giving a warning if it cannot be compiled using ++# the include files in INCLUDES and setting the cache variable VAR ++# accordingly. ++ac_fn_c_check_header_mongrel () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if eval \${$3+:} false; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++else ++ # Is the header compilable? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 ++$as_echo_n "checking $2 usability... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_header_compiler=yes ++else ++ ac_header_compiler=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 ++$as_echo "$ac_header_compiler" >&6; } + +-_ASUNAME ++# Is the header present? ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 ++$as_echo_n "checking $2 presence... " >&6; } ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include <$2> ++_ACEOF ++if ac_fn_c_try_cpp "$LINENO"; then : ++ ac_header_preproc=yes ++else ++ ac_header_preproc=no ++fi ++rm -f conftest.err conftest.i conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 ++$as_echo "$ac_header_preproc" >&6; } + +-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- $as_echo "PATH: $as_dir" +-done +-IFS=$as_save_IFS ++# So? What about this header? ++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( ++ yes:no: ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 ++$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++ ;; ++ no:yes:* ) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 ++$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 ++$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 ++$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 ++$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 ++$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ++( $as_echo "## ------------------------------ ## ++## Report this to bug-tar@gnu.org ## ++## ------------------------------ ##" ++ ) | sed "s/^/$as_me: WARNING: /" >&2 ++ ;; ++esac ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=\$ac_header_compiler" ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++fi ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +-} >&5 ++} # ac_fn_c_check_header_mongrel + +-cat >&5 <<_ACEOF ++# ac_fn_c_try_run LINENO ++# ---------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes ++# that executables *can* be run. ++ac_fn_c_try_run () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' ++ { { case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: program exited with status $ac_status" >&5 ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + ++ ac_retval=$ac_status ++fi ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + +-## ----------- ## +-## Core tests. ## +-## ----------- ## ++} # ac_fn_c_try_run + ++# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES ++# ------------------------------------------------------- ++# Tests whether HEADER exists and can be compiled using the include files in ++# INCLUDES, setting the cache variable VAR accordingly. ++ac_fn_c_check_header_compile () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++#include <$2> + _ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + ++} # ac_fn_c_check_header_compile + +-# Keep a trace of the command line. +-# Strip out --no-create and --no-recursion so they do not pile up. +-# Strip out --silent because we don't want to record it for future runs. +-# Also quote any args containing shell meta-characters. +-# Make two passes to allow for proper duplicate-argument suppression. +-ac_configure_args= +-ac_configure_args0= +-ac_configure_args1= +-ac_must_keep_next=false +-for ac_pass in 1 2 +-do +- for ac_arg +- do +- case $ac_arg in +- -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; +- -q | -quiet | --quiet | --quie | --qui | --qu | --q \ +- | -silent | --silent | --silen | --sile | --sil) +- continue ;; +- *\'*) +- ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; +- esac +- case $ac_pass in +- 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; +- 2) +- ac_configure_args1="$ac_configure_args1 '$ac_arg'" +- if test $ac_must_keep_next = true; then +- ac_must_keep_next=false # Got value, back to normal. +- else +- case $ac_arg in +- *=* | --config-cache | -C | -disable-* | --disable-* \ +- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ +- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ +- | -with-* | --with-* | -without-* | --without-* | --x) +- case "$ac_configure_args0 " in +- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; +- esac +- ;; +- -* ) ac_must_keep_next=true ;; +- esac +- fi +- ac_configure_args="$ac_configure_args '$ac_arg'" +- ;; +- esac +- done +-done +-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +- +-# When interrupted or exit'd, cleanup temporary files, and complete +-# config.log. We remove comments because anyway the quotes in there +-# would cause problems or look ugly. +-# WARNING: Use '\'' to represent an apostrophe within the trap. +-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +-trap 'exit_status=$? +- # Save into config.log some information that might help in debugging. +- { +- echo ++# ac_fn_c_try_link LINENO ++# ----------------------- ++# Try to link conftest.$ac_ext, and return whether this succeeded. ++ac_fn_c_try_link () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ rm -f conftest.$ac_objext conftest$ac_exeext ++ if { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>conftest.err ++ ac_status=$? ++ if test -s conftest.err; then ++ grep -v '^ *+' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ mv -f conftest.er1 conftest.err ++ fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && { ++ test -z "$ac_c_werror_flag" || ++ test ! -s conftest.err ++ } && test -s conftest$ac_exeext && { ++ test "$cross_compiling" = yes || ++ $as_test_x conftest$ac_exeext ++ }; then : ++ ac_retval=0 ++else ++ $as_echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 + +- cat <<\_ASBOX +-## ---------------- ## +-## Cache variables. ## +-## ---------------- ## +-_ASBOX +- echo +- # The following way of writing the cache mishandles newlines in values, +-( +- for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do +- eval ac_val=\$$ac_var +- case $ac_val in #( +- *${as_nl}*) +- case $ac_var in #( +- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; +- esac +- case $ac_var in #( +- _ | IFS | as_nl) ;; #( +- BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( +- *) $as_unset $ac_var ;; +- esac ;; +- esac +- done +- (set) 2>&1 | +- case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( +- *${as_nl}ac_space=\ *) +- sed -n \ +- "s/'\''/'\''\\\\'\'''\''/g; +- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" +- ;; #( +- *) +- sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" +- ;; +- esac | +- sort +-) +- echo ++ ac_retval=1 ++fi ++ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information ++ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would ++ # interfere with the next link command; also delete a directory that is ++ # left behind by Apple's compiler. We do this before executing the actions. ++ rm -rf conftest.dSYM conftest_ipa8_conftest.oo ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + +- cat <<\_ASBOX +-## ----------------- ## +-## Output variables. ## +-## ----------------- ## +-_ASBOX +- echo +- for ac_var in $ac_subst_vars +- do +- eval ac_val=\$$ac_var +- case $ac_val in +- *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; +- esac +- $as_echo "$ac_var='\''$ac_val'\''" +- done | sort +- echo ++} # ac_fn_c_try_link + +- if test -n "$ac_subst_files"; then +- cat <<\_ASBOX +-## ------------------- ## +-## File substitutions. ## +-## ------------------- ## +-_ASBOX +- echo +- for ac_var in $ac_subst_files +- do +- eval ac_val=\$$ac_var ++# ac_fn_c_check_type LINENO TYPE VAR INCLUDES ++# ------------------------------------------- ++# Tests whether TYPE exists after having included INCLUDES, setting cache ++# variable VAR accordingly. ++ac_fn_c_check_type () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ eval "$3=no" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof ($2)) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++if (sizeof (($2))) ++ return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++else ++ eval "$3=yes" ++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 ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_type ++ ++# ac_fn_c_check_func LINENO FUNC VAR ++# ---------------------------------- ++# Tests whether FUNC exists, setting the cache variable VAR accordingly ++ac_fn_c_check_func () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 ++$as_echo_n "checking for $2... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Define $2 to an innocuous variant, in case declares $2. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $2 innocuous_$2 ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $2 (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $2 ++ ++/* 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 $2 (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined __stub_$2 || defined __stub___$2 ++choke me ++#endif ++ ++int ++main () ++{ ++return $2 (); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_func ++ ++# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES ++# --------------------------------------------- ++# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR ++# accordingly. ++ac_fn_c_check_decl () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ as_decl_name=`echo $2|sed 's/ *(.*//'` ++ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 ++$as_echo_n "checking whether $as_decl_name is declared... " >&6; } ++if eval \${$3+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++#ifndef $as_decl_name ++#ifdef __cplusplus ++ (void) $as_decl_use; ++#else ++ (void) $as_decl_name; ++#endif ++#endif ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$3=yes" ++else ++ eval "$3=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$3 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_decl ++ ++# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES ++# -------------------------------------------- ++# Tries to find the compile-time value of EXPR in a program that includes ++# INCLUDES, setting VAR accordingly. Returns whether the value could be ++# computed ++ac_fn_c_compute_int () ++{ ++ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ if test "$cross_compiling" = yes; then ++ # Depending upon the size, compute the lo and hi bounds. ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++static int test_array [1 - 2 * !(($2) >= 0)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_lo=0 ac_mid=0 ++ while :; do ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++static int test_array [1 - 2 * !(($2) <= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_hi=$ac_mid; break ++else ++ as_fn_arith $ac_mid + 1 && ac_lo=$as_val ++ if test $ac_lo -le $ac_mid; then ++ ac_lo= ac_hi= ++ break ++ fi ++ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ done ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++static int test_array [1 - 2 * !(($2) < 0)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_hi=-1 ac_mid=-1 ++ while :; do ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++static int test_array [1 - 2 * !(($2) >= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_lo=$ac_mid; break ++else ++ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val ++ if test $ac_mid -le $ac_hi; then ++ ac_lo= ac_hi= ++ break ++ fi ++ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ done ++else ++ ac_lo= ac_hi= ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++# Binary search between lo and hi bounds. ++while test "x$ac_lo" != "x$ac_hi"; do ++ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++int ++main () ++{ ++static int test_array [1 - 2 * !(($2) <= $ac_mid)]; ++test_array [0] = 0 ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_hi=$ac_mid ++else ++ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++done ++case $ac_lo in #(( ++?*) eval "$3=\$ac_lo"; ac_retval=0 ;; ++'') ac_retval=1 ;; ++esac ++ else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$4 ++static long int longval () { return $2; } ++static unsigned long int ulongval () { return $2; } ++#include ++#include ++int ++main () ++{ ++ ++ FILE *f = fopen ("conftest.val", "w"); ++ if (! f) ++ return 1; ++ if (($2) < 0) ++ { ++ long int i = longval (); ++ if (i != ($2)) ++ return 1; ++ fprintf (f, "%ld", i); ++ } ++ else ++ { ++ unsigned long int i = ulongval (); ++ if (i != ($2)) ++ return 1; ++ fprintf (f, "%lu", i); ++ } ++ /* Do not output a trailing newline, as this causes \r\n confusion ++ on some platforms. */ ++ return ferror (f) || fclose (f) != 0; ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ echo >>conftest.val; read $3 &5 ++$as_echo_n "checking for $2.$3... " >&6; } ++if eval \${$4+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$5 ++int ++main () ++{ ++static $2 ac_aggr; ++if (sizeof ac_aggr.$3) ++return 0; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$4=yes" ++else ++ eval "$4=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 ++eval ac_res=\$$4 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ ++} # ac_fn_c_check_member ++cat >config.log <<_ACEOF ++This file contains any messages produced by compilers while ++running configure, to aid debugging if configure makes a mistake. ++ ++It was created by GNU tar $as_me 1.26, which was ++generated by GNU Autoconf 2.68. Invocation command line was ++ ++ $ $0 $@ ++ ++_ACEOF ++exec 5>>config.log ++{ ++cat <<_ASUNAME ++## --------- ## ++## Platform. ## ++## --------- ## ++ ++hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` ++uname -m = `(uname -m) 2>/dev/null || echo unknown` ++uname -r = `(uname -r) 2>/dev/null || echo unknown` ++uname -s = `(uname -s) 2>/dev/null || echo unknown` ++uname -v = `(uname -v) 2>/dev/null || echo unknown` ++ ++/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` ++/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ++ ++/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` ++/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` ++/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` ++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` ++/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` ++/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` ++/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ++ ++_ASUNAME ++ ++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ $as_echo "PATH: $as_dir" ++ done ++IFS=$as_save_IFS ++ ++} >&5 ++ ++cat >&5 <<_ACEOF ++ ++ ++## ----------- ## ++## Core tests. ## ++## ----------- ## ++ ++_ACEOF ++ ++ ++# Keep a trace of the command line. ++# Strip out --no-create and --no-recursion so they do not pile up. ++# Strip out --silent because we don't want to record it for future runs. ++# Also quote any args containing shell meta-characters. ++# Make two passes to allow for proper duplicate-argument suppression. ++ac_configure_args= ++ac_configure_args0= ++ac_configure_args1= ++ac_must_keep_next=false ++for ac_pass in 1 2 ++do ++ for ac_arg ++ do ++ case $ac_arg in ++ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; ++ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ | -silent | --silent | --silen | --sile | --sil) ++ continue ;; ++ *\'*) ++ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ esac ++ case $ac_pass in ++ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; ++ 2) ++ as_fn_append ac_configure_args1 " '$ac_arg'" ++ if test $ac_must_keep_next = true; then ++ ac_must_keep_next=false # Got value, back to normal. ++ else ++ case $ac_arg in ++ *=* | --config-cache | -C | -disable-* | --disable-* \ ++ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ ++ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ ++ | -with-* | --with-* | -without-* | --without-* | --x) ++ case "$ac_configure_args0 " in ++ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; ++ esac ++ ;; ++ -* ) ac_must_keep_next=true ;; ++ esac ++ fi ++ as_fn_append ac_configure_args " '$ac_arg'" ++ ;; ++ esac ++ done ++done ++{ ac_configure_args0=; unset ac_configure_args0;} ++{ ac_configure_args1=; unset ac_configure_args1;} ++ ++# When interrupted or exit'd, cleanup temporary files, and complete ++# config.log. We remove comments because anyway the quotes in there ++# would cause problems or look ugly. ++# WARNING: Use '\'' to represent an apostrophe within the trap. ++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. ++trap 'exit_status=$? ++ # Save into config.log some information that might help in debugging. ++ { ++ echo ++ ++ $as_echo "## ---------------- ## ++## Cache variables. ## ++## ---------------- ##" ++ echo ++ # The following way of writing the cache mishandles newlines in values, ++( ++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do ++ eval ac_val=\$$ac_var ++ case $ac_val in #( ++ *${as_nl}*) ++ case $ac_var in #( ++ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 ++$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ++ esac ++ case $ac_var in #( ++ _ | IFS | as_nl) ;; #( ++ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( ++ *) { eval $ac_var=; unset $ac_var;} ;; ++ esac ;; ++ esac ++ done ++ (set) 2>&1 | ++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( ++ *${as_nl}ac_space=\ *) ++ sed -n \ ++ "s/'\''/'\''\\\\'\'''\''/g; ++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ++ ;; #( ++ *) ++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ++ ;; ++ esac | ++ sort ++) ++ echo ++ ++ $as_echo "## ----------------- ## ++## Output variables. ## ++## ----------------- ##" ++ echo ++ for ac_var in $ac_subst_vars ++ do ++ eval ac_val=\$$ac_var ++ case $ac_val in ++ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; ++ esac ++ $as_echo "$ac_var='\''$ac_val'\''" ++ done | sort ++ echo ++ ++ if test -n "$ac_subst_files"; then ++ $as_echo "## ------------------- ## ++## File substitutions. ## ++## ------------------- ##" ++ echo ++ for ac_var in $ac_subst_files ++ do ++ eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac +@@ -2406,11 +3056,9 @@ + fi + + if test -s confdefs.h; then +- cat <<\_ASBOX +-## ----------- ## ++ $as_echo "## ----------- ## + ## confdefs.h. ## +-## ----------- ## +-_ASBOX ++## ----------- ##" + echo + cat confdefs.h + echo +@@ -2424,46 +3072,53 @@ + exit $exit_status + ' 0 + for ac_signal in 1 2 13 15; do +- trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal ++ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal + done + ac_signal=0 + + # confdefs.h avoids OS command line length limits that DEFS can exceed. + rm -f -r conftest* confdefs.h + ++$as_echo "/* confdefs.h */" > confdefs.h ++ + # Predefined preprocessor variables. + + cat >>confdefs.h <<_ACEOF + #define PACKAGE_NAME "$PACKAGE_NAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_TARNAME "$PACKAGE_TARNAME" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_VERSION "$PACKAGE_VERSION" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_STRING "$PACKAGE_STRING" + _ACEOF + +- + cat >>confdefs.h <<_ACEOF + #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" + _ACEOF + ++cat >>confdefs.h <<_ACEOF ++#define PACKAGE_URL "$PACKAGE_URL" ++_ACEOF ++ + + # Let the site file select an alternate cache file if it wants to. + # Prefer an explicitly selected file to automatically selected ones. + ac_site_file1=NONE + ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +- ac_site_file1=$CONFIG_SITE ++ # We do not want a PATH search for config.site. ++ case $CONFIG_SITE in #(( ++ -*) ac_site_file1=./$CONFIG_SITE;; ++ */*) ac_site_file1=$CONFIG_SITE;; ++ *) ac_site_file1=./$CONFIG_SITE;; ++ esac + elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +@@ -2474,19 +3129,23 @@ + for ac_site_file in "$ac_site_file1" "$ac_site_file2" + do + test "x$ac_site_file" = xNONE && continue +- if test -r "$ac_site_file"; then +- { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 ++ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + $as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 +- . "$ac_site_file" ++ . "$ac_site_file" \ ++ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "failed to load site script $ac_site_file ++See \`config.log' for more details" "$LINENO" 5; } + fi + done + + if test -r "$cache_file"; then +- # Some versions of bash will fail to source /dev/null (special +- # files actually), so we avoid doing that. +- if test -f "$cache_file"; then +- { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 ++ # Some versions of bash will fail to source /dev/null (special files ++ # actually), so we avoid doing that. DJGPP emulates it as a regular file. ++ if test /dev/null != "$cache_file" && test -f "$cache_file"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 + $as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; +@@ -2494,115 +3153,115 @@ + esac + fi + else +- { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 + $as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file + fi + +-ac_header_list="$ac_header_list fcntl.h" +-ac_header_list="$ac_header_list linux/fd.h" +-ac_header_list="$ac_header_list memory.h" +-ac_header_list="$ac_header_list net/errno.h" +-ac_header_list="$ac_header_list sgtty.h" +-ac_header_list="$ac_header_list string.h" +-ac_header_list="$ac_header_list sys/param.h" +-ac_header_list="$ac_header_list sys/device.h" +-ac_header_list="$ac_header_list sys/gentape.h" +-ac_header_list="$ac_header_list sys/inet.h" +-ac_header_list="$ac_header_list sys/io/trioctl.h" +-ac_header_list="$ac_header_list sys/mtio.h" +-ac_header_list="$ac_header_list sys/time.h" +-ac_header_list="$ac_header_list sys/tprintf.h" +-ac_header_list="$ac_header_list sys/tape.h" +-ac_header_list="$ac_header_list unistd.h" +-ac_header_list="$ac_header_list locale.h" +-ac_func_list="$ac_func_list flockfile" +-ac_func_list="$ac_func_list funlockfile" +-ac_header_list="$ac_header_list features.h" +-ac_header_list="$ac_header_list linewrap.h" +-ac_func_list="$ac_func_list pathconf" +-ac_func_list="$ac_func_list btowc" +-ac_func_list="$ac_func_list canonicalize_file_name" +-ac_func_list="$ac_func_list getcwd" +-ac_func_list="$ac_func_list readlink" +-ac_func_list="$ac_func_list realpath" +-ac_func_list="$ac_func_list chown" +-ac_func_list="$ac_func_list fchown" +-ac_header_list="$ac_header_list dirent.h" +-ac_func_list="$ac_func_list fdopendir" +-ac_func_list="$ac_func_list dup2" +-ac_func_list="$ac_func_list fcntl" +-ac_func_list="$ac_func_list fchdir" +-ac_func_list="$ac_func_list mempcpy" +-ac_func_list="$ac_func_list isblank" +-ac_func_list="$ac_func_list iswctype" +-ac_func_list="$ac_func_list mbsrtowcs" +-ac_func_list="$ac_func_list wmemchr" +-ac_func_list="$ac_func_list wmemcpy" +-ac_func_list="$ac_func_list wmempcpy" +-ac_header_list="$ac_header_list wctype.h" ++as_fn_append ac_header_list " fcntl.h" ++as_fn_append ac_header_list " linux/fd.h" ++as_fn_append ac_header_list " memory.h" ++as_fn_append ac_header_list " net/errno.h" ++as_fn_append ac_header_list " sgtty.h" ++as_fn_append ac_header_list " string.h" ++as_fn_append ac_header_list " sys/param.h" ++as_fn_append ac_header_list " sys/device.h" ++as_fn_append ac_header_list " sys/gentape.h" ++as_fn_append ac_header_list " sys/inet.h" ++as_fn_append ac_header_list " sys/io/trioctl.h" ++as_fn_append ac_header_list " sys/mtio.h" ++as_fn_append ac_header_list " sys/time.h" ++as_fn_append ac_header_list " sys/tprintf.h" ++as_fn_append ac_header_list " sys/tape.h" ++as_fn_append ac_header_list " unistd.h" ++as_fn_append ac_header_list " locale.h" ++as_fn_append ac_func_list " flockfile" ++as_fn_append ac_func_list " funlockfile" ++as_fn_append ac_header_list " features.h" ++as_fn_append ac_header_list " linewrap.h" ++as_fn_append ac_func_list " pathconf" ++as_fn_append ac_func_list " btowc" ++as_fn_append ac_func_list " canonicalize_file_name" ++as_fn_append ac_func_list " getcwd" ++as_fn_append ac_func_list " readlink" ++as_fn_append ac_func_list " realpath" ++as_fn_append ac_func_list " chown" ++as_fn_append ac_func_list " fchown" ++as_fn_append ac_header_list " dirent.h" ++as_fn_append ac_func_list " fdopendir" ++as_fn_append ac_func_list " dup2" ++as_fn_append ac_func_list " fcntl" ++as_fn_append ac_func_list " fchdir" ++as_fn_append ac_func_list " mempcpy" ++as_fn_append ac_func_list " isblank" ++as_fn_append ac_func_list " iswctype" ++as_fn_append ac_func_list " mbsrtowcs" ++as_fn_append ac_func_list " wmemchr" ++as_fn_append ac_func_list " wmemcpy" ++as_fn_append ac_func_list " wmempcpy" ++as_fn_append ac_header_list " wctype.h" + gl_fnmatch_required=GNU +-ac_header_list="$ac_header_list stdio_ext.h" +-ac_func_list="$ac_func_list __fpending" +-ac_func_list="$ac_func_list futimens" +-ac_func_list="$ac_func_list getdelim" +-ac_func_list="$ac_func_list getdtablesize" ++as_fn_append ac_header_list " stdio_ext.h" ++as_fn_append ac_func_list " __fpending" ++as_fn_append ac_func_list " futimens" ++as_fn_append ac_func_list " getdelim" ++as_fn_append ac_func_list " getdtablesize" + gl_getopt_required=GNU +-ac_header_list="$ac_header_list getopt.h" +-ac_func_list="$ac_func_list gettimeofday" +-ac_func_list="$ac_func_list nanotime" +-ac_header_list="$ac_header_list wchar.h" +-ac_header_list="$ac_header_list stdint.h" +-ac_header_list="$ac_header_list inttypes.h" +-ac_func_list="$ac_func_list iswcntrl" +-ac_func_list="$ac_func_list iswblank" +-ac_header_list="$ac_header_list langinfo.h" +-ac_func_list="$ac_func_list lchmod" +-ac_func_list="$ac_func_list link" +-ac_func_list="$ac_func_list linkat" +-ac_func_list="$ac_func_list symlink" +-ac_func_list="$ac_func_list lstat" +-ac_func_list="$ac_func_list mbsinit" +-ac_func_list="$ac_func_list mbrtowc" +-ac_header_list="$ac_header_list sys/mman.h" +-ac_func_list="$ac_func_list mprotect" +-ac_func_list="$ac_func_list memchr" +-ac_func_list="$ac_func_list mkfifo" +-ac_func_list="$ac_func_list mkfifoat" +-ac_func_list="$ac_func_list mknodat" +-ac_func_list="$ac_func_list mknod" +-ac_func_list="$ac_func_list alarm" +-ac_func_list="$ac_func_list nl_langinfo" +-ac_header_list="$ac_header_list priv.h" +-ac_func_list="$ac_func_list readlinkat" +-ac_func_list="$ac_func_list wcscoll" +-ac_func_list="$ac_func_list renameat" +-ac_func_list="$ac_func_list setenv" +-ac_func_list="$ac_func_list sleep" +-ac_func_list="$ac_func_list strdup" +-ac_header_list="$ac_header_list sys/socket.h" +-ac_header_list="$ac_header_list strings.h" +-ac_func_list="$ac_func_list strndup" +-ac_func_list="$ac_func_list symlinkat" +-ac_header_list="$ac_header_list sys/stat.h" +-ac_header_list="$ac_header_list sysexits.h" +-ac_func_list="$ac_func_list localtime_r" +-ac_func_list="$ac_func_list pipe" +-ac_header_list="$ac_header_list utime.h" +-ac_func_list="$ac_func_list futimes" +-ac_func_list="$ac_func_list futimesat" +-ac_func_list="$ac_func_list utimensat" +-ac_func_list="$ac_func_list lutimes" +-ac_func_list="$ac_func_list vasnprintf" +-ac_func_list="$ac_func_list wcrtomb" +-ac_func_list="$ac_func_list wcwidth" +-ac_header_list="$ac_header_list netdb.h" +-ac_header_list="$ac_header_list sys/wait.h" +-ac_header_list="$ac_header_list pwd.h" +-ac_header_list="$ac_header_list grp.h" +-ac_func_list="$ac_func_list setlocale" +-ac_func_list="$ac_func_list fchmod" +-ac_func_list="$ac_func_list fsync" ++as_fn_append ac_header_list " getopt.h" ++as_fn_append ac_func_list " gettimeofday" ++as_fn_append ac_func_list " nanotime" ++as_fn_append ac_header_list " wchar.h" ++as_fn_append ac_header_list " stdint.h" ++as_fn_append ac_header_list " inttypes.h" ++as_fn_append ac_func_list " iswcntrl" ++as_fn_append ac_func_list " iswblank" ++as_fn_append ac_header_list " langinfo.h" ++as_fn_append ac_func_list " lchmod" ++as_fn_append ac_func_list " link" ++as_fn_append ac_func_list " linkat" ++as_fn_append ac_func_list " symlink" ++as_fn_append ac_func_list " lstat" ++as_fn_append ac_func_list " mbsinit" ++as_fn_append ac_func_list " mbrtowc" ++as_fn_append ac_header_list " sys/mman.h" ++as_fn_append ac_func_list " mprotect" ++as_fn_append ac_func_list " memchr" ++as_fn_append ac_func_list " mkfifo" ++as_fn_append ac_func_list " mkfifoat" ++as_fn_append ac_func_list " mknodat" ++as_fn_append ac_func_list " mknod" ++as_fn_append ac_func_list " alarm" ++as_fn_append ac_func_list " nl_langinfo" ++as_fn_append ac_header_list " priv.h" ++as_fn_append ac_func_list " readlinkat" ++as_fn_append ac_func_list " wcscoll" ++as_fn_append ac_func_list " renameat" ++as_fn_append ac_func_list " setenv" ++as_fn_append ac_func_list " sleep" ++as_fn_append ac_func_list " strdup" ++as_fn_append ac_header_list " sys/socket.h" ++as_fn_append ac_header_list " strings.h" ++as_fn_append ac_func_list " strndup" ++as_fn_append ac_func_list " symlinkat" ++as_fn_append ac_header_list " sys/stat.h" ++as_fn_append ac_header_list " sysexits.h" ++as_fn_append ac_func_list " localtime_r" ++as_fn_append ac_func_list " pipe" ++as_fn_append ac_header_list " utime.h" ++as_fn_append ac_func_list " futimes" ++as_fn_append ac_func_list " futimesat" ++as_fn_append ac_func_list " utimensat" ++as_fn_append ac_func_list " lutimes" ++as_fn_append ac_func_list " vasnprintf" ++as_fn_append ac_func_list " wcrtomb" ++as_fn_append ac_func_list " wcwidth" ++as_fn_append ac_header_list " netdb.h" ++as_fn_append ac_header_list " sys/wait.h" ++as_fn_append ac_header_list " pwd.h" ++as_fn_append ac_header_list " grp.h" ++as_fn_append ac_func_list " setlocale" ++as_fn_append ac_func_list " fchmod" ++as_fn_append ac_func_list " fsync" + gt_needs="$gt_needs need-formatstring-macros" + # Check that the precious variables saved in the cache have kept the same + # value. +@@ -2614,11 +3273,11 @@ + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) +- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) +- { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 + $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; +@@ -2628,17 +3287,17 @@ + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then +- { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 + $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else +- { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi +- { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 + $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} +- { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 + $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac +@@ -2650,43 +3309,20 @@ + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. +- *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; ++ *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi + done + if $ac_cache_corrupted; then +- { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +- { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +-$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++## -------------------- ## ++## Main body of script. ## ++## -------------------- ## + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -2713,9 +3349,7 @@ + fi + done + if test -z "$ac_aux_dir"; then +- { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5 +-$as_echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 + fi + + # These three variables are undocumented and unsupported, +@@ -2746,10 +3380,10 @@ + # OS/2's system install, which has a completely different semantic + # ./install, which can be erroneously created by make from ./install.sh. + # Reject install programs that cannot install multiple files. +-{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 + $as_echo_n "checking for a BSD-compatible install... " >&6; } + if test -z "$INSTALL"; then +-if test "${ac_cv_path_install+set}" = set; then ++if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -2757,11 +3391,11 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- # Account for people who put trailing slashes in PATH elements. +-case $as_dir/ in +- ./ | .// | /cC/* | \ ++ # Account for people who put trailing slashes in PATH elements. ++case $as_dir/ in #(( ++ ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ +- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ ++ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. +@@ -2798,7 +3432,7 @@ + ;; + esac + +-done ++ done + IFS=$as_save_IFS + + rm -rf conftest.one conftest.two conftest.dir +@@ -2814,7 +3448,7 @@ + INSTALL=$ac_install_sh + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 + $as_echo "$INSTALL" >&6; } + + # Use test -z because SunOS4 sh mishandles braces in ${var-val}. +@@ -2825,7 +3459,7 @@ + + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +-{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 + $as_echo_n "checking whether build environment is sane... " >&6; } + # Just in case + sleep 1 +@@ -2836,15 +3470,11 @@ + ' + case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) +- { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5 +-$as_echo "$as_me: error: unsafe absolute working directory name" >&2;} +- { (exit 1); exit 1; }; };; ++ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; + esac + case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) +- { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5 +-$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;} +- { (exit 1); exit 1; }; };; ++ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + esac + + # Do `set' in a subshell so we don't clobber the current shell's +@@ -2866,11 +3496,8 @@ + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". +- { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +-alias in your environment" >&5 +-$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +-alias in your environment" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken ++alias in your environment" "$LINENO" 5 + fi + + test "$2" = conftest.file +@@ -2879,13 +3506,10 @@ + # Ok. + : + else +- { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! +-Check your system clock" >&5 +-$as_echo "$as_me: error: newly created file is older than distributed files! +-Check your system clock" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "newly created file is older than distributed files! ++Check your system clock" "$LINENO" 5 + fi +-{ $as_echo "$as_me:$LINENO: result: yes" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +@@ -2913,7 +3537,7 @@ + am_missing_run="$MISSING --run " + else + am_missing_run= +- { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 + $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + fi + +@@ -2934,9 +3558,9 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. + set dummy ${ac_tool_prefix}strip; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_STRIP+set}" = set; then ++if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$STRIP"; then +@@ -2947,24 +3571,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + STRIP=$ac_cv_prog_STRIP + if test -n "$STRIP"; then +- { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 + $as_echo "$STRIP" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -2974,9 +3598,9 @@ + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. + set dummy strip; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then ++if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_STRIP"; then +@@ -2987,24 +3611,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP + if test -n "$ac_ct_STRIP"; then +- { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 + $as_echo "$ac_ct_STRIP" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3013,7 +3637,7 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac +@@ -3026,10 +3650,10 @@ + fi + INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +-{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 ++{ $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 +- if test "${ac_cv_path_mkdir+set}" = set; then ++ if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 + else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -3037,7 +3661,7 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in mkdir gmkdir; do ++ for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( +@@ -3049,11 +3673,12 @@ + esac + done + done +-done ++ done + IFS=$as_save_IFS + + fi + ++ test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else +@@ -3061,11 +3686,10 @@ + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. +- test -d ./--version && rmdir ./--version + MKDIR_P="$ac_install_sh -d" + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 + $as_echo "$MKDIR_P" >&6; } + + +@@ -3079,9 +3703,9 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_AWK+set}" = set; then ++if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$AWK"; then +@@ -3092,24 +3716,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + AWK=$ac_cv_prog_AWK + if test -n "$AWK"; then +- { $as_echo "$as_me:$LINENO: result: $AWK" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 + $as_echo "$AWK" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3117,11 +3741,11 @@ + test -n "$AWK" && break + done + +-{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 + $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } + set x ${MAKE-make} + ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF +@@ -3129,7 +3753,7 @@ + all: + @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF +-# GNU make sometimes prints "make[1]: Entering...", which would confuse us. ++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; +@@ -3139,11 +3763,11 @@ + rm -f conftest.make + fi + if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then +- { $as_echo "$as_me:$LINENO: result: yes" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + SET_MAKE= + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" + fi +@@ -3158,7 +3782,7 @@ + rmdir .tst 2>/dev/null + + # Check whether --enable-silent-rules was given. +-if test "${enable_silent_rules+set}" = set; then ++if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; + fi + +@@ -3167,6 +3791,33 @@ + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; + esac ++am_make=${MAKE-make} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 ++$as_echo_n "checking whether $am_make supports nested variables... " >&6; } ++if ${am_cv_make_support_nested_variables+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if $as_echo 'TRUE=$(BAR$(V)) ++BAR0=false ++BAR1=true ++V=1 ++am__doit: ++ @$(TRUE) ++.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then ++ am_cv_make_support_nested_variables=yes ++else ++ am_cv_make_support_nested_variables=no ++fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 ++$as_echo "$am_cv_make_support_nested_variables" >&6; } ++if test $am_cv_make_support_nested_variables = yes; then ++ AM_V='$(V)' ++ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' ++else ++ AM_V=$AM_DEFAULT_VERBOSITY ++ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY ++fi + AM_BACKSLASH='\' + + if test "`cd $srcdir && pwd`" != "`pwd`"; then +@@ -3175,9 +3826,7 @@ + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then +- { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +-$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi + fi + +@@ -3223,12 +3872,12 @@ + + # We need awk for the "check" target. The system "awk" is bad on + # some platforms. +-# Always define AMTAR for backward compatibility. +- +-AMTAR=${AMTAR-"${am_missing_run}tar"} ++# Always define AMTAR for backward compatibility. Yes, it's still used ++# in the wild :-( We should find a proper way to deprecate it ... ++AMTAR='$${TAR-tar}' + + +-{ $as_echo "$as_me:$LINENO: checking how to create a ustar tar archive" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 + $as_echo_n "checking how to create a ustar tar archive... " >&6; } + # Loop over all known methods to create a tar archive until one works. + _am_tools='gnutar plaintar pax cpio none' +@@ -3301,13 +3950,13 @@ + done + rm -rf conftest.dir + +-if test "${am_cv_prog_tar_ustar+set}" = set; then ++if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 + else + am_cv_prog_tar_ustar=$_am_tool + fi + +-{ $as_echo "$as_me:$LINENO: result: $am_cv_prog_tar_ustar" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 + $as_echo "$am_cv_prog_tar_ustar" >&6; } + + +@@ -3317,7 +3966,7 @@ + + # Enable silent rules by default: + # Check whether --enable-silent-rules was given. +-if test "${enable_silent_rules+set}" = set; then ++if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; + fi + +@@ -3326,6 +3975,33 @@ + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; + esac ++am_make=${MAKE-make} ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 ++$as_echo_n "checking whether $am_make supports nested variables... " >&6; } ++if ${am_cv_make_support_nested_variables+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if $as_echo 'TRUE=$(BAR$(V)) ++BAR0=false ++BAR1=true ++V=1 ++am__doit: ++ @$(TRUE) ++.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then ++ am_cv_make_support_nested_variables=yes ++else ++ am_cv_make_support_nested_variables=no ++fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 ++$as_echo "$am_cv_make_support_nested_variables" >&6; } ++if test $am_cv_make_support_nested_variables = yes; then ++ AM_V='$(V)' ++ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' ++else ++ AM_V=$AM_DEFAULT_VERBOSITY ++ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY ++fi + AM_BACKSLASH='\' + + +@@ -3337,9 +4013,9 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. + set dummy ${ac_tool_prefix}gcc; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3350,24 +4026,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + $as_echo "$CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3377,9 +4053,9 @@ + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. + set dummy gcc; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +@@ -3390,24 +4066,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + $as_echo "$ac_ct_CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3416,7 +4092,7 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac +@@ -3430,9 +4106,9 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + set dummy ${ac_tool_prefix}cc; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3443,24 +4119,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + $as_echo "$CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3470,9 +4146,9 @@ + if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. + set dummy cc; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3484,18 +4160,18 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + if test $ac_prog_rejected = yes; then +@@ -3514,10 +4190,10 @@ + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + $as_echo "$CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3529,9 +4205,9 @@ + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. + set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_CC+set}" = set; then ++if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$CC"; then +@@ -3542,24 +4218,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + CC=$ac_cv_prog_CC + if test -n "$CC"; then +- { $as_echo "$as_me:$LINENO: result: $CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 + $as_echo "$CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3573,9 +4249,9 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ++if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_CC"; then +@@ -3586,24 +4262,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_CC=$ac_cv_prog_ac_ct_CC + if test -n "$ac_ct_CC"; then +- { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 + $as_echo "$ac_ct_CC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -3616,7 +4292,7 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac +@@ -3627,57 +4303,37 @@ + fi + + +-test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } ++as_fn_error $? "no acceptable C compiler found in \$PATH ++See \`config.log' for more details" "$LINENO" 5; } + + # Provide some information about the compiler. +-$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 ++$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 + set X $ac_compile + ac_compiler=$2 +-{ (ac_try="$ac_compiler --version >&5" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compiler --version >&5") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } +-{ (ac_try="$ac_compiler -v >&5" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compiler -v >&5") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } +-{ (ac_try="$ac_compiler -V >&5" ++for ac_option in --version -v -V -qversion; do ++ { { ac_try="$ac_compiler $ac_option >&5" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compiler -V >&5") 2>&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } ++ if test -s conftest.err; then ++ sed '10a\ ++... rest of stderr output deleted ... ++ 10q' conftest.err >conftest.er1 ++ cat conftest.er1 >&5 ++ fi ++ rm -f conftest.er1 conftest.err ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++done + +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -3693,8 +4349,8 @@ + # Try to create an executable without -o first, disregard a.out. + # It will help us diagnose broken compilers, and finding out an intuition + # of exeext. +-{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +-$as_echo_n "checking for C compiler default output file name... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 ++$as_echo_n "checking whether the C compiler works... " >&6; } + ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + + # The possible output files: +@@ -3710,17 +4366,17 @@ + done + rm -f $ac_rmfiles + +-if { (ac_try="$ac_link_default" ++if { { ac_try="$ac_link_default" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. + # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # in a Makefile. We should not override ac_cv_exeext if it was cached, +@@ -3737,7 +4393,7 @@ + # certainly right. + break;; + *.* ) +- if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; ++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi +@@ -3756,84 +4412,41 @@ + else + ac_file='' + fi +- +-{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +-$as_echo "$ac_file" >&6; } +-if test -z "$ac_file"; then +- $as_echo "$as_me: failed program was:" >&5 ++if test -z "$ac_file"; then : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++$as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: C compiler cannot create executables +-See \`config.log' for more details." >&2;} +- { (exit 77); exit 77; }; }; } ++as_fn_error 77 "C compiler cannot create executables ++See \`config.log' for more details" "$LINENO" 5; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } + fi +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 ++$as_echo_n "checking for C compiler default output file name... " >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 ++$as_echo "$ac_file" >&6; } + ac_exeext=$ac_cv_exeext + +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +-$as_echo_n "checking whether the C compiler works... " >&6; } +-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +-# If not cross compiling, check that we can run a simple program. +-if test "$cross_compiling" != yes; then +- if { ac_try='./$ac_file' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- cross_compiling=no +- else +- if test "$cross_compiling" = maybe; then +- cross_compiling=yes +- else +- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: cannot run C compiled programs. +-If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } +- fi +- fi +-fi +-{ $as_echo "$as_me:$LINENO: result: yes" >&5 +-$as_echo "yes" >&6; } +- + rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out + ac_clean_files=$ac_clean_files_save +-# Check that the compiler produces executables we can run. If not, either +-# the compiler is broken, or we cross compile. +-{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +-$as_echo_n "checking whether we are cross compiling... " >&6; } +-{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +-$as_echo "$cross_compiling" >&6; } +- +-{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 + $as_echo_n "checking for suffix of executables... " >&6; } +-if { (ac_try="$ac_link" ++if { { ac_try="$ac_link" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) + # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will + # work properly (i.e., refer to `conftest.exe'), while it won't with +@@ -3848,32 +4461,83 @@ + esac + done + else +- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } ++as_fn_error $? "cannot compute suffix of executables: cannot compile and link ++See \`config.log' for more details" "$LINENO" 5; } + fi +- +-rm -f conftest$ac_cv_exeext +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 ++rm -f conftest conftest$ac_cv_exeext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 + $as_echo "$ac_cv_exeext" >&6; } + + rm -f conftest.$ac_ext + EXEEXT=$ac_cv_exeext + ac_exeext=$EXEEXT +-{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++FILE *f = fopen ("conftest.out", "w"); ++ return ferror (f) || fclose (f) != 0; ++ ++ ; ++ return 0; ++} ++_ACEOF ++ac_clean_files="$ac_clean_files conftest.out" ++# Check that the compiler produces executables we can run. If not, either ++# the compiler is broken, or we cross compile. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 ++$as_echo_n "checking whether we are cross compiling... " >&6; } ++if test "$cross_compiling" != yes; then ++ { { ac_try="$ac_link" ++case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_link") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } ++ if { ac_try='./conftest$ac_cv_exeext' ++ { { case "(($ac_try" in ++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; ++ *) ac_try_echo=$ac_try;; ++esac ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 ++ (eval "$ac_try") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then ++ cross_compiling=no ++ else ++ if test "$cross_compiling" = maybe; then ++ cross_compiling=yes ++ else ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "cannot run C compiled programs. ++If you meant to cross compile, use \`--host'. ++See \`config.log' for more details" "$LINENO" 5; } ++ fi ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 ++$as_echo "$cross_compiling" >&6; } ++ ++rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ++ac_clean_files=$ac_clean_files_save ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 + $as_echo_n "checking for suffix of object files... " >&6; } +-if test "${ac_cv_objext+set}" = set; then ++if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -3885,17 +4549,17 @@ + } + _ACEOF + rm -f conftest.o conftest.obj +-if { (ac_try="$ac_compile" ++if { { ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in +@@ -3908,31 +4572,23 @@ + $as_echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } ++as_fn_error $? "cannot compute suffix of object files: cannot compile ++See \`config.log' for more details" "$LINENO" 5; } + fi +- + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 + $as_echo "$ac_cv_objext" >&6; } + OBJEXT=$ac_cv_objext + ac_objext=$OBJEXT +-{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 + $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +-if test "${ac_cv_c_compiler_gnu+set}" = set; then ++if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -3946,37 +4602,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_compiler_gnu=no ++ ac_compiler_gnu=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_c_compiler_gnu=$ac_compiler_gnu + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 + $as_echo "$ac_cv_c_compiler_gnu" >&6; } + if test $ac_compiler_gnu = yes; then + GCC=yes +@@ -3985,20 +4620,16 @@ + fi + ac_test_CFLAGS=${CFLAGS+set} + ac_save_CFLAGS=$CFLAGS +-{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 + $as_echo_n "checking whether $CC accepts -g... " >&6; } +-if test "${ac_cv_prog_cc_g+set}" = set; then ++if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -4009,35 +4640,11 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- CFLAGS="" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ CFLAGS="" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -4048,36 +4655,12 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_compile "$LINENO"; then : + +- ac_c_werror_flag=$ac_save_c_werror_flag ++else ++ ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -4088,42 +4671,17 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + 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 +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 + $as_echo "$ac_cv_prog_cc_g" >&6; } + if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +@@ -4140,18 +4698,14 @@ + CFLAGS= + fi + fi +-{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 + $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then ++if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -4208,32 +4762,9 @@ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break + done +@@ -4244,17 +4775,19 @@ + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c89" in + x) +- { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + $as_echo "none needed" >&6; } ;; + xno) +- { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + $as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" +- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 + $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac ++if test "x$ac_cv_prog_cc_c89" != xno; then : + ++fi + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -4273,7 +4806,7 @@ + .PHONY: am__doit + END + # If we don't find an include directive, just comment out the code. +-{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 + $as_echo_n "checking for style of include used by $am_make... " >&6; } + am__include="#" + am__quote= +@@ -4301,18 +4834,19 @@ + fi + + +-{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 + $as_echo "$_am_result" >&6; } + rm -f confinc confmf + + # Check whether --enable-dependency-tracking was given. +-if test "${enable_dependency_tracking+set}" = set; then ++if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; + fi + + if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' ++ am__nodep='_no' + fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= +@@ -4326,9 +4860,9 @@ + + depcc="$CC" am_compiler_list= + +-{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 + $as_echo_n "checking dependency style of $depcc... " >&6; } +-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then ++if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +@@ -4337,6 +4871,7 @@ + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. ++ rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. +@@ -4396,7 +4931,7 @@ + break + fi + ;; +- msvisualcpp | msvcmsys) ++ msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. +@@ -4436,7 +4971,7 @@ + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 + $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } + CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + +@@ -4455,9 +4990,9 @@ + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. + set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_RANLIB+set}" = set; then ++if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$RANLIB"; then +@@ -4468,24 +5003,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + RANLIB=$ac_cv_prog_RANLIB + if test -n "$RANLIB"; then +- { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 + $as_echo "$RANLIB" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -4495,9 +5030,9 @@ + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. + set dummy ranlib; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then ++if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$ac_ct_RANLIB"; then +@@ -4508,24 +5043,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_RANLIB="ranlib" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB + if test -n "$ac_ct_RANLIB"; then +- { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 + $as_echo "$ac_ct_RANLIB" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -4534,7 +5069,7 @@ + else + case $cross_compiling:$ac_tool_warned in + yes:) +-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 + $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} + ac_tool_warned=yes ;; + esac +@@ -4548,9 +5083,9 @@ + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_prog_YACC+set}" = set; then ++if ${ac_cv_prog_YACC+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$YACC"; then +@@ -4561,24 +5096,24 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_YACC="$ac_prog" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + fi + fi + YACC=$ac_cv_prog_YACC + if test -n "$YACC"; then +- { $as_echo "$as_me:$LINENO: result: $YACC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 + $as_echo "$YACC" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -4588,22 +5123,18 @@ + test -n "$YACC" || YACC="yacc" + + if test "x$CC" != xcc; then +- { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 + $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } + else +- { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 + $as_echo_n "checking whether cc understands -c and -o together... " >&6; } + fi + set dummy $CC; ac_cc=`$as_echo "$2" | + sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` +-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + int +@@ -4619,63 +5150,63 @@ + # existing .o file with -o, though they will create one. + ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* +-if { (case "(($ac_try" in ++if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- test -f conftest2.$ac_objext && { (case "(($ac_try" in ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && ++ test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; + then + eval ac_cv_prog_cc_${ac_cc}_c_o=yes + if test "x$CC" != xcc; then + # Test first that cc exists at all. + if { ac_try='cc -c conftest.$ac_ext >&5' +- { (case "(($ac_try" in ++ { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; }; then + ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' + rm -f conftest2.* +- if { (case "(($ac_try" in ++ if { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && +- test -f conftest2.$ac_objext && { (case "(($ac_try" in ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; } && ++ test -f conftest2.$ac_objext && { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 ++eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" ++$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; + then + # cc works too. + : +@@ -4692,15 +5223,13 @@ + + fi + if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then +- { $as_echo "$as_me:$LINENO: result: yes" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + +-cat >>confdefs.h <<\_ACEOF +-#define NO_MINUS_C_MINUS_O 1 +-_ACEOF ++$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + + fi + +@@ -4721,35 +5250,27 @@ + + # Make sure we can run config.sub. + $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || +- { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +-$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +-{ $as_echo "$as_me:$LINENO: checking build system type" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 + $as_echo_n "checking build system type... " >&6; } +-if test "${ac_cv_build+set}" = set; then ++if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_build_alias=$build_alias + test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + test "x$ac_build_alias" = x && +- { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +-$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || +- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 + $as_echo "$ac_cv_build" >&6; } + case $ac_cv_build in + *-*-*) ;; +-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +-$as_echo "$as_me: error: invalid value of canonical build" >&2;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; + esac + build=$ac_cv_build + ac_save_IFS=$IFS; IFS='-' +@@ -4765,28 +5286,24 @@ + case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +-{ $as_echo "$as_me:$LINENO: checking host system type" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 + $as_echo_n "checking host system type... " >&6; } +-if test "${ac_cv_host+set}" = set; then ++if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build + else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || +- { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +-$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 + $as_echo "$ac_cv_host" >&6; } + case $ac_cv_host in + *-*-*) ;; +-*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +-$as_echo "$as_me: error: invalid value of canonical host" >&2;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; + esac + host=$ac_cv_host + ac_save_IFS=$IFS; IFS='-' +@@ -4808,14 +5325,14 @@ + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' + ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu +-{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 + $as_echo_n "checking how to run the C preprocessor... " >&6; } + # On Suns, sometimes $CPP names a directory. + if test -n "$CPP" && test -d "$CPP"; then + CPP= + fi + if test -z "$CPP"; then +- if test "${ac_cv_prog_CPP+set}" = set; then ++ if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 + else + # Double quotes because CPP needs to be expanded +@@ -4830,11 +5347,7 @@ + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -4843,78 +5356,34 @@ + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : + break + fi + +@@ -4926,7 +5395,7 @@ + else + ac_cv_prog_CPP=$CPP + fi +-{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 + $as_echo "$CPP" >&6; } + ac_preproc_ok=false + for ac_c_preproc_warn_flag in '' yes +@@ -4937,11 +5406,7 @@ + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __STDC__ + # include +@@ -4950,87 +5415,40 @@ + #endif + Syntax error + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_cpp "$LINENO"; then : + ++else + # Broken: fails on valid input. + continue + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then ++if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. + continue + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + # Passes both tests. + ac_preproc_ok=: + break + fi +- +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext +-if $ac_preproc_ok; then +- : ++rm -f conftest.i conftest.err conftest.$ac_ext ++if $ac_preproc_ok; then : ++ + else +- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } ++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check ++See \`config.log' for more details" "$LINENO" 5; } + fi + + ac_ext=c +@@ -5040,9 +5458,9 @@ + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +-{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 + $as_echo_n "checking for grep that handles long lines and -e... " >&6; } +-if test "${ac_cv_path_GREP+set}" = set; then ++if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$GREP"; then +@@ -5053,7 +5471,7 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in grep ggrep; do ++ for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +@@ -5073,7 +5491,7 @@ + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" +@@ -5088,26 +5506,24 @@ + $ac_path_GREP_found && break 3 + done + done +-done ++ done + IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then +- { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_GREP=$GREP + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 + $as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +-{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 + $as_echo_n "checking for egrep... " >&6; } +-if test "${ac_cv_path_EGREP+set}" = set; then ++if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 + else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +@@ -5121,7 +5537,7 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_prog in egrep; do ++ for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +@@ -5141,7 +5557,7 @@ + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break +- ac_count=`expr $ac_count + 1` ++ as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" +@@ -5156,12 +5572,10 @@ + $ac_path_EGREP_found && break 3 + done + done +-done ++ done + IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then +- { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +-$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_EGREP=$EGREP +@@ -5169,21 +5583,17 @@ + + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 + $as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then ++if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -5198,48 +5608,23 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : ++ $EGREP "memchr" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -5249,18 +5634,14 @@ + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : ++ $EGREP "free" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -5270,14 +5651,10 @@ + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -5304,118 +5681,33 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_header_stdc=no ++else ++ ac_cv_header_stdc=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 + $as_echo "$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF ++$as_echo "#define STDC_HEADERS 1" >>confdefs.h + + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. +- +- +- +- +- +- +- +- +- + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +- +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_ac_Header=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_compile "$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 +@@ -5428,139 +5720,8 @@ + + + +- if test "${ac_cv_header_minix_config_h+set}" = set; then +- { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +-$as_echo_n "checking for minix/config.h... " >&6; } +-if test "${ac_cv_header_minix_config_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +-$as_echo "$ac_cv_header_minix_config_h" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +-$as_echo_n "checking minix/config.h usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +-$as_echo_n "checking minix/config.h presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +-$as_echo_n "checking for minix/config.h... " >&6; } +-if test "${ac_cv_header_minix_config_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_header_minix_config_h=$ac_header_preproc +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +-$as_echo "$ac_cv_header_minix_config_h" >&6; } +- +-fi +-if test "x$ac_cv_header_minix_config_h" = x""yes; then ++ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" ++if test "x$ac_cv_header_minix_config_h" = xyes; then : + MINIX=yes + else + MINIX= +@@ -5569,44 +5730,31 @@ + + if test "$MINIX" = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define _POSIX_SOURCE 1 +-_ACEOF ++$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define _POSIX_1_SOURCE 2 +-_ACEOF ++$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define _MINIX 1 +-_ACEOF ++$as_echo "#define _MINIX 1" >>confdefs.h + + fi + + case "$host_os" in + hpux*) + +-cat >>confdefs.h <<\_ACEOF +-#define _XOPEN_SOURCE 500 +-_ACEOF ++$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + + ;; + esac + + +- +- { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 + $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +-if test "${ac_cv_safe_to_define___extensions__+set}" = set; then ++if ${ac_cv_safe_to_define___extensions__+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + # define __EXTENSIONS__ 1 +@@ -5619,57 +5767,25 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_safe_to_define___extensions__=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_safe_to_define___extensions__=no ++ ac_cv_safe_to_define___extensions__=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 + $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && +- cat >>confdefs.h <<\_ACEOF +-#define __EXTENSIONS__ 1 +-_ACEOF ++ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h + +- cat >>confdefs.h <<\_ACEOF +-#define _ALL_SOURCE 1 +-_ACEOF +- +- cat >>confdefs.h <<\_ACEOF +-#define _GNU_SOURCE 1 +-_ACEOF ++ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h + +- cat >>confdefs.h <<\_ACEOF +-#define _POSIX_PTHREAD_SEMANTICS 1 +-_ACEOF ++ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + +- cat >>confdefs.h <<\_ACEOF +-#define _TANDEM_SOURCE 1 +-_ACEOF ++ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + ++ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + + + +@@ -5678,17 +5794,13 @@ + + + +-{ $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 + $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } +-if test "${ac_cv_sys_largefile_source+set}" = set; then ++if ${ac_cv_sys_largefile_source+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include /* for off_t */ + #include +@@ -5701,43 +5813,12 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=no; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #define _LARGEFILE_SOURCE 1 + #include /* for off_t */ +@@ -5751,43 +5832,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_sys_largefile_source=1; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + ac_cv_sys_largefile_source=unknown + break + done + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 + $as_echo "$ac_cv_sys_largefile_source" >&6; } + case $ac_cv_sys_largefile_source in #( + no | unknown) ;; +@@ -5804,26 +5858,22 @@ + # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. + if test $ac_cv_sys_largefile_source != unknown; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_FSEEKO 1 +-_ACEOF ++$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h + + fi + +- case $ac_cv_prog_cc_stdc in +- no) ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; +- *) { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 ++ case $ac_cv_prog_cc_stdc in #( ++ no) : ++ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( ++ *) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 + $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +-if test "${ac_cv_prog_cc_c99+set}" = set; then ++if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c99=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -5965,32 +6015,9 @@ + for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 + do + CC="$ac_save_CC $ac_arg" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c99=$ac_arg +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c99" != "xno" && break + done +@@ -6001,31 +6028,27 @@ + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c99" in + x) +- { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + $as_echo "none needed" >&6; } ;; + xno) +- { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + $as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" +- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 + $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; + esac +-if test "x$ac_cv_prog_cc_c99" != xno; then ++if test "x$ac_cv_prog_cc_c99" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + else +- { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 + $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +-if test "${ac_cv_prog_cc_c89+set}" = set; then ++if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_prog_cc_c89=no + ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -6082,32 +6105,9 @@ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break + done +@@ -6118,46 +6118,46 @@ + # AC_CACHE_VAL + case "x$ac_cv_prog_cc_c89" in + x) +- { $as_echo "$as_me:$LINENO: result: none needed" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 + $as_echo "none needed" >&6; } ;; + xno) +- { $as_echo "$as_me:$LINENO: result: unsupported" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 + $as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" +- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 + $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; + esac +-if test "x$ac_cv_prog_cc_c89" != xno; then ++if test "x$ac_cv_prog_cc_c89" != xno; then : + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + else + ac_cv_prog_cc_stdc=no + fi + +- + fi +- + ;; + esac +- { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO Standard C" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 + $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } +- if test "${ac_cv_prog_cc_stdc+set}" = set; then ++ if ${ac_cv_prog_cc_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + fi + +- case $ac_cv_prog_cc_stdc in +- no) { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +-$as_echo "unsupported" >&6; } ;; +- '') { $as_echo "$as_me:$LINENO: result: none needed" >&5 +-$as_echo "none needed" >&6; } ;; +- *) { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 ++ case $ac_cv_prog_cc_stdc in #( ++ no) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 ++$as_echo "unsupported" >&6; } ;; #( ++ '') : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 ++$as_echo "none needed" >&6; } ;; #( ++ *) : ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 + $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; + esac + + + + +- + # Code from module alloca: + # Code from module alloca-opt: + # Code from module areadlink: +@@ -6364,15 +6364,15 @@ + + + # Check whether --enable-largefile was given. +-if test "${enable_largefile+set}" = set; then ++if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; + fi + + if test "$enable_largefile" != no; then + +- { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 ++ { $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 test "${ac_cv_sys_largefile_CC+set}" = set; then ++if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_sys_largefile_CC=no +@@ -6381,11 +6381,7 @@ + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + /* Check that off_t can represent 2**63 - 1 correctly. +@@ -6404,60 +6400,14 @@ + return 0; + } + _ACEOF +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++ if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext + break + done +@@ -6465,23 +6415,19 @@ + rm -f conftest.$ac_ext + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 + $as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + +- { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 + $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +-if test "${ac_cv_sys_file_offset_bits+set}" = set; then ++if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + /* Check that off_t can represent 2**63 - 1 correctly. +@@ -6500,38 +6446,11 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #define _FILE_OFFSET_BITS 64 + #include +@@ -6551,38 +6470,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break + done + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 + $as_echo "$ac_cv_sys_file_offset_bits" >&6; } + case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; +@@ -6594,17 +6490,13 @@ + esac + rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then +- { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 ++ { $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 test "${ac_cv_sys_large_files+set}" = set; then ++if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 + else + while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + /* Check that off_t can represent 2**63 - 1 correctly. +@@ -6623,38 +6515,11 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #define _LARGE_FILES 1 + #include +@@ -6674,38 +6539,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break + done + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 + $as_echo "$ac_cv_sys_large_files" >&6; } + case $ac_cv_sys_large_files in #( + no | unknown) ;; +@@ -6719,17 +6561,13 @@ + fi + fi + +-{ $as_echo "$as_me:$LINENO: checking for library containing strerror" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 + $as_echo_n "checking for library containing strerror... " >&6; } +-if test "${ac_cv_search_strerror+set}" = set; then ++if ${ac_cv_search_strerror+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -6754,70 +6592,39 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_strerror=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_strerror+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_strerror+:} false; then : + break + fi + done +-if test "${ac_cv_search_strerror+set}" = set; then +- : ++if ${ac_cv_search_strerror+:} false; then : ++ + else + ac_cv_search_strerror=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 + $as_echo "$ac_cv_search_strerror" >&6; } + ac_res=$ac_cv_search_strerror +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + +-{ $as_echo "$as_me:$LINENO: checking for inline" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 + $as_echo_n "checking for inline... " >&6; } +-if test "${ac_cv_c_inline+set}" = set; then ++if ${ac_cv_c_inline+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_c_inline=no + for ac_kw in inline __inline__ __inline; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifndef __cplusplus + typedef int foo_t; +@@ -6826,41 +6633,17 @@ + #endif + + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_inline=$ac_kw +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + 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:$LINENO: result: $ac_cv_c_inline" >&5 ++{ $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) ;; + *) +@@ -6880,149 +6663,12 @@ + + + +- +-for ac_header in $ac_header_list +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_header in $ac_header_list ++do : ++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ++ac_fn_c_check_header_compile "$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 +@@ -7067,101 +6713,15 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- + for ac_header in sys/buf.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#if HAVE_SYS_PARAM_H ++do : ++ ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H + #include + #endif +- +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_ac_Header=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++" ++if test "x$ac_cv_header_sys_buf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_SYS_BUF_H 1 + _ACEOF + + fi +@@ -7169,16 +6729,12 @@ + done + + +-{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 + $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +-if test "${ac_cv_header_sys_wait_h+set}" = set; then ++if ${ac_cv_header_sys_wait_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -7199,63 +6755,31 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_sys_wait_h=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_sys_wait_h=no ++ ac_cv_header_sys_wait_h=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 + $as_echo "$ac_cv_header_sys_wait_h" >&6; } + if test $ac_cv_header_sys_wait_h = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_SYS_WAIT_H 1 +-_ACEOF ++$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h + + fi + + +- +- +- +- +- + ac_header_dirent=no + for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 + $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_ac_Header+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include <$ac_hdr> +@@ -7269,41 +6793,17 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_ac_Header=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" ++ eval "$as_ac_Header=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_ac_Header ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 + _ACEOF +@@ -7314,17 +6814,13 @@ + done + # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. + if test $ac_header_dirent = dirent.h; then +- { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +-if test "${ac_cv_search_opendir+set}" = set; then ++if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -7349,70 +6845,39 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_opendir+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_opendir+:} false; then : + break + fi + done +-if test "${ac_cv_search_opendir+set}" = set; then +- : ++if ${ac_cv_search_opendir+:} false; then : ++ + else + ac_cv_search_opendir=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 + $as_echo "$ac_cv_search_opendir" >&6; } + ac_res=$ac_cv_search_opendir +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + + else +- { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 + $as_echo_n "checking for library containing opendir... " >&6; } +-if test "${ac_cv_search_opendir+set}" = set; then ++if ${ac_cv_search_opendir+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -7437,70 +6902,39 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_opendir=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_opendir+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_opendir+:} false; then : + break + fi + done +-if test "${ac_cv_search_opendir+set}" = set; then +- : ++if ${ac_cv_search_opendir+:} false; then : ++ + else + ac_cv_search_opendir=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 + $as_echo "$ac_cv_search_opendir" >&6; } + ac_res=$ac_cv_search_opendir +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + + fi + +-{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 + $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } +-if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then ++if ${ac_cv_header_sys_types_h_makedev+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -7511,324 +6945,33 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_header_sys_types_h_makedev=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_sys_types_h_makedev=no ++ ac_cv_header_sys_types_h_makedev=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 + $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } + + if test $ac_cv_header_sys_types_h_makedev = no; then +-if test "${ac_cv_header_sys_mkdev_h+set}" = set; then +- { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +-$as_echo_n "checking for sys/mkdev.h... " >&6; } +-if test "${ac_cv_header_sys_mkdev_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +-$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5 +-$as_echo_n "checking sys/mkdev.h usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5 +-$as_echo_n "checking sys/mkdev.h presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5 +-$as_echo_n "checking for sys/mkdev.h... " >&6; } +-if test "${ac_cv_header_sys_mkdev_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_header_sys_mkdev_h=$ac_header_preproc +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5 +-$as_echo "$ac_cv_header_sys_mkdev_h" >&6; } +- +-fi +-if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then ++ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define MAJOR_IN_MKDEV 1 +-_ACEOF ++$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h + + fi + + + + if test $ac_cv_header_sys_mkdev_h = no; then +- if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then +- { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +-$as_echo_n "checking for sys/sysmacros.h... " >&6; } +-if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +-$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5 +-$as_echo_n "checking sys/sysmacros.h usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5 +-$as_echo_n "checking sys/sysmacros.h presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5 +-$as_echo_n "checking for sys/sysmacros.h... " >&6; } +-if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_header_sys_sysmacros_h=$ac_header_preproc +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5 +-$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; } +- +-fi +-if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : + +-cat >>confdefs.h <<\_ACEOF +-#define MAJOR_IN_SYSMACROS 1 +-_ACEOF ++$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h + + fi + +@@ -7836,16 +6979,12 @@ + fi + fi + +-{ $as_echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5 ++{ $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 test "${ac_cv_header_stat_broken+set}" = set; then ++if ${ac_cv_header_stat_broken+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -7867,54 +7006,27 @@ + #endif + + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stat_broken=no + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stat_broken=yes ++ ac_cv_header_stat_broken=yes + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5 ++{ $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 + +-cat >>confdefs.h <<\_ACEOF +-#define STAT_MACROS_BROKEN 1 +-_ACEOF ++$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h + + fi + +-{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } +-if test "${ac_cv_header_stdc+set}" = set; then ++if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -7929,48 +7041,23 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdc=no ++ ac_cv_header_stdc=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "memchr" >/dev/null 2>&1; then +- : ++ $EGREP "memchr" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -7980,18 +7067,14 @@ + + if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "free" >/dev/null 2>&1; then +- : ++ $EGREP "free" >/dev/null 2>&1; then : ++ + else + ac_cv_header_stdc=no + fi +@@ -8001,14 +7084,10 @@ + + if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -8035,65 +7114,32 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_header_stdc=no ++else ++ ac_cv_header_stdc=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 + $as_echo "$ac_cv_header_stdc" >&6; } + if test $ac_cv_header_stdc = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define STDC_HEADERS 1 +-_ACEOF ++$as_echo "#define STDC_HEADERS 1" >>confdefs.h + + fi + + +-{ $as_echo "$as_me:$LINENO: checking for st_fstype string in struct stat" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5 + $as_echo_n "checking for st_fstype string in struct stat... " >&6; } +-if test "${diff_cv_st_fstype_string+set}" = set; then ++if ${diff_cv_st_fstype_string+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -8105,55 +7151,28 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + diff_cv_st_fstype_string=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- diff_cv_st_fstype_string=no ++ diff_cv_st_fstype_string=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +-{ $as_echo "$as_me:$LINENO: result: $diff_cv_st_fstype_string" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5 + $as_echo "$diff_cv_st_fstype_string" >&6; } + if test $diff_cv_st_fstype_string = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ST_FSTYPE_STRING 1 +-_ACEOF ++$as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h + + fi + +-{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 + $as_echo_n "checking return type of signal handlers... " >&6; } +-if test "${ac_cv_type_signal+set}" = set; then ++if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -8166,35 +7185,14 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_signal=int + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_signal=void ++ ac_cv_type_signal=void + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 + $as_echo "$ac_cv_type_signal" >&6; } + + cat >>confdefs.h <<_ACEOF +@@ -8202,207 +7200,21 @@ + _ACEOF + + +-{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5 +-$as_echo_n "checking for mode_t... " >&6; } +-if test "${ac_cv_type_mode_t+set}" = set; then +- $as_echo_n "(cached) " >&6 ++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 +- ac_cv_type_mode_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (mode_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((mode_t))) +- return 0; +- ; +- return 0; +-} ++ ++cat >>confdefs.h <<_ACEOF ++#define mode_t int + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_type_mode_t=yes + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++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 : + +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +-$as_echo "$ac_cv_type_mode_t" >&6; } +-if test "x$ac_cv_type_mode_t" = x""yes; then +- : +-else +- +-cat >>confdefs.h <<_ACEOF +-#define mode_t int +-_ACEOF +- +-fi +- +-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5 +-$as_echo_n "checking for pid_t... " >&6; } +-if test "${ac_cv_type_pid_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_pid_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (pid_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((pid_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_pid_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +-$as_echo "$ac_cv_type_pid_t" >&6; } +-if test "x$ac_cv_type_pid_t" = x""yes; then +- : +-else ++else + + cat >>confdefs.h <<_ACEOF + #define pid_t int +@@ -8410,102 +7222,9 @@ + + fi + +-{ $as_echo "$as_me:$LINENO: checking for off_t" >&5 +-$as_echo_n "checking for off_t... " >&6; } +-if test "${ac_cv_type_off_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_off_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (off_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((off_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_off_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- ++ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" ++if test "x$ac_cv_type_off_t" = xyes; then : + +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +-$as_echo "$ac_cv_type_off_t" >&6; } +-if test "x$ac_cv_type_off_t" = x""yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -8514,102 +7233,9 @@ + + fi + +-{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 +-$as_echo_n "checking for size_t... " >&6; } +-if test "${ac_cv_type_size_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_size_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (size_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((size_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_size_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi ++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 : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +-$as_echo "$ac_cv_type_size_t" >&6; } +-if test "x$ac_cv_type_size_t" = x""yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -8618,22 +7244,18 @@ + + fi + +-{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 ++{ $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 test "${ac_cv_type_uid_t+set}" = set; then ++if ${ac_cv_type_uid_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "uid_t" >/dev/null 2>&1; then ++ $EGREP "uid_t" >/dev/null 2>&1; then : + ac_cv_type_uid_t=yes + else + ac_cv_type_uid_t=no +@@ -8641,325 +7263,38 @@ + rm -f conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 ++{ $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 + +-cat >>confdefs.h <<\_ACEOF +-#define uid_t int +-_ACEOF +- +- +-cat >>confdefs.h <<\_ACEOF +-#define gid_t int +-_ACEOF ++$as_echo "#define uid_t int" >>confdefs.h + +-fi + +-{ $as_echo "$as_me:$LINENO: checking for major_t" >&5 +-$as_echo_n "checking for major_t... " >&6; } +-if test "${ac_cv_type_major_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_major_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (major_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((major_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define gid_t int" >>confdefs.h + +- ac_cv_type_major_t=yes + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi ++ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default" ++if test "x$ac_cv_type_major_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_major_t" >&5 +-$as_echo "$ac_cv_type_major_t" >&6; } +-if test "x$ac_cv_type_major_t" = x""yes; then +- : + else + +-cat >>confdefs.h <<\_ACEOF +-#define major_t int +-_ACEOF +- +-fi +- +-{ $as_echo "$as_me:$LINENO: checking for minor_t" >&5 +-$as_echo_n "checking for minor_t... " >&6; } +-if test "${ac_cv_type_minor_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_minor_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (minor_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((minor_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define major_t int" >>confdefs.h + +- ac_cv_type_minor_t=yes + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi ++ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default" ++if test "x$ac_cv_type_minor_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_minor_t" >&5 +-$as_echo "$ac_cv_type_minor_t" >&6; } +-if test "x$ac_cv_type_minor_t" = x""yes; then +- : + else + +-cat >>confdefs.h <<\_ACEOF +-#define minor_t int +-_ACEOF +- +-fi +- +-{ $as_echo "$as_me:$LINENO: checking for dev_t" >&5 +-$as_echo_n "checking for dev_t... " >&6; } +-if test "${ac_cv_type_dev_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_dev_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (dev_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((dev_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define minor_t int" >>confdefs.h + +- ac_cv_type_dev_t=yes + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default" ++if test "x$ac_cv_type_dev_t" = xyes; then : + +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_dev_t" >&5 +-$as_echo "$ac_cv_type_dev_t" >&6; } +-if test "x$ac_cv_type_dev_t" = x""yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -8968,102 +7303,9 @@ + + fi + +-{ $as_echo "$as_me:$LINENO: checking for ino_t" >&5 +-$as_echo_n "checking for ino_t... " >&6; } +-if test "${ac_cv_type_ino_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_ino_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (ino_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((ino_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_ino_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi ++ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default" ++if test "x$ac_cv_type_ino_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ino_t" >&5 +-$as_echo "$ac_cv_type_ino_t" >&6; } +-if test "x$ac_cv_type_ino_t" = x""yes; then +- : + else + + cat >>confdefs.h <<_ACEOF +@@ -9074,16 +7316,12 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 + $as_echo_n "checking for ssize_t... " >&6; } +-if test "${gt_cv_ssize_t+set}" = set; then ++if ${gt_cv_ssize_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -9095,41 +7333,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_ssize_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_ssize_t=no ++ gt_cv_ssize_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 + $as_echo "$gt_cv_ssize_t" >&6; } + if test $gt_cv_ssize_t = no; then + +-cat >>confdefs.h <<\_ACEOF +-#define ssize_t int +-_ACEOF ++$as_echo "#define ssize_t int" >>confdefs.h + + fi + +@@ -9139,23 +7354,17 @@ + + + +- +- + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ + + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works + # for constant arguments. Useless! +-{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 + $as_echo_n "checking for working alloca.h... " >&6; } +-if test "${ac_cv_working_alloca_h+set}" = set; then ++if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -9167,59 +7376,28 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_working_alloca_h=no ++ ac_cv_working_alloca_h=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 + $as_echo "$ac_cv_working_alloca_h" >&6; } + if test $ac_cv_working_alloca_h = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALLOCA_H 1 +-_ACEOF ++$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + + fi + +-{ $as_echo "$as_me:$LINENO: checking for alloca" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 + $as_echo_n "checking for alloca... " >&6; } +-if test "${ac_cv_func_alloca_works+set}" = set; then ++if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifdef __GNUC__ + # define alloca __builtin_alloca +@@ -9235,7 +7413,7 @@ + #pragma alloca + # else + # ifndef alloca /* predefined by HP cc +Olibcalls */ +-char *alloca (); ++void *alloca (size_t); + # endif + # endif + # endif +@@ -9251,47 +7429,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_alloca_works=no ++ ac_cv_func_alloca_works=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 + $as_echo "$ac_cv_func_alloca_works" >&6; } + + if test $ac_cv_func_alloca_works = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALLOCA 1 +-_ACEOF ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + + else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +@@ -9305,21 +7456,15 @@ + + ALLOCA=\${LIBOBJDIR}alloca.$ac_objext + +-cat >>confdefs.h <<\_ACEOF +-#define C_ALLOCA 1 +-_ACEOF ++$as_echo "#define C_ALLOCA 1" >>confdefs.h + + +-{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 + $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +-if test "${ac_cv_os_cray+set}" = set; then ++if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if defined CRAY && ! defined CRAY2 + webecray +@@ -9329,7 +7474,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "webecray" >/dev/null 2>&1; then ++ $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes + else + ac_cv_os_cray=no +@@ -9337,101 +7482,13 @@ + rm -f conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 + $as_echo "$ac_cv_os_cray" >&6; } + if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + + cat >>confdefs.h <<_ACEOF + #define CRAY_STACKSEG_END $ac_func +@@ -9443,19 +7500,15 @@ + done + fi + +-{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 + $as_echo_n "checking stack direction for C alloca... " >&6; } +-if test "${ac_cv_c_stack_direction+set}" = set; then ++if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int +@@ -9478,46 +7531,18 @@ + return find_stack_direction () < 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_c_stack_direction=-1 ++ ac_cv_c_stack_direction=-1 + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 + $as_echo "$ac_cv_c_stack_direction" >&6; } +- + cat >>confdefs.h <<_ACEOF + #define STACK_DIRECTION $ac_cv_c_stack_direction + _ACEOF +@@ -9525,19 +7550,15 @@ + + fi + +-{ $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 + $as_echo_n "checking for C/C++ restrict keyword... " >&6; } +-if test "${ac_cv_c_restrict+set}" = set; then ++if ${ac_cv_c_restrict+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + typedef int * int_ptr; + int foo (int_ptr $ac_kw ip) { +@@ -9554,46 +7575,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 + $as_echo "$ac_cv_c_restrict" >&6; } + +- + case $ac_cv_c_restrict in + restrict) ;; +- no) cat >>confdefs.h <<\_ACEOF +-#define restrict /**/ +-_ACEOF ++ no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF + #define restrict $ac_cv_c_restrict +@@ -9601,1078 +7596,1034 @@ + ;; + esac + +-{ $as_echo "$as_me:$LINENO: checking whether getenv is declared" >&5 +-$as_echo_n "checking whether getenv is declared... " >&6; } +-if test "${ac_cv_have_decl_getenv+set}" = set; then +- $as_echo_n "(cached) " >&6 ++ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getenv" = xyes; then : ++ ac_have_decl=1 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getenv +- (void) getenv; +-#endif ++ ac_have_decl=0 ++fi + +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETENV $ac_have_decl + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getenv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_getenv=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5 +-$as_echo "$ac_cv_have_decl_getenv" >&6; } +-if test "x$ac_cv_have_decl_getenv" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETENV 1 ++#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl + _ACEOF + +- ++ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETENV 0 +-_ACEOF +- +- ++ ac_have_decl=0 + fi + +- +-{ $as_echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5 +-$as_echo_n "checking whether clearerr_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef clearerr_unlocked +- (void) clearerr_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_clearerr_unlocked=yes ++ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_clearerr_unlocked=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_clearerr_unlocked" >&6; } +-if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_CLEARERR_UNLOCKED 1 ++#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl + _ACEOF + +- ++ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_CLEARERR_UNLOCKED 0 +-_ACEOF +- +- ++ ac_have_decl=0 + fi + +- +-{ $as_echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5 +-$as_echo_n "checking whether feof_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef feof_unlocked +- (void) feof_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_feof_unlocked=yes ++ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_feof_unlocked=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_feof_unlocked" >&6; } +-if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FEOF_UNLOCKED 1 ++#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl + _ACEOF + +- ++ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FEOF_UNLOCKED 0 +-_ACEOF +- +- ++ ac_have_decl=0 + fi + +- +-{ $as_echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5 +-$as_echo_n "checking whether ferror_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef ferror_unlocked +- (void) ferror_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_ferror_unlocked=yes ++ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_ferror_unlocked=no ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl ++_ACEOF ++ ++ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_ferror_unlocked" >&6; } +-if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FERROR_UNLOCKED 1 ++#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl + _ACEOF + +- ++ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FERROR_UNLOCKED 0 +-_ACEOF ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl ++_ACEOF + ++ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl ++_ACEOF + +-{ $as_echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5 +-$as_echo_n "checking whether fflush_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 ++ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then : ++ ac_have_decl=1 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fflush_unlocked +- (void) fflush_unlocked; +-#endif ++ ac_have_decl=0 ++fi + +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fflush_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_fflush_unlocked=no ++ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl ++_ACEOF ++ ++ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fflush_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FFLUSH_UNLOCKED 1 ++#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl + _ACEOF + + +-else ++ ++ ++ for ac_func in $ac_func_list ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FFLUSH_UNLOCKED 0 ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF + +- + fi ++done + + +-{ $as_echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5 +-$as_echo_n "checking whether fgets_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fgets_unlocked +- (void) fgets_unlocked; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fgets_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_fgets_unlocked=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fgets_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FGETS_UNLOCKED 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FGETS_UNLOCKED 0 +-_ACEOF + + +-fi + ++ XGETTEXT_EXTRA_OPTIONS= + +-{ $as_echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5 +-$as_echo_n "checking whether fputc_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 ++$as_echo_n "checking for d_ino member in directory struct... " >&6; } ++if ${gl_cv_struct_dirent_d_ino+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_struct_dirent_d_ino=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default ++#include ++ #include ++ #include ++ + int + main () + { +-#ifndef fputc_unlocked +- (void) fputc_unlocked; +-#endif ++DIR *dp = opendir ("."); ++ struct dirent *e; ++ struct stat st; ++ if (! dp) ++ return 1; ++ e = readdir (dp); ++ if (! e) ++ return 2; ++ if (stat (e->d_name, &st) != 0) ++ return 3; ++ if (e->d_ino != st.st_ino) ++ return 4; ++ return 0; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fputc_unlocked=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_struct_dirent_d_ino=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fputc_unlocked=no ++ gl_cv_struct_dirent_d_ino=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_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fputc_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 ++$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } ++ if test $gl_cv_struct_dirent_d_ino = yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FPUTC_UNLOCKED 1 +-_ACEOF ++$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h ++ ++ fi + + ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 ++$as_echo_n "checking for long file names... " >&6; } ++if ${ac_cv_sys_long_file_names+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FPUTC_UNLOCKED 0 +-_ACEOF ++ ac_cv_sys_long_file_names=yes ++# Test for long file names in all the places we know might matter: ++# . the current directory, where building will happen ++# $prefix/lib where we will be installing things ++# $exec_prefix/lib likewise ++# $TMPDIR if set, where it might want to write temporary files ++# /tmp where it might want to write temporary files ++# /var/tmp likewise ++# /usr/tmp likewise ++for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do ++ # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib ++ # in the usual case where exec_prefix is '${prefix}'. ++ case $ac_dir in #( ++ . | /* | ?:[\\/]*) ;; #( ++ *) continue;; ++ esac ++ test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. ++ ac_xdir=$ac_dir/cf$$ ++ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue ++ ac_tf1=$ac_xdir/conftest9012345 ++ ac_tf2=$ac_xdir/conftest9012346 ++ touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ++ ac_cv_sys_long_file_names=no ++ rm -f -r "$ac_xdir" 2>/dev/null ++ test $ac_cv_sys_long_file_names = no && break ++done ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 ++$as_echo "$ac_cv_sys_long_file_names" >&6; } ++if test $ac_cv_sys_long_file_names = yes; then + ++$as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h + + fi + + +-{ $as_echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5 +-$as_echo_n "checking whether fputs_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then ++ ++ ++ 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_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; ++ 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_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_DECL_WCTOB=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; ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 ++$as_echo_n "checking whether uses 'inline' correctly... " >&6; } ++if ${gl_cv_header_wchar_h_correct_inline+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ gl_cv_header_wchar_h_correct_inline=yes ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fputs_unlocked +- (void) fputs_unlocked; +-#endif + +- ; +- return 0; +-} ++ #define wcstod renamed_wcstod ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++extern int zero (void); ++int main () { return zero(); } ++ + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 ++ (eval $ac_compile) 2>&5 + ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fputs_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fputs_unlocked=no +-fi ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ mv conftest.$ac_objext conftest1.$ac_objext ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fputs_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then ++ #define wcstod renamed_wcstod ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int zero (void) { return 0; } + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FPUTS_UNLOCKED 1 + _ACEOF ++ if { { 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 ++ mv conftest.$ac_objext conftest2.$ac_objext ++ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then ++ : ++ else ++ gl_cv_header_wchar_h_correct_inline=no ++ fi ++ fi ++ fi ++ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext + +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FPUTS_UNLOCKED 0 +-_ACEOF ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 ++$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } ++ if test $gl_cv_header_wchar_h_correct_inline = no; then ++ as_fn_error $? " cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). ++This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in ++C99 mode. You have four options: ++ - Add the flag -fgnu89-inline to CC and reconfigure, or ++ - Fix your include files, using parts of ++ , or ++ - Use a gcc version older than 4.3, or ++ - Don't use the flags -std=c99 or -std=gnu99. ++Configuration aborted." "$LINENO" 5 ++ fi + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5 +-$as_echo_n "checking whether fread_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 ++$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } ++if ${am_cv_langinfo_codeset+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default ++#include + int + main () + { +-#ifndef fread_unlocked +- (void) fread_unlocked; +-#endif +- ++char* cs = nl_langinfo(CODESET); return !cs; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fread_unlocked=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ am_cv_langinfo_codeset=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fread_unlocked=no ++ am_cv_langinfo_codeset=no + fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fread_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FREAD_UNLOCKED 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 ++$as_echo "$am_cv_langinfo_codeset" >&6; } ++ if test $am_cv_langinfo_codeset = yes; then + ++$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FREAD_UNLOCKED 0 +-_ACEOF ++ fi + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5 +-$as_echo_n "checking whether fwrite_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 ++$as_echo_n "checking for a traditional french locale... " >&6; } ++if ${gt_cv_locale_fr+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fwrite_unlocked +- (void) fwrite_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fwrite_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++#include ++#include ++#if HAVE_LANGINFO_CODESET ++# include ++#endif ++#include ++#include ++struct tm t; ++char buf[16]; ++int main () { ++ /* Check whether the given locale name is recognized by the system. */ ++#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ ++ /* On native Win32, setlocale(category, "") looks at the system settings, ++ not at the environment variables. Also, when an encoding suffix such ++ as ".65001" or ".54936" is speficied, 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 MacOS 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 the abbreviation of the second month, the second ++ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only ++ one byte long. This excludes the UTF-8 encoding. */ ++ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; ++ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; ++ /* 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; ++ return 0; ++} + +- ac_cv_have_decl_fwrite_unlocked=no +-fi ++_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 native Win32 locale name. ++ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then ++ gt_cv_locale_fr=French_France.1252 ++ else ++ # None found. ++ gt_cv_locale_fr=none ++ fi ++ ;; ++ *) ++ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because ++ # otherwise on MacOS 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=fr_FR ++ else ++ # Test for the locale name with explicit encoding suffix. ++ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then ++ gt_cv_locale_fr=fr_FR.ISO-8859-1 ++ else ++ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. ++ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then ++ gt_cv_locale_fr=fr_FR.ISO8859-1 ++ else ++ # Test for the HP-UX locale name. ++ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then ++ gt_cv_locale_fr=fr_FR.iso88591 ++ else ++ # Test for the Solaris 7 locale name. ++ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then ++ gt_cv_locale_fr=fr ++ else ++ # None found. ++ gt_cv_locale_fr=none ++ fi ++ fi ++ fi ++ fi ++ fi ++ ;; ++ esac ++ fi ++ rm -fr conftest* + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_fwrite_unlocked" >&6; } +-if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 ++$as_echo "$gt_cv_locale_fr" >&6; } ++ LOCALE_FR=$gt_cv_locale_fr + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FWRITE_UNLOCKED 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FWRITE_UNLOCKED 0 +-_ACEOF + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +-$as_echo_n "checking whether getc_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getc_unlocked +- (void) getc_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getc_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_getc_unlocked=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ { $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 ++ # . ++ 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:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } +-if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then ++{ $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 + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 1 +-_ACEOF ++$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + ++ fi + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 0 +-_ACEOF + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5 +-$as_echo_n "checking whether getchar_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; 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 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ touch conftest.a ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_realpath_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default ++ ++ ++ #include ++ + int + main () + { +-#ifndef getchar_unlocked +- (void) getchar_unlocked; +-#endif ++ ++ int result = 0; ++ { ++ char *name = realpath ("conftest.a", NULL); ++ if (!(name && *name == '/')) ++ result |= 1; ++ } ++ { ++ char *name = realpath ("conftest.b/../conftest.a", NULL); ++ if (name != NULL) ++ result |= 2; ++ } ++ { ++ char *name = realpath ("conftest.a/", NULL); ++ if (name != NULL) ++ result |= 4; ++ } ++ return result; + + ; + return 0; + } ++ + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getchar_unlocked=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_realpath_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getchar_unlocked=no ++ 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 -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_getchar_unlocked" >&6; } +-if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 ++$as_echo "$gl_cv_func_realpath_works" >&6; } ++ if test "$gl_cv_func_realpath_works" = yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETCHAR_UNLOCKED 1 +-_ACEOF ++$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h + ++ fi + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETCHAR_UNLOCKED 0 +-_ACEOF + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5 +-$as_echo_n "checking whether putc_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef putc_unlocked +- (void) putc_unlocked; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_putc_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_putc_unlocked=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_putc_unlocked" >&6; } +-if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PUTC_UNLOCKED 1 +-_ACEOF ++ GNULIB__EXIT=0; ++ GNULIB_ATOLL=0; ++ GNULIB_CALLOC_POSIX=0; ++ GNULIB_CANONICALIZE_FILE_NAME=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_PTSNAME=0; ++ GNULIB_PUTENV=0; ++ GNULIB_RANDOM_R=0; ++ GNULIB_REALLOC_POSIX=0; ++ GNULIB_REALPATH=0; ++ GNULIB_RPMATCH=0; ++ GNULIB_SETENV=0; ++ GNULIB_STRTOD=0; ++ GNULIB_STRTOLL=0; ++ GNULIB_STRTOULL=0; ++ GNULIB_SYSTEM_POSIX=0; ++ GNULIB_UNLOCKPT=0; ++ GNULIB_UNSETENV=0; ++ GNULIB_WCTOMB=0; ++ HAVE__EXIT=1; ++ HAVE_ATOLL=1; ++ HAVE_CANONICALIZE_FILE_NAME=1; ++ HAVE_DECL_GETLOADAVG=1; ++ HAVE_GETSUBOPT=1; ++ HAVE_GRANTPT=1; ++ HAVE_MKDTEMP=1; ++ HAVE_MKOSTEMP=1; ++ HAVE_MKOSTEMPS=1; ++ HAVE_MKSTEMP=1; ++ HAVE_MKSTEMPS=1; ++ HAVE_PTSNAME=1; ++ HAVE_RANDOM_H=1; ++ HAVE_RANDOM_R=1; ++ HAVE_REALPATH=1; ++ HAVE_RPMATCH=1; ++ HAVE_SETENV=1; ++ HAVE_DECL_SETENV=1; ++ HAVE_STRTOD=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_CALLOC=0; ++ REPLACE_CANONICALIZE_FILE_NAME=0; ++ REPLACE_MALLOC=0; ++ REPLACE_MBTOWC=0; ++ REPLACE_MKSTEMP=0; ++ REPLACE_PUTENV=0; ++ REPLACE_REALLOC=0; ++ REPLACE_REALPATH=0; ++ REPLACE_SETENV=0; ++ REPLACE_STRTOD=0; ++ REPLACE_UNSETENV=0; ++ REPLACE_WCTOMB=0; + + +-else ++ GNULIB_CHOWN=0; ++ GNULIB_CLOSE=0; ++ GNULIB_DUP2=0; ++ GNULIB_DUP3=0; ++ GNULIB_ENVIRON=0; ++ GNULIB_EUIDACCESS=0; ++ GNULIB_FACCESSAT=0; ++ GNULIB_FCHDIR=0; ++ GNULIB_FCHOWNAT=0; ++ GNULIB_FSYNC=0; ++ GNULIB_FTRUNCATE=0; ++ GNULIB_GETCWD=0; ++ GNULIB_GETDOMAINNAME=0; ++ GNULIB_GETDTABLESIZE=0; ++ GNULIB_GETGROUPS=0; ++ GNULIB_GETHOSTNAME=0; ++ GNULIB_GETLOGIN=0; ++ GNULIB_GETLOGIN_R=0; ++ GNULIB_GETPAGESIZE=0; ++ GNULIB_GETUSERSHELL=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_READLINK=0; ++ GNULIB_READLINKAT=0; ++ GNULIB_RMDIR=0; ++ GNULIB_SLEEP=0; ++ GNULIB_SYMLINK=0; ++ GNULIB_SYMLINKAT=0; ++ GNULIB_TTYNAME_R=0; ++ GNULIB_UNISTD_H_GETOPT=0; ++ GNULIB_UNISTD_H_SIGPIPE=0; ++ GNULIB_UNLINK=0; ++ GNULIB_UNLINKAT=0; ++ GNULIB_USLEEP=0; ++ GNULIB_WRITE=0; ++ HAVE_CHOWN=1; ++ HAVE_DUP2=1; ++ HAVE_DUP3=1; ++ HAVE_EUIDACCESS=1; ++ HAVE_FACCESSAT=1; ++ HAVE_FCHDIR=1; ++ HAVE_FCHOWNAT=1; ++ HAVE_FSYNC=1; ++ HAVE_FTRUNCATE=1; ++ HAVE_GETDTABLESIZE=1; ++ HAVE_GETGROUPS=1; ++ HAVE_GETHOSTNAME=1; ++ HAVE_GETLOGIN=1; ++ HAVE_GETPAGESIZE=1; ++ HAVE_LCHOWN=1; ++ HAVE_LINK=1; ++ HAVE_LINKAT=1; ++ HAVE_PIPE=1; ++ HAVE_PIPE2=1; ++ HAVE_PREAD=1; ++ HAVE_PWRITE=1; ++ HAVE_READLINK=1; ++ HAVE_READLINKAT=1; ++ HAVE_SLEEP=1; ++ HAVE_SYMLINK=1; ++ HAVE_SYMLINKAT=1; ++ HAVE_UNLINKAT=1; ++ HAVE_USLEEP=1; ++ HAVE_DECL_ENVIRON=1; ++ HAVE_DECL_FCHDIR=1; ++ HAVE_DECL_GETDOMAINNAME=1; ++ HAVE_DECL_GETLOGIN_R=1; ++ HAVE_DECL_GETPAGESIZE=1; ++ HAVE_DECL_GETUSERSHELL=1; ++ HAVE_DECL_TTYNAME_R=1; ++ HAVE_OS_H=0; ++ HAVE_SYS_PARAM_H=0; ++ REPLACE_CHOWN=0; ++ REPLACE_CLOSE=0; ++ REPLACE_DUP=0; ++ REPLACE_DUP2=0; ++ REPLACE_FCHOWNAT=0; ++ REPLACE_GETCWD=0; ++ REPLACE_GETDOMAINNAME=0; ++ REPLACE_GETLOGIN_R=0; ++ REPLACE_GETGROUPS=0; ++ REPLACE_GETPAGESIZE=0; ++ REPLACE_LCHOWN=0; ++ REPLACE_LINK=0; ++ REPLACE_LINKAT=0; ++ REPLACE_LSEEK=0; ++ REPLACE_PREAD=0; ++ REPLACE_PWRITE=0; ++ REPLACE_READLINK=0; ++ REPLACE_RMDIR=0; ++ REPLACE_SLEEP=0; ++ REPLACE_SYMLINK=0; ++ REPLACE_TTYNAME_R=0; ++ REPLACE_UNLINK=0; ++ REPLACE_UNLINKAT=0; ++ REPLACE_USLEEP=0; ++ REPLACE_WRITE=0; ++ UNISTD_H_HAVE_WINSOCK2_H=0; ++ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=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_DECL_PUTC_UNLOCKED 0 ++#define HAVE_UNISTD_H 1 + _ACEOF + +- + fi + ++done + +-{ $as_echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5 +-$as_echo_n "checking whether putchar_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then ++{ $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 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ ac_cv_func_chown_works=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default ++#include ++ + int + main () + { +-#ifndef putchar_unlocked +- (void) putchar_unlocked; +-#endif ++ 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_putchar_unlocked=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_chown_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_putchar_unlocked=no ++ ac_cv_func_chown_works=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:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_putchar_unlocked" >&6; } +-if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PUTCHAR_UNLOCKED 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PUTCHAR_UNLOCKED 0 +-_ACEOF + ++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; } ++if test $ac_cv_func_chown_works = yes; then + ++$as_echo "#define HAVE_CHOWN 1" >>confdefs.h + ++fi + + ++ { $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=yes + +-for ac_func in $ac_func_list +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++#include ++#include ++#include + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif ++ int ++ main () ++ { ++ int result = 0; ++ char const *dangling_symlink = "conftest.dangle"; + +-#undef $ac_func ++ unlink (dangling_symlink); ++ if (symlink ("conftest.no-such", dangling_symlink)) ++ abort (); + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++ /* 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; ++ } + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_chown_follows_symlink=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ gl_cv_func_chown_follows_symlink=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- 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 +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++ ++ + + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5 ++$as_echo "$gl_cv_func_chown_follows_symlink" >&6; } + ++ if test $gl_cv_func_chown_follows_symlink = no; then + ++$as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h + ++ fi + + + +@@ -10680,528 +8631,161 @@ + + + +- XGETTEXT_EXTRA_OPTIONS= + +-{ $as_echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5 +-$as_echo_n "checking for d_ino member in directory struct... " >&6; } +-if test "${gl_cv_struct_dirent_d_ino+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_struct_dirent_d_ino=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- #include + +-int +-main () +-{ +-DIR *dp = opendir ("."); +- struct dirent *e; +- struct stat st; +- if (! dp) +- return 1; +- e = readdir (dp); +- if (! e) +- return 2; +- if (stat (e->d_name, &st) != 0) +- return 3; +- if (e->d_ino != st.st_ino) +- return 4; +- return 0; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_struct_dirent_d_ino=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_struct_dirent_d_ino=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + ++ if test $ac_cv_func_chown = no; then ++ HAVE_CHOWN=0 + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_struct_dirent_d_ino" >&5 +-$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } +- if test $gl_cv_struct_dirent_d_ino = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define D_INO_IN_DIRENT 1 +-_ACEOF + +- fi + + +-{ $as_echo "$as_me:$LINENO: checking for long file names" >&5 +-$as_echo_n "checking for long file names... " >&6; } +-if test "${ac_cv_sys_long_file_names+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_sys_long_file_names=yes +-# Test for long file names in all the places we know might matter: +-# . the current directory, where building will happen +-# $prefix/lib where we will be installing things +-# $exec_prefix/lib likewise +-# $TMPDIR if set, where it might want to write temporary files +-# /tmp where it might want to write temporary files +-# /var/tmp likewise +-# /usr/tmp likewise +-for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do +- # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib +- # in the usual case where exec_prefix is '${prefix}'. +- case $ac_dir in #( +- . | /* | ?:[\\/]*) ;; #( +- *) continue;; +- esac +- test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. +- ac_xdir=$ac_dir/cf$$ +- (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue +- ac_tf1=$ac_xdir/conftest9012345 +- ac_tf2=$ac_xdir/conftest9012346 +- touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || +- ac_cv_sys_long_file_names=no +- rm -f -r "$ac_xdir" 2>/dev/null +- test $ac_cv_sys_long_file_names = no && break +-done +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5 +-$as_echo "$ac_cv_sys_long_file_names" >&6; } +-if test $ac_cv_sys_long_file_names = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LONG_FILE_NAMES 1 +-_ACEOF + +-fi + ++ gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" + ++ else ++ if test $gl_cv_func_chown_follows_symlink = no; then ++ REPLACE_CHOWN=1 + + +- 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_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; +- 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_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_DECL_WCTOB=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; + + +- { $as_echo "$as_me:$LINENO: checking whether uses 'inline' correctly" >&5 +-$as_echo_n "checking whether uses 'inline' correctly... " >&6; } +-if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- gl_cv_header_wchar_h_correct_inline=yes +- cat >conftest.$ac_ext <<_ACEOF + +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#define wcstod renamed_wcstod +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-extern int zero (void); +-int main () { return zero(); } + +-_ACEOF +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then +- mv conftest.$ac_objext conftest1.$ac_objext +- cat >conftest.$ac_ext <<_ACEOF + +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#define wcstod renamed_wcstod +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int zero (void) { return 0; } + +-_ACEOF +- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 +- (eval $ac_compile) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; then +- mv conftest.$ac_objext conftest2.$ac_objext +- if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then +- : +- else +- gl_cv_header_wchar_h_correct_inline=no +- fi +- fi +- fi +- rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ++ gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_correct_inline" >&5 +-$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } +- if test $gl_cv_header_wchar_h_correct_inline = no; then +- { { $as_echo "$as_me:$LINENO: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). +-This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in +-C99 mode. You have four options: +- - Add the flag -fgnu89-inline to CC and reconfigure, or +- - Fix your include files, using parts of +- , or +- - Use a gcc version older than 4.3, or +- - Don't use the flags -std=c99 or -std=gnu99. +-Configuration aborted." >&5 +-$as_echo "$as_me: error: cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). +-This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in +-C99 mode. You have four options: +- - Add the flag -fgnu89-inline to CC and reconfigure, or +- - Fix your include files, using parts of +- , or +- - Use a gcc version older than 4.3, or +- - Don't use the flags -std=c99 or -std=gnu99. +-Configuration aborted." >&2;} +- { (exit 1); exit 1; }; } +- fi ++ fi ++ ++ if test $ac_cv_func_chown_works = no; then + ++$as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h + ++ REPLACE_CHOWN=1 + + +- { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +-$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } +-if test "${am_cv_langinfo_codeset+set}" = set; then ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" ++ ++ fi ++ ++ { $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 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ touch conftest.file && rm -f conftest.link ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_chown_slash_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++#include ++#include ++#include ++ + int + main () + { +-char* cs = nl_langinfo(CODESET); return !cs; ++ if (symlink ("conftest.file", "conftest.link")) return 1; ++ if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- am_cv_langinfo_codeset=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_chown_slash_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ 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 + +- am_cv_langinfo_codeset=no ++ 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; } ++ if test "$gl_cv_func_chown_slash_works" != yes; then + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++$as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h + +-fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +-$as_echo "$am_cv_langinfo_codeset" >&6; } +- if test $am_cv_langinfo_codeset = yes; then ++ REPLACE_CHOWN=1 + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LANGINFO_CODESET 1 +-_ACEOF + +- fi + + + + +- { $as_echo "$as_me:$LINENO: checking for a traditional french locale" >&5 +-$as_echo_n "checking for a traditional french locale... " >&6; } +-if test "${gt_cv_locale_fr+set}" = set; then ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" ++ ++ fi ++ ++ { $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 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_chown_ctime_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#if HAVE_LANGINFO_CODESET +-# include +-#endif ++#include + #include +-#include +-struct tm t; +-char buf[16]; +-int main () { +- /* Check whether the given locale name is recognized by the system. */ +-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +- /* On native Win32, setlocale(category, "") looks at the system settings, +- not at the environment variables. Also, when an encoding suffix such +- as ".65001" or ".54936" is speficied, 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 MacOS 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 the abbreviation of the second month, the second +- character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only +- one byte long. This excludes the UTF-8 encoding. */ +- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; +- if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; +- /* 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; ++#include ++#include ++#include ++ ++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 { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && 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 native Win32 locale name. +- if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_fr=French_France.1252 +- else +- # None found. +- gt_cv_locale_fr=none +- fi +- ;; +- *) +- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because +- # otherwise on MacOS 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=fr_FR +- else +- # Test for the locale name with explicit encoding suffix. +- if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_fr=fr_FR.ISO-8859-1 +- else +- # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. +- if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_fr=fr_FR.ISO8859-1 +- else +- # Test for the HP-UX locale name. +- if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_fr=fr_FR.iso88591 +- else +- # Test for the Solaris 7 locale name. +- if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_fr=fr +- else +- # None found. +- gt_cv_locale_fr=none +- fi +- fi +- fi +- fi +- fi +- ;; +- esac +- fi +- rm -fr conftest* ++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:$LINENO: result: $gt_cv_locale_fr" >&5 +-$as_echo "$gt_cv_locale_fr" >&6; } +- LOCALE_FR=$gt_cv_locale_fr ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5 ++$as_echo "$gl_cv_func_chown_ctime_works" >&6; } ++ if test "$gl_cv_func_chown_ctime_works" != yes; then + ++$as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h + ++ REPLACE_CHOWN=1 + + + +@@ -11210,44 +8794,11 @@ + + + +- { $as_echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 +-$as_echo_n "checking whether // is distinct from /... " >&6; } +-if test "${gl_cv_double_slash_root+set}" = set; 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 +- # . +- 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:$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 ++ gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" + +-cat >>confdefs.h <<\_ACEOF +-#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 +-_ACEOF ++ fi + +- fi ++ if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then + + + +@@ -11256,102 +8807,143 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext" + ++ fi ++ fi ++ ++ ++ GNULIB_DIRFD=0; ++ GNULIB_FDOPENDIR=0; ++ GNULIB_SCANDIR=0; ++ GNULIB_ALPHASORT=0; ++ HAVE_DECL_DIRFD=1; ++ HAVE_DECL_FDOPENDIR=1; ++ HAVE_FDOPENDIR=1; ++ HAVE_SCANDIR=1; ++ HAVE_ALPHASORT=1; ++ REPLACE_CLOSEDIR=0; ++ REPLACE_DIRFD=0; ++ REPLACE_FDOPENDIR=0; ++ REPLACE_OPENDIR=0; + +- { $as_echo "$as_me:$LINENO: checking whether realpath works" >&5 +-$as_echo_n "checking whether realpath works... " >&6; } +-if test "${gl_cv_func_realpath_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- touch conftest.a +- if test "$cross_compiling" = yes; then +- gl_cv_func_realpath_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF + +- /* confdefs.h. */ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 ++$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } ++if ${gl_cv_have_include_next+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ rm -rf conftestd1a conftestd1b conftestd2 ++ mkdir conftestd1a conftestd1b conftestd2 ++ cat < conftestd1a/conftest.h ++#define DEFINED_IN_CONFTESTD1 ++#include_next ++#ifdef DEFINED_IN_CONFTESTD2 ++int foo; ++#else ++#error "include_next doesn't work" ++#endif ++EOF ++ cat < conftestd1b/conftest.h ++#define DEFINED_IN_CONFTESTD1 ++#include ++#include_next ++#ifdef DEFINED_IN_CONFTESTD2 ++int foo; ++#else ++#error "include_next doesn't work" ++#endif ++EOF ++ cat < conftestd2/conftest.h ++#ifndef DEFINED_IN_CONFTESTD1 ++#error "include_next test doesn't work" ++#endif ++#define DEFINED_IN_CONFTESTD2 ++EOF ++ gl_save_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_have_include_next=yes ++else ++ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_have_include_next=buggy ++else ++ gl_cv_have_include_next=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- #include ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CPPFLAGS="$gl_save_CPPFLAGS" ++ rm -rf conftestd1a conftestd1b conftestd2 + +-int +-main () +-{ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 ++$as_echo "$gl_cv_have_include_next" >&6; } ++ PRAGMA_SYSTEM_HEADER= ++ if test $gl_cv_have_include_next = yes; then ++ INCLUDE_NEXT=include_next ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next ++ if test -n "$GCC"; then ++ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' ++ fi ++ else ++ if test $gl_cv_have_include_next = buggy; then ++ INCLUDE_NEXT=include ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next ++ else ++ INCLUDE_NEXT=include ++ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include ++ fi ++ fi + +- int result = 0; +- { +- char *name = realpath ("conftest.a", NULL); +- if (!(name && *name == '/')) +- result |= 1; +- } +- { +- char *name = realpath ("conftest.b/../conftest.a", NULL); +- if (name != NULL) +- result |= 2; +- } +- { +- char *name = realpath ("conftest.a/", NULL); +- if (name != NULL) +- result |= 4; +- } +- return result; + +- ; +- return 0; +-} + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_realpath_works=yes ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 ++$as_echo_n "checking whether system header files limit the line length... " >&6; } ++if ${gl_cv_pragma_columns+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#ifdef __TANDEM ++choke me ++#endif + +-( exit $ac_status ) +-gl_cv_func_realpath_works=no ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "choke me" >/dev/null 2>&1; then : ++ gl_cv_pragma_columns=yes ++else ++ gl_cv_pragma_columns=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f conftest* ++ ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 ++$as_echo "$gl_cv_pragma_columns" >&6; } ++ if test $gl_cv_pragma_columns = yes; then ++ PRAGMA_COLUMNS="#pragma COLUMNS 10000" ++ else ++ PRAGMA_COLUMNS= ++ fi + + + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_realpath_works" >&5 +-$as_echo "$gl_cv_func_realpath_works" >&6; } +- if test "$gl_cv_func_realpath_works" = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define FUNC_REALPATH_WORKS 1 +-_ACEOF + +- fi + + + +@@ -11362,6 +8954,7 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" + + + +@@ -11371,1076 +8964,79 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" + + + + +- GNULIB__EXIT=0; +- GNULIB_ATOLL=0; +- GNULIB_CALLOC_POSIX=0; +- GNULIB_CANONICALIZE_FILE_NAME=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_PTSNAME=0; +- GNULIB_PUTENV=0; +- GNULIB_RANDOM_R=0; +- GNULIB_REALLOC_POSIX=0; +- GNULIB_REALPATH=0; +- GNULIB_RPMATCH=0; +- GNULIB_SETENV=0; +- GNULIB_STRTOD=0; +- GNULIB_STRTOLL=0; +- GNULIB_STRTOULL=0; +- GNULIB_SYSTEM_POSIX=0; +- GNULIB_UNLOCKPT=0; +- GNULIB_UNSETENV=0; +- GNULIB_WCTOMB=0; +- HAVE__EXIT=1; +- HAVE_ATOLL=1; +- HAVE_CANONICALIZE_FILE_NAME=1; +- HAVE_DECL_GETLOADAVG=1; +- HAVE_GETSUBOPT=1; +- HAVE_GRANTPT=1; +- HAVE_MKDTEMP=1; +- HAVE_MKOSTEMP=1; +- HAVE_MKOSTEMPS=1; +- HAVE_MKSTEMP=1; +- HAVE_MKSTEMPS=1; +- HAVE_PTSNAME=1; +- HAVE_RANDOM_H=1; +- HAVE_RANDOM_R=1; +- HAVE_REALPATH=1; +- HAVE_RPMATCH=1; +- HAVE_SETENV=1; +- HAVE_DECL_SETENV=1; +- HAVE_STRTOD=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_CALLOC=0; +- REPLACE_CANONICALIZE_FILE_NAME=0; +- REPLACE_MALLOC=0; +- REPLACE_MBTOWC=0; +- REPLACE_MKSTEMP=0; +- REPLACE_PUTENV=0; +- REPLACE_REALLOC=0; +- REPLACE_REALPATH=0; +- REPLACE_SETENV=0; +- REPLACE_STRTOD=0; +- REPLACE_UNSETENV=0; +- REPLACE_WCTOMB=0; + + +- GNULIB_CHOWN=0; +- GNULIB_CLOSE=0; +- GNULIB_DUP2=0; +- GNULIB_DUP3=0; +- GNULIB_ENVIRON=0; +- GNULIB_EUIDACCESS=0; +- GNULIB_FACCESSAT=0; +- GNULIB_FCHDIR=0; +- GNULIB_FCHOWNAT=0; +- GNULIB_FSYNC=0; +- GNULIB_FTRUNCATE=0; +- GNULIB_GETCWD=0; +- GNULIB_GETDOMAINNAME=0; +- GNULIB_GETDTABLESIZE=0; +- GNULIB_GETGROUPS=0; +- GNULIB_GETHOSTNAME=0; +- GNULIB_GETLOGIN=0; +- GNULIB_GETLOGIN_R=0; +- GNULIB_GETPAGESIZE=0; +- GNULIB_GETUSERSHELL=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_READLINK=0; +- GNULIB_READLINKAT=0; +- GNULIB_RMDIR=0; +- GNULIB_SLEEP=0; +- GNULIB_SYMLINK=0; +- GNULIB_SYMLINKAT=0; +- GNULIB_TTYNAME_R=0; +- GNULIB_UNISTD_H_GETOPT=0; +- GNULIB_UNISTD_H_SIGPIPE=0; +- GNULIB_UNLINK=0; +- GNULIB_UNLINKAT=0; +- GNULIB_USLEEP=0; +- GNULIB_WRITE=0; +- HAVE_CHOWN=1; +- HAVE_DUP2=1; +- HAVE_DUP3=1; +- HAVE_EUIDACCESS=1; +- HAVE_FACCESSAT=1; +- HAVE_FCHDIR=1; +- HAVE_FCHOWNAT=1; +- HAVE_FSYNC=1; +- HAVE_FTRUNCATE=1; +- HAVE_GETDTABLESIZE=1; +- HAVE_GETGROUPS=1; +- HAVE_GETHOSTNAME=1; +- HAVE_GETLOGIN=1; +- HAVE_GETPAGESIZE=1; +- HAVE_LCHOWN=1; +- HAVE_LINK=1; +- HAVE_LINKAT=1; +- HAVE_PIPE=1; +- HAVE_PIPE2=1; +- HAVE_PREAD=1; +- HAVE_PWRITE=1; +- HAVE_READLINK=1; +- HAVE_READLINKAT=1; +- HAVE_SLEEP=1; +- HAVE_SYMLINK=1; +- HAVE_SYMLINKAT=1; +- HAVE_UNLINKAT=1; +- HAVE_USLEEP=1; +- HAVE_DECL_ENVIRON=1; +- HAVE_DECL_FCHDIR=1; +- HAVE_DECL_GETDOMAINNAME=1; +- HAVE_DECL_GETLOGIN_R=1; +- HAVE_DECL_GETPAGESIZE=1; +- HAVE_DECL_GETUSERSHELL=1; +- HAVE_DECL_TTYNAME_R=1; +- HAVE_OS_H=0; +- HAVE_SYS_PARAM_H=0; +- REPLACE_CHOWN=0; +- REPLACE_CLOSE=0; +- REPLACE_DUP=0; +- REPLACE_DUP2=0; +- REPLACE_FCHOWNAT=0; +- REPLACE_GETCWD=0; +- REPLACE_GETDOMAINNAME=0; +- REPLACE_GETLOGIN_R=0; +- REPLACE_GETGROUPS=0; +- REPLACE_GETPAGESIZE=0; +- REPLACE_LCHOWN=0; +- REPLACE_LINK=0; +- REPLACE_LINKAT=0; +- REPLACE_LSEEK=0; +- REPLACE_PREAD=0; +- REPLACE_PWRITE=0; +- REPLACE_READLINK=0; +- REPLACE_RMDIR=0; +- REPLACE_SLEEP=0; +- REPLACE_SYMLINK=0; +- REPLACE_TTYNAME_R=0; +- REPLACE_UNLINK=0; +- REPLACE_UNLINKAT=0; +- REPLACE_USLEEP=0; +- REPLACE_WRITE=0; +- UNISTD_H_HAVE_WINSOCK2_H=0; +- UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; + + + +-for ac_header in unistd.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_preproc=no +-fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + +-fi + +-done + +-{ $as_echo "$as_me:$LINENO: checking for working chown" >&5 +-$as_echo_n "checking for working chown... " >&6; } +-if test "${ac_cv_func_chown_works+set}" = set; then ++ ++ ++ ++ ++ { $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 +- if test "$cross_compiling" = yes; then +- ac_cv_func_chown_works=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ extern struct { int foo; } environ; + 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); +- ++environ.foo = 1; + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_func_chown_works=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gt_cv_var_environ_declaration=no + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_chown_works=no ++ gt_cv_var_environ_declaration=yes + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++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 + +-rm -f conftest.chown ++$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h + +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_chown_works" >&5 +-$as_echo "$ac_cv_func_chown_works" >&6; } +-if test $ac_cv_func_chown_works = yes; then ++ fi + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_CHOWN 1 +-_ACEOF + +-fi ++ if test $gt_cv_var_environ_declaration != yes; then ++ HAVE_DECL_ENVIRON=0 ++ fi + + +- { $as_echo "$as_me:$LINENO: checking whether chown dereferences symlinks" >&5 +-$as_echo_n "checking whether chown dereferences symlinks... " >&6; } +-if test "${gl_cv_func_chown_follows_symlink+set}" = set; then ++ ++ { $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 + +- if test "$cross_compiling" = yes; then +- gl_cv_func_chown_follows_symlink=yes +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +- +- 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 +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_chown_follows_symlink=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_chown_follows_symlink=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_chown_follows_symlink" >&5 +-$as_echo "$gl_cv_func_chown_follows_symlink" >&6; } +- +- if test $gl_cv_func_chown_follows_symlink = no; then +- +-cat >>confdefs.h <<\_ACEOF +-#define CHOWN_MODIFIES_SYMLINK 1 +-_ACEOF +- +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_chown = no; then +- HAVE_CHOWN=0 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +- +- else +- if test $gl_cv_func_chown_follows_symlink = no; then +- REPLACE_CHOWN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +- +- fi +- +- if test $ac_cv_func_chown_works = no; then +- +-cat >>confdefs.h <<\_ACEOF +-#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1 +-_ACEOF +- +- REPLACE_CHOWN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +- +- fi +- +- { $as_echo "$as_me:$LINENO: checking whether chown honors trailing slash" >&5 +-$as_echo_n "checking whether chown honors trailing slash... " >&6; } +-if test "${gl_cv_func_chown_slash_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- touch conftest.file && rm -f conftest.link +- if test "$cross_compiling" = yes; then +- gl_cv_func_chown_slash_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +- +-int +-main () +-{ +- if (symlink ("conftest.file", "conftest.link")) return 1; +- if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_chown_slash_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_chown_slash_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- rm -f conftest.link conftest.file +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_chown_slash_works" >&5 +-$as_echo "$gl_cv_func_chown_slash_works" >&6; } +- if test "$gl_cv_func_chown_slash_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define CHOWN_TRAILING_SLASH_BUG 1 +-_ACEOF +- +- REPLACE_CHOWN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +- +- fi +- +- { $as_echo "$as_me:$LINENO: checking whether chown always updates ctime" >&5 +-$as_echo_n "checking whether chown always updates ctime... " >&6; } +-if test "${gl_cv_func_chown_ctime_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_chown_ctime_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include +-#include +- +-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 +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_chown_ctime_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_chown_ctime_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- rm -f conftest.file +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_chown_ctime_works" >&5 +-$as_echo "$gl_cv_func_chown_ctime_works" >&6; } +- if test "$gl_cv_func_chown_ctime_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define CHOWN_CHANGE_TIME_BUG 1 +-_ACEOF +- +- REPLACE_CHOWN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext" +- +- fi +- +- if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext" +- +- fi +- fi +- +- +- GNULIB_DIRFD=0; +- GNULIB_FDOPENDIR=0; +- GNULIB_SCANDIR=0; +- GNULIB_ALPHASORT=0; +- HAVE_DECL_DIRFD=1; +- HAVE_DECL_FDOPENDIR=1; +- HAVE_FDOPENDIR=1; +- HAVE_SCANDIR=1; +- HAVE_ALPHASORT=1; +- REPLACE_CLOSEDIR=0; +- REPLACE_DIRFD=0; +- REPLACE_FDOPENDIR=0; +- REPLACE_OPENDIR=0; +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5 +-$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } +-if test "${gl_cv_have_include_next+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- rm -rf conftestd1a conftestd1b conftestd2 +- mkdir conftestd1a conftestd1b conftestd2 +- cat < conftestd1a/conftest.h +-#define DEFINED_IN_CONFTESTD1 +-#include_next +-#ifdef DEFINED_IN_CONFTESTD2 +-int foo; +-#else +-#error "include_next doesn't work" +-#endif +-EOF +- cat < conftestd1b/conftest.h +-#define DEFINED_IN_CONFTESTD1 +-#include +-#include_next +-#ifdef DEFINED_IN_CONFTESTD2 +-int foo; +-#else +-#error "include_next doesn't work" +-#endif +-EOF +- cat < conftestd2/conftest.h +-#ifndef DEFINED_IN_CONFTESTD1 +-#error "include_next test doesn't work" +-#endif +-#define DEFINED_IN_CONFTESTD2 +-EOF +- gl_save_CPPFLAGS="$CPPFLAGS" +- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" +- cat >conftest.$ac_ext <<_ACEOF +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_have_include_next=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" +- cat >conftest.$ac_ext <<_ACEOF +-#include +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_have_include_next=buggy +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_have_include_next=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 +- CPPFLAGS="$gl_save_CPPFLAGS" +- rm -rf conftestd1a conftestd1b conftestd2 +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5 +-$as_echo "$gl_cv_have_include_next" >&6; } +- PRAGMA_SYSTEM_HEADER= +- if test $gl_cv_have_include_next = yes; then +- INCLUDE_NEXT=include_next +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next +- if test -n "$GCC"; then +- PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' +- fi +- else +- if test $gl_cv_have_include_next = buggy; then +- INCLUDE_NEXT=include +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next +- else +- INCLUDE_NEXT=include +- INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include +- fi +- fi +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether system header files limit the line length" >&5 +-$as_echo_n "checking whether system header files limit the line length... " >&6; } +-if test "${gl_cv_pragma_columns+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#ifdef __TANDEM +-choke me +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "choke me" >/dev/null 2>&1; then +- gl_cv_pragma_columns=yes +-else +- gl_cv_pragma_columns=no +-fi +-rm -f conftest* +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_pragma_columns" >&5 +-$as_echo "$gl_cv_pragma_columns" >&6; } +- if test $gl_cv_pragma_columns = yes; then +- PRAGMA_COLUMNS="#pragma COLUMNS 10000" +- else +- PRAGMA_COLUMNS= +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking if environ is properly declared" >&5 +-$as_echo_n "checking if environ is properly declared... " >&6; } +- if test "${gt_cv_var_environ_declaration+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- extern struct { int foo; } environ; +-int +-main () +-{ +-environ.foo = 1; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_var_environ_declaration=no +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_var_environ_declaration=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +- +- { $as_echo "$as_me:$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 +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ENVIRON_DECL 1 +-_ACEOF +- +- fi +- +- +- if test $gt_cv_var_environ_declaration != yes; then +- HAVE_DECL_ENVIRON=0 +- fi +- +- +- +- { $as_echo "$as_me:$LINENO: checking for complete errno.h" >&5 +-$as_echo_n "checking for complete errno.h... " >&6; } +-if test "${gl_cv_header_errno_h_complete+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -12480,7 +9076,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "booboo" >/dev/null 2>&1; then ++ $EGREP "booboo" >/dev/null 2>&1; then : + gl_cv_header_errno_h_complete=no + else + gl_cv_header_errno_h_complete=yes +@@ -12489,7 +9085,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5 ++{ $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='' +@@ -12505,17 +9101,13 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_errno_h='<'errno.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_errno_h+set}" = set; then ++if ${gl_cv_next_errno_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -12534,7 +9126,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5 ++{ $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 +@@ -12556,17 +9148,13 @@ + + + if test -n "$ERRNO_H"; then +- { $as_echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 + $as_echo_n "checking for EMULTIHOP value... " >&6; } +-if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then ++if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -12576,7 +9164,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EMULTIHOP=yes + else + gl_cv_header_errno_h_EMULTIHOP=no +@@ -12584,11 +9172,7 @@ + rm -f conftest* + + if test $gl_cv_header_errno_h_EMULTIHOP = no; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #define _XOPEN_SOURCE_EXTENDED 1 +@@ -12599,370 +9183,27 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $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 test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " + #define _XOPEN_SOURCE_EXTENDED 1 + #include + /* The following two lines are a workaround against an autoconf-2.52 bug. */ + #include + #include ++"; then : + +-int +-main () +-{ +-static int test_array [1 - 2 * !((EMULTIHOP) >= 0)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++fi + +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EMULTIHOP) < 0)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo= ac_hi= +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;; +-'') ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-static long int longval () { return EMULTIHOP; } +-static unsigned long int ulongval () { return EMULTIHOP; } +-#include +-#include +-int +-main () +-{ +- +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((EMULTIHOP) < 0) +- { +- long int i = longval (); +- if (i != (EMULTIHOP)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (EMULTIHOP)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val +- fi +- fi ++ fi ++ fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 ++{ $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) +@@ -12978,17 +9219,13 @@ + + + if test -n "$ERRNO_H"; then +- { $as_echo "$as_me:$LINENO: checking for ENOLINK value" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 + $as_echo_n "checking for ENOLINK value... " >&6; } +-if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then ++if ${gl_cv_header_errno_h_ENOLINK+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -12998,7 +9235,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_ENOLINK=yes + else + gl_cv_header_errno_h_ENOLINK=no +@@ -13006,11 +9243,7 @@ + rm -f conftest* + + if test $gl_cv_header_errno_h_ENOLINK = no; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #define _XOPEN_SOURCE_EXTENDED 1 +@@ -13021,370 +9254,27 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $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 test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((ENOLINK) >= 0)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((ENOLINK) < 0)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo= ac_hi= +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " + #define _XOPEN_SOURCE_EXTENDED 1 + #include + /* The following two lines are a workaround against an autoconf-2.52 bug. */ + #include + #include ++"; then : + +-int +-main () +-{ +-static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;; +-'') ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-static long int longval () { return ENOLINK; } +-static unsigned long int ulongval () { return ENOLINK; } +-#include +-#include +-int +-main () +-{ +- +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((ENOLINK) < 0) +- { +- long int i = longval (); +- if (i != (ENOLINK)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (ENOLINK)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_header_errno_h_ENOLINK=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val + fi + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5 ++{ $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) +@@ -13400,17 +9290,13 @@ + + + if test -n "$ERRNO_H"; then +- { $as_echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 + $as_echo_n "checking for EOVERFLOW value... " >&6; } +-if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then ++if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -13420,7 +9306,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EOVERFLOW=yes + else + gl_cv_header_errno_h_EOVERFLOW=no +@@ -13428,11 +9314,7 @@ + rm -f conftest* + + if test $gl_cv_header_errno_h_EOVERFLOW = no; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #define _XOPEN_SOURCE_EXTENDED 1 +@@ -13443,608 +9325,90 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "yes" >/dev/null 2>&1; then ++ $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 test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " + #define _XOPEN_SOURCE_EXTENDED 1 + #include + /* The following two lines are a workaround against an autoconf-2.52 bug. */ + #include + #include ++"; then : + +-int +-main () +-{ +-static int test_array [1 - 2 * !((EOVERFLOW) >= 0)]; +-test_array [0] = 0 ++fi + +- ; +- return 0; +-} ++ 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++ ++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 +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include ++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 () + { +-static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; +-test_array [0] = 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EOVERFLOW) < 0)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo= ac_hi= +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-int +-main () +-{ +-static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)]; +-test_array [0] = 0 +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;; +-'') ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define _XOPEN_SOURCE_EXTENDED 1 +-#include +-/* The following two lines are a workaround against an autoconf-2.52 bug. */ +-#include +-#include +- +-static long int longval () { return EOVERFLOW; } +-static unsigned long int ulongval () { return EOVERFLOW; } +-#include +-#include +-int +-main () +-{ +- +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((EOVERFLOW) < 0) +- { +- long int i = longval (); +- if (i != (EOVERFLOW)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (EOVERFLOW)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val +- fi +- fi +- +-fi +-{ $as_echo "$as_me:$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 +- +- +-{ $as_echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 +-$as_echo_n "checking whether strerror_r is declared... " >&6; } +-if test "${ac_cv_have_decl_strerror_r+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strerror_r +- (void) strerror_r; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strerror_r=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strerror_r=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 +-$as_echo "$ac_cv_have_decl_strerror_r" >&6; } +-if test "x$ac_cv_have_decl_strerror_r" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRERROR_R 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRERROR_R 0 +-_ACEOF +- +- +-fi +- +- +- +-for ac_func in strerror_r +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +-{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 +-$as_echo_n "checking whether strerror_r returns char *... " >&6; } +-if test "${ac_cv_func_strerror_r_char_p+set}" = set; 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # strerror_r is not declared. Choose between +@@ -14053,14 +9417,10 @@ + # 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 ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + extern char *strerror_r (); +@@ -14074,50 +9434,21 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 ++{ $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 + +-cat >>confdefs.h <<\_ACEOF +-#define STRERROR_R_CHAR_P 1 +-_ACEOF ++$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h + + fi + +@@ -14155,76 +9486,18 @@ + REPLACE_STAT=0; + REPLACE_UTIMENSAT=0; + +-{ $as_echo "$as_me:$LINENO: checking whether fchdir is declared" >&5 +-$as_echo_n "checking whether fchdir is declared... " >&6; } +-if test "${ac_cv_have_decl_fchdir+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fchdir +- (void) fchdir; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fchdir=yes ++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 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fchdir=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fchdir" >&5 +-$as_echo "$ac_cv_have_decl_fchdir" >&6; } +-if test "x$ac_cv_have_decl_fchdir" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FCHDIR 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FCHDIR 0 ++#define HAVE_DECL_FCHDIR $ac_have_decl + _ACEOF + + +-fi +- +- +- + + + GNULIB_FCNTL=0; +@@ -14238,17 +9511,13 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for promoted mode_t type" >&5 ++ { $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 test "${gl_cv_promoted_mode_t+set}" = set; then ++if ${gl_cv_promoted_mode_t+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -14259,36 +9528,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_promoted_mode_t='int' + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_promoted_mode_t='mode_t' ++ gl_cv_promoted_mode_t='mode_t' + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_promoted_mode_t" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 + $as_echo "$gl_cv_promoted_mode_t" >&6; } + + cat >>confdefs.h <<_ACEOF +@@ -14385,19 +9633,15 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for working fcntl.h" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 + $as_echo_n "checking for working fcntl.h... " >&6; } +-if test "${gl_cv_header_working_fcntl_h+set}" = set; then ++if ${gl_cv_header_working_fcntl_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_header_working_fcntl_h=cross-compiling + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -14473,49 +9717,22 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_fcntl_h=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-case $? in #( ++ 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 -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_fcntl_h" >&5 ++{ $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 #( +@@ -14542,16 +9759,12 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for mbstate_t" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 + $as_echo_n "checking for mbstate_t... " >&6; } +-if test "${ac_cv_type_mbstate_t+set}" = set; then ++if ${ac_cv_type_mbstate_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + /* Tru64 with Desktop Toolkit C has a bug: must be included before +@@ -14570,47 +9783,22 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mbstate_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_mbstate_t=no ++ ac_cv_type_mbstate_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5 ++{ $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 + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MBSTATE_T 1 +-_ACEOF ++$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + + else + +-cat >>confdefs.h <<\_ACEOF +-#define mbstate_t int +-_ACEOF ++$as_echo "#define mbstate_t int" >>confdefs.h + + fi + +@@ -14637,17 +9825,13 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for fseeko" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5 + $as_echo_n "checking for fseeko... " >&6; } +-if test "${gl_cv_func_fseeko+set}" = set; then ++if ${gl_cv_func_fseeko+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -14659,54 +9843,25 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_fseeko=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_fseeko=no ++ gl_cv_func_fseeko=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fseeko" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5 + $as_echo "$gl_cv_func_fseeko" >&6; } + + +- { $as_echo "$as_me:$LINENO: checking whether stdin defaults to large file offsets" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5 + $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; } +-if test "${gl_cv_var_stdin_large_offset+set}" = set; then ++if ${gl_cv_var_stdin_large_offset+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -14725,120 +9880,37 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + gl_cv_var_stdin_large_offset=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_var_stdin_large_offset=no ++ gl_cv_var_stdin_large_offset=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_var_stdin_large_offset" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5 + $as_echo "$gl_cv_var_stdin_large_offset" >&6; } + +-{ $as_echo "$as_me:$LINENO: checking whether fseeko is declared" >&5 +-$as_echo_n "checking whether fseeko is declared... " >&6; } +-if test "${ac_cv_have_decl_fseeko+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef fseeko +- (void) fseeko; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fseeko=yes ++ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default" ++if test "x$ac_cv_have_decl_fseeko" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fseeko=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fseeko" >&5 +-$as_echo "$ac_cv_have_decl_fseeko" >&6; } +-if test "x$ac_cv_have_decl_fseeko" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FSEEKO 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FSEEKO 0 ++#define HAVE_DECL_FSEEKO $ac_have_decl + _ACEOF + + +-fi +- +- + + +- +- { $as_echo "$as_me:$LINENO: checking whether getcwd (NULL, 0) allocates memory for result" >&5 ++ { $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 test "${gl_cv_func_getcwd_null+set}" = set; then ++if ${gl_cv_func_getcwd_null+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess yes on glibc systems. +@@ -14852,11 +9924,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + # include +@@ -14890,263 +9958,57 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getcwd_null=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_getcwd_null=no ++ gl_cv_func_getcwd_null=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_null" >&5 ++{ $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:$LINENO: checking whether getcwd is declared" >&5 +-$as_echo_n "checking whether getcwd is declared... " >&6; } +-if test "${ac_cv_have_decl_getcwd+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getcwd +- (void) getcwd; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getcwd=yes ++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 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getcwd=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getcwd" >&5 +-$as_echo "$ac_cv_have_decl_getcwd" >&6; } +-if test "x$ac_cv_have_decl_getcwd" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETCWD 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETCWD 0 +-_ACEOF +- +- +-fi +- +- +-{ $as_echo "$as_me:$LINENO: checking whether getdelim is declared" >&5 +-$as_echo_n "checking whether getdelim is declared... " >&6; } +-if test "${ac_cv_have_decl_getdelim+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++#define HAVE_DECL_GETCWD $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getdelim +- (void) getdelim; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getdelim=yes ++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 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getdelim=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5 +-$as_echo "$ac_cv_have_decl_getdelim" >&6; } +-if test "x$ac_cv_have_decl_getdelim" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETDELIM 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETDELIM 0 ++#define HAVE_DECL_GETDELIM $ac_have_decl + _ACEOF + + +-fi +- +- + + + +- +-{ $as_echo "$as_me:$LINENO: checking whether getline is declared" >&5 +-$as_echo_n "checking whether getline is declared... " >&6; } +-if test "${ac_cv_have_decl_getline+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getline +- (void) getline; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getline=yes ++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 +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getline=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5 +-$as_echo "$ac_cv_have_decl_getline" >&6; } +-if test "x$ac_cv_have_decl_getline" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETLINE 1 ++#define HAVE_DECL_GETLINE $ac_have_decl + _ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETLINE 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- + + + +@@ -15164,20 +10026,16 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_getopt_h='<'getopt.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_getopt_h+set}" = set; then ++if ${gl_cv_next_getopt_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_getopt_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -15199,7 +10057,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_getopt_h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 + $as_echo "$gl_cv_next_getopt_h" >&6; } + fi + NEXT_GETOPT_H=$gl_cv_next_getopt_h +@@ -15226,151 +10084,12 @@ + gl_replace_getopt= + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then +- +-for ac_header in getopt.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_header in getopt.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" ++if test "x$ac_cv_header_getopt_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_GETOPT_H 1 + _ACEOF + + else +@@ -15382,102 +10101,12 @@ + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then +- +-for ac_func in getopt_long_only +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in getopt_long_only ++do : ++ ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" ++if test "x$ac_cv_func_getopt_long_only" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_GETOPT_LONG_ONLY 1 + _ACEOF + + else +@@ -15488,17 +10117,13 @@ + fi + + if test -z "$gl_replace_getopt"; then +- { $as_echo "$as_me:$LINENO: checking whether getopt is POSIX compatible" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 + $as_echo_n "checking whether getopt is POSIX compatible... " >&6; } +-if test "${gl_cv_func_getopt_posix+set}" = set; then ++if ${gl_cv_func_getopt_posix+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -15509,34 +10134,10 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_optind_min=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -15547,40 +10148,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_optind_min=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_optind_min=0 ++ gl_optind_min=0 + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + gl_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min" +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + case "$host_os" in + mingw*) gl_cv_func_getopt_posix="guessing no";; + darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; +@@ -15588,11 +10167,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -15680,46 +10255,19 @@ + } + + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_getopt_posix=no ++ gl_cv_func_getopt_posix=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + CPPFLAGS=$gl_save_CPPFLAGS + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getopt_posix" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 + $as_echo "$gl_cv_func_getopt_posix" >&6; } + case "$gl_cv_func_getopt_posix" in + *no) gl_replace_getopt=yes ;; +@@ -15727,9 +10275,9 @@ + fi + + if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then +- { $as_echo "$as_me:$LINENO: checking for working GNU getopt function" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 + $as_echo_n "checking for working GNU getopt function... " >&6; } +-if test "${gl_cv_func_getopt_gnu+set}" = set; then ++if ${gl_cv_func_getopt_gnu+:} false; then : + $as_echo_n "(cached) " >&6 + else + # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the +@@ -15746,7 +10294,7 @@ + esac + POSIXLY_CORRECT=1 + export POSIXLY_CORRECT +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + case $host_os:$ac_cv_have_decl_optreset in + *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; + *:yes) gl_cv_func_getopt_gnu=no;; +@@ -15754,11 +10302,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -15821,50 +10365,23 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_gnu=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_getopt_gnu=no ++ gl_cv_func_getopt_gnu=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + case $gl_had_POSIXLY_CORRECT in + exported) ;; +- yes) $as_unset POSIXLY_CORRECT || test "${POSIXLY_CORRECT+set}" != set || { POSIXLY_CORRECT=; export POSIXLY_CORRECT; }; POSIXLY_CORRECT=1 ;; +- *) $as_unset POSIXLY_CORRECT || test "${POSIXLY_CORRECT+set}" != set || { POSIXLY_CORRECT=; export POSIXLY_CORRECT; } ;; ++ yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; ++ *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; + esac + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getopt_gnu" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 + $as_echo "$gl_cv_func_getopt_gnu" >&6; } + if test "$gl_cv_func_getopt_gnu" = "no"; then + gl_replace_getopt=yes +@@ -15876,15 +10393,13 @@ + + + +- if test -n "$gl_replace_getopt"; then ++ if test -n "$gl_replace_getopt"; then : + + + + GETOPT_H=getopt.h + +-cat >>confdefs.h <<\_ACEOF +-#define __GETOPT_PREFIX rpl_ +-_ACEOF ++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + +@@ -15914,9 +10429,6 @@ + + + +- +- +- + fi + + +@@ -15928,7 +10440,6 @@ + + + +- + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; +@@ -15948,33 +10459,19 @@ + + + +- +- +- +- +- +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_time_h='<'sys/time.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_sys_time_h+set}" = set; then ++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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -15996,7 +10493,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5 ++{ $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 +@@ -16018,16 +10515,12 @@ + HAVE_SYS_TIME_H=0 + fi + +- { $as_echo "$as_me:$LINENO: checking for struct timeval" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 + $as_echo_n "checking for struct timeval... " >&6; } +-if test "${gl_cv_sys_struct_timeval+set}" = set; then ++if ${gl_cv_sys_struct_timeval+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #if HAVE_SYS_TIME_H + #include +@@ -16042,54 +10535,28 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_sys_struct_timeval=no ++ gl_cv_sys_struct_timeval=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5 ++{ $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 + fi + + +- +- for gl_func in gettimeofday; do ++ for gl_func in gettimeofday; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #if HAVE_SYS_TIME_H +@@ -16106,64 +10573,35 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + + + + +-{ $as_echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 ++{ $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 test "${ac_cv_header_stdbool_h+set}" = set; then ++if ${ac_cv_header_stdbool_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -16225,131 +10663,17 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdbool_h=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_stdbool_h=no ++ ac_cv_header_stdbool_h=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 + $as_echo "$ac_cv_header_stdbool_h" >&6; } +- { $as_echo "$as_me:$LINENO: checking for _Bool" >&5 +-$as_echo_n "checking for _Bool... " >&6; } +-if test "${ac_cv_type__Bool+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type__Bool=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (_Bool)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((_Bool))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type__Bool=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 +-$as_echo "$ac_cv_type__Bool" >&6; } +-if test "x$ac_cv_type__Bool" = x""yes; then ++ 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 +@@ -16379,21 +10703,17 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for unsigned long long int" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 + $as_echo_n "checking for unsigned long long int... " >&6; } +-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then ++if ${ac_cv_type_unsigned_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* For now, do not test the preprocessor; as of 2007 there are too many ++ ++ /* For now, do not test the preprocessor; as of 2007 there are too many + implementations with broken preprocessors. Perhaps this can + be revisited in 2012. In the meantime, code should not expect + #if to work with literals wider than 32 bits. */ +@@ -16422,69 +10742,38 @@ + } + + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_link "$LINENO"; then : + +- ac_cv_type_unsigned_long_long_int=no ++else ++ ac_cv_type_unsigned_long_long_int=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 + $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_UNSIGNED_LONG_LONG_INT 1 +-_ACEOF ++$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + +- { $as_echo "$as_me:$LINENO: checking for long long int" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 + $as_echo_n "checking for long long int... " >&6; } +-if test "${ac_cv_type_long_long_int+set}" = set; then ++if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #ifndef LLONG_MAX +@@ -16510,52 +10799,23 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- : +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : + +-( exit $ac_status ) +-ac_cv_type_long_long_int=no ++else ++ ac_cv_type_long_long_int=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 + $as_echo "$ac_cv_type_long_long_int" >&6; } + if test $ac_cv_type_long_long_int = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LONG_LONG_INT 1 +-_ACEOF ++$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h + + fi + +@@ -16565,11 +10825,7 @@ + + + gl_cv_c_multiarch=no +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #ifndef __APPLE_CC__ + not a universal capable compiler +@@ -16577,24 +10833,7 @@ + typedef int dummy; + + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + + arch= + prev= +@@ -16617,13 +10856,7 @@ + fi + done + +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $gl_cv_c_multiarch = yes; then + APPLE_UNIVERSAL_BUILD=1 +@@ -16635,7 +10868,6 @@ + + + +- + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else +@@ -16651,11 +10883,6 @@ + + + +- +- +- +- +- + if test $ac_cv_header_wchar_h = yes; then + HAVE_WCHAR_H=1 + else +@@ -16686,28 +10913,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdint_h='<'stdint.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stdint_h+set}" = set; then ++if ${gl_cv_next_stdint_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_stdint_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -16729,7 +10947,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 ++{ $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 +@@ -16754,20 +10972,16 @@ + + + if test $ac_cv_header_stdint_h = yes; then +- { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 ++ { $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 test "${gl_cv_header_working_stdint_h+set}" = set; then ++if ${gl_cv_header_working_stdint_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + gl_cv_header_working_stdint_h=no +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ + #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ + #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +@@ -16929,36 +11143,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- if test "$cross_compiling" = yes; then ++if ac_fn_c_try_compile "$LINENO"; then : ++ if test "$cross_compiling" = yes; then : + gl_cv_header_working_stdint_h=yes + + else +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ + #define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ + #define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +@@ -17032,201 +11225,29 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_stdint_h=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-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 +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 ++{ $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 + if test "$gl_cv_header_working_stdint_h" = yes; then + STDINT_H= + else +- +- +-for ac_header in sys/inttypes.h sys/bitypes.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ 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 +@@ -17253,23 +11274,13 @@ + if test $APPLE_UNIVERSAL_BUILD = 0; then + + +- +- + for gltype in ptrdiff_t size_t ; do +- { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 ++ { $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 { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include +@@ -17280,44 +11291,41 @@ + # include + #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +-test_array [0] = 0 ++#include "; then : + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++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 +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + ++ 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 ++ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include +@@ -17328,107 +11336,40 @@ + # include + #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 ++#include "; then : + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ result=unknown ++fi ++ ++ eval gl_cv_bitsizeof_${gltype}=\$result + +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` + 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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ eval BITSIZEOF_${GLTYPE}=\$result + done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ 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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -17441,69 +11382,71 @@ + # include + #endif + +-#include ++ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break ++if ac_fn_c_try_compile "$LINENO"; then : ++ result=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ result=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ eval gl_cv_type_${gltype}_signed=\$result + +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` + 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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ eval HAVE_SIGNED_${GLTYPE}=1 ++ else ++ eval HAVE_SIGNED_${GLTYPE}=0 ++ fi + done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo= ac_hi= +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi ++ gl_cv_type_ptrdiff_t_signed=yes ++ gl_cv_type_size_t_signed=no ++ if test $APPLE_UNIVERSAL_BUILD = 0; then + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ 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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -17516,55 +11459,66 @@ + # include + #endif + +-#include ++ extern $gltype foo; ++ extern $gltype1 foo; + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` ++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 +-done +-case $ac_lo in +-?*) result=$ac_lo;; +-'') result=unknown ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++ 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 +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ done ++ ++ ++ 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_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. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -17577,647 +11531,309 @@ + # include + #endif + +-#include +-static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +-static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +-#include +-#include ++ extern $gltype foo; ++ extern $gltype1 foo; + int + main () + { + +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof ($gltype) * CHAR_BIT) < 0) +- { +- long int i = longval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; +- + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- result=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-result=unknown +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval gl_cv_type_${gltype}_suffix=\$glsuf + fi +-rm -f conftest.val +- eval gl_cv_bitsizeof_${gltype}=\$result +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ eval result=\$gl_cv_type_${gltype}_suffix ++ test "$result" != no && break ++ done + fi +-ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$gl_cv_type_${gltype}_suffix ++ { $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_'` ++ 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 BITSIZEOF_${GLTYPE} $result ++#define ${GLTYPE}_SUFFIX $result + _ACEOF + +- eval BITSIZEOF_${GLTYPE}=\$result + done + + ++ ++ STDINT_H=stdint.h + fi + + + ++ for ac_header in inttypes.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" ++if test "x$ac_cv_header_inttypes_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_INTTYPES_H 1 ++_ACEOF ++ ++fi + ++done + +- for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 +-$as_echo_n "checking for bit size of $gltype... " >&6; } +-if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then ++ if test $ac_cv_header_inttypes_h = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 ++$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } ++if ${gt_cv_inttypes_pri_broken+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++#include ++#ifdef PRId32 ++char *p = PRId32; ++#endif + +-#include + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++if ac_fn_c_try_compile "$LINENO"; then : ++ gt_cv_inttypes_pri_broken=no ++else ++ gt_cv_inttypes_pri_broken=yes ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 ++$as_echo "$gt_cv_inttypes_pri_broken" >&6; } ++ fi ++ if test "$gt_cv_inttypes_pri_broken" = yes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define PRI_MACROS_BROKEN 1 + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ PRI_MACROS_BROKEN=1 ++ else ++ PRI_MACROS_BROKEN=0 ++ fi + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` ++ ++ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default" ++if test "x$ac_cv_have_decl_imaxabs" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_IMAXABS $ac_have_decl ++_ACEOF ++ ++ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default" ++if test "x$ac_cv_have_decl_imaxdiv" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_have_decl=0 ++fi + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_IMAXDIV $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strtoimax" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +-test_array [0] = 0 ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_STRTOIMAX $ac_have_decl ++_ACEOF + +- ; +- return 0; +-} ++ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strtoumax" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_STRTOUMAX $ac_have_decl + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +-test_array [0] = 0 ++ 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; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi ++ GNULIB_ISWBLANK=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; + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo= ac_hi= +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ { $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. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif +- +-#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be included ++ before . */ ++#include ++#include ++#include ++#include ++ wint_t foo = (wchar_t)'\0'; + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid ++if ac_fn_c_try_compile "$LINENO"; then : ++ gt_cv_c_wint_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` ++ gt_cv_c_wint_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) result=$ac_lo;; +-'') result=unknown ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++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 + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++$as_echo "#define HAVE_WINT_T 1" >>confdefs.h + +-#include +-static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +-static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +-#include +-#include +-int +-main () +-{ ++ fi + +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof ($gltype) * CHAR_BIT) < 0) +- { +- long int i = longval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%ld", i); +- } ++ ++ ++ ++ ++ ++ if test $ac_cv_func_iswcntrl = yes; then ++ HAVE_ISWCNTRL=1 + else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; ++ HAVE_ISWCNTRL=0 ++ fi + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- result=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-result=unknown +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val +- eval gl_cv_bitsizeof_${gltype}=\$result + +-fi +-ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$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 + ++ if test $gt_cv_c_wint_t = yes; then ++ HAVE_WINT_T=1 ++ else ++ HAVE_WINT_T=0 ++ fi + + + + + + +- for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 +-$as_echo_n "checking whether $gltype is signed... " >&6; } +-if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +- int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- result=yes ++ ++ ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_wctype_h+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- result=no +-fi ++ if test $ac_cv_header_wctype_h = yes; then + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- eval gl_cv_type_${gltype}_signed=\$result + +-fi +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$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 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ + _ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/wctype.h#{ ++ s#.*"\(.*/wctype.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ else ++ gl_cv_next_wctype_h='<'wctype.h'>' ++ fi + +- eval HAVE_SIGNED_${GLTYPE}=1 +- else +- eval HAVE_SIGNED_${GLTYPE}=0 +- fi +- done + ++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 + +- gl_cv_type_ptrdiff_t_signed=yes +- gl_cv_type_size_t_signed=no +- if test $APPLE_UNIVERSAL_BUILD = 0; then ++ 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 + + + + +- for gltype in ptrdiff_t size_t ; do +- { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 +-$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +-if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; 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 +- 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +- extern $gltype foo; +- extern $gltype1 foo; ++ if test "$cross_compiling" = yes; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ #if __GNU_LIBRARY__ == 1 ++ Linux libc5 i18n is broken. ++ #endif + int + main () + { +@@ -18226,101 +11842,80 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval gl_cv_type_${gltype}_suffix=\$glsuf ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_iswcntrl_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_cv_func_iswcntrl_works=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-fi ++ /* Tru64 with Desktop Toolkit C has a bug: must be ++ included before . ++ BSD/OS 4.0.1 has a bug: , and ++ must be included before . */ ++ #include ++ #include ++ #include ++ #include ++ #include ++ int main () { return iswprint ('x') == 0; } + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- eval result=\$gl_cv_type_${gltype}_suffix +- test "$result" != no && break +- done +-fi +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$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 ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_iswcntrl_works=yes ++else ++ gl_cv_func_iswcntrl_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_iswcntrl_works" >&5 ++$as_echo "$gl_cv_func_iswcntrl_works" >&6; } ++ fi ++ HAVE_WCTYPE_H=1 ++ else ++ HAVE_WCTYPE_H=0 + fi + + ++ if test "$gl_cv_func_iswcntrl_works" = no; then ++ REPLACE_ISWCNTRL=1 ++ else ++ REPLACE_ISWCNTRL=0 ++ fi + + ++ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then ++ : ++ fi + +- for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 +-$as_echo_n "checking for $gltype integer literal suffix... " >&6; } +-if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $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 +- 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++/* Tru64 with Desktop Toolkit C has a bug: must be ++ included before . ++ BSD/OS 4.0.1 has a bug: , and ++ must be included before . */ ++ #include ++ #include ++ #include ++ #include ++ #if HAVE_WCTYPE_H ++ # include ++ #endif ++ wctype_t a; + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif +- +- extern $gltype foo; +- extern $gltype1 foo; + int + main () + { +@@ -18329,650 +11924,365 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval gl_cv_type_${gltype}_suffix=\$glsuf ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_type_wctype_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_type_wctype_t=no + 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 +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$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 +- +- + +- STDINT_H=stdint.h ++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 + +- +- +- +-for ac_header in inttypes.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $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 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> ++/* Tru64 with Desktop Toolkit C has a bug: must be ++ included before . ++ BSD/OS 4.0.1 has a bug: , and ++ must be included before . */ ++ #include ++ #include ++ #include ++ #include ++ #include ++ wctrans_t a; ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_type_wctrans_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no ++ gl_cv_type_wctrans_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = 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: $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 + +-done + +- if test $ac_cv_header_inttypes_h = yes; then +- { $as_echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 +-$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } +-if test "${gt_cv_inttypes_pri_broken+set}" = set; then ++ for gl_func in wctype iswctype wctrans towctrans ; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#ifdef PRId32 +-char *p = PRId32; ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#if !(defined __GLIBC__ && !defined __UCLIBC__) ++# include ++# include ++# include ++# include + #endif ++#include + + int + main () + { +- ++#undef $gl_func ++ (void) $gl_func; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_inttypes_pri_broken=no ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_inttypes_pri_broken=yes ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 +-$as_echo "$gt_cv_inttypes_pri_broken" >&6; } +- fi +- if test "$gt_cv_inttypes_pri_broken" = yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define PRI_MACROS_BROKEN 1 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + +- PRI_MACROS_BROKEN=1 +- else +- PRI_MACROS_BROKEN=0 +- fi ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done + + + + +-{ $as_echo "$as_me:$LINENO: checking whether imaxabs is declared" >&5 +-$as_echo_n "checking whether imaxabs is declared... " >&6; } +-if test "${ac_cv_have_decl_imaxabs+set}" = set; then +- $as_echo_n "(cached) " >&6 ++ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "$ac_includes_default" ++if test "x$ac_cv_have_decl_iswblank" = xyes; then : ++ ac_have_decl=1 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef imaxabs +- (void) imaxabs; +-#endif ++ ac_have_decl=0 ++fi + +- ; +- return 0; +-} ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_ISWBLANK $ac_have_decl + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_imaxabs=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_imaxabs=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_imaxabs" >&5 +-$as_echo "$ac_cv_have_decl_imaxabs" >&6; } +-if test "x$ac_cv_have_decl_imaxabs" = x""yes; then ++ GNULIB_NL_LANGINFO=0; ++ HAVE_NL_LANGINFO=1; ++ REPLACE_NL_LANGINFO=0; ++ + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_IMAXABS 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_IMAXABS 0 +-_ACEOF + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether imaxdiv is declared" >&5 +-$as_echo_n "checking whether imaxdiv is declared... " >&6; } +-if test "${ac_cv_have_decl_imaxdiv+set}" = set; then ++ { $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 ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ rm -f conftest.sym conftest.file ++ echo >conftest.file ++ if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then ++ if test "$cross_compiling" = yes; then : ++ # When cross-compiling, be pessimistic so we will end up using the ++ # replacement version of lstat that checks for trailing slashes and ++ # calls lstat a second time when necessary. ++ ac_cv_func_lstat_dereferences_slashed_symlink=no ++ ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int + main () + { +-#ifndef imaxdiv +- (void) imaxdiv; +-#endif ++struct stat sbuf; ++ /* 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_imaxdiv=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_lstat_dereferences_slashed_symlink=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_imaxdiv=no ++ ac_cv_func_lstat_dereferences_slashed_symlink=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:$LINENO: result: $ac_cv_have_decl_imaxdiv" >&5 +-$as_echo "$ac_cv_have_decl_imaxdiv" >&6; } +-if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_IMAXDIV 1 +-_ACEOF ++ else ++ # If the 'ln -s' command failed, then we probably don't even ++ # have an lstat function. ++ ac_cv_func_lstat_dereferences_slashed_symlink=no ++ fi ++ rm -f conftest.sym conftest.file + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 ++$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } ++ test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_IMAXDIV 0 ++cat >>confdefs.h <<_ACEOF ++#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 + _ACEOF + ++ if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether strtoimax is declared" >&5 +-$as_echo_n "checking whether strtoimax is declared... " >&6; } +-if test "${ac_cv_have_decl_strtoimax+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strtoimax +- (void) strtoimax; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strtoimax=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_strtoimax=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoimax" >&5 +-$as_echo "$ac_cv_have_decl_strtoimax" >&6; } +-if test "x$ac_cv_have_decl_strtoimax" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOIMAX 1 +-_ACEOF + ++ gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOIMAX 0 +-_ACEOF ++ fi + + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether strtoumax is declared" >&5 +-$as_echo_n "checking whether strtoumax is declared... " >&6; } +-if test "${ac_cv_have_decl_strtoumax+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5 ++$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } ++if ${gl_cv_func_unlink_honors_slashes+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ touch conftest.file ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ ln -s conftest.file conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_unlink_honors_slashes="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default ++#include ++ #include ++ + int + main () + { +-#ifndef strtoumax +- (void) strtoumax; ++int result = 0; ++ if (!unlink ("conftest.file/")) ++ result |= 1; ++ else if (errno != ENOTDIR) ++ result |= 2; ++#if HAVE_LSTAT ++ if (!unlink ("conftest.lnk/")) ++ result |= 4; ++ else if (errno != ENOTDIR) ++ result |= 8; + #endif ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strtoumax=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_unlink_honors_slashes=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strtoumax=no ++ gl_cv_func_unlink_honors_slashes=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:$LINENO: result: $ac_cv_have_decl_strtoumax" >&5 +-$as_echo "$ac_cv_have_decl_strtoumax" >&6; } +-if test "x$ac_cv_have_decl_strtoumax" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOUMAX 1 +-_ACEOF ++ rm -f conftest.file conftest.lnk ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5 ++$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5 ++$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } ++if ${gl_cv_func_unlink_parent_fails+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ case "$host_os" in ++ darwin*) ++ if { ++ # Use the mktemp program if available. If not available, hide the error ++ # message. ++ tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && ++ test -n "$tmp" && test -d "$tmp" ++ } || ++ { ++ # Use a simple mkdir command. It is guaranteed to fail if the directory ++ # already exists. $RANDOM is bash specific and expands to empty in shells ++ # other than bash, ksh and zsh. Its use does not increase security; ++ # rather, it minimizes the probability of failure in a very cluttered /tmp ++ # directory. ++ tmp=/tmp/gt$$-$RANDOM ++ (umask 077 && mkdir "$tmp") ++ }; then ++ mkdir "$tmp/subdir" ++ GL_SUBDIR_FOR_UNLINK="$tmp/subdir" ++ export GL_SUBDIR_FOR_UNLINK ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_unlink_parent_fails="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++ #include ++ #include ++ int main () ++ { ++ int result = 0; ++ if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) ++ result |= 1; ++ else if (unlink ("..") == 0) ++ result |= 2; ++ return result; ++ } + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOUMAX 0 + _ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_unlink_parent_fails=yes ++else ++ gl_cv_func_unlink_parent_fails=no ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi + ++ unset GL_SUBDIR_FOR_UNLINK ++ rm -rf "$tmp" ++ else ++ gl_cv_func_unlink_parent_fails="guessing no" ++ fi ++ ;; ++ *) ++ gl_cv_func_unlink_parent_fails="guessing yes" ++ ;; ++ esac + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5 ++$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } ++ case "$gl_cv_func_unlink_parent_fails" in ++ *no) ++ ++$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h + ++ ;; ++ esac ++ if test "$gl_cv_func_unlink_honors_slashes" != yes \ ++ || { case "$gl_cv_func_unlink_parent_fails" in ++ *yes) false;; ++ *no) true;; ++ esac ++ }; then ++ REPLACE_UNLINK=1 + + +- 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; + + +- GNULIB_ISWBLANK=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; + + + + +- { $as_echo "$as_me:$LINENO: checking for wint_t" >&5 +-$as_echo_n "checking for wint_t... " >&6; } +-if test "${gt_cv_c_wint_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++ gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" + +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be included +- before . */ +-#include +-#include +-#include +-#include +- wint_t foo = (wchar_t)'\0'; +-int +-main () +-{ ++ fi + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_c_wint_t=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gt_cv_c_wint_t=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$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 ++ GNULIB_OPENAT=1 + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_WINT_T 1 +-_ACEOF + +- fi ++ GNULIB_FCHMODAT=1 ++ GNULIB_FSTATAT=1 ++ GNULIB_MKDIRAT=1 + + ++ GNULIB_FCHOWNAT=1 ++ GNULIB_UNLINKAT=1 + + + +@@ -18982,21 +12292,12 @@ + + + +- if test $ac_cv_func_iswcntrl = yes; then +- HAVE_ISWCNTRL=1 +- else +- HAVE_ISWCNTRL=0 +- fi ++ gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + + + +- if test $gt_cv_c_wint_t = yes; then +- HAVE_WINT_T=1 +- else +- HAVE_WINT_T=0 +- fi + + + +@@ -19013,793 +12314,237 @@ + + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_wctype_h='<'wctype.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_wctype_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- if test $ac_cv_header_wctype_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/wctype.h#{ +- s#.*"\(.*/wctype.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- else +- gl_cv_next_wctype_h='<'wctype.h'>' +- fi + + +-fi +-{ $as_echo "$as_me:$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 + + + + +- if test $ac_cv_header_wctype_h = yes; then +- if test $ac_cv_func_iswcntrl = yes; then +- { $as_echo "$as_me:$LINENO: checking whether iswcntrl works" >&5 +-$as_echo_n "checking whether iswcntrl works... " >&6; } +-if test "${gl_cv_func_iswcntrl_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #if __GNU_LIBRARY__ == 1 +- Linux libc5 i18n is broken. +- #endif +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_iswcntrl_works=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_func_iswcntrl_works=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* Tru64 with Desktop Toolkit C has a bug: must be +- included before . +- BSD/OS 4.0.1 has a bug: , and +- must be included before . */ +- #include +- #include +- #include +- #include +- #include +- int main () { return iswprint ('x') == 0; } + ++ for ac_func in fchmodat fstatat mkdirat openat unlinkat ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_iswcntrl_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_iswcntrl_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + ++else + ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + + fi +-{ $as_echo "$as_me:$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 +- fi ++done + + +- if test "$gl_cv_func_iswcntrl_works" = no; then +- REPLACE_ISWCNTRL=1 +- else +- REPLACE_ISWCNTRL=0 +- fi + + +- if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then +- : +- fi +- +- { $as_echo "$as_me:$LINENO: checking for wctype_t" >&5 +-$as_echo_n "checking for wctype_t... " >&6; } +-if test "${gl_cv_type_wctype_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Tru64 with Desktop Toolkit C has a bug: must be +- included before . +- BSD/OS 4.0.1 has a bug: , and +- must be included before . */ +- #include +- #include +- #include +- #include +- #if HAVE_WCTYPE_H +- # include +- #endif +- wctype_t a; +- +-int +-main () +-{ ++ case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in ++ yes+yes) ++ # GNU/Hurd has unlinkat, but it has the same bug as unlink. ++ if test $REPLACE_UNLINK = 1; then + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_type_wctype_t=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_type_wctype_t=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-fi +-{ $as_echo "$as_me:$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:$LINENO: checking for wctrans_t" >&5 +-$as_echo_n "checking for wctrans_t... " >&6; } +-if test "${gl_cv_type_wctrans_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Tru64 with Desktop Toolkit C has a bug: must be +- included before . +- BSD/OS 4.0.1 has a bug: , and +- must be included before . */ +- #include +- #include +- #include +- #include +- #include +- wctrans_t a; + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_type_wctrans_t=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_type_wctrans_t=no +-fi ++ gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ REPLACE_UNLINKAT=1 ++ fi ;; ++ yes+*) ++ # Solaris 9 has *at functions, but uniformly mishandles trailing ++ # slash in all of them. + +-fi +-{ $as_echo "$as_me:$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 + + + + + + +- for gl_func in wctype iswctype wctrans towctrans ; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#if !(defined __GLIBC__ && !defined __UCLIBC__) +-# include +-# include +-# include +-# include +-#endif +-#include ++ gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" + +-int +-main () +-{ +-#undef $gl_func +- (void) $gl_func; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ REPLACE_OPENAT=1 + +- eval "$as_gl_Symbol=no" +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF + +- eval ac_cv_have_decl_$gl_func=yes +-fi + +- done + + + + +-{ $as_echo "$as_me:$LINENO: checking whether iswblank is declared" >&5 +-$as_echo_n "checking whether iswblank is declared... " >&6; } +-if test "${ac_cv_have_decl_iswblank+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef iswblank +- (void) iswblank; +-#endif ++ gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_iswblank=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ REPLACE_FSTATAT=1 + +- ac_cv_have_decl_iswblank=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_iswblank" >&5 +-$as_echo "$ac_cv_have_decl_iswblank" >&6; } +-if test "x$ac_cv_have_decl_iswblank" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISWBLANK 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISWBLANK 0 +-_ACEOF + + +-fi + ++ gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + ++ REPLACE_UNLINKAT=1 ++ ;; ++ *) ++ HAVE_OPENAT=0 ++ HAVE_UNLINKAT=0 # No known system with unlinkat but not openat ++ HAVE_FSTATAT=0 # No known system with fstatat but not openat + +- GNULIB_NL_LANGINFO=0; +- HAVE_NL_LANGINFO=1; +- REPLACE_NL_LANGINFO=0; + + ++ : ++;; ++ esac ++ if test $ac_cv_func_fchmodat != yes; then ++ HAVE_FCHMODAT=0 ++ fi ++ if test $ac_cv_func_mkdirat != yes; then ++ HAVE_MKDIRAT=0 ++ fi + + + ++ ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" ++if test "x$ac_cv_func_fchownat" = xyes; then : + + + +- { $as_echo "$as_me:$LINENO: checking whether lstat correctly handles trailing slash" >&5 +-$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } +-if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 ++$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } ++if ${gl_cv_func_fchownat_nofollow_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -f conftest.sym conftest.file +- echo >conftest.file +- if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then +- if test "$cross_compiling" = yes; then +- # When cross-compiling, be pessimistic so we will end up using the +- # replacement version of lstat that checks for trailing slashes and +- # calls lstat a second time when necessary. +- ac_cv_func_lstat_dereferences_slashed_symlink=no + ++ gl_dangle=conftest.dangle ++ # Remove any remnants of a previous test. ++ rm -f $gl_dangle ++ # Arrange for deletion of the temporary file this test creates. ++ ac_clean_files="$ac_clean_files $gl_dangle" ++ ln -s conftest.no-such $gl_dangle ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_fchownat_nofollow_works=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default ++ ++#include ++#include ++#include ++#include ++#include + int + main () + { +-struct stat sbuf; +- /* 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; ++ return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), ++ AT_SYMLINK_NOFOLLOW) != 0 ++ && errno == ENOENT); + } ++ + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_func_lstat_dereferences_slashed_symlink=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fchownat_nofollow_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_lstat_dereferences_slashed_symlink=no ++ gl_cv_func_fchownat_nofollow_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- else +- # If the 'ln -s' command failed, then we probably don't even +- # have an lstat function. +- ac_cv_func_lstat_dereferences_slashed_symlink=no +- fi +- rm -f conftest.sym conftest.file +- + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 +-$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } +- test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && +- +-cat >>confdefs.h <<_ACEOF +-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 +-_ACEOF +- +- if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then +- +- +- +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5 ++$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } ++ if test $gl_cv_func_fchownat_nofollow_works = no; then : ++ REPLACE_FCHOWNAT=1 + ++$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h + +- gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + +- fi ++fi + + + + +- { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 +-$as_echo_n "checking whether unlink honors trailing slashes... " >&6; } +-if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5 ++$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } ++if ${gl_cv_func_fchownat_empty_filename_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- touch conftest.file +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- ln -s conftest.file conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_unlink_honors_slashes="guessing no" ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_fchownat_empty_filename_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include +- #include ++ #include + + int + main () + { +-int result = 0; +- if (!unlink ("conftest.file/")) +- result |= 1; +- else if (errno != ENOTDIR) +- result |= 2; +-#if HAVE_LSTAT +- if (!unlink ("conftest.lnk/")) +- result |= 4; +- else if (errno != ENOTDIR) +- result |= 8; +-#endif +- return result; ++int fd; ++ int ret; ++ if (mkdir ("conftestdir", 0700) < 0) ++ return 2; ++ fd = open ("conftestdir", O_RDONLY); ++ if (fd < 0) ++ return 3; ++ ret = fchownat (fd, "", -1, -1, 0); ++ close (fd); ++ rmdir ("conftestdir"); ++ return ret == 0; + + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_unlink_honors_slashes=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fchownat_empty_filename_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_unlink_honors_slashes=no ++ gl_cv_func_fchownat_empty_filename_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- rm -f conftest.file conftest.lnk + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_honors_slashes" >&5 +-$as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } +- { $as_echo "$as_me:$LINENO: checking whether unlink of a parent directory fails as it should" >&5 +-$as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } +-if test "${gl_cv_func_unlink_parent_fails+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- case "$host_os" in +- darwin*) +- if { +- # Use the mktemp program if available. If not available, hide the error +- # message. +- tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` && +- test -n "$tmp" && test -d "$tmp" +- } || +- { +- # Use a simple mkdir command. It is guaranteed to fail if the directory +- # already exists. $RANDOM is bash specific and expands to empty in shells +- # other than bash, ksh and zsh. Its use does not increase security; +- # rather, it minimizes the probability of failure in a very cluttered /tmp +- # directory. +- tmp=/tmp/gt$$-$RANDOM +- (umask 077 && mkdir "$tmp") +- }; then +- mkdir "$tmp/subdir" +- GL_SUBDIR_FOR_UNLINK="$tmp/subdir" +- export GL_SUBDIR_FOR_UNLINK +- if test "$cross_compiling" = yes; then +- gl_cv_func_unlink_parent_fails="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5 ++$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } ++ if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then : ++ REPLACE_FCHOWNAT=1 + +- #include +- #include +- int main () +- { +- int result = 0; +- if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0) +- result |= 1; +- else if (unlink ("..") == 0) +- result |= 2; +- return result; +- } ++$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_unlink_parent_fails=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_unlink_parent_fails=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- unset GL_SUBDIR_FOR_UNLINK +- rm -rf "$tmp" +- else +- gl_cv_func_unlink_parent_fails="guessing no" +- fi +- ;; +- *) +- gl_cv_func_unlink_parent_fails="guessing yes" +- ;; +- esac + ++ if test $REPLACE_CHOWN = 1; then ++ REPLACE_FCHOWNAT=1 ++ fi ++else ++ HAVE_FCHOWNAT=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_parent_fails" >&5 +-$as_echo "$gl_cv_func_unlink_parent_fails" >&6; } +- case "$gl_cv_func_unlink_parent_fails" in +- *no) +- +-cat >>confdefs.h <<\_ACEOF +-#define UNLINK_PARENT_BUG 1 +-_ACEOF + +- ;; +- esac +- if test "$gl_cv_func_unlink_honors_slashes" != yes \ +- || { case "$gl_cv_func_unlink_parent_fails" in +- *yes) false;; +- *no) true;; +- esac +- }; then +- REPLACE_UNLINK=1 ++ if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + + + +@@ -19808,47 +12553,145 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + + fi + + + +- GNULIB_OPENAT=1 + + +- GNULIB_FCHMODAT=1 +- GNULIB_FSTATAT=1 +- GNULIB_MKDIRAT=1 + + +- GNULIB_FCHOWNAT=1 +- GNULIB_UNLINKAT=1 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 ++$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } ++if ${ac_cv_gnu_library_2_1+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) ++ Lucky GNU user ++ #endif ++#endif ++#ifdef __UCLIBC__ ++ Lucky user ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Lucky" >/dev/null 2>&1; then : ++ ac_cv_gnu_library_2_1=yes ++else ++ ac_cv_gnu_library_2_1=no ++fi ++rm -f conftest* + + + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 ++$as_echo "$ac_cv_gnu_library_2_1" >&6; } + ++ GLIBC21="$ac_cv_gnu_library_2_1" + + + +- gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + ++ { $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 : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++int ++main () ++{ ++#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ ++ choke me ++ #endif + ++ ; ++ return 0; ++} ++_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 + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 ++$as_echo "$gl_cv_func_malloc_posix" >&6; } + + ++ for ac_header in stdlib.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdlib_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STDLIB_H 1 ++_ACEOF + ++fi + ++done + ++{ $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 : ++ ac_cv_func_malloc_0_nonnull=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#if defined STDC_HEADERS || defined HAVE_STDLIB_H ++# include ++#else ++char *malloc (); ++#endif + ++int ++main () ++{ ++return ! malloc (0); ++ ; ++ return 0; ++} ++_ACEOF ++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 *.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_malloc_0_nonnull" >&5 ++$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } ++if test $ac_cv_func_malloc_0_nonnull = yes; then : ++ gl_cv_func_malloc_0_nonnull=1 ++else ++ gl_cv_func_malloc_0_nonnull=0 ++fi + + ++cat >>confdefs.h <<_ACEOF ++#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull ++_ACEOF + + + +@@ -19858,919 +12701,345 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-for ac_func in fchmodat fstatat mkdirat openat unlinkat +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-#ifdef __STDC__ +-# include ++#include ++#include ++#if HAVE_LANGINFO_CODESET ++# include ++#endif ++#include ++#include ++struct tm t; ++char buf[16]; ++int main () ++{ ++ const char *p; ++ /* Check whether the given locale name is recognized by the system. */ ++#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ ++ /* On native Win32, setlocale(category, "") looks at the system settings, ++ not at the environment variables. Also, when an encoding suffix such ++ as ".65001" or ".54936" is speficied, 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 +-# include ++ if (setlocale (LC_ALL, "") == NULL) return 1; + #endif +- +-#undef $ac_func +- +-/* 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" ++ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". ++ On MacOS 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 +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me ++#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 +- +-int +-main () +-{ +-return $ac_func (); +- ; ++ /* 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). */ ++ 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; + } +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +- +-else +- +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" ++ 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 Win32, 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 MacOS 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 +-done +- +- +- +- +- case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in +- yes+yes) +- # GNU/Hurd has unlinkat, but it has the same bug as unlink. +- if test $REPLACE_UNLINK = 1; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" +- +- REPLACE_UNLINKAT=1 +- fi ;; +- yes+*) +- # Solaris 9 has *at functions, but uniformly mishandles trailing +- # slash in all of them. +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" +- +- REPLACE_OPENAT=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" +- +- REPLACE_FSTATAT=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" +- +- REPLACE_UNLINKAT=1 +- ;; +- *) +- HAVE_OPENAT=0 +- HAVE_UNLINKAT=0 # No known system with unlinkat but not openat +- HAVE_FSTATAT=0 # No known system with fstatat but not openat +- ++{ $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 + + +- : +-;; +- esac +- if test $ac_cv_func_fchmodat != yes; then +- HAVE_FCHMODAT=0 +- fi +- if test $ac_cv_func_mkdirat != yes; then +- HAVE_MKDIRAT=0 +- fi + + + +- { $as_echo "$as_me:$LINENO: checking for fchownat" >&5 +-$as_echo_n "checking for fchownat... " >&6; } +-if test "${ac_cv_func_fchownat+set}" = set; then ++ { $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 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define fchownat to an innocuous variant, in case declares fchownat. +- For example, HP-UX 11i declares gettimeofday. */ +-#define fchownat innocuous_fchownat + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char fchownat (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-#ifdef __STDC__ +-# include ++#include ++#include ++#include ++#if HAVE_LANGINFO_CODESET ++# include ++#endif ++#include ++#include ++struct tm t; ++char buf[16]; ++int main () ++{ ++ const char *p; ++ /* Check whether the given locale name is recognized by the system. */ ++#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ ++ /* On native Win32, setlocale(category, "") looks at the system settings, ++ not at the environment variables. Also, when an encoding suffix such ++ as ".65001" or ".54936" is speficied, 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 +-# include ++ if (setlocale (LC_ALL, "") == NULL) return 1; + #endif +- +-#undef fchownat +- +-/* 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" ++ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". ++ On MacOS 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 +-char fchownat (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_fchownat || defined __stub___fchownat +-choke me ++#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 +- +-int +-main () +-{ +-return fchownat (); +- ; ++ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. ++ This excludes the UTF-8 encoding (except on MirBSD). */ ++ 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; + } ++ + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 ++ (eval $ac_link) 2>&5 + ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_func_fchownat=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ $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 Win32 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 ++ ;; ++ *) ++ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because ++ # otherwise on MacOS 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* + +- ac_cv_func_fchownat=no + 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 + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchownat" >&5 +-$as_echo "$ac_cv_func_fchownat" >&6; } +-if test "x$ac_cv_func_fchownat" = x""yes; then + + + +- { $as_echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +-$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } +-if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; 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 + +- gl_dangle=conftest.dangle +- # Remove any remnants of a previous test. +- rm -f $gl_dangle +- # Arrange for deletion of the temporary file this test creates. +- ac_clean_files="$ac_clean_files $gl_dangle" +- ln -s conftest.no-such $gl_dangle +- if test "$cross_compiling" = yes; then +- gl_cv_func_fchownat_nofollow_works=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include ++#include ++#include ++#if HAVE_LANGINFO_CODESET ++# include ++#endif + #include +-#include +-#include +-int +-main () +-{ +- return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), +- AT_SYMLINK_NOFOLLOW) != 0 +- && errno == ENOENT); ++#include ++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 __WIN32__) && !defined __CYGWIN__ ++ /* On native Win32, setlocale(category, "") looks at the system settings, ++ not at the environment variables. Also, when an encoding suffix such ++ as ".65001" or ".54936" is speficied, 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 MacOS 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 ++ /* 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; ++ return 0; + } + + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 ++ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 ++ (eval $ac_link) 2>&5 + ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fchownat_nofollow_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_fchownat_nofollow_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_nofollow_works" >&5 +-$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } +- if test $gl_cv_func_fchownat_nofollow_works = no; then +- REPLACE_FCHOWNAT=1 +- +-cat >>confdefs.h <<\_ACEOF +-#define FCHOWNAT_NOFOLLOW_BUG 1 +-_ACEOF +- +- +-fi +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether fchownat works with an empty file name" >&5 +-$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } +-if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_fchownat_empty_filename_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- +-int +-main () +-{ +-int fd; +- int ret; +- if (mkdir ("conftestdir", 0700) < 0) +- return 2; +- fd = open ("conftestdir", O_RDONLY); +- if (fd < 0) +- return 3; +- ret = fchownat (fd, "", -1, -1, 0); +- close (fd); +- rmdir ("conftestdir"); +- return ret == 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fchownat_empty_filename_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_fchownat_empty_filename_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_empty_filename_works" >&5 +-$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } +- if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then +- REPLACE_FCHOWNAT=1 +- +-cat >>confdefs.h <<\_ACEOF +-#define FCHOWNAT_EMPTY_FILENAME_BUG 1 +-_ACEOF +- +- +-fi +- +- +- if test $REPLACE_CHOWN = 1; then +- REPLACE_FCHOWNAT=1 +- fi +-else +- HAVE_FCHOWNAT=0 +-fi +- +- if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" +- +- fi +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +-$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +-if test "${ac_cv_gnu_library_2_1+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#ifdef __GNU_LIBRARY__ +- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) +- Lucky GNU user +- #endif +-#endif +-#ifdef __UCLIBC__ +- Lucky user +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Lucky" >/dev/null 2>&1; then +- ac_cv_gnu_library_2_1=yes +-else +- ac_cv_gnu_library_2_1=no +-fi +-rm -f conftest* +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +-$as_echo "$ac_cv_gnu_library_2_1" >&6; } +- +- GLIBC21="$ac_cv_gnu_library_2_1" +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5 +-$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } +-if test "${gl_cv_func_malloc_posix+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-int +-main () +-{ +-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +- choke me +- #endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_malloc_posix=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_malloc_posix=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5 +-$as_echo "$gl_cv_func_malloc_posix" >&6; } +- +- +- +-for ac_header in stdlib.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +-{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +-$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- ac_cv_func_malloc_0_nonnull=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#if defined STDC_HEADERS || defined HAVE_STDLIB_H +-# include +-#else +-char *malloc (); +-#endif +- +-int +-main () +-{ +-return ! malloc (0); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_func_malloc_0_nonnull=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_malloc_0_nonnull=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +-if test $ac_cv_func_malloc_0_nonnull = yes; then +- gl_cv_func_malloc_0_nonnull=1 +-else +- gl_cv_func_malloc_0_nonnull=0 +-fi +- +- +- +-cat >>confdefs.h <<_ACEOF +-#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull +-_ACEOF +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5 +-$as_echo_n "checking for a traditional japanese locale... " >&6; } +-if test "${gt_cv_locale_ja+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#if HAVE_LANGINFO_CODESET +-# include +-#endif +-#include +-#include +-struct tm t; +-char buf[16]; +-int main () +-{ +- const char *p; +- /* Check whether the given locale name is recognized by the system. */ +-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +- /* On native Win32, setlocale(category, "") looks at the system settings, +- not at the environment variables. Also, when an encoding suffix such +- as ".65001" or ".54936" is speficied, 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 MacOS 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). */ +- 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; +-} +- +-_ACEOF +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && test -s conftest$ac_exeext; then ++ $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", +@@ -20779,44 +13048,33 @@ + # "ja" as "Japanese" or "Japanese_Japan.932", + # and similar. + mingw*) +- # Note that on native Win32, 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 ++ # Test for the hypothetical native Win32 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 MacOS 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 ++ # 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=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then +- gt_cv_locale_ja=ja_JP.EUC-JP ++ 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 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 ++ # 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 +- # 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 ++ # None found. ++ gt_cv_locale_fr_utf8=none + fi + fi + fi +@@ -20826,341 +13084,80 @@ + rm -fr conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5 +-$as_echo "$gt_cv_locale_ja" >&6; } +- LOCALE_JA=$gt_cv_locale_ja ++{ $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 + + + +- +- +- { $as_echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5 +-$as_echo_n "checking for a transitional chinese locale... " >&6; } +-if test "${gt_cv_locale_zh_CN+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#if HAVE_LANGINFO_CODESET +-# include +-#endif +-#include +-#include +-struct tm t; +-char buf[16]; +-int main () +-{ +- const char *p; +- /* Check whether the given locale name is recognized by the system. */ +-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ +- /* On native Win32, setlocale(category, "") looks at the system settings, +- not at the environment variables. Also, when an encoding suffix such +- as ".65001" or ".54936" is speficied, 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 MacOS 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). */ +- 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; +-} +- +-_ACEOF +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && 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 Win32 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 +- ;; +- *) +- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because +- # otherwise on MacOS 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:$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:$LINENO: checking for a french Unicode locale" >&5 +-$as_echo_n "checking for a french Unicode locale... " >&6; } +-if test "${gt_cv_locale_fr_utf8+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#if HAVE_LANGINFO_CODESET +-# include +-#endif +-#include +-#include +-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 __WIN32__) && !defined __CYGWIN__ +- /* On native Win32, setlocale(category, "") looks at the system settings, +- not at the environment variables. Also, when an encoding suffix such +- as ".65001" or ".54936" is speficied, 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 MacOS 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 +- /* 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; +- return 0; +-} +- +-_ACEOF +- if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 +- (eval $ac_link) 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && 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 Win32 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 MacOS 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:$LINENO: result: $gt_cv_locale_fr_utf8" >&5 +-$as_echo "$gt_cv_locale_fr_utf8" >&6; } +- LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 +- +- +- +- 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_STRSIGNAL=0; +- GNULIB_STRVERSCMP=0; +- HAVE_MBSLEN=0; +- HAVE_MEMCHR=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_DECL_STRSIGNAL=1; +- HAVE_STRVERSCMP=1; +- REPLACE_MEMCHR=0; +- REPLACE_MEMMEM=0; +- REPLACE_STPNCPY=0; +- REPLACE_STRDUP=0; +- REPLACE_STRSTR=0; +- REPLACE_STRCASESTR=0; +- REPLACE_STRERROR=0; +- REPLACE_STRERROR_R=0; +- REPLACE_STRNCAT=0; +- REPLACE_STRNDUP=0; +- REPLACE_STRNLEN=0; +- REPLACE_STRSIGNAL=0; +- REPLACE_STRTOK_R=0; +- UNDEFINE_STRTOK_R=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_STRSIGNAL=0; ++ GNULIB_STRVERSCMP=0; ++ HAVE_MBSLEN=0; ++ HAVE_MEMCHR=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_DECL_STRSIGNAL=1; ++ HAVE_STRVERSCMP=1; ++ REPLACE_MEMCHR=0; ++ REPLACE_MEMMEM=0; ++ REPLACE_STPNCPY=0; ++ REPLACE_STRDUP=0; ++ REPLACE_STRSTR=0; ++ REPLACE_STRCASESTR=0; ++ REPLACE_STRERROR=0; ++ REPLACE_STRERROR_R=0; ++ REPLACE_STRNCAT=0; ++ REPLACE_STRNDUP=0; ++ REPLACE_STRNLEN=0; ++ REPLACE_STRSIGNAL=0; ++ REPLACE_STRTOK_R=0; ++ UNDEFINE_STRTOK_R=0; + + + +@@ -21175,6153 +13172,158 @@ + # 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. +- { $as_echo "$as_me:$LINENO: checking for mmap" >&5 +-$as_echo_n "checking for mmap... " >&6; } +-if test "${ac_cv_func_mmap+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define mmap to an innocuous variant, in case declares mmap. +- For example, HP-UX 11i declares gettimeofday. */ +-#define mmap innocuous_mmap +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char mmap (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef mmap +- +-/* 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 mmap (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_mmap || defined __stub___mmap +-choke me +-#endif +- +-int +-main () +-{ +-return mmap (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_func_mmap=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_mmap=no +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap" >&5 +-$as_echo "$ac_cv_func_mmap" >&6; } +-if test "x$ac_cv_func_mmap" = x""yes; then ++ 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:$LINENO: checking for MAP_ANONYMOUS" >&5 +-$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#ifdef MAP_ANONYMOUS +- I cant identify this map. +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "I cant 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#ifdef MAP_ANON +- I cant identify this map. +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "I cant identify this map." >/dev/null 2>&1; then +- +-cat >>confdefs.h <<\_ACEOF +-#define MAP_ANONYMOUS MAP_ANON +-_ACEOF +- +- gl_have_mmap_anonymous=yes +-fi +-rm -f conftest* +- +- fi +- { $as_echo "$as_me:$LINENO: result: $gl_have_mmap_anonymous" >&5 +-$as_echo "$gl_have_mmap_anonymous" >&6; } +- if test $gl_have_mmap_anonymous = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MAP_ANONYMOUS 1 +-_ACEOF +- +- fi +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_memchr = yes; then +- # Detect platform-specific bugs in some versions of glibc: +- # memchr should not dereference anything with length 0 +- # http://bugzilla.redhat.com/499689 +- # memchr should not dereference overestimated length after a match +- # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 +- # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 +- # Assume that memchr works on platforms that lack mprotect. +- { $as_echo "$as_me:$LINENO: checking whether memchr works" >&5 +-$as_echo_n "checking whether memchr works... " >&6; } +-if test "${gl_cv_func_memchr_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_memchr_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#if HAVE_SYS_MMAN_H +-# include +-# include +-# include +-# include +-# ifndef MAP_FILE +-# define MAP_FILE 0 +-# endif +-#endif +- +-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) +- { +- 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; +- } +- return result; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_memchr_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_memchr_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_memchr_works" >&5 +-$as_echo "$gl_cv_func_memchr_works" >&6; } +- if test "$gl_cv_func_memchr_works" != yes; then +- REPLACE_MEMCHR=1 +- fi +- else +- HAVE_MEMCHR=0 +- fi +- if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" +- +- +- +-for ac_header in bp-sym.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +- fi +- +-{ $as_echo "$as_me:$LINENO: checking whether memrchr is declared" >&5 +-$as_echo_n "checking whether memrchr is declared... " >&6; } +-if test "${ac_cv_have_decl_memrchr+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef memrchr +- (void) memrchr; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_memrchr=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_memrchr=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_memrchr" >&5 +-$as_echo "$ac_cv_have_decl_memrchr" >&6; } +-if test "x$ac_cv_have_decl_memrchr" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_MEMRCHR 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_MEMRCHR 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- +- +- +- +- GNULIB_MKTIME=0; +- GNULIB_NANOSLEEP=0; +- GNULIB_STRPTIME=0; +- GNULIB_TIMEGM=0; +- GNULIB_TIME_R=0; +- HAVE_DECL_LOCALTIME_R=1; +- HAVE_NANOSLEEP=1; +- HAVE_STRPTIME=1; +- HAVE_TIMEGM=1; +- REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; +- REPLACE_MKTIME=GNULIB_PORTCHECK; +- REPLACE_NANOSLEEP=GNULIB_PORTCHECK; +- REPLACE_TIMEGM=GNULIB_PORTCHECK; +- +- +- +- +- +- +- # parse-datetime.y works with bison only. +- : ${YACC='bison -y'} +- +- +- { $as_echo "$as_me:$LINENO: checking for compound literals" >&5 +-$as_echo_n "checking for compound literals... " >&6; } +-if test "${gl_cv_compound_literals+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-struct s { int i, j; }; +-int +-main () +-{ +-struct s t = (struct s) { 3, 4 }; +- if (t.i != 0) return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_compound_literals=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_compound_literals=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_compound_literals" >&5 +-$as_echo "$gl_cv_compound_literals" >&6; } +- if test $gl_cv_compound_literals = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_COMPOUND_LITERALS 1 +-_ACEOF +- +- fi +- +-{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +-$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } +-if test "${ac_cv_struct_tm+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +- +-int +-main () +-{ +-struct tm tm; +- int *p = &tm.tm_sec; +- return !p; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_struct_tm=time.h +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_struct_tm=sys/time.h +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +-$as_echo "$ac_cv_struct_tm" >&6; } +-if test $ac_cv_struct_tm = sys/time.h; then +- +-cat >>confdefs.h <<\_ACEOF +-#define TM_IN_SYS_TIME 1 +-_ACEOF +- +-fi +- +- +- { $as_echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 +-$as_echo_n "checking for struct tm.tm_gmtoff... " >&6; } +-if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct tm ac_aggr; +-if (ac_aggr.tm_gmtoff) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_tm_tm_gmtoff=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct tm ac_aggr; +-if (sizeof ac_aggr.tm_gmtoff) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_tm_tm_gmtoff=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_tm_tm_gmtoff=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 +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 +-$as_echo "$ac_cv_member_struct_tm_tm_gmtoff" >&6; } +-if test "x$ac_cv_member_struct_tm_tm_gmtoff" = x""yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_TM_GMTOFF 1 +-_ACEOF +- +-fi +- +- +- +- +- +- +- +- +- +- +-{ $as_echo "$as_me:$LINENO: checking whether setenv is declared" >&5 +-$as_echo_n "checking whether setenv is declared... " >&6; } +-if test "${ac_cv_have_decl_setenv+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef setenv +- (void) setenv; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_setenv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_setenv=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_setenv" >&5 +-$as_echo "$ac_cv_have_decl_setenv" >&6; } +-if test "x$ac_cv_have_decl_setenv" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SETENV 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SETENV 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_have_decl_setenv = no; then +- HAVE_DECL_SETENV=0 +- fi +- +- +- +- +- +- +- if test $ac_cv_func_setenv = no; then +- HAVE_SETENV=0 +- else +- { $as_echo "$as_me:$LINENO: checking whether setenv validates arguments" >&5 +-$as_echo_n "checking whether setenv validates arguments... " >&6; } +-if test "${gl_cv_func_setenv_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_setenv_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +- #include +- #include +- #include +- +-int +-main () +-{ +- +- int result = 0; +- { +- if (setenv ("", "", 0) != -1) +- result |= 1; +- else if (errno != EINVAL) +- result |= 2; +- } +- { +- if (setenv ("a", "=", 1) != 0) +- result |= 4; +- else if (strcmp (getenv ("a"), "=") != 0) +- result |= 8; +- } +- return result; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_setenv_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_setenv_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_setenv_works" >&5 +-$as_echo "$gl_cv_func_setenv_works" >&6; } +- if test "$gl_cv_func_setenv_works" != yes; then +- REPLACE_SETENV=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" +- +- fi +- fi +- +- +- +- +- +- +- +- +- +- +-for ac_header in search.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- +-for ac_func in tsearch +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether snprintf returns a byte count as in C99" >&5 +-$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } +-if test "${gl_cv_func_snprintf_retval_c99+set}" = set; 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_snprintf_retval_c99="guessing yes";; +- # Guess yes on FreeBSD >= 5. +- freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; +- freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # Guess yes on MacOS X >= 10.3. +- darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; +- darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # Guess yes on OpenBSD >= 3.9. +- openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) +- gl_cv_func_snprintf_retval_c99="guessing no";; +- openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # Guess yes on Solaris >= 2.10. +- solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; +- solaris*) gl_cv_func_printf_sizes_c99="guessing no";; +- # Guess yes on AIX >= 4. +- aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; +- aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # Guess yes on NetBSD >= 3. +- netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) +- gl_cv_func_snprintf_retval_c99="guessing no";; +- netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # Guess yes on BeOS. +- beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; +- # If we don't know, assume the worst. +- *) gl_cv_func_snprintf_retval_c99="guessing no";; +- esac +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-static char buf[100]; +-int main () +-{ +- strcpy (buf, "ABCDEF"); +- if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) +- return 1; +- if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) +- return 2; +- if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) +- return 3; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_snprintf_retval_c99=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_snprintf_retval_c99=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_retval_c99" >&5 +-$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } +- +-{ $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5 +-$as_echo_n "checking whether snprintf is declared... " >&6; } +-if test "${ac_cv_have_decl_snprintf+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef snprintf +- (void) snprintf; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_snprintf=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_snprintf=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5 +-$as_echo "$ac_cv_have_decl_snprintf" >&6; } +-if test "x$ac_cv_have_decl_snprintf" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SNPRINTF 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SNPRINTF 0 +-_ACEOF +- +- +-fi +- +- +- +- REPLACE_NULL=0; +- HAVE_WCHAR_T=1; +- STDDEF_H=''; +- +- +- { $as_echo "$as_me:$LINENO: checking for wchar_t" >&5 +-$as_echo_n "checking for wchar_t... " >&6; } +-if test "${gt_cv_c_wchar_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- wchar_t foo = (wchar_t)'\0'; +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_c_wchar_t=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_c_wchar_t=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$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 +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_WCHAR_T 1 +-_ACEOF +- +- fi +- +- +- HAVE_STRCASECMP=1; +- HAVE_DECL_STRNCASECMP=1; +- +- +- +-{ $as_echo "$as_me:$LINENO: checking whether strdup is declared" >&5 +-$as_echo_n "checking whether strdup is declared... " >&6; } +-if test "${ac_cv_have_decl_strdup+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strdup +- (void) strdup; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strdup=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strdup=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strdup" >&5 +-$as_echo "$ac_cv_have_decl_strdup" >&6; } +-if test "x$ac_cv_have_decl_strdup" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRDUP 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRDUP 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- if test -z "$ERRNO_H"; then +- { $as_echo "$as_me:$LINENO: checking for working strerror function" >&5 +-$as_echo_n "checking for working strerror function... " >&6; } +-if test "${gl_cv_func_working_strerror+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-return !*strerror (-2); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_working_strerror=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_working_strerror=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-return !*strerror (-2); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_working_strerror=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_working_strerror=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_strerror" >&5 +-$as_echo "$gl_cv_func_working_strerror" >&6; } +- if test $gl_cv_func_working_strerror = no; then +- REPLACE_STRERROR=1 +- fi +- else +- REPLACE_STRERROR=1 +- fi +- if test $REPLACE_STRERROR = 1; then +- +- { $as_echo "$as_me:$LINENO: checking whether strerror is declared" >&5 +-$as_echo_n "checking whether strerror is declared... " >&6; } +-if test "${ac_cv_have_decl_strerror+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strerror +- (void) strerror; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strerror=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strerror=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5 +-$as_echo "$ac_cv_have_decl_strerror" >&6; } +-if test "x$ac_cv_have_decl_strerror" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRERROR 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRERROR 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- +- if test $ac_cv_header_sys_socket_h != yes; then +- +-for ac_header in winsock2.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +- +-done +- +- fi +- +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_string_h='<'string.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_string_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/string.h#{ +- s#.*"\(.*/string.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- +- +-fi +-{ $as_echo "$as_me:$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 +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#undef $gl_func +- (void) $gl_func; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF +- +- eval ac_cv_have_decl_$gl_func=yes +-fi +- +- done +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_strings_h='<'strings.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_strings_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- if test $ac_cv_header_strings_h = yes; then +- +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/strings.h#{ +- s#.*"\(.*/strings.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- else +- gl_cv_next_strings_h='<'strings.h'>' +- fi +- +- +-fi +-{ $as_echo "$as_me:$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 +- +- +- +- +- +- +- +- +- for gl_func in strcasecmp strncasecmp; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#undef $gl_func +- (void) $gl_func; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF +- +- eval ac_cv_have_decl_$gl_func=yes +-fi +- +- done +- +- +-{ $as_echo "$as_me:$LINENO: checking whether strndup is declared" >&5 +-$as_echo_n "checking whether strndup is declared... " >&6; } +-if test "${ac_cv_have_decl_strndup+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strndup +- (void) strndup; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strndup=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strndup=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strndup" >&5 +-$as_echo "$ac_cv_have_decl_strndup" >&6; } +-if test "x$ac_cv_have_decl_strndup" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNDUP 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNDUP 0 +-_ACEOF +- +- +-fi +- +- +- +- +-{ $as_echo "$as_me:$LINENO: checking whether strnlen is declared" >&5 +-$as_echo_n "checking whether strnlen is declared... " >&6; } +-if test "${ac_cv_have_decl_strnlen+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strnlen +- (void) strnlen; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strnlen=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strnlen=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strnlen" >&5 +-$as_echo "$ac_cv_have_decl_strnlen" >&6; } +-if test "x$ac_cv_have_decl_strnlen" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNLEN 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNLEN 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 +-$as_echo_n "checking for struct timespec in ... " >&6; } +-if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct timespec x; x.tv_sec = x.tv_nsec; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_sys_struct_timespec_in_time_h=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- 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:$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 +- if test $gl_cv_sys_struct_timespec_in_time_h = yes; then +- TIME_H_DEFINES_STRUCT_TIMESPEC=1 +- else +- { $as_echo "$as_me:$LINENO: checking for struct timespec in " >&5 +-$as_echo_n "checking for struct timespec in ... " >&6; } +-if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct timespec x; x.tv_sec = x.tv_nsec; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_sys_struct_timespec_in_sys_time_h=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- 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:$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:$LINENO: checking for struct timespec in " >&5 +-$as_echo_n "checking for struct timespec in ... " >&6; } +-if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-static struct timespec x; x.tv_sec = x.tv_nsec; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_sys_struct_timespec_in_pthread_h=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- 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:$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 +- fi +- fi +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_time_h='<'time.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_time_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/time.h#{ +- s#.*"\(.*/time.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_time_h" >&5 +-$as_echo "$gl_cv_next_time_h" >&6; } +- fi +- 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='<'time.h'>' +- else +- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_time_h +- fi +- NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive +- +- +- +- +- +- +-{ $as_echo "$as_me:$LINENO: checking whether localtime_r is declared" >&5 +-$as_echo_n "checking whether localtime_r is declared... " >&6; } +-if test "${ac_cv_have_decl_localtime_r+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef localtime_r +- (void) localtime_r; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_localtime_r=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_localtime_r=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_localtime_r" >&5 +-$as_echo "$ac_cv_have_decl_localtime_r" >&6; } +-if test "x$ac_cv_have_decl_localtime_r" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_LOCALTIME_R 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_LOCALTIME_R 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- +- +- +- +- +-gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} +-i\ +-0 +-q +-' +-gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} +-i\ +-0 +-q +-' +-gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} +-i\ +-0 +-q +-' +- +- +- if test "$HAVE_LIBUNISTRING" = yes; then +- LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` +- LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` +- LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` +- fi +- +-{ $as_echo "$as_me:$LINENO: checking whether unsetenv is declared" >&5 +-$as_echo_n "checking whether unsetenv is declared... " >&6; } +-if test "${ac_cv_have_decl_unsetenv+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef unsetenv +- (void) unsetenv; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_unsetenv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_unsetenv=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_unsetenv" >&5 +-$as_echo "$ac_cv_have_decl_unsetenv" >&6; } +-if test "x$ac_cv_have_decl_unsetenv" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_UNSETENV 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_UNSETENV 0 +-_ACEOF +- +- +-fi +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether the utimes function works" >&5 +-$as_echo_n "checking whether the utimes function works... " >&6; } +-if test "${gl_cv_func_working_utimes+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- if test "$cross_compiling" = yes; then +- gl_cv_func_working_utimes=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-static int +-inorder (time_t a, time_t b, time_t c) +-{ +- return a <= b && b <= c; +-} +- +-int +-main () +-{ +- int result = 0; +- char const *file = "conftest.utimes"; +- static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; +- +- /* Test whether utimes() essentially works. */ +- { +- struct stat sbuf; +- FILE *f = fopen (file, "w"); +- if (f == NULL) +- result |= 1; +- else if (fclose (f) != 0) +- result |= 1; +- else if (utimes (file, timeval) != 0) +- result |= 2; +- else if (lstat (file, &sbuf) != 0) +- result |= 1; +- else if (!(sbuf.st_atime == timeval[0].tv_sec +- && sbuf.st_mtime == timeval[1].tv_sec)) +- result |= 4; +- if (unlink (file) != 0) +- result |= 1; +- } +- +- /* Test whether utimes() with a NULL argument sets the file's timestamp +- to the current time. Use 'fstat' as well as 'time' to +- determine the "current" time, to accommodate NFS file systems +- if there is a time skew between the host and the NFS server. */ +- { +- int fd = open (file, O_WRONLY|O_CREAT, 0644); +- if (fd < 0) +- result |= 1; +- else +- { +- time_t t0, t2; +- struct stat st0, st1, st2; +- if (time (&t0) == (time_t) -1) +- result |= 1; +- else if (fstat (fd, &st0) != 0) +- result |= 1; +- else if (utimes (file, timeval) != 0) +- result |= 2; +- else if (utimes (file, NULL) != 0) +- result |= 8; +- else if (fstat (fd, &st1) != 0) +- result |= 1; +- else if (write (fd, "\n", 1) != 1) +- result |= 1; +- else if (fstat (fd, &st2) != 0) +- result |= 1; +- else if (time (&t2) == (time_t) -1) +- result |= 1; +- else +- { +- int m_ok_POSIX = inorder (t0, st1.st_mtime, t2); +- int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime); +- if (! (st1.st_atime == st1.st_mtime)) +- result |= 16; +- if (! (m_ok_POSIX || m_ok_NFS)) +- result |= 32; +- } +- if (close (fd) != 0) +- result |= 1; +- } +- if (unlink (file) != 0) +- result |= 1; +- } +- +- /* Test whether utimes() with a NULL argument works on read-only files. */ +- { +- int fd = open (file, O_WRONLY|O_CREAT, 0444); +- if (fd < 0) +- result |= 1; +- else if (close (fd) != 0) +- result |= 1; +- else if (utimes (file, NULL) != 0) +- result |= 64; +- if (unlink (file) != 0) +- result |= 1; +- } +- +- return result; +-} +- +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_working_utimes=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_working_utimes=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_utimes" >&5 +-$as_echo "$gl_cv_func_working_utimes" >&6; } +- +- if test $gl_cv_func_working_utimes = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_WORKING_UTIMES 1 +-_ACEOF +- +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for struct utimbuf" >&5 +-$as_echo_n "checking for struct utimbuf... " >&6; } +-if test "${gl_cv_sys_struct_utimbuf+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#if HAVE_SYS_TIME_H +- #include +- #endif +- #include +- #ifdef HAVE_UTIME_H +- #include +- #endif +- +-int +-main () +-{ +-static struct utimbuf x; x.actime = x.modtime; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_sys_struct_utimbuf=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_sys_struct_utimbuf=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_sys_struct_utimbuf" >&5 +-$as_echo "$gl_cv_sys_struct_utimbuf" >&6; } +- +- if test $gl_cv_sys_struct_utimbuf = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_STRUCT_UTIMBUF 1 +-_ACEOF +- +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_header_features_h = yes; then +- HAVE_FEATURES_H=1 +- else +- HAVE_FEATURES_H=0 +- fi +- +- +- +- { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5 +-$as_echo_n "checking for inttypes.h... " >&6; } +-if test "${gl_cv_header_inttypes_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +- +-int +-main () +-{ +-uintmax_t i = (uintmax_t) -1; return !i; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_inttypes_h=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_header_inttypes_h=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_inttypes_h" >&5 +-$as_echo "$gl_cv_header_inttypes_h" >&6; } +- if test $gl_cv_header_inttypes_h = yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +-_ACEOF +- +- fi +- +- +- { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 +-$as_echo_n "checking for stdint.h... " >&6; } +-if test "${gl_cv_header_stdint_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +-int +-main () +-{ +-uintmax_t i = (uintmax_t) -1; return !i; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_stdint_h=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_header_stdint_h=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_stdint_h" >&5 +-$as_echo "$gl_cv_header_stdint_h" >&6; } +- if test $gl_cv_header_stdint_h = yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STDINT_H_WITH_UINTMAX 1 +-_ACEOF +- +- fi +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for intmax_t" >&5 +-$as_echo_n "checking for intmax_t... " >&6; } +-if test "${gt_cv_c_intmax_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#if HAVE_STDINT_H_WITH_UINTMAX +-#include +-#endif +-#if HAVE_INTTYPES_H_WITH_UINTMAX +-#include +-#endif +- +-int +-main () +-{ +-intmax_t x = -1; return !x; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_c_intmax_t=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_c_intmax_t=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_c_intmax_t" >&5 +-$as_echo "$gt_cv_c_intmax_t" >&6; } +- if test $gt_cv_c_intmax_t = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_INTMAX_T 1 +-_ACEOF +- +- else +- +- test $ac_cv_type_long_long_int = yes \ +- && ac_type='long long' \ +- || ac_type='long' +- +-cat >>confdefs.h <<_ACEOF +-#define intmax_t $ac_type +-_ACEOF +- +- fi +- +- +- +- +- +- +- +- +- +- +- +- +- +-for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +- { $as_echo "$as_me:$LINENO: checking whether _snprintf is declared" >&5 +-$as_echo_n "checking whether _snprintf is declared... " >&6; } +-if test "${ac_cv_have_decl__snprintf+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#ifndef _snprintf +- (void) _snprintf; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl__snprintf=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl__snprintf=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl__snprintf" >&5 +-$as_echo "$ac_cv_have_decl__snprintf" >&6; } +-if test "x$ac_cv_have_decl__snprintf" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL__SNPRINTF 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL__SNPRINTF 0 +-_ACEOF +- +- +-fi +- +- +- +- case "$gl_cv_func_snprintf_retval_c99" in +- *yes) +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_SNPRINTF_RETVAL_C99 1 +-_ACEOF +- +- ;; +- esac +- +-{ $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5 +-$as_echo_n "checking whether vsnprintf is declared... " >&6; } +-if test "${ac_cv_have_decl_vsnprintf+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef vsnprintf +- (void) vsnprintf; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_vsnprintf=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_vsnprintf=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5 +-$as_echo "$ac_cv_have_decl_vsnprintf" >&6; } +-if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_VSNPRINTF 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_VSNPRINTF 0 +-_ACEOF +- +- +-fi +- +- +- +- +- +- +- +- if false; then +- GL_COND_LIBTOOL_TRUE= +- GL_COND_LIBTOOL_FALSE='#' +-else +- GL_COND_LIBTOOL_TRUE='#' +- GL_COND_LIBTOOL_FALSE= +-fi +- +- gl_cond_libtool=false +- gl_libdeps= +- gl_ltlibdeps= +- gl_m4_base='m4' +- +- +- +- +- +- +- +- +- +- gl_source_base='gnu' +- # Code from module alloca: +- # Code from module alloca-opt: +- +- +- if test $ac_cv_func_alloca_works = no; then +- : +- fi +- +- # Define an additional variable used in the Makefile substitution. +- if test $ac_cv_working_alloca_h = yes; then +- { $as_echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5 +-$as_echo_n "checking for alloca as a compiler built-in... " >&6; } +-if test "${gl_cv_rpl_alloca+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#if defined __GNUC__ || defined _AIX || defined _MSC_VER +- Need own alloca +-#endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Need own alloca" >/dev/null 2>&1; then +- gl_cv_rpl_alloca=yes +-else +- gl_cv_rpl_alloca=no +-fi +-rm -f conftest* +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5 +-$as_echo "$gl_cv_rpl_alloca" >&6; } +- if test $gl_cv_rpl_alloca = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ALLOCA 1 +-_ACEOF +- +- ALLOCA_H=alloca.h +- else +- ALLOCA_H= +- fi +- else +- ALLOCA_H=alloca.h +- fi +- +- +- # Code from module areadlink: +- # Code from module areadlinkat: +- +- +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_AREADLINKAT 1 +-_ACEOF +- +- +- # Code from module arg-nonnull: +- # Code from module argmatch: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" +- +- +- # Code from module argp: +- +- +- +- +- +- +- GETOPT_H=getopt.h +- +-cat >>confdefs.h <<\_ACEOF +-#define __GETOPT_PREFIX rpl_ +-_ACEOF +- +- +- +- GNULIB_UNISTD_H_GETOPT=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_name is declared" >&5 +-$as_echo_n "checking whether program_invocation_name is declared... " >&6; } +-if test "${ac_cv_have_decl_program_invocation_name+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#ifndef program_invocation_name +- (void) program_invocation_name; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_program_invocation_name=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_program_invocation_name=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_program_invocation_name" >&5 +-$as_echo "$ac_cv_have_decl_program_invocation_name" >&6; } +-if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1 +-_ACEOF +- +-else +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_PROGRAM_INVOCATION_NAME 1 +-_ACEOF +- +-fi +- +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_short_name is declared" >&5 +-$as_echo_n "checking whether program_invocation_short_name is declared... " >&6; } +-if test "${ac_cv_have_decl_program_invocation_short_name+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#ifndef program_invocation_short_name +- (void) program_invocation_short_name; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_program_invocation_short_name=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_program_invocation_short_name=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_program_invocation_short_name" >&5 +-$as_echo "$ac_cv_have_decl_program_invocation_short_name" >&6; } +-if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1 +-_ACEOF +- +-else +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1 +-_ACEOF +- +-fi +- +- +- # Check if program_invocation_name and program_invocation_short_name +- # are defined elsewhere. It is improbable that only one of them will +- # be defined and other not, I prefer to stay on the safe side and to +- # test each one separately. +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_name is defined" >&5 +-$as_echo_n "checking whether program_invocation_name is defined... " >&6; } +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-program_invocation_name = "test"; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_PROGRAM_INVOCATION_NAME 1 +-_ACEOF +- +- { $as_echo "$as_me:$LINENO: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- { $as_echo "$as_me:$LINENO: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +- +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_short_name is defined" >&5 +-$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; } +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-program_invocation_short_name = "test"; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1 +-_ACEOF +- +- { $as_echo "$as_me:$LINENO: result: yes" >&5 +-$as_echo "yes" >&6; } +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- { $as_echo "$as_me:$LINENO: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format" +- +- +- +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format" +- +- # Code from module argp-version-etc: +- # Code from module backupfile: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS backupfile.$ac_objext" +- +- +- +- +- +- +- +- +- +- +- +- # Code from module bitrotate: +- +- # Code from module btowc: +- +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_btowc = no; then +- HAVE_BTOWC=0 +- else +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether btowc(0) is correct" >&5 +-$as_echo_n "checking whether btowc(0) is correct... " >&6; } +-if test "${gl_cv_func_btowc_nul+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- if test "$cross_compiling" = yes; then +- +- case "$host_os" in +- # Guess no on Cygwin. +- cygwin*) gl_cv_func_btowc_nul="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_btowc_nul="guessing yes" ;; +- esac +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- if (btowc ('\0') != 0) +- return 1; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_btowc_nul=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_btowc_nul=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_nul" >&5 +-$as_echo "$gl_cv_func_btowc_nul" >&6; } +- +- { $as_echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5 +-$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } +-if test "${gl_cv_func_btowc_eof+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- case "$host_os" in +- # Guess no on IRIX. +- irix*) gl_cv_func_btowc_eof="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_btowc_eof="guessing yes" ;; +- esac +- if test $LOCALE_FR != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) +- { +- if (btowc (EOF) != WEOF) +- return 1; +- } +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_btowc_eof=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_btowc_eof=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- fi +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_btowc_eof" >&5 +-$as_echo "$gl_cv_func_btowc_eof" >&6; } +- +- case "$gl_cv_func_btowc_nul" in +- *yes) ;; +- *) REPLACE_BTOWC=1 ;; +- esac +- case "$gl_cv_func_btowc_eof" in +- *yes) ;; +- *) REPLACE_BTOWC=1 ;; +- esac +- fi +- if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then +- +- : +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" +- +- +- : +- +- fi +- +- +- +- +- GNULIB_BTOWC=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_BTOWC 1 +-_ACEOF +- +- +- +- # Code from module c++defs: +- # Code from module c-ctype: +- # Code from module canonicalize-lgpl: +- +- +- if test $ac_cv_func_canonicalize_file_name = no; then +- HAVE_CANONICALIZE_FILE_NAME=0 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" +- +- if test $ac_cv_func_realpath = no; then +- HAVE_REALPATH=0 +- elif test "$gl_cv_func_realpath_works" != yes; then +- REPLACE_REALPATH=1 +- fi +- elif test "$gl_cv_func_realpath_works" != yes; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" +- +- REPLACE_REALPATH=1 +- REPLACE_CANONICALIZE_FILE_NAME=1 +- fi +- +- +- +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_CANONICALIZE_LGPL 1 +-_ACEOF +- +- +- +- +- +- GNULIB_CANONICALIZE_FILE_NAME=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1 +-_ACEOF +- +- +- +- +- +- +- GNULIB_REALPATH=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_REALPATH 1 +-_ACEOF +- +- +- +- # Code from module chdir-long: +- +- { $as_echo "$as_me:$LINENO: checking whether this system has an arbitrary file name length limit" >&5 +-$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } +-if test "${gl_cv_have_arbitrary_file_name_length_limit+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-#if defined PATH_MAX || defined MAXPATHLEN +-have_arbitrary_file_name_length_limit +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then +- gl_cv_have_arbitrary_file_name_length_limit=yes +-else +- gl_cv_have_arbitrary_file_name_length_limit=no +-fi +-rm -f conftest* +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 +-$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } +- +- if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" +- +- +- +- : +- +- fi +- +- # Code from module chown: +- +- +- +- +- GNULIB_CHOWN=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_CHOWN 1 +-_ACEOF +- +- +- +- # Code from module clock-time: +- +- +- +- # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. +- # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. +- +- # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* +- # programs in the package would end up linked with that potentially-shared +- # library, inducing unnecessary run-time overhead. +- LIB_CLOCK_GETTIME= +- +- gl_saved_libs=$LIBS +- { $as_echo "$as_me:$LINENO: checking for library containing clock_gettime" >&5 +-$as_echo_n "checking for library containing clock_gettime... " >&6; } +-if test "${ac_cv_search_clock_gettime+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* 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 clock_gettime (); +-int +-main () +-{ +-return clock_gettime (); +- ; +- return 0; +-} +-_ACEOF +-for ac_lib in '' rt posix4; do +- if test -z "$ac_lib"; then +- ac_res="none required" +- else +- ac_res=-l$ac_lib +- LIBS="-l$ac_lib $ac_func_search_save_LIBS" +- fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_search_clock_gettime=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_clock_gettime+set}" = set; then +- break +-fi +-done +-if test "${ac_cv_search_clock_gettime+set}" = set; then +- : +-else +- ac_cv_search_clock_gettime=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_clock_gettime" >&5 +-$as_echo "$ac_cv_search_clock_gettime" >&6; } +-ac_res=$ac_cv_search_clock_gettime +-if test "$ac_res" != no; then +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +- test "$ac_cv_search_clock_gettime" = "none required" || +- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime +-fi +- +- +- +-for ac_func in clock_gettime clock_settime +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +- LIBS=$gl_saved_libs +- +- # Code from module cloexec: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" +- +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_CLOEXEC 1 +-_ACEOF +- +- +- # Code from module close: +- +- +- +- +- +- +- GNULIB_CLOSE=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_CLOSE 1 +-_ACEOF +- +- +- +- # Code from module close-hook: +- # Code from module close-stream: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext" +- +- +- : +- +- +- +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_CLOSE_STREAM 1 +-_ACEOF +- +- +- # Code from module closeout: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext" +- +- +- : +- +- # Code from module configmake: +- +- if test "x$datarootdir" = x; then +- datarootdir='${datadir}' +- +- fi +- if test "x$docdir" = x; then +- docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +- +- fi +- if test "x$htmldir" = x; then +- htmldir='${docdir}' +- +- fi +- if test "x$dvidir" = x; then +- dvidir='${docdir}' +- +- fi +- if test "x$pdfdir" = x; then +- pdfdir='${docdir}' +- +- fi +- if test "x$psdir" = x; then +- psdir='${docdir}' +- +- fi +- if test "x$lispdir" = x; then +- lispdir='${datarootdir}/emacs/site-lisp' +- +- fi +- if test "x$localedir" = x; then +- localedir='${datarootdir}/locale' +- +- fi +- +- pkglibexecdir='${libexecdir}/${PACKAGE}' +- +- +- # Code from module d-ino: +- { $as_echo "$as_me:$LINENO: checking for d_ino member in directory struct" >&5 +-$as_echo_n "checking for d_ino member in directory struct... " >&6; } +-if test "${gl_cv_struct_dirent_d_ino+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_struct_dirent_d_ino=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- #include +- +-int +-main () +-{ +-DIR *dp = opendir ("."); +- struct dirent *e; +- struct stat st; +- if (! dp) +- return 1; +- e = readdir (dp); +- if (! e) +- return 2; +- if (stat (e->d_name, &st) != 0) +- return 3; +- if (e->d_ino != st.st_ino) +- return 4; +- return 0; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_struct_dirent_d_ino=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_struct_dirent_d_ino=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_struct_dirent_d_ino" >&5 +-$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } +- if test $gl_cv_struct_dirent_d_ino = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define D_INO_IN_DIRENT 1 +-_ACEOF +- +- fi +- +- +- # Code from module dirent: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_dirent_h='<'dirent.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_dirent_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- if test $ac_cv_header_dirent_h = yes; then +- +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/dirent.h#{ +- s#.*"\(.*/dirent.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- else +- gl_cv_next_dirent_h='<'dirent.h'>' +- fi +- +- +-fi +-{ $as_echo "$as_me:$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 +- +- +- +- +- +- +- +- +- +- +- for gl_func in alphasort dirfd fdopendir scandir; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#undef $gl_func +- (void) $gl_func; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF +- +- eval ac_cv_have_decl_$gl_func=yes +-fi +- +- done +- +- +- # Code from module dirent-safer: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS opendir-safer.$ac_objext" +- +- +- +- +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_DIRENT_SAFER 1 +-_ACEOF +- +- +- # Code from module dirfd: +- +- +- +- : +- +- +- +- +- +-for ac_func in dirfd +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-fi +-done +- +- { $as_echo "$as_me:$LINENO: checking whether dirfd is declared" >&5 +-$as_echo_n "checking whether dirfd is declared... " >&6; } +-if test "${ac_cv_have_decl_dirfd+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- +-int +-main () +-{ +-#ifndef dirfd +- (void) dirfd; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_dirfd=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_dirfd=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_dirfd" >&5 +-$as_echo "$ac_cv_have_decl_dirfd" >&6; } +-if test "x$ac_cv_have_decl_dirfd" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_DIRFD 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_DIRFD 0 +-_ACEOF +- +- +-fi +- +- +- if test $ac_cv_have_decl_dirfd = no; then +- HAVE_DECL_DIRFD=0 +- fi +- +- { $as_echo "$as_me:$LINENO: checking whether dirfd is a macro" >&5 +-$as_echo_n "checking whether dirfd is a macro... " >&6; } +-if test "${gl_cv_func_dirfd_macro+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#ifdef dirfd +- dirent_header_defines_dirfd +-#endif +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then +- gl_cv_func_dirfd_macro=yes +-else +- gl_cv_func_dirfd_macro=no +-fi +-rm -f conftest* +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_dirfd_macro" >&5 +-$as_echo "$gl_cv_func_dirfd_macro" >&6; } +- +- # Use the replacement only if we have no function or macro with that name. +- if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then +- if test $ac_cv_have_decl_dirfd = yes; then +- # If the system declares dirfd already, let's declare rpl_dirfd instead. +- REPLACE_DIRFD=1 +- fi +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" +- +- { $as_echo "$as_me:$LINENO: checking how to get the file descriptor associated with an open DIR*" >&5 +-$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } +-if test "${gl_cv_sys_dir_fd_member_name+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- +- dirfd_save_CFLAGS=$CFLAGS +- for ac_expr in d_fd dd_fd; do +- +- CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +- #include +- #include +-int +-main () +-{ +-DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- dir_fd_found=yes +- +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- CFLAGS=$dirfd_save_CFLAGS +- test "$dir_fd_found" = yes && break +- done +- test "$dir_fd_found" = yes || ac_expr=no_such_member +- +- gl_cv_sys_dir_fd_member_name=$ac_expr +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_sys_dir_fd_member_name" >&5 +-$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } +- if test $gl_cv_sys_dir_fd_member_name != no_such_member; then +- +-cat >>confdefs.h <<_ACEOF +-#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name +-_ACEOF +- +- fi +- +- +- fi +- +- +- +- +- GNULIB_DIRFD=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_DIRFD 1 +-_ACEOF +- +- +- +- # Code from module dirname: +- +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" +- +- +- +- +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_DIRNAME 1 +-_ACEOF +- +- +- # Code from module dirname-lgpl: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" +- +- +- +- +- +- # Code from module dosname: +- # Code from module double-slash-root: +- +- +- { $as_echo "$as_me:$LINENO: checking whether // is distinct from /" >&5 +-$as_echo_n "checking whether // is distinct from /... " >&6; } +-if test "${gl_cv_double_slash_root+set}" = set; 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 +- # . +- 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:$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 +- +-cat >>confdefs.h <<\_ACEOF +-#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1 +-_ACEOF +- +- fi +- +- # Code from module dup2: +- +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_dup2 = no; then +- HAVE_DUP2=0 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" +- +- else +- { $as_echo "$as_me:$LINENO: checking whether dup2 works" >&5 +-$as_echo_n "checking whether dup2 works... " >&6; } +-if test "${gl_cv_func_dup2_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- case "$host_os" in +- mingw*) # on this platform, dup2 always returns 0 for success +- gl_cv_func_dup2_works=no;; +- cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 +- gl_cv_func_dup2_works=no;; +- linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a +- # closed fd may yield -EBADF instead of -1 / errno=EBADF. +- gl_cv_func_dup2_works=no;; +- freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. +- gl_cv_func_dup2_works=no;; +- haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. +- gl_cv_func_dup2_works=no;; +- *) gl_cv_func_dup2_works=yes;; +- esac +-else +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-#include +-int +-main () +-{ +-int result = 0; +-#if HAVE_FCNTL +- if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) +- result |= 1; +-#endif HAVE_FCNTL +- if (dup2 (1, 1) == 0) +- result |= 2; +-#if HAVE_FCNTL +- if (fcntl (1, F_GETFD) != FD_CLOEXEC) +- result |= 4; +-#endif +- close (0); +- if (dup2 (0, 0) != -1) +- result |= 8; +- /* Many gnulib modules require POSIX conformance of EBADF. */ +- if (dup2 (2, 1000000) == -1 && errno != EBADF) +- result |= 16; +- return result; +- +- ; +- return 0; +-} +- +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_dup2_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_dup2_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_dup2_works" >&5 +-$as_echo "$gl_cv_func_dup2_works" >&6; } +- if test "$gl_cv_func_dup2_works" = no; then +- +- +- if test $ac_cv_func_dup2 = yes; then +- REPLACE_DUP2=1 +- fi +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" +- +- +- fi +- fi +- +- +- +- +- GNULIB_DUP2=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_DUP2 1 +-_ACEOF +- +- +- +- # Code from module environ: +- +- +- +- +- GNULIB_ENVIRON=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_ENVIRON 1 +-_ACEOF +- +- +- +- # Code from module errno: +- +- # Code from module error: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for error_at_line" >&5 +-$as_echo_n "checking for error_at_line... " >&6; } +-if test "${ac_cv_lib_error_at_line+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-error_at_line (0, 0, "", 0, "an error occurred"); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_lib_error_at_line=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_lib_error_at_line=no +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$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 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" +- +- fi +- +- +- +- +- : +- +- +- +- +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" +- +- +- +- XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" +- +- # Code from module exclude: +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS exclude.$ac_objext" +- +- +- # Code from module exitfail: +- # Code from module extensions: +- # Code from module fchdir: +- +- +- +- +- +- +- +- +- +- if test $ac_cv_have_decl_fchdir = no; then +- HAVE_DECL_FCHDIR=0 +- fi +- +- +- +- +- +- +- +- if test $ac_cv_func_fchdir = no; then +- HAVE_FCHDIR=0 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" +- +- : +- +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_FCHDIR 1 +-_ACEOF +- +- REPLACE_OPENDIR=1 +- REPLACE_CLOSEDIR=1 +- REPLACE_DUP=1 +- +- +- REPLACE_OPEN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" +- +- +- +- +- : +- +- +- +- +- REPLACE_CLOSE=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" +- +- +- +- REPLACE_FCLOSE=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" +- +- +- +- +- +- if test $ac_cv_func_dup2 = yes; then +- REPLACE_DUP2=1 +- fi +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_fcntl = no; then +- HAVE_FCNTL=0 +- else +- REPLACE_FCNTL=1 +- fi +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" +- +- +- +- : +- +- { $as_echo "$as_me:$LINENO: checking whether open can visit directories" >&5 +-$as_echo_n "checking whether open can visit directories... " >&6; } +-if test "${gl_cv_func_open_directory_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_open_directory_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-return open(".", O_RDONLY) < 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_open_directory_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_open_directory_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_open_directory_works" >&5 +-$as_echo "$gl_cv_func_open_directory_works" >&6; } +- if test "$gl_cv_func_open_directory_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_OPEN_DIRECTORY 1 +-_ACEOF +- +- REPLACE_FSTAT=1 +- fi +- fi +- +- +- +- +- GNULIB_FCHDIR=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_FCHDIR 1 +-_ACEOF +- +- +- +- # Code from module fclose: +- +- +- +- +- +- GNULIB_FCLOSE=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_FCLOSE 1 +-_ACEOF +- +- +- +- # Code from module fcntl: +- +- +- +- +- +- +- +- +- +- +- if test $ac_cv_func_fcntl = no; then +- +- +- +- +- +- +- +- +- if test $ac_cv_func_fcntl = no; then +- HAVE_FCNTL=0 +- else +- REPLACE_FCNTL=1 +- fi +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" +- +- +- else +- { $as_echo "$as_me:$LINENO: checking whether fcntl handles F_DUPFD correctly" >&5 +-$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } +-if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- # Guess that it works on glibc systems +- case $host_os in #(( +- *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; +- *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; +- esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +- +-int +-main () +-{ +-int result = 0; +- if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; +- if (errno != EINVAL) result |= 2; +- return result; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fcntl_f_dupfd_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_fcntl_f_dupfd_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 +-$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } +- case $gl_cv_func_fcntl_f_dupfd_works in +- *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 ++#ifdef MAP_ANONYMOUS ++ I cant identify this map. ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "I cant 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. */ + +- if test $ac_cv_func_fcntl = no; then +- HAVE_FCNTL=0 +- else +- REPLACE_FCNTL=1 +- fi ++#include ++#ifdef MAP_ANON ++ I cant identify this map. ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "I cant 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 + ++ fi ++ fi + + +- gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" + + + +-cat >>confdefs.h <<\_ACEOF +-#define FCNTL_DUPFD_BUGGY 1 +-_ACEOF +- ;; +- esac + +- { $as_echo "$as_me:$LINENO: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 +-$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } +-if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then ++ if test $ac_cv_func_memchr = yes; then ++ # Detect platform-specific bugs in some versions of glibc: ++ # memchr should not dereference anything with length 0 ++ # http://bugzilla.redhat.com/499689 ++ # memchr should not dereference overestimated length after a match ++ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 ++ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 ++ # 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 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_memchr_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#ifndef F_DUPFD_CLOEXEC +-choke me ++#include ++#if HAVE_SYS_MMAN_H ++# include ++# include ++# include ++# include ++# ifndef MAP_FILE ++# define MAP_FILE 0 ++# endif + #endif + + int + main () + { + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#ifdef __linux__ +-/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace +- it to support the semantics on older kernels that failed with EINVAL. */ +-choke me ++ 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 +- +-int +-main () +-{ ++ if (fence) ++ { ++ 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; ++ } ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_fcntl_f_dupfd_cloexec=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_memchr_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" ++ gl_cv_func_memchr_works=no + fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_fcntl_f_dupfd_cloexec=no ++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_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 +-$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } +- if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then +- +- +- +- +- +- +- +- +- if test $ac_cv_func_fcntl = no; then +- HAVE_FCNTL=0 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 ++$as_echo "$gl_cv_func_memchr_works" >&6; } ++ if test "$gl_cv_func_memchr_works" != yes; then ++ REPLACE_MEMCHR=1 ++ fi + else +- REPLACE_FCNTL=1 ++ HAVE_MEMCHR=0 + fi ++ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + + + +@@ -27330,345 +13332,227 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" +- +- +- fi +- fi +- +- +- +- +- GNULIB_FCNTL=1 +- ++ gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_FCNTL 1 ++ for ac_header in bp-sym.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" ++if test "x$ac_cv_header_bp_sym_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_BP_SYM_H 1 + _ACEOF + ++fi + +- +- # Code from module fcntl-h: +- +- ++done + + ++ 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_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_MEMRCHR $ac_have_decl ++_ACEOF + + + + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_fcntl_h='<'fcntl.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_fcntl_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/fcntl.h#{ +- s#.*"\(.*/fcntl.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' + + +-fi +-{ $as_echo "$as_me:$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 ++ GNULIB_MKTIME=0; ++ GNULIB_NANOSLEEP=0; ++ GNULIB_STRPTIME=0; ++ GNULIB_TIMEGM=0; ++ GNULIB_TIME_R=0; ++ HAVE_DECL_LOCALTIME_R=1; ++ HAVE_NANOSLEEP=1; ++ HAVE_STRPTIME=1; ++ HAVE_TIMEGM=1; ++ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; ++ REPLACE_MKTIME=GNULIB_PORTCHECK; ++ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; ++ REPLACE_TIMEGM=GNULIB_PORTCHECK; + + + + + + ++ # parse-datetime.y works with bison only. ++ : ${YACC='bison -y'} + + +- for gl_func in fcntl openat; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5 ++$as_echo_n "checking for compound literals... " >&6; } ++if ${gl_cv_compound_literals+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- ++struct s { int i, j; }; + int + main () + { +-#undef $gl_func +- (void) $gl_func; ++struct s t = (struct s) { 3, 4 }; ++ if (t.i != 0) return 0; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_compound_literals=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ gl_cv_compound_literals=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF +- +- eval ac_cv_have_decl_$gl_func=yes +-fi +- +- done +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5 ++$as_echo "$gl_cv_compound_literals" >&6; } ++ if test $gl_cv_compound_literals = yes; then + +- # Code from module fdopendir: ++$as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h + ++ fi + +- { $as_echo "$as_me:$LINENO: checking whether fdopendir is declared" >&5 +-$as_echo_n "checking whether fdopendir is declared... " >&6; } +-if test "${ac_cv_have_decl_fdopendir+set}" = set; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 ++$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } ++if ${ac_cv_struct_tm+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#include +- ++#include ++#include + + int + main () + { +-#ifndef fdopendir +- (void) fdopendir; +-#endif +- ++struct tm tm; ++ int *p = &tm.tm_sec; ++ return !p; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_fdopendir=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_struct_tm=time.h + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_fdopendir=no ++ ac_cv_struct_tm=sys/time.h + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdopendir" >&5 +-$as_echo "$ac_cv_have_decl_fdopendir" >&6; } +-if test "x$ac_cv_have_decl_fdopendir" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FDOPENDIR 1 +-_ACEOF +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 ++$as_echo "$ac_cv_struct_tm" >&6; } ++if test $ac_cv_struct_tm = sys/time.h; then + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_FDOPENDIR 0 +-_ACEOF ++$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h + +-HAVE_DECL_FDOPENDIR=0 + fi + + ++ ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include ++" ++if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then : + ++$as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h + +- +- +- +- +- if test $ac_cv_func_fdopendir = no; then +- +- ++fi + + + + + + +- gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + + ++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 + + + + +- gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" + + +- : ++ if test $ac_cv_have_decl_setenv = no; then ++ HAVE_DECL_SETENV=0 ++ fi + +- HAVE_FDOPENDIR=0 ++ if test $ac_cv_func_setenv = no; then ++ HAVE_SETENV=0 + else +- { $as_echo "$as_me:$LINENO: checking whether fdopendir works" >&5 +-$as_echo_n "checking whether fdopendir works... " >&6; } +-if test "${gl_cv_func_fdopendir_works+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 ++$as_echo_n "checking whether setenv validates arguments... " >&6; } ++if ${gl_cv_func_setenv_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- gl_cv_func_fdopendir_works="guessing no" ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_setenv_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#include +-#if !HAVE_DECL_FDOPENDIR +-extern DIR *fdopendir (int); +-#endif ++ #include ++ #include ++ #include + + int + main () + { +-int result = 0; +- int fd = open ("conftest.c", O_RDONLY); +- if (fd < 0) result |= 1; +- if (fdopendir (fd)) result |= 2; +- if (close (fd)) result |= 4; +- return result; ++ ++ int result = 0; ++ { ++ if (setenv ("", "", 0) != -1) ++ result |= 1; ++ else if (errno != EINVAL) ++ result |= 2; ++ } ++ { ++ if (setenv ("a", "=", 1) != 0) ++ result |= 4; ++ else if (strcmp (getenv ("a"), "=") != 0) ++ result |= 8; ++ } ++ return result; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fdopendir_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_setenv_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_fdopendir_works=no ++ gl_cv_func_setenv_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fdopendir_works" >&5 +-$as_echo "$gl_cv_func_fdopendir_works" >&6; } +- if test "$gl_cv_func_fdopendir_works" != yes; then +- REPLACE_FDOPENDIR=1 +- +- : +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 ++$as_echo "$gl_cv_func_setenv_works" >&6; } ++ if test "$gl_cv_func_setenv_works" != yes; then ++ REPLACE_SETENV=1 + + + +@@ -27677,7 +13561,7 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" + + fi + fi +@@ -27685,193 +13569,268 @@ + + + +- GNULIB_FDOPENDIR=1 ++ 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 + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_FDOPENDIR 1 ++ 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 + + + + +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_FDOPENDIR 1 +-_ACEOF +- + +- # Code from module fdutimensat: + + +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_FDUTIMENSAT 1 +-_ACEOF ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 ++$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } ++if ${gl_cv_func_snprintf_retval_c99+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ if test "$cross_compiling" = yes; then : + +- # Code from module fileblocks: ++ case "$host_os" in ++ # Guess yes on glibc systems. ++ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on FreeBSD >= 5. ++ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; ++ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on MacOS X >= 10.3. ++ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; ++ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on OpenBSD >= 3.9. ++ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) ++ gl_cv_func_snprintf_retval_c99="guessing no";; ++ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on Solaris >= 2.10. ++ solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; ++ solaris*) gl_cv_func_printf_sizes_c99="guessing no";; ++ # Guess yes on AIX >= 4. ++ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; ++ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on NetBSD >= 3. ++ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) ++ gl_cv_func_snprintf_retval_c99="guessing no";; ++ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # Guess yes on BeOS. ++ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; ++ # If we don't know, assume the worst. ++ *) gl_cv_func_snprintf_retval_c99="guessing no";; ++ esac + +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5 +-$as_echo_n "checking for struct stat.st_blocks... " >&6; } +-if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then +- $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_blocks) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blocks=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () ++#include ++#include ++static char buf[100]; ++int main () + { +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_blocks) +-return 0; +- ; ++ strcpy (buf, "ABCDEF"); ++ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7) ++ return 1; ++ if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) ++ return 2; ++ if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) ++ return 3; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blocks=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_snprintf_retval_c99=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_blocks=no ++ gl_cv_func_snprintf_retval_c99=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_ext ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 ++$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" ++if test "x$ac_cv_have_decl_snprintf" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; } +-if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BLOCKS 1 ++#define HAVE_DECL_SNPRINTF $ac_have_decl + _ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ST_BLOCKS 1 ++ REPLACE_NULL=0; ++ HAVE_WCHAR_T=1; ++ STDDEF_H=''; ++ ++ ++ { $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 ++ 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 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext" +- ++ gt_cv_c_wchar_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_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_member_struct_stat_st_blocks = no; then +- ++ fi + + ++ HAVE_STRCASECMP=1; ++ HAVE_DECL_STRNCASECMP=1; + + + ++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 + +- fi + +- # Code from module filenamecat-lgpl: + + + + ++ if test -z "$ERRNO_H"; 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 : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + ++int ++main () ++{ ++return !*strerror (-2); ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_working_strerror=yes ++else ++ gl_cv_func_working_strerror=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 + ++int ++main () ++{ ++return !*strerror (-2); ++ ; ++ 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 + + +- gl_LIBOBJS="$gl_LIBOBJS filenamecat-lgpl.$ac_objext" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 ++$as_echo "$gl_cv_func_working_strerror" >&6; } ++ if test $gl_cv_func_working_strerror = no; then ++ REPLACE_STRERROR=1 ++ fi ++ else ++ REPLACE_STRERROR=1 ++ fi ++ if test $REPLACE_STRERROR = 1; then + ++ ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strerror" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_STRERROR $ac_have_decl ++_ACEOF + + ++ 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 + ++ fi + +- # Code from module float: + + + +- FLOAT_H= +- case "$host_os" in +- beos* | openbsd* | mirbsd*) +- FLOAT_H=float.h + + + +@@ -27881,30 +13840,26 @@ + + + if test $gl_cv_have_include_next = yes; then +- gl_cv_next_float_h='<'float.h'>' ++ gl_cv_next_string_h='<'string.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_float_h+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_string_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac +- gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/float.h#{ +- s#.*"\(.*/float.h\)".*#\1# ++ gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/string.h#{ ++ s#.*"\(.*/string.h\)".*#\1# + s#^/[^/]#//&# + p + q +@@ -27912,272 +13867,63 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_float_h" >&5 +-$as_echo "$gl_cv_next_float_h" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 ++$as_echo "$gl_cv_next_string_h" >&6; } + fi +- NEXT_FLOAT_H=$gl_cv_next_float_h ++ 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='<'float.h'>' ++ gl_next_as_first_directive='<'string.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_float_h +- fi +- NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive +- +- +- +- +- ;; +- esac +- +- +- # Code from module fnmatch: +- +- +- +- +- +- FNMATCH_H= +- gl_fnmatch_required_lowercase=` +- echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' +- ` +- gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" +- { $as_echo "$as_me:$LINENO: checking for working $gl_fnmatch_required fnmatch" >&5 +-$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } +-if { as_var=$gl_fnmatch_cache_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- if test $gl_fnmatch_required = GNU; then +- gl_fnmatch_gnu_start= +- gl_fnmatch_gnu_end= +- else +- gl_fnmatch_gnu_start='#if 0' +- gl_fnmatch_gnu_end='#endif' ++ gl_next_as_first_directive=$gl_cv_next_string_h + fi +- if test "$cross_compiling" = yes; then +- eval "$gl_fnmatch_cache_var=\"guessing no\"" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- static int +- y (char const *pattern, char const *string, int flags) +- { +- return fnmatch (pattern, string, flags) == 0; +- } +- static int +- n (char const *pattern, char const *string, int flags) +- { +- return fnmatch (pattern, string, flags) == FNM_NOMATCH; +- } +- +-int +-main () +-{ +-char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; +- char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; +- static char const A_1[] = { 'A' - 1, 0 }; +- static char const A01[] = { 'A' + 1, 0 }; +- static char const a_1[] = { 'a' - 1, 0 }; +- static char const a01[] = { 'a' + 1, 0 }; +- static char const bs_1[] = { '\\\\' - 1, 0 }; +- static char const bs01[] = { '\\\\' + 1, 0 }; +- int result = 0; +- if (!n ("a*", "", 0)) +- return 1; +- if (!y ("a*", "abc", 0)) +- return 1; +- if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) +- return 2; +- if (!y ("a\\\\bc", "abc", 0)) +- return 3; +- if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) +- return 3; +- if (!y ("*x", ".x", 0)) +- return 4; +- if (!n ("*x", ".x", FNM_PERIOD)) +- return 4; +- if (!y (Apat, "\\\\", 0)) +- return 5; +- if (!y (Apat, "A", 0)) +- return 5; +- if (!y (apat, "\\\\", 0)) +- return 5; +- if (!y (apat, "a", 0)) +- return 5; +- if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) +- return 5; +- if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) +- return 5; +- if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) +- return 5; +- if (!(y (apat, a01, 0) == ('a' < '\\\\'))) +- return 5; +- if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) +- return 5; +- if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) +- return 5; +- if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) +- return 5; +- if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) +- return 5; +- $gl_fnmatch_gnu_start +- if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) +- result |= 8; +- if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) +- result |= 16; +- if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) +- result |= 32; +- if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) +- result |= 64; +- if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) +- result |= 64; +- if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) +- result |= 64; +- $gl_fnmatch_gnu_end +- return result; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- eval "$gl_fnmatch_cache_var=yes" +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-eval "$gl_fnmatch_cache_var=no" +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- +-fi +-ac_res=`eval 'as_val=${'$gl_fnmatch_cache_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" +- if test "$gl_fnmatch_result" = yes; then +- rm -f "$gl_source_base/fnmatch.h" +- else +- FNMATCH_H=fnmatch.h +- +- +- +- +- +- ++ NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + + +- gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" + + +-cat >>confdefs.h <<_ACEOF +-#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch +-_ACEOF + + +- { $as_echo "$as_me:$LINENO: checking whether isblank is declared" >&5 +-$as_echo_n "checking whether isblank is declared... " >&6; } +-if test "${ac_cv_have_decl_isblank+set}" = set; then ++ for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + int + main () + { +-#ifndef isblank +- (void) isblank; +-#endif +- ++#undef $gl_func ++ (void) $gl_func; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_isblank=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_isblank=no ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 +-$as_echo "$ac_cv_have_decl_isblank" >&6; } +-if test "x$ac_cv_have_decl_isblank" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISBLANK 1 +-_ACEOF +- +- +-else ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISBLANK 0 ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + +- ++ eval ac_cv_have_decl_$gl_func=yes + fi ++ done + + + +@@ -28193,33 +13939,122 @@ + + + ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_strings_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ if test $ac_cv_header_strings_h = yes; then + + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/strings.h#{ ++ s#.*"\(.*/strings.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ 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 + + + + + + +- fi +- +- +- # Code from module fnmatch-gnu: ++ for gl_func in strcasecmp strncasecmp; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + ++int ++main () ++{ ++#undef $gl_func ++ (void) $gl_func; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" ++else ++ eval "$as_gl_Symbol=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 ++_ACEOF + ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done + + ++ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strndup" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + +- # Code from module fpending: ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_STRNDUP $ac_have_decl ++_ACEOF + + + ++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 + + + +@@ -28229,196 +14064,100 @@ + + + +- fp_headers=' +-# include +-# if HAVE_STDIO_EXT_H +-# include +-# endif +-' +- { $as_echo "$as_me:$LINENO: checking whether __fpending is declared" >&5 +-$as_echo_n "checking whether __fpending is declared... " >&6; } +-if test "${ac_cv_have_decl___fpending+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 ++$as_echo_n "checking for struct timespec in ... " >&6; } ++if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$fp_headers ++#include + + int + main () + { +-#ifndef __fpending +- (void) __fpending; +-#endif +- ++static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl___fpending=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_sys_struct_timespec_in_time_h=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl___fpending=no ++ 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:$LINENO: result: $ac_cv_have_decl___fpending" >&5 +-$as_echo "$ac_cv_have_decl___fpending" >&6; } +-if test "x$ac_cv_have_decl___fpending" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL___FPENDING 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL___FPENDING 0 +-_ACEOF +- +- +-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; } + +- if test $ac_cv_func___fpending = no; then +- { $as_echo "$as_me:$LINENO: checking how to determine the number of pending output bytes on a stream" >&5 +-$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } +-if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then ++ TIME_H_DEFINES_STRUCT_TIMESPEC=0 ++ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 ++ PTHREAD_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 " >&5 ++$as_echo_n "checking for struct timespec in ... " >&6; } ++if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- for ac_expr in \ +- \ +- '# glibc2' \ +- 'fp->_IO_write_ptr - fp->_IO_write_base' \ +- \ +- '# traditional Unix' \ +- 'fp->_ptr - fp->_base' \ +- \ +- '# BSD' \ +- 'fp->_p - fp->_bf._base' \ +- \ +- '# SCO, Unixware' \ +- '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ +- \ +- '# QNX' \ +- '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ +- \ +- '# old glibc?' \ +- 'fp->__bufp - fp->__buffer' \ +- \ +- '# old glibc iostream?' \ +- 'fp->_pptr - fp->_pbase' \ +- \ +- '# emx+gcc' \ +- 'fp->_ptr - fp->_buffer' \ +- \ +- '# VMS' \ +- '(*fp)->_ptr - (*fp)->_base' \ +- \ +- '# e.g., DGUX R4.11; the info is not available' \ +- 1 \ +- ; do +- +- # Skip each embedded comment. +- case "$ac_expr" in '#'*) continue;; esac +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ + int + main () + { +-FILE *fp = stdin; (void) ($ac_expr); ++static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- fp_done=yes +- ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_sys_struct_timespec_in_sys_time_h=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_sys_struct_timespec_in_sys_time_h=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- test "$fp_done" = yes && break +- done +- +- ac_cv_sys_pending_output_n_bytes=$ac_expr +- +- + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_pending_output_n_bytes" >&5 +-$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } ++{ $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 " >&5 ++$as_echo_n "checking for struct timespec in ... " >&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 + +-cat >>confdefs.h <<_ACEOF +-#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes ++int ++main () ++{ ++static struct timespec x; x.tv_sec = x.tv_nsec; ++ ; ++ return 0; ++} + _ACEOF +- +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" +- ++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 ++ fi ++ fi + fi + +- # Code from module fseeko: +- + + + +@@ -28427,581 +14166,447 @@ + + + +- if test $ac_cv_have_decl_fseeko = no; then +- HAVE_DECL_FSEEKO=0 +- fi +- +- if test $gl_cv_func_fseeko = no; then +- HAVE_FSEEKO=0 +- +- + +- if test $gl_cv_func_fseeko = yes; then +- REPLACE_FSEEKO=1 +- fi + + + + + ++ if test $gl_cv_have_include_next = yes; then ++ gl_cv_next_time_h='<'time.h'>' ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_time_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/time.h#{ ++ s#.*"\(.*/time.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' + +- gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 ++$as_echo "$gl_cv_next_time_h" >&6; } ++ fi ++ 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='<'time.h'>' ++ else ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' ++ gl_next_as_first_directive=$gl_cv_next_time_h ++ fi ++ NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive + +- else +- if test $gl_cv_var_stdin_large_offset = no; then + + + +- if test $gl_cv_func_fseeko = yes; then +- REPLACE_FSEEKO=1 +- fi + + ++ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default" ++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 + + + + + +- gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + + + +- fi +- fi + + + ++gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} ++i\ ++0 ++q ++' ++gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} ++i\ ++0 ++q ++' ++gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} ++i\ ++0 ++q ++' + +- GNULIB_FSEEKO=1 + ++ if test "$HAVE_LIBUNISTRING" = yes; then ++ LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` ++ LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` ++ LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` ++ fi + ++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 GNULIB_TEST_FSEEKO 1 ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_UNSETENV $ac_have_decl + _ACEOF + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5 ++$as_echo_n "checking whether the utimes function works... " >&6; } ++if ${gl_cv_func_working_utimes+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- # Code from module full-write: +- # Code from module futimens: +- ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_working_utimes=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + ++static int ++inorder (time_t a, time_t b, time_t c) ++{ ++ return a <= b && b <= c; ++} + ++int ++main () ++{ ++ int result = 0; ++ char const *file = "conftest.utimes"; ++ static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; + ++ /* Test whether utimes() essentially works. */ ++ { ++ struct stat sbuf; ++ FILE *f = fopen (file, "w"); ++ if (f == NULL) ++ result |= 1; ++ else if (fclose (f) != 0) ++ result |= 1; ++ else if (utimes (file, timeval) != 0) ++ result |= 2; ++ else if (lstat (file, &sbuf) != 0) ++ result |= 1; ++ else if (!(sbuf.st_atime == timeval[0].tv_sec ++ && sbuf.st_mtime == timeval[1].tv_sec)) ++ result |= 4; ++ if (unlink (file) != 0) ++ result |= 1; ++ } + ++ /* Test whether utimes() with a NULL argument sets the file's timestamp ++ to the current time. Use 'fstat' as well as 'time' to ++ determine the "current" time, to accommodate NFS file systems ++ if there is a time skew between the host and the NFS server. */ ++ { ++ int fd = open (file, O_WRONLY|O_CREAT, 0644); ++ if (fd < 0) ++ result |= 1; ++ else ++ { ++ time_t t0, t2; ++ struct stat st0, st1, st2; ++ if (time (&t0) == (time_t) -1) ++ result |= 1; ++ else if (fstat (fd, &st0) != 0) ++ result |= 1; ++ else if (utimes (file, timeval) != 0) ++ result |= 2; ++ else if (utimes (file, NULL) != 0) ++ result |= 8; ++ else if (fstat (fd, &st1) != 0) ++ result |= 1; ++ else if (write (fd, "\n", 1) != 1) ++ result |= 1; ++ else if (fstat (fd, &st2) != 0) ++ result |= 1; ++ else if (time (&t2) == (time_t) -1) ++ result |= 1; ++ else ++ { ++ int m_ok_POSIX = inorder (t0, st1.st_mtime, t2); ++ int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime); ++ if (! (st1.st_atime == st1.st_mtime)) ++ result |= 16; ++ if (! (m_ok_POSIX || m_ok_NFS)) ++ result |= 32; ++ } ++ if (close (fd) != 0) ++ result |= 1; ++ } ++ if (unlink (file) != 0) ++ result |= 1; ++ } + ++ /* Test whether utimes() with a NULL argument works on read-only files. */ ++ { ++ int fd = open (file, O_WRONLY|O_CREAT, 0444); ++ if (fd < 0) ++ result |= 1; ++ else if (close (fd) != 0) ++ result |= 1; ++ else if (utimes (file, NULL) != 0) ++ result |= 64; ++ if (unlink (file) != 0) ++ result |= 1; ++ } + ++ return result; ++} + +- if test $ac_cv_func_futimens = no; then +- HAVE_FUTIMENS=0 ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_working_utimes=yes ++else ++ gl_cv_func_working_utimes=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_utimes" >&5 ++$as_echo "$gl_cv_func_working_utimes" >&6; } + ++ if test $gl_cv_func_working_utimes = yes; then + ++$as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h + ++ fi + + + + +- gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" + +- else +- { $as_echo "$as_me:$LINENO: checking whether futimens works" >&5 +-$as_echo_n "checking whether futimens works... " >&6; } +-if test "${gl_cv_func_futimens_works+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5 ++$as_echo_n "checking for struct utimbuf... " >&6; } ++if ${gl_cv_sys_struct_utimbuf+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- gl_cv_func_futimens_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-#include +- +-int +-main () +-{ +-struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } }; +- int fd = creat ("conftest.file", 0600); +- struct stat st; +- if (fd < 0) return 1; +- errno = 0; +- if (futimens (AT_FDCWD, NULL) == 0) return 2; +- if (errno != EBADF) return 3; +- if (futimens (fd, ts)) return 4; +- sleep (1); +- ts[0].tv_nsec = UTIME_NOW; +- ts[1].tv_nsec = UTIME_OMIT; +- if (futimens (fd, ts)) return 5; +- if (fstat (fd, &st)) return 6; +- if (st.st_ctime < st.st_atime) return 7; +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#ifdef __linux__ +-/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT +- in several file systems as recently as 2.6.32. Always replace futimens +- to support older kernels. */ +-choke me +-#endif ++#if HAVE_SYS_TIME_H ++ #include ++ #endif ++ #include ++ #ifdef HAVE_UTIME_H ++ #include ++ #endif + + int + main () + { +- ++static struct utimbuf x; x.actime = x.modtime; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_futimens_works=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_sys_struct_utimbuf=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_futimens_works="needs runtime check" ++ gl_cv_sys_struct_utimbuf=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_futimens_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- rm -f conftest.file + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_futimens_works" >&5 +-$as_echo "$gl_cv_func_futimens_works" >&6; } +- if test "$gl_cv_func_futimens_works" != yes; then +- REPLACE_FUTIMENS=1 +- +- +- +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5 ++$as_echo "$gl_cv_sys_struct_utimbuf" >&6; } + ++ if test $gl_cv_sys_struct_utimbuf = yes; then + +- gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" ++$as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h + +- fi + fi + + + + +- GNULIB_FUTIMENS=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_FUTIMENS 1 +-_ACEOF +- + + +- # Code from module getcwd: + + + + +- gl_abort_bug=no +- case $gl_cv_func_getcwd_null,$host_os in +- *,mingw*) +- gl_cv_func_getcwd_path_max=yes;; +- yes,*) + + + ++ if test $ac_cv_header_features_h = yes; then ++ HAVE_FEATURES_H=1 ++ else ++ HAVE_FEATURES_H=0 ++ fi + + + +- { $as_echo "$as_me:$LINENO: checking whether getcwd handles long file names properly" >&5 +-$as_echo_n "checking whether getcwd handles long file names properly... " >&6; } +-if test "${gl_cv_func_getcwd_path_max+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 ++$as_echo_n "checking for inttypes.h... " >&6; } ++if ${gl_cv_header_inttypes_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- # Arrange for deletion of the temporary directory this test creates. +- ac_clean_files="$ac_clean_files confdir3" +- if test "$cross_compiling" = yes; then +- gl_cv_func_getcwd_path_max=no +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#include +-#include +-#include +-#include + #include +-#include +- +-#ifndef AT_FDCWD +-# define AT_FDCWD 0 +-#endif +-#ifdef ENAMETOOLONG +-# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) +-#else +-# define is_ENAMETOOLONG(x) 0 +-#endif +- +-/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +-#undef mkdir +- +-#ifndef S_IRWXU +-# define S_IRWXU 0700 +-#endif +- +-/* The length of this name must be 8. */ +-#define DIR_NAME "confdir3" +-#define DIR_NAME_LEN 8 +-#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) +- +-/* The length of "../". */ +-#define DOTDOTSLASH_LEN 3 +- +-/* Leftover bytes in the buffer, to work around library or OS bugs. */ +-#define BUF_SLOP 20 ++#include + + int + main () + { +-#ifndef PATH_MAX +- /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- +- at least not on a local file system. And if we were to start worrying +- about remote file systems, we'd have to enable the wrapper function +- all of the time, just to be safe. That's not worth the cost. */ +- exit (0); +-#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ +- - DIR_NAME_SIZE - BUF_SLOP) \ +- <= PATH_MAX) +- /* FIXME: Assuming there's a system for which this is true, +- this should be done in a compile test. */ +- exit (0); +-#else +- char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) +- + DIR_NAME_SIZE + BUF_SLOP]; +- char *cwd = getcwd (buf, PATH_MAX); +- size_t initial_cwd_len; +- size_t cwd_len; +- int fail = 0; +- size_t n_chdirs = 0; +- +- if (cwd == NULL) +- exit (10); +- +- cwd_len = initial_cwd_len = strlen (cwd); +- +- while (1) +- { +- size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); +- char *c = NULL; +- +- cwd_len += DIR_NAME_SIZE; +- /* If mkdir or chdir fails, it could be that this system cannot create +- any file with an absolute name longer than PATH_MAX, such as cygwin. +- If so, leave fail as 0, because the current working directory can't +- be too long for getcwd if it can't even be created. For other +- errors, be pessimistic and consider that as a failure, too. */ +- if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) +- { +- if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) +- fail = 20; +- break; +- } +- +- if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) +- { +- c = getcwd (buf, PATH_MAX); +- if (!c && errno == ENOENT) +- { +- fail = 11; +- break; +- } +- if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) +- { +- fail = 21; +- break; +- } +- } +- +- if (dotdot_max <= cwd_len - initial_cwd_len) +- { +- if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) +- break; +- c = getcwd (buf, cwd_len + 1); +- if (!c) +- { +- if (! (errno == ERANGE || errno == ENOENT +- || is_ENAMETOOLONG (errno))) +- { +- fail = 22; +- break; +- } +- if (AT_FDCWD || errno == ERANGE || errno == ENOENT) +- { +- fail = 12; +- break; +- } +- } +- } ++uintmax_t i = (uintmax_t) -1; return !i; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_inttypes_h=yes ++else ++ gl_cv_header_inttypes_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_inttypes_h" >&5 ++$as_echo "$gl_cv_header_inttypes_h" >&6; } ++ if test $gl_cv_header_inttypes_h = yes; then + +- if (c && strlen (c) != cwd_len) +- { +- fail = 23; +- break; +- } +- ++n_chdirs; +- } ++cat >>confdefs.h <<_ACEOF ++#define HAVE_INTTYPES_H_WITH_UINTMAX 1 ++_ACEOF + +- /* Leaving behind such a deep directory is not polite. +- So clean up here, right away, even though the driving +- shell script would also clean up. */ +- { +- size_t i; ++ fi + +- /* Try rmdir first, in case the chdir failed. */ +- rmdir (DIR_NAME); +- for (i = 0; i <= n_chdirs; i++) +- { +- if (chdir ("..") < 0) +- break; +- if (rmdir (DIR_NAME) != 0) +- break; +- } +- } + +- exit (fail); +-#endif ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 ++$as_echo_n "checking for stdint.h... " >&6; } ++if ${gl_cv_header_stdint_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ #include ++int ++main () ++{ ++uintmax_t i = (uintmax_t) -1; return !i; ++ ; ++ return 0; + } +- + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_getcwd_path_max=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_stdint_h=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-case $? in +- 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; +- *) gl_cv_func_getcwd_path_max=no;; +- esac ++ gl_cv_header_stdint_h=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_path_max" >&5 +-$as_echo "$gl_cv_func_getcwd_path_max" >&6; } +- case $gl_cv_func_getcwd_path_max in +- no,*) ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 ++$as_echo "$gl_cv_header_stdint_h" >&6; } ++ if test $gl_cv_header_stdint_h = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_PARTLY_WORKING_GETCWD 1 ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STDINT_H_WITH_UINTMAX 1 + _ACEOF +-;; +- esac +- +- + ++ fi + + + + +-for ac_func in getpagesize +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 ++$as_echo_n "checking for intmax_t... " >&6; } ++if ${gt_cv_c_intmax_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func + +-/* 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" ++#include ++#include ++#if HAVE_STDINT_H_WITH_UINTMAX ++#include + #endif +-char $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me ++#if HAVE_INTTYPES_H_WITH_UINTMAX ++#include + #endif + + int + main () + { +-return $ac_func (); ++intmax_t x = -1; return !x; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ gt_cv_c_intmax_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ gt_cv_c_intmax_t=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 ++$as_echo "$gt_cv_c_intmax_t" >&6; } ++ if test $gt_cv_c_intmax_t = yes; then ++ ++$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h ++ ++ else ++ ++ test $ac_cv_type_long_long_int = yes \ ++ && ac_type='long long' \ ++ || ac_type='long' ++ ++cat >>confdefs.h <<_ACEOF ++#define intmax_t $ac_type ++_ACEOF ++ ++ fi ++ ++ ++ ++ ++ ++ ++ ++ for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -29009,184 +14614,151 @@ + fi + done + +- { $as_echo "$as_me:$LINENO: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 +-$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } +-if test "${gl_cv_func_getcwd_abort_bug+set}" = set; then +- $as_echo_n "(cached) " >&6 ++ ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include ++" ++if test "x$ac_cv_have_decl__snprintf" = xyes; then : ++ ac_have_decl=1 + else +- # Remove any remnants of a previous test. +- rm -rf confdir-14B--- +- # Arrange for deletion of the temporary directory this test creates. +- ac_clean_files="$ac_clean_files confdir-14B---" +- if test "$cross_compiling" = yes; then +- gl_cv_func_getcwd_abort_bug=yes ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL__SNPRINTF $ac_have_decl ++_ACEOF ++ ++ ++ case "$gl_cv_func_snprintf_retval_c99" in ++ *yes) ++ ++$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h ++ ++ ;; ++ esac ++ ++ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" ++if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : ++ ac_have_decl=1 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_VSNPRINTF $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-#include +-#include +-#include + +-/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ +-#undef mkdir + +-#ifndef S_IRWXU +-# define S_IRWXU 0700 +-#endif + +-/* FIXME: skip the run-test altogether on systems without getpagesize. */ +-#if ! HAVE_GETPAGESIZE +-# define getpagesize() 0 +-#endif + +-/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than +- the 16kB pagesize on ia64 linux. Those conditions make the code below +- trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ +-#define TARGET_LEN (5 * 1024) + +-int +-main () +-{ +- char const *dir_name = "confdir-14B---"; +- char *cwd; +- size_t initial_cwd_len; +- int fail = 0; +- size_t desired_depth; +- size_t d; ++ if false; then ++ GL_COND_LIBTOOL_TRUE= ++ GL_COND_LIBTOOL_FALSE='#' ++else ++ GL_COND_LIBTOOL_TRUE='#' ++ GL_COND_LIBTOOL_FALSE= ++fi + +- /* The bug is triggered when PATH_MAX < getpagesize (), so skip +- this relative expensive and invasive test if that's not true. */ +- if (getpagesize () <= PATH_MAX) +- return 0; ++ gl_cond_libtool=false ++ gl_libdeps= ++ gl_ltlibdeps= ++ gl_m4_base='m4' + +- cwd = getcwd (NULL, 0); +- if (cwd == NULL) +- return 0; + +- initial_cwd_len = strlen (cwd); +- free (cwd); +- desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) +- / (1 + strlen (dir_name))); +- for (d = 0; d < desired_depth; d++) +- { +- if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) +- { +- fail = 3; /* Unable to construct deep hierarchy. */ +- break; +- } +- } + +- /* If libc has the bug in question, this invocation of getcwd +- results in a failed assertion. */ +- cwd = getcwd (NULL, 0); +- if (cwd == NULL) +- fail = 4; /* getcwd failed. This is ok, and expected. */ +- free (cwd); + +- /* Call rmdir first, in case the above chdir failed. */ +- rmdir (dir_name); +- while (0 < d--) +- { +- if (chdir ("..") < 0) +- break; +- rmdir (dir_name); +- } + +- return 0; +-} + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_getcwd_abort_bug=no ++ ++ ++ ++ gl_source_base='gnu' ++ # Code from module alloca: ++ # Code from module alloca-opt: ++ ++ ++ if test $ac_cv_func_alloca_works = no; then ++ : ++ fi ++ ++ # Define an additional variable used in the Makefile substitution. ++ if test $ac_cv_working_alloca_h = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 ++$as_echo_n "checking for alloca as a compiler built-in... " >&6; } ++if ${gl_cv_rpl_alloca+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_getcwd_abort_bug=yes ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#if defined __GNUC__ || defined _AIX || defined _MSC_VER ++ Need own alloca ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Need own alloca" >/dev/null 2>&1; then : ++ gl_cv_rpl_alloca=yes ++else ++ gl_cv_rpl_alloca=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++rm -f conftest* ++ ++ + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 ++$as_echo "$gl_cv_rpl_alloca" >&6; } ++ if test $gl_cv_rpl_alloca = yes; then + ++$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h + ++ ALLOCA_H=alloca.h ++ else ++ ALLOCA_H= ++ fi ++ else ++ ALLOCA_H=alloca.h ++ fi + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_getcwd_abort_bug" >&5 +-$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } +- if test $gl_cv_func_getcwd_abort_bug = yes; then +- gl_abort_bug=yes +-fi + +-;; +- esac ++ # Code from module areadlink: ++ # Code from module areadlinkat: + +- case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in +- *yes,yes,no) ;; +- *) +- REPLACE_GETCWD=1 + ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_AREADLINKAT 1 ++_ACEOF + + ++ # Code from module arg-nonnull: ++ # Code from module argmatch: + + + + + +- gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" + + + + +- : +-;; +- esac ++ gl_LIBOBJS="$gl_LIBOBJS argmatch.$ac_objext" + + ++ # Code from module argp: + + +- GNULIB_GETCWD=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETCWD 1 +-_ACEOF + ++ GETOPT_H=getopt.h + ++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + +- # Code from module getdelim: + + ++ GNULIB_UNISTD_H_GETOPT=1 + + + +@@ -29195,132 +14767,105 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + + + + + +- if test $ac_cv_func_getdelim = yes; then +- { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 +-$as_echo_n "checking for working getdelim function... " >&6; } +-if test "${gl_cv_func_working_getdelim+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#ifdef __GNU_LIBRARY__ +- #if (__GLIBC__ >= 2) && !defined __UCLIBC__ +- Lucky GNU user +- #endif +-#endif + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Lucky GNU user" >/dev/null 2>&1; then +- gl_cv_func_working_getdelim=yes ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" ++ ++ ++ ++ ++ ++ ++ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ++ ++$as_echo "#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1" >>confdefs.h ++ + else +- gl_cv_func_working_getdelim=no ++ ++$as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h ++ + fi +-rm -f conftest* + ++ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ++ ++$as_echo "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-# include +-# include +-# include +- int main () +- { +- FILE *in = fopen ("./conftest.data", "r"); +- if (!in) +- return 1; +- { +- /* Test result for a NULL buffer and a zero size. +- Based on a test program from Karl Heuer. */ +- char *line = NULL; +- size_t siz = 0; +- int len = getdelim (&line, &siz, '\n', in); +- if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) +- return 2; +- } +- { +- /* Test result for a NULL buffer and a non-zero size. +- This crashes on FreeBSD 8.0. */ +- char *line = NULL; +- size_t siz = (size_t)(~0) / 4; +- if (getdelim (&line, &siz, '\n', in) == -1) +- return 3; +- } +- return 0; +- } ++$as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h ++ ++fi ++ + ++ # Check if program_invocation_name and program_invocation_short_name ++ # are defined elsewhere. It is improbable that only one of them will ++ # be defined and other not, I prefer to stay on the safe side and to ++ # test each one separately. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5 ++$as_echo_n "checking whether program_invocation_name is defined... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++program_invocation_name = "test"; ++ ; ++ return 0; ++} + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_working_getdelim=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_link "$LINENO"; then : + +-( exit $ac_status ) +-gl_cv_func_working_getdelim=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++$as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5 ++$as_echo_n "checking whether program_invocation_short_name is defined... " >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ ++program_invocation_short_name = "test"; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : + ++$as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 +-$as_echo "$gl_cv_func_working_getdelim" >&6; } +- else +- gl_cv_func_working_getdelim=no +- fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + +- if test $ac_cv_have_decl_getdelim = no; then +- HAVE_DECL_GETDELIM=0 +- fi + +- if test $gl_cv_func_working_getdelim = no; then +- if test $ac_cv_func_getdelim = yes; then +- REPLACE_GETDELIM=1 +- fi + + + +@@ -29329,207 +14874,204 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" + + + + +-for ac_func in flockfile funlockfile +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ ++ ++ ++ ++ ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format" ++ ++ ++ ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format" ++ ++ # Code from module argp-version-etc: ++ # Code from module backupfile: ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS backupfile.$ac_objext" ++ ++ ++ ++ ++ ++ ++ # Code from module bitrotate: ++ ++ # Code from module btowc: ++ ++ ++ ++ ++ ++ ++ if test $ac_cv_func_btowc = no; then ++ HAVE_BTOWC=0 ++ else ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 ++$as_echo_n "checking whether btowc(0) is correct... " >&6; } ++if ${gl_cv_func_btowc_nul+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif ++ if test "$cross_compiling" = yes; then : + +-#undef $ac_func ++ case "$host_os" in ++ # Guess no on Cygwin. ++ cygwin*) gl_cv_func_btowc_nul="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_btowc_nul="guessing yes" ;; ++ esac + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-int +-main () ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () + { +-return $ac_func (); +- ; ++ if (btowc ('\0') != 0) ++ return 1; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_btowc_nul=yes ++else ++ gl_cv_func_btowc_nul=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- 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 +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++ + + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 ++$as_echo "$gl_cv_func_btowc_nul" >&6; } + +- { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +-$as_echo_n "checking whether getc_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 ++$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } ++if ${gl_cv_func_btowc_eof+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ case "$host_os" in ++ # Guess no on IRIX. ++ irix*) gl_cv_func_btowc_eof="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_btowc_eof="guessing yes" ;; ++ esac ++ if test $LOCALE_FR != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getc_unlocked +- (void) getc_unlocked; +-#endif + +- ; ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) ++ { ++ if (btowc (EOF) != WEOF) ++ return 1; ++ } + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getc_unlocked=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_btowc_eof=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getc_unlocked=no ++ gl_cv_func_btowc_eof=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_ext ++ fi ++ + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } +-if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 ++$as_echo "$gl_cv_func_btowc_eof" >&6; } + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 1 +-_ACEOF ++ case "$gl_cv_func_btowc_nul" in ++ *yes) ;; ++ *) REPLACE_BTOWC=1 ;; ++ esac ++ case "$gl_cv_func_btowc_eof" in ++ *yes) ;; ++ *) REPLACE_BTOWC=1 ;; ++ esac ++ fi ++ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then + ++ : + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 0 +-_ACEOF + + +-fi + + + +- fi + + + ++ gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" + +- GNULIB_GETDELIM=1 + ++ : + ++ fi + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETDELIM 1 +-_ACEOF + + + +- # Code from module getdtablesize: ++ GNULIB_BTOWC=1 + + + ++$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h + + + ++ # Code from module c++defs: ++ # Code from module c-ctype: ++ # Code from module canonicalize-lgpl: + + +- if test $ac_cv_func_getdtablesize != yes; then +- HAVE_GETDTABLESIZE=0 ++ if test $ac_cv_func_canonicalize_file_name = no; then ++ HAVE_CANONICALIZE_FILE_NAME=0 + + + +@@ -29538,242 +15080,86 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" ++ ++ if test $ac_cv_func_realpath = no; then ++ HAVE_REALPATH=0 ++ elif test "$gl_cv_func_realpath_works" != yes; then ++ REPLACE_REALPATH=1 ++ fi ++ elif test "$gl_cv_func_realpath_works" != yes; then ++ + +- fi + + + + +- GNULIB_GETDTABLESIZE=1 + + ++ gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" ++ ++ REPLACE_REALPATH=1 ++ REPLACE_CANONICALIZE_FILE_NAME=1 ++ fi ++ + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETDTABLESIZE 1 ++ ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_CANONICALIZE_LGPL 1 + _ACEOF + + + +- # Code from module getline: + + ++ GNULIB_CANONICALIZE_FILE_NAME=1 + + + ++$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h + + + + + +- gl_getline_needs_run_time_check=no +- { $as_echo "$as_me:$LINENO: checking for getline" >&5 +-$as_echo_n "checking for getline... " >&6; } +-if test "${ac_cv_func_getline+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define getline to an innocuous variant, in case declares getline. +- For example, HP-UX 11i declares gettimeofday. */ +-#define getline innocuous_getline + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char getline (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++ GNULIB_REALPATH=1 + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef getline + +-/* 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 getline (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_getline || defined __stub___getline +-choke me +-#endif ++$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h + +-int +-main () +-{ +-return getline (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_func_getline=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_func_getline=no +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5 +-$as_echo "$ac_cv_func_getline" >&6; } +-if test "x$ac_cv_func_getline" = x""yes; then +- gl_getline_needs_run_time_check=yes +-else +- am_cv_func_working_getline=no +-fi ++ # Code from module chdir-long: + +- if test $gl_getline_needs_run_time_check = yes; then +- { $as_echo "$as_me:$LINENO: checking for working getline function" >&5 +-$as_echo_n "checking for working getline function... " >&6; } +-if test "${am_cv_func_working_getline+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 ++$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } ++if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then : + $as_echo_n "(cached) " >&6 + else +- echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#include +-#ifdef __GNU_LIBRARY__ +- #if (__GLIBC__ >= 2) && !defined __UCLIBC__ +- Lucky GNU user +- #endif ++#include ++#include ++#if defined PATH_MAX || defined MAXPATHLEN ++have_arbitrary_file_name_length_limit + #endif +- + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Lucky GNU user" >/dev/null 2>&1; then +- am_cv_func_working_getline=yes ++ $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : ++ gl_cv_have_arbitrary_file_name_length_limit=yes + else +- am_cv_func_working_getline=no ++ gl_cv_have_arbitrary_file_name_length_limit=no + fi + rm -f conftest* + +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-# include +-# include +-# include +- int main () +- { +- FILE *in = fopen ("./conftest.data", "r"); +- if (!in) +- return 1; +- { +- /* Test result for a NULL buffer and a zero size. +- Based on a test program from Karl Heuer. */ +- char *line = NULL; +- size_t siz = 0; +- int len = getline (&line, &siz, in); +- if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) +- return 2; +- } +- { +- /* Test result for a NULL buffer and a non-zero size. +- This crashes on FreeBSD 8.0. */ +- char *line = NULL; +- size_t siz = (size_t)(~0) / 4; +- if (getline (&line, &siz, in) == -1) +- return 3; +- } +- return 0; +- } +- +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- am_cv_func_working_getline=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-am_cv_func_working_getline=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5 +-$as_echo "$am_cv_func_working_getline" >&6; } +- fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 ++$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } + +- if test $ac_cv_have_decl_getline = no; then +- HAVE_DECL_GETLINE=0 +- fi ++ if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then + +- if test $am_cv_func_working_getline = no; then +- REPLACE_GETLINE=1 + + + +@@ -29781,147 +15167,112 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" + +- gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" + + ++ : + ++ fi + ++ # Code from module chown: + + + + ++ GNULIB_CHOWN=1 + + + ++$as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h + + + ++ # Code from module clock-time: + + + ++ # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. ++ # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. + ++ # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* ++ # programs in the package would end up linked with that potentially-shared ++ # library, inducing unnecessary run-time overhead. ++ LIB_CLOCK_GETTIME= + +- if test $ac_cv_func_getdelim = yes; then +- { $as_echo "$as_me:$LINENO: checking for working getdelim function" >&5 +-$as_echo_n "checking for working getdelim function... " >&6; } +-if test "${gl_cv_func_working_getdelim+set}" = set; then ++ gl_saved_libs=$LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 ++$as_echo_n "checking for library containing clock_gettime... " >&6; } ++if ${ac_cv_search_clock_gettime+:} false; then : + $as_echo_n "(cached) " >&6 + else +- echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ac_func_search_save_LIBS=$LIBS ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#ifdef __GNU_LIBRARY__ +- #if (__GLIBC__ >= 2) && !defined __UCLIBC__ +- Lucky GNU user +- #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 clock_gettime (); ++int ++main () ++{ ++return clock_gettime (); ++ ; ++ return 0; ++} + _ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Lucky GNU user" >/dev/null 2>&1; then +- gl_cv_func_working_getdelim=yes +-else +- gl_cv_func_working_getdelim=no ++for ac_lib in '' rt posix4; do ++ if test -z "$ac_lib"; then ++ ac_res="none required" ++ else ++ ac_res=-l$ac_lib ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ fi ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_clock_gettime=$ac_res + fi +-rm -f conftest* +- +- +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-# include +-# include +-# include +- int main () +- { +- FILE *in = fopen ("./conftest.data", "r"); +- if (!in) +- return 1; +- { +- /* Test result for a NULL buffer and a zero size. +- Based on a test program from Karl Heuer. */ +- char *line = NULL; +- size_t siz = 0; +- int len = getdelim (&line, &siz, '\n', in); +- if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) +- return 2; +- } +- { +- /* Test result for a NULL buffer and a non-zero size. +- This crashes on FreeBSD 8.0. */ +- char *line = NULL; +- size_t siz = (size_t)(~0) / 4; +- if (getdelim (&line, &siz, '\n', in) == -1) +- return 3; +- } +- return 0; +- } ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_clock_gettime+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_clock_gettime+:} false; then : + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_working_getdelim=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_working_getdelim=no ++ ac_cv_search_clock_gettime=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 ++$as_echo "$ac_cv_search_clock_gettime" >&6; } ++ac_res=$ac_cv_search_clock_gettime ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ++ test "$ac_cv_search_clock_gettime" = "none required" || ++ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime + fi + ++ for ac_func in 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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_working_getdelim" >&5 +-$as_echo "$gl_cv_func_working_getdelim" >&6; } +- else +- gl_cv_func_working_getdelim=no +- fi ++done + +- if test $ac_cv_have_decl_getdelim = no; then +- HAVE_DECL_GETDELIM=0 +- fi ++ LIBS=$gl_saved_libs + +- if test $gl_cv_func_working_getdelim = no; then +- if test $ac_cv_func_getdelim = yes; then +- REPLACE_GETDELIM=1 +- fi ++ # Code from module cloexec: + + + +@@ -29930,200 +15281,55 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" + ++ gl_LIBOBJS="$gl_LIBOBJS cloexec.$ac_objext" + + + +-for ac_func in flockfile funlockfile +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func ++ # Code from module close: + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF + +-fi +-done + +- { $as_echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5 +-$as_echo_n "checking whether getc_unlocked is declared... " >&6; } +-if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getc_unlocked +- (void) getc_unlocked; +-#endif ++ GNULIB_CLOSE=1 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getc_unlocked=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_getc_unlocked=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5 +-$as_echo "$ac_cv_have_decl_getc_unlocked" >&6; } +-if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then ++$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETC_UNLOCKED 0 +-_ACEOF ++ # Code from module close-hook: ++ # Code from module close-stream: + + +-fi + + + +- fi + + +- fi + + ++ gl_LIBOBJS="$gl_LIBOBJS close-stream.$ac_objext" + + +- GNULIB_GETLINE=1 ++ : + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETLINE 1 ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_CLOSE_STREAM 1 + _ACEOF + + ++ # Code from module closeout: + +- # Code from module getopt-gnu: + + + +@@ -30131,39 +15337,106 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETOPT_GNU 1 +-_ACEOF + ++ gl_LIBOBJS="$gl_LIBOBJS closeout.$ac_objext" + +- # Code from module getopt-posix: + ++ : ++ ++ # Code from module configmake: + ++ if test "x$datarootdir" = x; then ++ datarootdir='${datadir}' + ++ fi ++ if test "x$docdir" = x; then ++ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + ++ fi ++ if test "x$htmldir" = x; then ++ htmldir='${docdir}' + +- if test -n "$gl_replace_getopt"; then ++ fi ++ if test "x$dvidir" = x; then ++ dvidir='${docdir}' + ++ fi ++ if test "x$pdfdir" = x; then ++ pdfdir='${docdir}' + ++ fi ++ if test "x$psdir" = x; then ++ psdir='${docdir}' + +- GETOPT_H=getopt.h ++ fi ++ if test "x$lispdir" = x; then ++ lispdir='${datarootdir}/emacs/site-lisp' + +-cat >>confdefs.h <<\_ACEOF +-#define __GETOPT_PREFIX rpl_ +-_ACEOF ++ fi ++ if test "x$localedir" = x; then ++ localedir='${datarootdir}/locale' + ++ fi + ++ pkglibexecdir='${libexecdir}/${PACKAGE}' + +- GNULIB_UNISTD_H_GETOPT=1 + ++ # Code from module d-ino: ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 ++$as_echo_n "checking for d_ino member in directory struct... " >&6; } ++if ${gl_cv_struct_dirent_d_ino+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ gl_cv_struct_dirent_d_ino=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ #include ++ #include + ++int ++main () ++{ ++DIR *dp = opendir ("."); ++ struct dirent *e; ++ struct stat st; ++ if (! dp) ++ return 1; ++ e = readdir (dp); ++ if (! e) ++ return 2; ++ if (stat (e->d_name, &st) != 0) ++ return 3; ++ if (e->d_ino != st.st_ino) ++ return 4; ++ return 0; + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_struct_dirent_d_ino=yes ++else ++ gl_cv_struct_dirent_d_ino=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_struct_dirent_d_ino" >&5 ++$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } ++ if test $gl_cv_struct_dirent_d_ino = yes; then + ++$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h + ++ fi + + +- gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" ++ # Code from module dirent: + + + +@@ -30173,1593 +15446,571 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&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 + ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/dirent.h#{ ++ s#.*"\(.*/dirent.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ 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 + + +- # Code from module getpagesize: + + + + +-for ac_func in getpagesize +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ for gl_func in alphasort dirfd fdopendir scandir; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++#include + + int + main () + { +-return $ac_func (); ++#undef $gl_func ++ (void) $gl_func; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ eval "$as_gl_Symbol=no" + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + ++ eval ac_cv_have_decl_$gl_func=yes + fi +-done ++ done + +- if test $ac_cv_func_getpagesize = no; then +- HAVE_GETPAGESIZE=0 + +-for ac_header in OS.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module dirent-safer: + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_preproc=no +-fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = 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_OS_h = yes; then +- HAVE_OS_H=1 +- fi ++ gl_LIBOBJS="$gl_LIBOBJS opendir-safer.$ac_objext" + +-for ac_header in sys/param.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_DIRENT_SAFER 1 + _ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF ++ # Code from module dirfd: + +-fi + +-done + +- if test $ac_cv_header_sys_param_h = yes; then +- HAVE_SYS_PARAM_H=1 +- fi +- fi +- case "$host_os" in +- mingw*) +- REPLACE_GETPAGESIZE=1 ++ : + + + + ++ for ac_func in dirfd ++do : ++ ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" ++if test "x$ac_cv_func_dirfd" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_DIRFD 1 ++_ACEOF + ++fi ++done + ++ ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include ++ #include ++" ++if test "x$ac_cv_have_decl_dirfd" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_DIRFD $ac_have_decl ++_ACEOF + +- gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext" ++ if test $ac_cv_have_decl_dirfd = no; then ++ HAVE_DECL_DIRFD=0 ++ fi + +- ;; +- esac +- { $as_echo "$as_me:$LINENO: checking whether getpagesize is declared" >&5 +-$as_echo_n "checking whether getpagesize is declared... " >&6; } +-if test "${ac_cv_have_decl_getpagesize+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 ++$as_echo_n "checking whether dirfd is a macro... " >&6; } ++if ${gl_cv_func_dirfd_macro+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef getpagesize +- (void) getpagesize; +-#endif + +- ; +- return 0; +-} ++#include ++#include ++#ifdef dirfd ++ dirent_header_defines_dirfd ++#endif + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getpagesize=yes ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : ++ gl_cv_func_dirfd_macro=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getpagesize=no ++ gl_cv_func_dirfd_macro=no + fi ++rm -f conftest* + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpagesize" >&5 +-$as_echo "$ac_cv_have_decl_getpagesize" >&6; } +-if test "x$ac_cv_have_decl_getpagesize" = x""yes; then +- : +-else +- HAVE_DECL_GETPAGESIZE=0 + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 ++$as_echo "$gl_cv_func_dirfd_macro" >&6; } + ++ # Use the replacement only if we have no function or macro with that name. ++ if test $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro = no,no; then ++ if test $ac_cv_have_decl_dirfd = yes; then ++ # If the system declares dirfd already, let's declare rpl_dirfd instead. ++ REPLACE_DIRFD=1 ++ fi + + + + +- GNULIB_GETPAGESIZE=1 +- +- +- +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETPAGESIZE 1 +-_ACEOF +- +- +- +- # Code from module gettext: +- +- # Code from module gettext-h: +- +- +- # Code from module gettime: +- +- +- + + + + ++ gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 ++$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } ++if ${gl_cv_sys_dir_fd_member_name+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext" ++ dirfd_save_CFLAGS=$CFLAGS ++ for ac_expr in d_fd dd_fd; do + ++ CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++ #include ++ #include ++int ++main () ++{ ++DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ dir_fd_found=yes + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS=$dirfd_save_CFLAGS ++ test "$dir_fd_found" = yes && break ++ done ++ test "$dir_fd_found" = yes || ac_expr=no_such_member + ++ gl_cv_sys_dir_fd_member_name=$ac_expr + + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 ++$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } ++ if test $gl_cv_sys_dir_fd_member_name != no_such_member; then + ++cat >>confdefs.h <<_ACEOF ++#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name ++_ACEOF + ++ fi + ++ fi + + + + +- # Code from module gettimeofday: ++ GNULIB_DIRFD=1 + + + ++$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h + + + ++ # Code from module dirname: + + + + + +- gl_gettimeofday_timezone=void +- if test $ac_cv_func_gettimeofday != yes; then +- HAVE_GETTIMEOFDAY=0 + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS basename.$ac_objext" + + + +- gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + + + +-for ac_header in sys/timeb.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_LIBOBJS="$gl_LIBOBJS dirname.$ac_objext" + +- ac_header_preproc=no +-fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_DIRNAME 1 + _ACEOF + +-fi + +-done ++ # Code from module dirname-lgpl: + + +-for ac_func in _ftime +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS basename-lgpl.$ac_objext" + +-fi +-done + + +- else + + + +- { $as_echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5 +-$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } +-if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_gettimeofday_clobber=yes +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- #include +- #include + +-int +-main () +-{ + +- time_t t = 0; +- struct tm *lt; +- struct tm saved_lt; +- struct timeval tv; +- lt = localtime (&t); +- saved_lt = *lt; +- gettimeofday (&tv, NULL); +- return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_gettimeofday_clobber=no +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_LIBOBJS="$gl_LIBOBJS dirname-lgpl.$ac_objext" + +-( exit $ac_status ) +-gl_cv_func_gettimeofday_clobber=yes +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5 +-$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } + +- if test $gl_cv_func_gettimeofday_clobber = yes; then +- REPLACE_GETTIMEOFDAY=1 + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS stripslash.$ac_objext" + + + + +- gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + ++ # Code from module dosname: ++ # Code from module double-slash-root: + + +-for ac_header in sys/timeb.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; 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 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no ++ 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 ++ # . ++ 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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } ++$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ fi + +- ac_header_preproc=no +-fi ++ # Code from module dup2: + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + +-fi ++ if test $ac_cv_func_dup2 = no; then ++ HAVE_DUP2=0 + +-done + + +-for ac_func in _ftime +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + ++ gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 ++$as_echo_n "checking whether dup2 works... " >&6; } ++if ${gl_cv_func_dup2_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ case "$host_os" in ++ mingw*) # on this platform, dup2 always returns 0 for success ++ gl_cv_func_dup2_works=no;; ++ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 ++ gl_cv_func_dup2_works=no;; ++ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a ++ # closed fd may yield -EBADF instead of -1 / errno=EBADF. ++ gl_cv_func_dup2_works=no;; ++ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. ++ gl_cv_func_dup2_works=no;; ++ haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. ++ gl_cv_func_dup2_works=no;; ++ *) gl_cv_func_dup2_works=yes;; ++ esac ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #include ++#include ++#include + int + main () + { +-return $ac_func (); ++int result = 0; ++#if HAVE_FCNTL ++ if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) ++ result |= 1; ++#endif HAVE_FCNTL ++ if (dup2 (1, 1) == 0) ++ result |= 2; ++#if HAVE_FCNTL ++ if (fcntl (1, F_GETFD) != FD_CLOEXEC) ++ result |= 4; ++#endif ++ close (0); ++ if (dup2 (0, 0) != -1) ++ result |= 8; ++ /* Many gnulib modules require POSIX conformance of EBADF. */ ++ if (dup2 (2, 1000000) == -1 && errno != EBADF) ++ result |= 16; ++ return result; ++ + ; + return 0; + } ++ + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_dup2_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ gl_cv_func_dup2_works=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- 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 +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++ + + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 ++$as_echo "$gl_cv_func_dup2_works" >&6; } ++ if test "$gl_cv_func_dup2_works" = no; then + + ++ if test $ac_cv_func_dup2 = yes; then ++ REPLACE_DUP2=1 ++ fi + +-cat >>confdefs.h <<\_ACEOF +-#define gmtime rpl_gmtime +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define localtime rpl_localtime +-_ACEOF + + + +-cat >>confdefs.h <<\_ACEOF +-#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1 +-_ACEOF + +- fi + +- { $as_echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5 +-$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } +-if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- struct timeval c; +- int gettimeofday (struct timeval *restrict, void *restrict); ++ gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" + +-int +-main () +-{ +-/* glibc uses struct timezone * rather than the POSIX void * +- if _GNU_SOURCE is defined. However, since the only portable +- use of gettimeofday uses NULL as the second parameter, and +- since the glibc definition is actually more typesafe, it is +- not worth wrapping this to get a compliant signature. */ +- int (*f) (struct timeval *restrict, void *restrict) +- = gettimeofday; +- int x = f (&c, 0); +- return !(x | c.tv_sec | c.tv_usec); + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_gettimeofday_posix_signature=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ fi ++ fi + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_gettimeofday_posix_signature=almost +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_func_gettimeofday_posix_signature=no +-fi ++ GNULIB_DUP2=1 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +-$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } +- if test $gl_cv_func_gettimeofday_posix_signature = almost; then +- gl_gettimeofday_timezone='struct timezone' +- elif test $gl_cv_func_gettimeofday_posix_signature != yes; then +- REPLACE_GETTIMEOFDAY=1 + ++$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h + + + ++ # Code from module environ: + + + + +- gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" ++ GNULIB_ENVIRON=1 + + + +-for ac_header in sys/timeb.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module errno: ++ ++ # Code from module error: + +- ac_header_preproc=no +-fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + +-fi + +-done + + +-for ac_func in _ftime +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + ++ ++ { $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_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + int + main () + { +-return $ac_func (); ++error_at_line (0, 0, "", 0, "an error occurred"); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_lib_error_at_line=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ ac_cv_lib_error_at_line=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++{ $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 + +-fi +-done + + +- fi ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" ++ + fi + +-cat >>confdefs.h <<_ACEOF +-#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone +-_ACEOF + + + ++ : ++ + + +- GNULIB_GETTIMEOFDAY=1 + ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_GETTIMEOFDAY 1 +-_ACEOF + ++ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" + ++ # Code from module exclude: + +- # Code from module gitlog-to-changelog: +- # Code from module hash: + + + +@@ -31768,16 +16019,25 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS exclude.$ac_objext" + +- gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext" ++ ++ # Code from module exitfail: ++ # Code from module extensions: ++ # Code from module fchdir: + + + + +- # Code from module havelib: +- # Code from module human: + + ++ if test $ac_cv_have_decl_fchdir = no; then ++ HAVE_DECL_FCHDIR=0 ++ fi ++ ++ ++ if test $ac_cv_func_fchdir = no; then ++ HAVE_FCHDIR=0 + + + +@@ -31785,95 +16045,38 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext" + ++ gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" + + : + +- # Code from module include_next: +- # Code from module inline: ++$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h ++ ++ REPLACE_OPENDIR=1 ++ REPLACE_CLOSEDIR=1 ++ REPLACE_DUP=1 ++ ++ ++ REPLACE_OPEN=1 + + +- { $as_echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5 +-$as_echo_n "checking whether the compiler generally respects inline... " >&6; } +-if test "${gl_cv_c_inline_effective+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test $ac_cv_c_inline = no; then +- gl_cv_c_inline_effective=no +- else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-int +-main () +-{ +-#ifdef __NO_INLINE__ +- #error "inline is not effective" +- #endif +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_c_inline_effective=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_c_inline_effective=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- fi + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5 +-$as_echo "$gl_cv_c_inline_effective" >&6; } +- if test $gl_cv_c_inline_effective = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_INLINE 1 +-_ACEOF + +- fi ++ gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + +- # Code from module intprops: +- # Code from module inttostr: + + + + : + +- : +- : +- : +- : + +- # Code from module inttypes: + + ++ REPLACE_CLOSE=1 + + + +@@ -31882,9 +16085,11 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" + + + ++ REPLACE_FCLOSE=1 + + + +@@ -31893,366 +16098,221 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS fclose.$ac_objext" + + + + + +- { $as_echo "$as_me:$LINENO: checking whether inttypes.h conforms to C99" >&5 +-$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; } +-if test "${gl_cv_header_working_inttypes_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- gl_cv_header_working_inttypes_h=no +- if test "$gl_cv_header_working_stdint_h" = yes \ +- && test $ac_cv_header_inttypes_h = yes \ +- && test "$ac_cv_have_decl_imaxabs" = yes \ +- && test "$ac_cv_have_decl_imaxdiv" = yes \ +- && test "$ac_cv_have_decl_strtoimax" = yes \ +- && test "$ac_cv_have_decl_strtoumax" = yes; then +- cat >conftest.$ac_ext <<_ACEOF ++ if test $ac_cv_func_dup2 = yes; then ++ REPLACE_DUP2=1 ++ fi + +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +-#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ +-#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ +-#include + +-/* No need to duplicate the tests of stdint.m4; they are subsumed by +- $gl_cv_header_working_stdint_h = yes. */ + +-/* Tests for macros supposed to be defined in inttypes.h. */ + +-const char *k = /* implicit string concatenation */ +-#ifdef INT8_MAX +- PRId8 PRIi8 +-#endif +-#ifdef UINT8_MAX +- PRIo8 PRIu8 PRIx8 PRIX8 +-#endif +-#ifdef INT16_MAX +- PRId16 PRIi16 +-#endif +-#ifdef UINT16_MAX +- PRIo16 PRIu16 PRIx16 PRIX16 +-#endif +-#ifdef INT32_MAX +- PRId32 PRIi32 +-#endif +-#ifdef UINT32_MAX +- PRIo32 PRIu32 PRIx32 PRIX32 +-#endif +-#ifdef INT64_MAX +- PRId64 PRIi64 +-#endif +-#ifdef UINT64_MAX +- PRIo64 PRIu64 PRIx64 PRIX64 +-#endif +- PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 +- PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 +- PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 +- PRIdLEAST64 PRIiLEAST64 +- PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 +- PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 +- PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 +- PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 +- PRIdFAST64 PRIiFAST64 +- PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 +- PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX +-#ifdef INTPTR_MAX +- PRIdPTR PRIiPTR +-#endif +-#ifdef UINTPTR_MAX +- PRIoPTR PRIuPTR PRIxPTR PRIXPTR +-#endif +- ; +-const char *l = /* implicit string concatenation */ +-#ifdef INT8_MAX +- SCNd8 SCNi8 +-#endif +-#ifdef UINT8_MAX +- SCNo8 SCNu8 SCNx8 +-#endif +-#ifdef INT16_MAX +- SCNd16 SCNi16 +-#endif +-#ifdef UINT16_MAX +- SCNo16 SCNu16 SCNx16 +-#endif +-#ifdef INT32_MAX +- SCNd32 SCNi32 +-#endif +-#ifdef UINT32_MAX +- SCNo32 SCNu32 SCNx32 +-#endif +-#ifdef INT64_MAX +- SCNd64 SCNi64 +-#endif +-#ifdef UINT64_MAX +- SCNo64 SCNu64 SCNx64 +-#endif +- SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 +- SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 +- SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 +- SCNdLEAST64 SCNiLEAST64 +- SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 +- SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 +- SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 +- SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 +- SCNdFAST64 SCNiFAST64 +- SCNoFAST64 SCNuFAST64 SCNxFAST64 +- SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX +-#ifdef INTPTR_MAX +- SCNdPTR SCNiPTR +-#endif +-#ifdef UINTPTR_MAX +- SCNoPTR SCNuPTR SCNxPTR +-#endif +- ; ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" ++ ++ ++ ++ ++ ++ if test $ac_cv_func_fcntl = no; then ++ HAVE_FCNTL=0 ++ else ++ REPLACE_FCNTL=1 ++ fi ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" ++ ++ ++ ++ : ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 ++$as_echo_n "checking whether open can visit directories... " >&6; } ++if ${gl_cv_func_open_directory_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_open_directory_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + + int + main () + { +- ++return open(".", O_RDONLY) < 0; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_working_inttypes_h=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_open_directory_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_func_open_directory_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 core conftest.err conftest.$ac_objext conftest.$ac_ext +- fi + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_inttypes_h" >&5 +-$as_echo "$gl_cv_header_working_inttypes_h" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 ++$as_echo "$gl_cv_func_open_directory_works" >&6; } ++ if test "$gl_cv_func_open_directory_works" != yes; then + ++$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h + ++ REPLACE_FSTAT=1 ++ fi ++ fi + + + + ++ GNULIB_FCHDIR=1 + + + ++$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h + + + ++ # Code from module fclose: + + + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_inttypes_h='<'inttypes.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_inttypes_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- if test $ac_cv_header_inttypes_h = yes; then ++ GNULIB_FCLOSE=1 + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-_ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/inttypes.h#{ +- s#.*"\(.*/inttypes.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- else +- gl_cv_next_inttypes_h='<'inttypes.h'>' +- fi ++$as_echo "#define GNULIB_TEST_FCLOSE 1" >>confdefs.h + + +-fi +-{ $as_echo "$as_me:$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 ++ # Code from module fcntl: + + + + + ++ if test $ac_cv_func_fcntl = no; then + + + +-cat >>confdefs.h <<\_ACEOF +-#define GL_TRIGGER_STDC_LIMIT_MACROS 1 +-_ACEOF ++ if test $ac_cv_func_fcntl = no; then ++ HAVE_FCNTL=0 ++ else ++ REPLACE_FCNTL=1 ++ fi + + + + +- PRIPTR_PREFIX= +- if test -n "$STDINT_H"; then +- PRIPTR_PREFIX='"l"' ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" ++ ++ + 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 ++$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } ++if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ # Guess that it works on glibc systems ++ case $host_os in #(( ++ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; ++ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; ++ esac ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- extern intptr_t foo; +- extern $gltype1 foo; ++ ++#include ++#include ++ + int + main () + { ++int result = 0; ++ if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; ++ if (errno != EINVAL) result |= 2; ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- PRIPTR_PREFIX='"'$glpfx'"' ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fcntl_f_dupfd_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_func_fcntl_f_dupfd_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 core conftest.err conftest.$ac_objext conftest.$ac_ext +- test -n "$PRIPTR_PREFIX" && break +- done +- fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 ++$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } ++ case $gl_cv_func_fcntl_f_dupfd_works in ++ *yes) ;; ++ *) + + +- if test "$ac_cv_have_decl_imaxabs" = yes; then +- HAVE_DECL_IMAXABS=1 ++ if test $ac_cv_func_fcntl = no; then ++ HAVE_FCNTL=0 + else +- HAVE_DECL_IMAXABS=0 ++ REPLACE_FCNTL=1 + fi + +- if test "$ac_cv_have_decl_imaxdiv" = yes; then +- HAVE_DECL_IMAXDIV=1 +- else +- HAVE_DECL_IMAXDIV=0 +- fi + +- if test "$ac_cv_have_decl_strtoimax" = yes; then +- HAVE_DECL_STRTOIMAX=1 +- else +- HAVE_DECL_STRTOIMAX=0 +- fi + +- if test "$ac_cv_have_decl_strtoumax" = yes; then +- HAVE_DECL_STRTOUMAX=1 +- else +- HAVE_DECL_STRTOUMAX=0 +- fi + + +- { $as_echo "$as_me:$LINENO: checking whether INT32_MAX < INTMAX_MAX" >&5 +-$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } +-if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" ++ ++ ++ ++$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h ++ ;; ++ esac ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 ++$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } ++if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ 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 +- #if HAVE_STDINT_H +- #include +- #endif ++#include ++#ifndef F_DUPFD_CLOEXEC ++choke me ++#endif + +- #if defined INT32_MAX && defined INTMAX_MAX +- #define CONDITION (INT32_MAX < INTMAX_MAX) +- #elif HAVE_LONG_LONG_INT +- #define CONDITION (sizeof (int) < sizeof (long long int)) +- #else +- #define CONDITION 0 +- #endif +- int test[CONDITION ? 1 : -1]; + int + main () + { +@@ -32261,75 +16321,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- 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:$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:$LINENO: checking whether INT64_MAX == LONG_MAX" >&5 +-$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } +-if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ 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 +- #if HAVE_STDINT_H +- #include +- #endif ++#ifdef __linux__ ++/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace ++ it to support the semantics on older kernels that failed with EINVAL. */ ++choke me ++#endif + +- #if defined INT64_MAX +- #define CONDITION (INT64_MAX == LONG_MAX) +- #elif HAVE_LONG_LONG_INT +- #define CONDITION (sizeof (long long int) == sizeof (long int)) +- #else +- #define CONDITION 0 +- #endif +- int test[CONDITION ? 1 : -1]; + int + main () + { +@@ -32338,222 +16339,122 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_fcntl_f_dupfd_cloexec=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_test_INT64_MAX_EQ_LONG_MAX=no ++ gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++else ++ gl_cv_func_fcntl_f_dupfd_cloexec=no + fi +-{ $as_echo "$as_me:$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 ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 ++$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } ++ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then + + ++ ++ if test $ac_cv_func_fcntl = no; then ++ HAVE_FCNTL=0 + else +- INT64_MAX_EQ_LONG_MAX=-1 ++ REPLACE_FCNTL=1 + fi + +- { $as_echo "$as_me:$LINENO: checking whether UINT32_MAX < UINTMAX_MAX" >&5 +-$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } +-if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* 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 +- #if HAVE_STDINT_H +- #include +- #endif + +- #if defined UINT32_MAX && defined UINTMAX_MAX +- #define CONDITION (UINT32_MAX < UINTMAX_MAX) +- #elif HAVE_LONG_LONG_INT +- #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) +- #else +- #define CONDITION 0 +- #endif +- int test[CONDITION ? 1 : -1]; +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- 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:$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; ++ ++ gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" ++ ++ ++ fi + fi + + +- if test $APPLE_UNIVERSAL_BUILD = 0; then + +- { $as_echo "$as_me:$LINENO: checking whether UINT64_MAX == ULONG_MAX" >&5 +-$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } +-if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* 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 ++ GNULIB_FCNTL=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h ++ ++ ++ ++ # Code from module fcntl-h: ++ ++ ++ ++ ++ ++ ++ ++ ++ + +- #include +- #if HAVE_STDINT_H +- #include +- #endif + +- #if defined UINT64_MAX +- #define CONDITION (UINT64_MAX == ULONG_MAX) +- #elif HAVE_LONG_LONG_INT +- #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) +- #else +- #define CONDITION 0 +- #endif +- int test[CONDITION ? 1 : -1]; +-int +-main () +-{ ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&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 + +- ; +- return 0; +-} + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/fcntl.h#{ ++ s#.*"\(.*/fcntl.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' + +- 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:$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 +- ++{ $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 + +- else +- UINT64_MAX_EQ_ULONG_MAX=-1 +- 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='<'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 + + + + + + +- for gl_func in imaxabs imaxdiv strtoimax strtoumax; do ++ for gl_func in fcntl openat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + int + main () +@@ -32564,59 +16465,50 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +- # Code from module iswblank: ++ # Code from module fdopendir: + + ++ ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " ++#include + ++" ++if test "x$ac_cv_have_decl_fdopendir" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_FDOPENDIR $ac_have_decl ++_ACEOF ++if test $ac_have_decl = 1; then : + ++else ++ HAVE_DECL_FDOPENDIR=0 ++fi + + ++ if test $ac_cv_func_fdopendir = no; then + + + +@@ -32624,17 +16516,8 @@ + + + +- if test $ac_cv_func_iswblank = no; then +- HAVE_ISWBLANK=0 +- if test $ac_cv_have_decl_iswblank = yes; then +- REPLACE_ISWBLANK=1 +- fi +- fi +- if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then +- : +- else +- if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + ++ gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + + + +@@ -32642,545 +16525,478 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" + +- fi +- fi + ++ gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" + + ++ : + ++ HAVE_FDOPENDIR=0 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 ++$as_echo_n "checking whether fdopendir works... " >&6; } ++if ${gl_cv_func_fdopendir_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_fdopendir_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- GNULIB_ISWBLANK=1 ++#include ++#include ++#include ++#if !HAVE_DECL_FDOPENDIR ++extern DIR *fdopendir (int); ++#endif + ++int ++main () ++{ ++int result = 0; ++ int fd = open ("conftest.c", O_RDONLY); ++ if (fd < 0) result |= 1; ++ if (fdopendir (fd)) result |= 2; ++ if (close (fd)) result |= 4; ++ return result; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fdopendir_works=yes ++else ++ gl_cv_func_fdopendir_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_fdopendir_works" >&5 ++$as_echo "$gl_cv_func_fdopendir_works" >&6; } ++ if test "$gl_cv_func_fdopendir_works" != yes; then ++ REPLACE_FDOPENDIR=1 + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_ISWBLANK 1 +-_ACEOF ++ : + + + +- # Code from module langinfo: + + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" + ++ fi ++ fi + + + + ++ GNULIB_FDOPENDIR=1 + + + ++$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h + + + + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_langinfo_h='<'langinfo.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_langinfo_h+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_FDOPENDIR 1 ++_ACEOF + +- if test $ac_cv_header_langinfo_h = yes; then ++ ++ # Code from module fdutimensat: + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_FDUTIMENSAT 1 + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + ++ ++ # Code from module fileblocks: ++ ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BLOCKS 1 + _ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/langinfo.h#{ +- s#.*"\(.*/langinfo.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- else +- gl_cv_next_langinfo_h='<'langinfo.h'>' +- fi + + ++$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h ++ ++else ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext" ++ + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_langinfo_h" >&5 +-$as_echo "$gl_cv_next_langinfo_h" >&6; } +- fi +- NEXT_LANGINFO_H=$gl_cv_next_langinfo_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='<'langinfo.h'>' +- else +- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_langinfo_h +- fi +- NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + ++ if test $ac_cv_member_struct_stat_st_blocks = no; then + + ++ : + ++ fi + +- HAVE_LANGINFO_CODESET=0 +- HAVE_LANGINFO_T_FMT_AMPM=0 +- HAVE_LANGINFO_ERA=0 +- HAVE_LANGINFO_YESEXPR=0 ++ # Code from module filenamecat-lgpl: + + + + + + +- if test $ac_cv_header_langinfo_h = yes; then +- HAVE_LANGINFO_H=1 +- { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines CODESET" >&5 +-$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } +-if test "${gl_cv_header_langinfo_codeset+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int a = CODESET; + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_langinfo_codeset=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_header_langinfo_codeset=no +-fi ++ gl_LIBOBJS="$gl_LIBOBJS filenamecat-lgpl.$ac_objext" + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_codeset" >&5 +-$as_echo "$gl_cv_header_langinfo_codeset" >&6; } +- if test $gl_cv_header_langinfo_codeset = yes; then +- HAVE_LANGINFO_CODESET=1 +- fi +- { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines T_FMT_AMPM" >&5 +-$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } +-if test "${gl_cv_header_langinfo_t_fmt_ampm+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int a = T_FMT_AMPM; + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_langinfo_t_fmt_ampm=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module float: + +- gl_cv_header_langinfo_t_fmt_ampm=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 +-$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } +- if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then +- HAVE_LANGINFO_T_FMT_AMPM=1 +- fi +- { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines ERA" >&5 +-$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } +-if test "${gl_cv_header_langinfo_era+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int a = ERA; ++ FLOAT_H= ++ case "$host_os" in ++ beos* | openbsd* | mirbsd*) ++ FLOAT_H=float.h + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_langinfo_era=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- gl_cv_header_langinfo_era=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_era" >&5 +-$as_echo "$gl_cv_header_langinfo_era" >&6; } +- if test $gl_cv_header_langinfo_era = yes; then +- HAVE_LANGINFO_ERA=1 +- fi +- { $as_echo "$as_me:$LINENO: checking whether langinfo.h defines YESEXPR" >&5 +-$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } +-if test "${gl_cv_header_langinfo_yesexpr+set}" = set; then ++ ++ ++ ++ if test $gl_cv_have_include_next = yes; then ++ gl_cv_next_float_h='<'float.h'>' ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_float_h+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int a = YESEXPR; + +-int +-main () +-{ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + +- ; +- return 0; +-} + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_header_langinfo_yesexpr=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/float.h#{ ++ s#.*"\(.*/float.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ + +- gl_cv_header_langinfo_yesexpr=no + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 ++$as_echo "$gl_cv_next_float_h" >&6; } ++ fi ++ NEXT_FLOAT_H=$gl_cv_next_float_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='<'float.h'>' ++ else ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' ++ gl_next_as_first_directive=$gl_cv_next_float_h ++ fi ++ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_langinfo_yesexpr" >&5 +-$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } +- if test $gl_cv_header_langinfo_yesexpr = yes; then +- HAVE_LANGINFO_YESEXPR=1 +- fi +- else +- HAVE_LANGINFO_H=0 +- fi + + ++ ;; ++ esac + + ++ # Code from module fnmatch: + + + + +- for gl_func in nl_langinfo; do +- as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 +-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++ ++ FNMATCH_H= ++ gl_fnmatch_required_lowercase=` ++ echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' ++ ` ++ gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 ++$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } ++if eval \${$gl_fnmatch_cache_var+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test $gl_fnmatch_required = GNU; then ++ gl_fnmatch_gnu_start= ++ gl_fnmatch_gnu_end= ++ else ++ gl_fnmatch_gnu_start='#if 0' ++ gl_fnmatch_gnu_end='#endif' ++ fi ++ if test "$cross_compiling" = yes; then : ++ eval "$gl_fnmatch_cache_var=\"guessing no\"" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ static int ++ y (char const *pattern, char const *string, int flags) ++ { ++ return fnmatch (pattern, string, flags) == 0; ++ } ++ static int ++ n (char const *pattern, char const *string, int flags) ++ { ++ return fnmatch (pattern, string, flags) == FNM_NOMATCH; ++ } + + int + main () + { +-#undef $gl_func +- (void) $gl_func; ++char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; ++ char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; ++ static char const A_1[] = { 'A' - 1, 0 }; ++ static char const A01[] = { 'A' + 1, 0 }; ++ static char const a_1[] = { 'a' - 1, 0 }; ++ static char const a01[] = { 'a' + 1, 0 }; ++ static char const bs_1[] = { '\\\\' - 1, 0 }; ++ static char const bs01[] = { '\\\\' + 1, 0 }; ++ int result = 0; ++ if (!n ("a*", "", 0)) ++ return 1; ++ if (!y ("a*", "abc", 0)) ++ return 1; ++ if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) ++ return 2; ++ if (!y ("a\\\\bc", "abc", 0)) ++ return 3; ++ if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) ++ return 3; ++ if (!y ("*x", ".x", 0)) ++ return 4; ++ if (!n ("*x", ".x", FNM_PERIOD)) ++ return 4; ++ if (!y (Apat, "\\\\", 0)) ++ return 5; ++ if (!y (Apat, "A", 0)) ++ return 5; ++ if (!y (apat, "\\\\", 0)) ++ return 5; ++ if (!y (apat, "a", 0)) ++ return 5; ++ if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) ++ return 5; ++ if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) ++ return 5; ++ if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) ++ return 5; ++ if (!(y (apat, a01, 0) == ('a' < '\\\\'))) ++ return 5; ++ if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) ++ return 5; ++ if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) ++ return 5; ++ if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) ++ return 5; ++ if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) ++ return 5; ++ $gl_fnmatch_gnu_start ++ if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) ++ result |= 8; ++ if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) ++ result |= 16; ++ if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) ++ result |= 32; ++ if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) ++ result |= 64; ++ if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) ++ result |= 64; ++ if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) ++ result |= 64; ++ $gl_fnmatch_gnu_end ++ return result; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" ++if ac_fn_c_try_run "$LINENO"; then : ++ eval "$gl_fnmatch_cache_var=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ eval "$gl_fnmatch_cache_var=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 ++eval ac_res=\$$gl_fnmatch_cache_var ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" ++ if test "$gl_fnmatch_result" = yes; then ++ rm -f "$gl_source_base/fnmatch.h" ++ else ++ FNMATCH_H=fnmatch.h + +- eval "$as_gl_Symbol=no" +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF + +- eval ac_cv_have_decl_$gl_func=yes +-fi + +- done + + +- # Code from module lchown: + + ++ gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch ++_ACEOF + + ++ ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include ++" ++if test "x$ac_cv_have_decl_isblank" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_ISBLANK $ac_have_decl ++_ACEOF + + + ++ fi + + ++ # Code from module fnmatch-gnu: + + + + + ++ # Code from module fpending: + + + +-for ac_func in lchown +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 ++ fp_headers=' ++# include ++# if HAVE_STDIO_EXT_H ++# include ++# endif ++' ++ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers ++" ++if test "x$ac_cv_have_decl___fpending" = xyes; then : ++ ac_have_decl=1 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func ++ ac_have_decl=0 ++fi + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL___FPENDING $ac_have_decl ++_ACEOF + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif ++ if test $ac_cv_func___fpending = no; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 ++$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } ++if ${ac_cv_sys_pending_output_n_bytes+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +-#undef $ac_func ++ for ac_expr in \ ++ \ ++ '# glibc2' \ ++ 'fp->_IO_write_ptr - fp->_IO_write_base' \ ++ \ ++ '# traditional Unix' \ ++ 'fp->_ptr - fp->_base' \ ++ \ ++ '# BSD' \ ++ 'fp->_p - fp->_bf._base' \ ++ \ ++ '# SCO, Unixware' \ ++ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ ++ \ ++ '# QNX' \ ++ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ ++ \ ++ '# old glibc?' \ ++ 'fp->__bufp - fp->__buffer' \ ++ \ ++ '# old glibc iostream?' \ ++ 'fp->_pptr - fp->_pbase' \ ++ \ ++ '# emx+gcc' \ ++ 'fp->_ptr - fp->_buffer' \ ++ \ ++ '# VMS' \ ++ '(*fp)->_ptr - (*fp)->_base' \ ++ \ ++ '# e.g., DGUX R4.11; the info is not available' \ ++ 1 \ ++ ; do + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++ # Skip each embedded comment. ++ case "$ac_expr" in '#'*) continue;; esac + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + int + main () + { +-return $ac_func (); ++FILE *fp = stdin; (void) ($ac_expr); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi ++if ac_fn_c_try_compile "$LINENO"; then : ++ fp_done=yes + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ test "$fp_done" = yes && break ++ done + +-else ++ ac_cv_sys_pending_output_n_bytes=$ac_expr + +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + + fi +-done ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 ++$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } + ++cat >>confdefs.h <<_ACEOF ++#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes ++_ACEOF + +- if test $ac_cv_func_lchown = no; then +- HAVE_LCHOWN=0 +- elif test "$gl_cv_func_chown_slash_works" != yes \ +- || test "$gl_cv_func_chown_ctime_works" != yes; then + + + +@@ -33189,26 +17005,29 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" + +- REPLACE_LCHOWN=1 + fi + ++ # Code from module fseeko: + + + +- GNULIB_LCHOWN=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_LCHOWN 1 +-_ACEOF ++ if test $ac_cv_have_decl_fseeko = no; then ++ HAVE_DECL_FSEEKO=0 ++ fi + ++ if test $gl_cv_func_fseeko = no; then ++ HAVE_FSEEKO=0 + + +- # Code from module link: + ++ if test $gl_cv_func_fseeko = yes; then ++ REPLACE_FSEEKO=1 ++ fi + + + +@@ -33216,671 +17035,610 @@ + + + +- if test $ac_cv_func_link = no; then +- HAVE_LINK=0 + ++ gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + + + ++ else ++ if test $gl_cv_var_stdin_large_offset = no; then + + + ++ if test $gl_cv_func_fseeko = yes; then ++ REPLACE_FSEEKO=1 ++ fi + +- gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" + +- else +- { $as_echo "$as_me:$LINENO: checking whether link handles trailing slash correctly" >&5 +-$as_echo_n "checking whether link handles trailing slash correctly... " >&6; } +-if test "${gl_cv_func_link_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- 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.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_link_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-int result = 0; +- if (!link ("conftest.a", "conftest.b/")) +- result |= 1; +-#if HAVE_LSTAT +- if (!link ("conftest.lnk/", "conftest.b")) +- result |= 2; +-#endif +- return result; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_link_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_link_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- rm -f conftest.a conftest.b conftest.lnk +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_link_works" >&5 +-$as_echo "$gl_cv_func_link_works" >&6; } +- if test "$gl_cv_func_link_works" != yes; then +- REPLACE_LINK=1 + ++ gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext" + + + ++ fi ++ fi + + + + +- gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" ++ GNULIB_FSEEKO=1 + +- fi +- fi + + ++$as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h + + +- GNULIB_LINK=1 ++ ++ # Code from module full-write: ++ # Code from module futimens: + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_LINK 1 +-_ACEOF + ++ if test $ac_cv_func_futimens = no; then ++ HAVE_FUTIMENS=0 + + +- # Code from module link-follow: + + + + + + +- gl_link_follows_symlinks=0 # assume GNU behavior +- if test $ac_cv_func_readlink = yes; then +- { $as_echo "$as_me:$LINENO: checking for __xpg4" >&5 +-$as_echo_n "checking for __xpg4... " >&6; } +-if test "${gl_cv_have___xpg4+set}" = set; then ++ gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5 ++$as_echo_n "checking whether futimens works... " >&6; } ++if ${gl_cv_func_futimens_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_futimens_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-extern int __xpg4; ++ ++#include ++#include ++#include ++#include ++ + int + main () + { +-return __xpg4; ++struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } }; ++ int fd = creat ("conftest.file", 0600); ++ struct stat st; ++ if (fd < 0) return 1; ++ errno = 0; ++ if (futimens (AT_FDCWD, NULL) == 0) return 2; ++ if (errno != EBADF) return 3; ++ if (futimens (fd, ts)) return 4; ++ sleep (1); ++ ts[0].tv_nsec = UTIME_NOW; ++ ts[1].tv_nsec = UTIME_OMIT; ++ if (futimens (fd, ts)) return 5; ++ if (fstat (fd, &st)) return 6; ++ if (st.st_ctime < st.st_atime) return 7; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- gl_cv_have___xpg4=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++if ac_fn_c_try_run "$LINENO"; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- gl_cv_have___xpg4=no +-fi ++#ifdef __linux__ ++/* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT ++ in several file systems as recently as 2.6.32. Always replace futimens ++ to support older kernels. */ ++choke me ++#endif + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_futimens_works=yes ++else ++ gl_cv_func_futimens_works="needs runtime check" + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_have___xpg4" >&5 +-$as_echo "$gl_cv_have___xpg4" >&6; } +- if test $gl_cv_have___xpg4 = yes; then +- gl_link_follows_symlinks=-1 +- else +- { $as_echo "$as_me:$LINENO: checking whether link(2) dereferences a symlink" >&5 +-$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; } +-if test "${gl_cv_func_link_follows_symlink+set}" = set; then +- $as_echo_n "(cached) " >&6 ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else ++ gl_cv_func_futimens_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 + +- # Create a regular file. +- echo > conftest.file +- if test "$cross_compiling" = yes; then +- gl_cv_func_link_follows_symlink=unknown +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++ rm -f conftest.file ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5 ++$as_echo "$gl_cv_func_futimens_works" >&6; } ++ if test "$gl_cv_func_futimens_works" != yes; then ++ REPLACE_FUTIMENS=1 + +-# include +-# include +-# include +-# include + +-# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ +- ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ +- && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) + +- int +- main () +- { +- const char *file = "conftest.file"; +- const char *sym = "conftest.sym"; +- const char *hard = "conftest.hard"; +- struct stat sb_file, sb_hard; + +- /* Create a symlink to the regular file. */ +- if (symlink (file, sym)) +- return 2; + +- /* Create a hard link to that symlink. */ +- if (link (sym, hard)) +- return 3; + +- if (lstat (hard, &sb_hard)) +- return 4; +- if (lstat (file, &sb_file)) +- return 5; + +- /* If the dev/inode of hard and file are the same, then +- the link call followed the symlink. */ +- return SAME_INODE (sb_hard, sb_file) ? 1 : 0; +- } + +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_link_follows_symlink=no +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext" + +-( exit $ac_status ) +- gl_cv_func_link_follows_symlink=yes +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++ fi ++ fi + + +- rm -f conftest.file conftest.sym conftest.hard + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_link_follows_symlink" >&5 +-$as_echo "$gl_cv_func_link_follows_symlink" >&6; } +- case $gl_cv_func_link_follows_symlink in +- yes) gl_link_follows_symlinks=1 ;; +- no) ;; # already defaulted to 0 +- *) gl_link_follows_symlinks=-2 ;; +- esac +- fi +- fi + +-cat >>confdefs.h <<_ACEOF +-#define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks +-_ACEOF ++ GNULIB_FUTIMENS=1 + + +- # Code from module linkat: + ++$as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h + + + ++ # Code from module getcwd: + + + + ++ gl_abort_bug=no ++ case $gl_cv_func_getcwd_null,$host_os in ++ *,mingw*) ++ gl_cv_func_getcwd_path_max=yes;; ++ yes,*) + + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 ++$as_echo_n "checking whether getcwd handles long file names properly... " >&6; } ++if ${gl_cv_func_getcwd_path_max+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ # Arrange for deletion of the temporary directory this test creates. ++ ac_clean_files="$ac_clean_files confdir3" ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_getcwd_path_max=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include + ++#ifndef AT_FDCWD ++# define AT_FDCWD 0 ++#endif ++#ifdef ENAMETOOLONG ++# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) ++#else ++# define is_ENAMETOOLONG(x) 0 ++#endif + ++/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ ++#undef mkdir + ++#ifndef S_IRWXU ++# define S_IRWXU 0700 ++#endif + ++/* The length of this name must be 8. */ ++#define DIR_NAME "confdir3" ++#define DIR_NAME_LEN 8 ++#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) + ++/* The length of "../". */ ++#define DOTDOTSLASH_LEN 3 + ++/* Leftover bytes in the buffer, to work around library or OS bugs. */ ++#define BUF_SLOP 20 + ++int ++main () ++{ ++#ifndef PATH_MAX ++ /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- ++ at least not on a local file system. And if we were to start worrying ++ about remote file systems, we'd have to enable the wrapper function ++ all of the time, just to be safe. That's not worth the cost. */ ++ exit (0); ++#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ ++ - DIR_NAME_SIZE - BUF_SLOP) \ ++ <= PATH_MAX) ++ /* FIXME: Assuming there's a system for which this is true, ++ this should be done in a compile test. */ ++ exit (0); ++#else ++ char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) ++ + DIR_NAME_SIZE + BUF_SLOP]; ++ char *cwd = getcwd (buf, PATH_MAX); ++ size_t initial_cwd_len; ++ size_t cwd_len; ++ int fail = 0; ++ size_t n_chdirs = 0; + +- if test $ac_cv_func_linkat = no; then +- HAVE_LINKAT=0 ++ if (cwd == NULL) ++ exit (10); + ++ cwd_len = initial_cwd_len = strlen (cwd); + ++ while (1) ++ { ++ size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); ++ char *c = NULL; + ++ cwd_len += DIR_NAME_SIZE; ++ /* If mkdir or chdir fails, it could be that this system cannot create ++ any file with an absolute name longer than PATH_MAX, such as cygwin. ++ If so, leave fail as 0, because the current working directory can't ++ be too long for getcwd if it can't even be created. For other ++ errors, be pessimistic and consider that as a failure, too. */ ++ if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) ++ { ++ if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) ++ fail = 20; ++ break; ++ } + ++ if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) ++ { ++ c = getcwd (buf, PATH_MAX); ++ if (!c && errno == ENOENT) ++ { ++ fail = 11; ++ break; ++ } ++ if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) ++ { ++ fail = 21; ++ break; ++ } ++ } + ++ if (dotdot_max <= cwd_len - initial_cwd_len) ++ { ++ if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) ++ break; ++ c = getcwd (buf, cwd_len + 1); ++ if (!c) ++ { ++ if (! (errno == ERANGE || errno == ENOENT ++ || is_ENAMETOOLONG (errno))) ++ { ++ fail = 22; ++ break; ++ } ++ if (AT_FDCWD || errno == ERANGE || errno == ENOENT) ++ { ++ fail = 12; ++ break; ++ } ++ } ++ } + ++ if (c && strlen (c) != cwd_len) ++ { ++ fail = 23; ++ break; ++ } ++ ++n_chdirs; ++ } + ++ /* Leaving behind such a deep directory is not polite. ++ So clean up here, right away, even though the driving ++ shell script would also clean up. */ ++ { ++ size_t i; + +- gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" ++ /* Try rmdir first, in case the chdir failed. */ ++ rmdir (DIR_NAME); ++ for (i = 0; i <= n_chdirs; i++) ++ { ++ if (chdir ("..") < 0) ++ break; ++ if (rmdir (DIR_NAME) != 0) ++ break; ++ } ++ } + ++ exit (fail); ++#endif ++} + ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getcwd_path_max=yes ++else ++ case $? in ++ 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; ++ *) gl_cv_func_getcwd_path_max=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_func_getcwd_path_max" >&5 ++$as_echo "$gl_cv_func_getcwd_path_max" >&6; } ++ case $gl_cv_func_getcwd_path_max in ++ no,*) + ++$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h ++;; ++ esac + + + ++ for ac_func in getpagesize ++do : ++ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" ++if test "x$ac_cv_func_getpagesize" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETPAGESIZE 1 ++_ACEOF + +- gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" ++fi ++done + +- else +- { $as_echo "$as_me:$LINENO: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5 +-$as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; } +-if test "${gl_cv_func_linkat_follow+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 ++$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } ++if ${gl_cv_func_getcwd_abort_bug+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftest.f1 conftest.f2 +- touch conftest.f1 +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ # Remove any remnants of a previous test. ++ rm -rf confdir-14B--- ++ # Arrange for deletion of the temporary directory this test creates. ++ ac_clean_files="$ac_clean_files confdir-14B---" ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_getcwd_abort_bug=yes ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include ++#include + #include +-#ifdef __linux__ +-/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW +- until 2.6.18. Always replace linkat to support older kernels. */ +-choke me ++#include ++#include ++#include ++ ++/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ ++#undef mkdir ++ ++#ifndef S_IRWXU ++# define S_IRWXU 0700 ++#endif ++ ++/* FIXME: skip the run-test altogether on systems without getpagesize. */ ++#if ! HAVE_GETPAGESIZE ++# define getpagesize() 0 + #endif + ++/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than ++ the 16kB pagesize on ia64 linux. Those conditions make the code below ++ trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ ++#define TARGET_LEN (5 * 1024) ++ + int + main () + { +-return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2", +- AT_SYMLINK_FOLLOW); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_linkat_follow=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ char const *dir_name = "confdir-14B---"; ++ char *cwd; ++ size_t initial_cwd_len; ++ int fail = 0; ++ size_t desired_depth; ++ size_t d; + +- gl_cv_func_linkat_follow="need runtime check" +-fi ++ /* The bug is triggered when PATH_MAX < getpagesize (), so skip ++ this relative expensive and invasive test if that's not true. */ ++ if (getpagesize () <= PATH_MAX) ++ return 0; + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- rm -rf conftest.f1 conftest.f2 +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_linkat_follow" >&5 +-$as_echo "$gl_cv_func_linkat_follow" >&6; } +- { $as_echo "$as_me:$LINENO: checking whether linkat handles trailing slash correctly" >&5 +-$as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; } +-if test "${gl_cv_func_linkat_slash+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- rm -rf conftest.a conftest.b conftest.c conftest.d +- if test "$cross_compiling" = yes; then +- # Guess yes on glibc systems, no otherwise. +- case "$host_os" in +- *-gnu*) gl_cv_func_linkat_slash="guessing yes";; +- *) gl_cv_func_linkat_slash="guessing no";; +- esac ++ cwd = getcwd (NULL, 0); ++ if (cwd == NULL) ++ return 0; + +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- #include +- #include ++ initial_cwd_len = strlen (cwd); ++ free (cwd); ++ desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) ++ / (1 + strlen (dir_name))); ++ for (d = 0; d < desired_depth; d++) ++ { ++ if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) ++ { ++ fail = 3; /* Unable to construct deep hierarchy. */ ++ break; ++ } ++ } + +-int +-main () +-{ +-int result; +- int fd; +- /* Create a regular file. */ +- fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600); +- if (fd < 0) +- return 1; +- if (write (fd, "hello", 5) < 5) +- return 2; +- if (close (fd) < 0) +- return 3; +- /* Test whether hard links are supported on the current +- device. */ +- if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b", +- AT_SYMLINK_FOLLOW) < 0) +- return 0; +- result = 0; +- /* Test whether a trailing "/" is treated like "/.". */ +- if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c", +- AT_SYMLINK_FOLLOW) == 0) +- result |= 4; +- if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/", +- AT_SYMLINK_FOLLOW) == 0) +- result |= 8; +- return result; ++ /* If libc has the bug in question, this invocation of getcwd ++ results in a failed assertion. */ ++ cwd = getcwd (NULL, 0); ++ if (cwd == NULL) ++ fail = 4; /* getcwd failed. This is ok, and expected. */ ++ free (cwd); ++ ++ /* Call rmdir first, in case the above chdir failed. */ ++ rmdir (dir_name); ++ while (0 < d--) ++ { ++ if (chdir ("..") < 0) ++ break; ++ rmdir (dir_name); ++ } + +- ; + return 0; + } ++ + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_linkat_slash=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_getcwd_abort_bug=no + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_linkat_slash=no ++ gl_cv_func_getcwd_abort_bug=yes + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- rm -rf conftest.a conftest.b conftest.c conftest.d + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_linkat_slash" >&5 +-$as_echo "$gl_cv_func_linkat_slash" >&6; } +- case "$gl_cv_func_linkat_slash" in +- *yes) gl_linkat_slash_bug=0 ;; +- *) gl_linkat_slash_bug=1 ;; +- esac +- if test "$gl_cv_func_linkat_follow" != yes \ +- || test $gl_linkat_slash_bug = 1; then +- REPLACE_LINKAT=1 +- +- +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 ++$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } ++ if test $gl_cv_func_getcwd_abort_bug = yes; then : ++ gl_abort_bug=yes ++fi ++;; ++ esac + ++ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in ++ *yes,yes,no) ;; ++ *) ++ REPLACE_GETCWD=1 + + +- gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" + + +-cat >>confdefs.h <<_ACEOF +-#define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug +-_ACEOF + +- fi +- fi + + + ++ gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" + +- GNULIB_LINKAT=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_LINKAT 1 +-_ACEOF ++ : ++;; ++ esac + + + +- # Code from module localcharset: + ++ GNULIB_GETCWD=1 + + + ++$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h + + + ++ # Code from module getdelim: + + + + +- LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" + +- # Code from module lseek: + + + +- { $as_echo "$as_me:$LINENO: checking whether lseek detects pipes" >&5 +-$as_echo_n "checking whether lseek detects pipes... " >&6; } +-if test "${gl_cv_func_lseek_pipe+set}" = set; then ++ if test $ac_cv_func_getdelim = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 ++$as_echo_n "checking for working getdelim function... " >&6; } ++if ${gl_cv_func_working_getdelim+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test $cross_compiling = no; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data ++ if test "$cross_compiling" = yes; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include /* for off_t */ +-#include /* for SEEK_CUR */ +-#include +-int +-main () +-{ +- +- /* Exit with success only if stdin is seekable. */ +- return lseek (0, (off_t)0, SEEK_CUR) < 0; ++#include ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ ++ Lucky GNU user ++ #endif ++#endif + +- ; +- return 0; +-} + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- if test -s conftest$ac_exeext \ +- && ./conftest$ac_exeext < conftest.$ac_ext \ +- && test 1 = "`echo hi \ +- | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then +- gl_cv_func_lseek_pipe=yes +- else +- gl_cv_func_lseek_pipe=no +- fi ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Lucky GNU user" >/dev/null 2>&1; then : ++ gl_cv_func_working_getdelim=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_lseek_pipe=no ++ gl_cv_func_working_getdelim=no + fi ++rm -f conftest* + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +- else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ +-/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ +- Choke me. +-#endif ++# include ++# include ++# include ++ int main () ++ { ++ FILE *in = fopen ("./conftest.data", "r"); ++ if (!in) ++ return 1; ++ { ++ /* Test result for a NULL buffer and a zero size. ++ Based on a test program from Karl Heuer. */ ++ char *line = NULL; ++ size_t siz = 0; ++ int len = getdelim (&line, &siz, '\n', in); ++ if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) ++ return 2; ++ } ++ { ++ /* Test result for a NULL buffer and a non-zero size. ++ This crashes on FreeBSD 8.0. */ ++ char *line = NULL; ++ size_t siz = (size_t)(~0) / 4; ++ if (getdelim (&line, &siz, '\n', in) == -1) ++ return 3; ++ } ++ return 0; ++ } ++ + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_lseek_pipe=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_working_getdelim=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_lseek_pipe=no ++ gl_cv_func_working_getdelim=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_ext +- fi + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_lseek_pipe" >&5 +-$as_echo "$gl_cv_func_lseek_pipe" >&6; } +- if test $gl_cv_func_lseek_pipe = no; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 ++$as_echo "$gl_cv_func_working_getdelim" >&6; } ++ else ++ gl_cv_func_working_getdelim=no ++ fi ++ ++ if test $ac_cv_have_decl_getdelim = no; then ++ HAVE_DECL_GETDELIM=0 ++ fi + ++ if test $gl_cv_func_working_getdelim = no; then ++ if test $ac_cv_func_getdelim = yes; then ++ REPLACE_GETDELIM=1 ++ fi + + + +@@ -33889,13 +17647,30 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" + + +- REPLACE_LSEEK=1 ++ for ac_func in flockfile funlockfile ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done + +-cat >>confdefs.h <<\_ACEOF +-#define LSEEK_PIPE_BROKEN 1 ++ ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl + _ACEOF + + +@@ -33904,280 +17679,140 @@ + + + +- GNULIB_LSEEK=1 ++ GNULIB_GETDELIM=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_LSEEK 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h + + + +- # Code from module lstat: ++ # Code from module getdtablesize: + + + ++ if test $ac_cv_func_getdtablesize != yes; then ++ HAVE_GETDTABLESIZE=0 + + + + + +- if test $ac_cv_func_lstat = yes; then + +- if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then +- REPLACE_LSTAT=1 +- fi +- # Prerequisites of lib/lstat.c. + +- else +- HAVE_LSTAT=0 ++ ++ gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" ++ + fi + + + + +- GNULIB_LSTAT=1 ++ GNULIB_GETDTABLESIZE=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_LSTAT 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h + + + +- # Code from module malloc-gnu: ++ # Code from module getline: + + + +-for ac_header in stdlib.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_preproc=no ++ gl_getline_needs_run_time_check=no ++ ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" ++if test "x$ac_cv_func_getline" = xyes; then : ++ gl_getline_needs_run_time_check=yes ++else ++ am_cv_func_working_getline=no + fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ if test $gl_getline_needs_run_time_check = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 ++$as_echo_n "checking for working getline function... " >&6; } ++if ${am_cv_func_working_getline+:} false; then : + $as_echo_n "(cached) " >&6 + else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } ++ echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data ++ if test "$cross_compiling" = yes; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF ++#include ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ ++ Lucky GNU user ++ #endif ++#endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Lucky GNU user" >/dev/null 2>&1; then : ++ am_cv_func_working_getline=yes ++else ++ am_cv_func_working_getline=no + fi ++rm -f conftest* + +-done + +-{ $as_echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 +-$as_echo_n "checking for GNU libc compatible malloc... " >&6; } +-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- ac_cv_func_malloc_0_nonnull=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#if defined STDC_HEADERS || defined HAVE_STDLIB_H +-# include +-#else +-char *malloc (); +-#endif + +-int +-main () +-{ +-return ! malloc (0); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_func_malloc_0_nonnull=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++# include ++# include ++# include ++ int main () ++ { ++ FILE *in = fopen ("./conftest.data", "r"); ++ if (!in) ++ return 1; ++ { ++ /* Test result for a NULL buffer and a zero size. ++ Based on a test program from Karl Heuer. */ ++ char *line = NULL; ++ size_t siz = 0; ++ int len = getline (&line, &siz, in); ++ if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) ++ return 2; ++ } ++ { ++ /* Test result for a NULL buffer and a non-zero size. ++ This crashes on FreeBSD 8.0. */ ++ char *line = NULL; ++ size_t siz = (size_t)(~0) / 4; ++ if (getline (&line, &siz, in) == -1) ++ return 3; ++ } ++ return 0; ++ } + +-( exit $ac_status ) +-ac_cv_func_malloc_0_nonnull=no ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ am_cv_func_working_getline=yes ++else ++ am_cv_func_working_getline=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 +-$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } +-if test $ac_cv_func_malloc_0_nonnull = yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 ++$as_echo "$am_cv_func_working_getline" >&6; } ++ fi + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC_GNU 1 +-_ACEOF ++ if test $ac_cv_have_decl_getline = no; then ++ HAVE_DECL_GETLINE=0 ++ fi + +-else +- cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC_GNU 0 +-_ACEOF ++ if test $am_cv_func_working_getline = no; then ++ REPLACE_GETLINE=1 + + + +@@ -34186,36 +17821,103 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" + + +- gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + +- REPLACE_MALLOC=1 + + +-fi + + + + + +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_MALLOC_GNU 1 +-_ACEOF + ++ if test $ac_cv_func_getdelim = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 ++$as_echo_n "checking for working getdelim function... " >&6; } ++if ${gl_cv_func_working_getdelim+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data ++ if test "$cross_compiling" = yes; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- # Code from module malloc-posix: ++#include ++#ifdef __GNU_LIBRARY__ ++ #if (__GLIBC__ >= 2) && !defined __UCLIBC__ ++ Lucky GNU user ++ #endif ++#endif ++ ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Lucky GNU user" >/dev/null 2>&1; then : ++ gl_cv_func_working_getdelim=yes ++else ++ gl_cv_func_working_getdelim=no ++fi ++rm -f conftest* + + ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- if test $gl_cv_func_malloc_posix = yes; then ++# include ++# include ++# include ++ int main () ++ { ++ FILE *in = fopen ("./conftest.data", "r"); ++ if (!in) ++ return 1; ++ { ++ /* Test result for a NULL buffer and a zero size. ++ Based on a test program from Karl Heuer. */ ++ char *line = NULL; ++ size_t siz = 0; ++ int len = getdelim (&line, &siz, '\n', in); ++ if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) ++ return 2; ++ } ++ { ++ /* Test result for a NULL buffer and a non-zero size. ++ This crashes on FreeBSD 8.0. */ ++ char *line = NULL; ++ size_t siz = (size_t)(~0) / 4; ++ if (getdelim (&line, &siz, '\n', in) == -1) ++ return 3; ++ } ++ return 0; ++ } + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_MALLOC_POSIX 1 + _ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_working_getdelim=yes ++else ++ gl_cv_func_working_getdelim=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_getdelim" >&5 ++$as_echo "$gl_cv_func_working_getdelim" >&6; } + else ++ gl_cv_func_working_getdelim=no ++ fi ++ ++ if test $ac_cv_have_decl_getdelim = no; then ++ HAVE_DECL_GETDELIM=0 ++ fi + ++ if test $gl_cv_func_working_getdelim = no; then ++ if test $ac_cv_func_getdelim = yes; then ++ REPLACE_GETDELIM=1 ++ fi + + + +@@ -34224,49 +17926,77 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" ++ ++ ++ for ac_func in flockfile funlockfile ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++ ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl ++_ACEOF + +- REPLACE_MALLOC=1 + + fi + + ++ fi + + +- GNULIB_MALLOC_POSIX=1 + + ++ GNULIB_GETLINE=1 + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MALLOC_POSIX 1 +-_ACEOF + + ++$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h ++ + +- # Code from module malloca: + ++ # Code from module getopt-gnu: + + + +- # Code from module mbchar: + + + + +- # Code from module mbrtowc: ++$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h ++ + ++ # Code from module getopt-posix: + + + + + ++ if test -n "$gl_replace_getopt"; then : + + + ++ GETOPT_H=getopt.h + ++$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + + + ++ GNULIB_UNISTD_H_GETOPT=1 + + + +@@ -34274,793 +18004,390 @@ + + + +- if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + ++ gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 +-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- case "$host_os" in +- # Guess no on AIX and OSF/1. +- aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; +- esac +- if test $LOCALE_JA != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) +- { +- const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) +- if (mbsinit (&state)) +- return 1; +- } +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_incomplete_state=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_mbrtowc_incomplete_state=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- fi ++ ++ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" ++ ++ ++ ++ ++ + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + + ++ # Code from module getpagesize: + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 +-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +-if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- case "$host_os" in +- # Guess no on Solaris 8. +- solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; +- esac +- if test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++ for ac_func in getpagesize ++do : ++ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" ++if test "x$ac_cv_func_getpagesize" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETPAGESIZE 1 + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- /* This fails on Solaris 8: +- mbrtowc returns 2, and sets wc to 0x00F0. +- mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ +- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) +- { +- char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; ++fi ++done + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 6, &state) != 4 +- && mbtowc (&wc, input + 3, 6) == 4) +- return 1; +- } +- return 0; +-} ++ if test $ac_cv_func_getpagesize = no; then ++ HAVE_GETPAGESIZE=0 ++ for ac_header in OS.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" ++if test "x$ac_cv_header_OS_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_OS_H 1 + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_sanitycheck=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_mbrtowc_sanitycheck=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext + fi + ++done + +- fi ++ if test $ac_cv_header_OS_h = yes; then ++ HAVE_OS_H=1 ++ fi ++ for ac_header in sys/param.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_param_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SYS_PARAM_H 1 ++_ACEOF + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + +- REPLACE_MBSTATE_T=0 +- case "$gl_cv_func_mbrtowc_incomplete_state" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- esac +- case "$gl_cv_func_mbrtowc_sanitycheck" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- esac +- else +- REPLACE_MBSTATE_T=1 ++done ++ ++ if test $ac_cv_header_sys_param_h = yes; then ++ HAVE_SYS_PARAM_H=1 ++ fi + fi +- if test $REPLACE_MBSTATE_T = 1; then ++ case "$host_os" in ++ mingw*) ++ REPLACE_GETPAGESIZE=1 + +- : + +- fi + + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext" + ++ ;; ++ esac ++ ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" ++if test "x$ac_cv_have_decl_getpagesize" = xyes; then : + +- if test $ac_cv_func_mbrtowc = no; then +- HAVE_MBRTOWC=0 +- else +- if test $REPLACE_MBSTATE_T = 1; then +- REPLACE_MBRTOWC=1 +- else ++else ++ HAVE_DECL_GETPAGESIZE=0 ++fi + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL pwc argument" >&5 +-$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } +-if test "${gl_cv_func_mbrtowc_null_arg1+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- case "$host_os" in +- # Guess no on Solaris. +- solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; +- esac +- if test $LOCALE_FR_UTF8 != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- int result = 0; ++ GNULIB_GETPAGESIZE=1 + +- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) +- { +- char input[] = "\303\237er"; +- mbstate_t state; +- wchar_t wc; +- size_t ret; + +- memset (&state, '\0', sizeof (mbstate_t)); +- wc = (wchar_t) 0xBADFACE; +- ret = mbrtowc (&wc, input, 5, &state); +- if (ret != 2) +- result |= 1; +- if (!mbsinit (&state)) +- result |= 2; + +- memset (&state, '\0', sizeof (mbstate_t)); +- ret = mbrtowc (NULL, input, 5, &state); +- if (ret != 2) /* Solaris 7 fails here: ret is -1. */ +- result |= 4; +- if (!mbsinit (&state)) +- result |= 8; +- } +- return result; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_null_arg1=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h + +-( exit $ac_status ) +-gl_cv_func_mbrtowc_null_arg1=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- fi ++ # Code from module gettext: + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg1" >&5 +-$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } ++ # Code from module gettext-h: + + ++ # Code from module gettime: + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5 +-$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } +-if test "${gl_cv_func_mbrtowc_null_arg2+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- case "$host_os" in +- # Guess no on OSF/1. +- osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; +- esac +- if test $LOCALE_FR_UTF8 != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) +- { +- mbstate_t state; +- wchar_t wc; +- int ret; + +- memset (&state, '\0', sizeof (mbstate_t)); +- wc = (wchar_t) 0xBADFACE; +- mbrtowc (&wc, NULL, 5, &state); +- /* Check that wc was not modified. */ +- if (wc != (wchar_t) 0xBADFACE) +- return 1; +- } +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_null_arg2=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_mbrtowc_null_arg2=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- fi + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg2" >&5 +-$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } ++ gl_LIBOBJS="$gl_LIBOBJS gettime.$ac_objext" + + + + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5 +-$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } +-if test "${gl_cv_func_mbrtowc_retval+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else ++ # Code from module gettimeofday: ++ + +- case "$host_os" in +- # Guess no on HP-UX, Solaris, native Windows. +- hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_retval="guessing yes" ;; +- esac +- if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ +- || { case "$host_os" in mingw*) true;; *) false;; esac; }; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- int result = 0; +- int found_some_locale = 0; +- /* This fails on Solaris. */ +- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) +- { +- char input[] = "B\303\274\303\237er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) +- { +- input[1] = '\0'; +- if (mbrtowc (&wc, input + 2, 5, &state) != 1) +- result |= 1; +- } +- found_some_locale = 1; +- } +- /* This fails on HP-UX 11.11. */ +- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) +- { +- char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) +- { +- input[1] = '\0'; +- if (mbrtowc (&wc, input + 2, 5, &state) != 2) +- result |= 2; +- } +- found_some_locale = 1; +- } +- /* This fails on native Windows. */ +- if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) +- { +- char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) +- { +- input[3] = '\0'; +- if (mbrtowc (&wc, input + 4, 4, &state) != 1) +- result |= 4; +- } +- found_some_locale = 1; +- } +- if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) +- { +- char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ +- mbstate_t state; +- wchar_t wc; ++ gl_gettimeofday_timezone=void ++ if test $ac_cv_func_gettimeofday != yes; then ++ HAVE_GETTIMEOFDAY=0 + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) +- { +- input[3] = '\0'; +- if (mbrtowc (&wc, input + 4, 4, &state) != 1) +- result |= 8; +- } +- found_some_locale = 1; +- } +- if (setlocale (LC_ALL, "Chinese_China.936") != NULL) +- { +- char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) +- { +- input[3] = '\0'; +- if (mbrtowc (&wc, input + 4, 4, &state) != 1) +- result |= 16; +- } +- found_some_locale = 1; +- } +- return (found_some_locale ? result : 77); +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_retval=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-if test $? != 77; then +- gl_cv_func_mbrtowc_retval=no +- fi + +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" ++ ++ ++ for ac_header in sys/timeb.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_timeb_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SYS_TIMEB_H 1 ++_ACEOF ++ + fi + ++done + +- fi ++ for ac_func in _ftime ++do : ++ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" ++if test "x$ac_cv_func__ftime" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE__FTIME 1 ++_ACEOF + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_retval" >&5 +-$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } ++done + + ++ else + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 +-$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } +-if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 ++$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } ++if ${gl_cv_func_gettimeofday_clobber+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- case "$host_os" in +- # Guess no on Solaris 8 and 9. +- solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; +- esac +- if test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then +- : ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_gettimeofday_clobber=yes + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#include + #include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () ++ #include ++ #include ++ #include ++ ++int ++main () + { +- /* This fails on Solaris 8 and 9. */ +- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) +- { +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, "", 1, &state) != 0) +- return 1; +- } ++ time_t t = 0; ++ struct tm *lt; ++ struct tm saved_lt; ++ struct timeval tv; ++ lt = localtime (&t); ++ saved_lt = *lt; ++ gettimeofday (&tv, NULL); ++ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; ++ ++ ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_nul_retval=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_gettimeofday_clobber=no + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_nul_retval=no ++ gl_cv_func_gettimeofday_clobber=yes + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 ++$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } + +- fi ++ if test $gl_cv_func_gettimeofday_clobber = yes; then ++ REPLACE_GETTIMEOFDAY=1 + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5 +-$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } + +- case "$gl_cv_func_mbrtowc_null_arg1" in +- *yes) ;; +- *) +-cat >>confdefs.h <<\_ACEOF +-#define MBRTOWC_NULL_ARG1_BUG 1 +-_ACEOF + +- REPLACE_MBRTOWC=1 +- ;; +- esac +- case "$gl_cv_func_mbrtowc_null_arg2" in +- *yes) ;; +- *) +-cat >>confdefs.h <<\_ACEOF +-#define MBRTOWC_NULL_ARG2_BUG 1 +-_ACEOF + +- REPLACE_MBRTOWC=1 +- ;; +- esac +- case "$gl_cv_func_mbrtowc_retval" in +- *yes) ;; +- *) +-cat >>confdefs.h <<\_ACEOF +-#define MBRTOWC_RETVAL_BUG 1 ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" ++ ++ ++ for ac_header in sys/timeb.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_timeb_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SYS_TIMEB_H 1 + _ACEOF + +- REPLACE_MBRTOWC=1 +- ;; +- esac +- case "$gl_cv_func_mbrtowc_nul_retval" in +- *yes) ;; +- *) +-cat >>confdefs.h <<\_ACEOF +-#define MBRTOWC_NUL_RETVAL_BUG 1 ++fi ++ ++done ++ ++ for ac_func in _ftime ++do : ++ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" ++if test "x$ac_cv_func__ftime" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE__FTIME 1 + _ACEOF + +- REPLACE_MBRTOWC=1 +- ;; +- esac +- fi +- fi +- if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then ++fi ++done + +- : + + ++$as_echo "#define gmtime rpl_gmtime" >>confdefs.h + + ++$as_echo "#define localtime rpl_localtime" >>confdefs.h + + + ++$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + ++ fi + +- gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 ++$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } ++if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++ struct timeval c; ++ int gettimeofday (struct timeval *restrict, void *restrict); + ++int ++main () ++{ ++/* glibc uses struct timezone * rather than the POSIX void * ++ if _GNU_SOURCE is defined. However, since the only portable ++ use of gettimeofday uses NULL as the second parameter, and ++ since the glibc definition is actually more typesafe, it is ++ not worth wrapping this to get a compliant signature. */ ++ int (*f) (struct timeval *restrict, void *restrict) ++ = gettimeofday; ++ int x = f (&c, 0); ++ return !(x | c.tv_sec | c.tv_usec); + +- : ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_gettimeofday_posix_signature=yes ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +- fi ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_gettimeofday_posix_signature=almost ++else ++ gl_cv_func_gettimeofday_posix_signature=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 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 ++$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } ++ if test $gl_cv_func_gettimeofday_posix_signature = almost; then ++ gl_gettimeofday_timezone='struct timezone' ++ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then ++ REPLACE_GETTIMEOFDAY=1 + + + + +- GNULIB_MBRTOWC=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MBRTOWC 1 +-_ACEOF + ++ gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + + +- # Code from module mbscasecmp: ++ for ac_header in sys/timeb.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_timeb_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SYS_TIMEB_H 1 ++_ACEOF + ++fi + ++done + +- GNULIB_MBSCASECMP=1 ++ for ac_func in _ftime ++do : ++ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" ++if test "x$ac_cv_func__ftime" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE__FTIME 1 ++_ACEOF ++ ++fi ++done + + ++ fi ++ fi + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MBSCASECMP 1 ++cat >>confdefs.h <<_ACEOF ++#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone + _ACEOF + + + +- # Code from module mbsinit: + + ++ GNULIB_GETTIMEOFDAY=1 + + + ++$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + + + ++ # Code from module gitlog-to-changelog: ++ # Code from module hash: + + + +@@ -35070,276 +18397,280 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS hash.$ac_objext" + + + + +- if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then ++ # Code from module havelib: ++ # Code from module human: + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 +-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- case "$host_os" in +- # Guess no on AIX and OSF/1. +- aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; +- esac +- if test $LOCALE_JA != none; then +- if test "$cross_compiling" = yes; then +- : ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS human.$ac_objext" ++ ++ ++ : ++ ++ # Code from module include_next: ++ # Code from module inline: ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5 ++$as_echo_n "checking whether the compiler generally respects inline... " >&6; } ++if ${gl_cv_c_inline_effective+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test $ac_cv_c_inline = no; then ++ gl_cv_c_inline_effective=no ++ else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () ++int ++main () + { +- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) +- { +- const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; +- +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) +- if (mbsinit (&state)) +- return 1; +- } ++#ifdef __NO_INLINE__ ++ #error "inline is not effective" ++ #endif ++ ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_incomplete_state=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_c_inline_effective=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_incomplete_state=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ gl_cv_c_inline_effective=no + fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5 ++$as_echo "$gl_cv_c_inline_effective" >&6; } ++ if test $gl_cv_c_inline_effective = yes; then + +- fi ++$as_echo "#define HAVE_INLINE 1" >>confdefs.h + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } ++ fi + ++ # Code from module intprops: ++ # Code from module inttostr: + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 +-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +-if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else ++ : + +- case "$host_os" in +- # Guess no on Solaris 8. +- solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; +- esac +- if test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then + : ++ : ++ : ++ : ++ ++ # Code from module inttypes: ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5 ++$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; } ++if ${gl_cv_header_working_inttypes_h+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ gl_cv_header_working_inttypes_h=no ++ if test "$gl_cv_header_working_stdint_h" = yes \ ++ && test $ac_cv_header_inttypes_h = yes \ ++ && test "$ac_cv_have_decl_imaxabs" = yes \ ++ && test "$ac_cv_have_decl_imaxdiv" = yes \ ++ && test "$ac_cv_have_decl_strtoimax" = yes \ ++ && test "$ac_cv_have_decl_strtoumax" = yes; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ ++ + #include +-#include +-#include +-#include +-int main () ++#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ ++#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ ++#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */ ++#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */ ++#include ++ ++/* No need to duplicate the tests of stdint.m4; they are subsumed by ++ $gl_cv_header_working_stdint_h = yes. */ ++ ++/* Tests for macros supposed to be defined in inttypes.h. */ ++ ++const char *k = /* implicit string concatenation */ ++#ifdef INT8_MAX ++ PRId8 PRIi8 ++#endif ++#ifdef UINT8_MAX ++ PRIo8 PRIu8 PRIx8 PRIX8 ++#endif ++#ifdef INT16_MAX ++ PRId16 PRIi16 ++#endif ++#ifdef UINT16_MAX ++ PRIo16 PRIu16 PRIx16 PRIX16 ++#endif ++#ifdef INT32_MAX ++ PRId32 PRIi32 ++#endif ++#ifdef UINT32_MAX ++ PRIo32 PRIu32 PRIx32 PRIX32 ++#endif ++#ifdef INT64_MAX ++ PRId64 PRIi64 ++#endif ++#ifdef UINT64_MAX ++ PRIo64 PRIu64 PRIx64 PRIX64 ++#endif ++ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8 ++ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16 ++ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32 ++ PRIdLEAST64 PRIiLEAST64 ++ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64 ++ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8 ++ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16 ++ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32 ++ PRIdFAST64 PRIiFAST64 ++ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64 ++ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX ++#ifdef INTPTR_MAX ++ PRIdPTR PRIiPTR ++#endif ++#ifdef UINTPTR_MAX ++ PRIoPTR PRIuPTR PRIxPTR PRIXPTR ++#endif ++ ; ++const char *l = /* implicit string concatenation */ ++#ifdef INT8_MAX ++ SCNd8 SCNi8 ++#endif ++#ifdef UINT8_MAX ++ SCNo8 SCNu8 SCNx8 ++#endif ++#ifdef INT16_MAX ++ SCNd16 SCNi16 ++#endif ++#ifdef UINT16_MAX ++ SCNo16 SCNu16 SCNx16 ++#endif ++#ifdef INT32_MAX ++ SCNd32 SCNi32 ++#endif ++#ifdef UINT32_MAX ++ SCNo32 SCNu32 SCNx32 ++#endif ++#ifdef INT64_MAX ++ SCNd64 SCNi64 ++#endif ++#ifdef UINT64_MAX ++ SCNo64 SCNu64 SCNx64 ++#endif ++ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8 ++ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16 ++ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32 ++ SCNdLEAST64 SCNiLEAST64 ++ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64 ++ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8 ++ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16 ++ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32 ++ SCNdFAST64 SCNiFAST64 ++ SCNoFAST64 SCNuFAST64 SCNxFAST64 ++ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX ++#ifdef INTPTR_MAX ++ SCNdPTR SCNiPTR ++#endif ++#ifdef UINTPTR_MAX ++ SCNoPTR SCNuPTR SCNxPTR ++#endif ++ ; ++ ++int ++main () + { +- /* This fails on Solaris 8: +- mbrtowc returns 2, and sets wc to 0x00F0. +- mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ +- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) +- { +- char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 6, &state) != 4 +- && mbtowc (&wc, input + 3, 6) == 4) +- return 1; +- } ++ ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_sanitycheck=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_sanitycheck=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_working_inttypes_h=yes + fi +- +- +- fi +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } +- +- REPLACE_MBSTATE_T=0 +- case "$gl_cv_func_mbrtowc_incomplete_state" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- esac +- case "$gl_cv_func_mbrtowc_sanitycheck" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- esac +- else +- REPLACE_MBSTATE_T=1 +- fi +- if test $REPLACE_MBSTATE_T = 1; then +- +- : +- +- fi +- +- +- +- +- +- +- +- +- if test $ac_cv_func_mbsinit = no; then +- HAVE_MBSINIT=0 +- else +- if test $REPLACE_MBSTATE_T = 1; then +- REPLACE_MBSINIT=1 +- else +- case "$host_os" in +- mingw*) REPLACE_MBSINIT=1 ;; +- esac +- fi +- fi +- if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then +- +- : +- +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5 ++$as_echo "$gl_cv_header_working_inttypes_h" >&6; } + + + + + +- gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" + + +- : + +- fi + + + ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_inttypes_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- GNULIB_MBSINIT=1 ++ if test $ac_cv_header_inttypes_h = yes; then + + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MBSINIT 1 + _ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/inttypes.h#{ ++ s#.*"\(.*/inttypes.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ else ++ gl_cv_next_inttypes_h='<'inttypes.h'>' ++ fi + + ++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 + +- # Code from module mbsrtowcs: +- +- +- +- ++ 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 + + + +@@ -35348,438 +18679,364 @@ + + + ++$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h + + + ++ PRIPTR_PREFIX= ++ if test -n "$STDINT_H"; then ++ PRIPTR_PREFIX='"l"' ++ 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 ++ 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 + + ++ if test "$ac_cv_have_decl_imaxabs" = yes; then ++ HAVE_DECL_IMAXABS=1 ++ else ++ HAVE_DECL_IMAXABS=0 ++ fi + ++ if test "$ac_cv_have_decl_imaxdiv" = yes; then ++ HAVE_DECL_IMAXDIV=1 ++ else ++ HAVE_DECL_IMAXDIV=0 ++ fi + +- if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then ++ if test "$ac_cv_have_decl_strtoimax" = yes; then ++ HAVE_DECL_STRTOIMAX=1 ++ else ++ HAVE_DECL_STRTOIMAX=0 ++ fi + ++ if test "$ac_cv_have_decl_strtoumax" = yes; then ++ HAVE_DECL_STRTOUMAX=1 ++ else ++ HAVE_DECL_STRTOUMAX=0 ++ fi + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 +-$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; 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 +- +- case "$host_os" in +- # Guess no on AIX and OSF/1. +- aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; +- esac +- if test $LOCALE_JA != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++/* Work also in C++ mode. */ ++ #define __STDC_LIMIT_MACROS 1 + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () ++ /* Work if build is not clean. */ ++ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H ++ ++ #include ++ #if HAVE_STDINT_H ++ #include ++ #endif ++ ++ #if defined INT32_MAX && defined INTMAX_MAX ++ #define CONDITION (INT32_MAX < INTMAX_MAX) ++ #elif HAVE_LONG_LONG_INT ++ #define CONDITION (sizeof (int) < sizeof (long long int)) ++ #else ++ #define CONDITION 0 ++ #endif ++ int test[CONDITION ? 1 : -1]; ++int ++main () + { +- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) +- { +- const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) +- if (mbsinit (&state)) +- return 1; +- } ++ ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_incomplete_state=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_incomplete_state=no ++ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- fi +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 +-$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } +- ++{ $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:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 +-$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +-if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; 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 +- +- case "$host_os" in +- # Guess no on Solaris 8. +- solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; +- esac +- if test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++/* Work also in C++ mode. */ ++ #define __STDC_LIMIT_MACROS 1 + +-#include +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () ++ /* Work if build is not clean. */ ++ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H ++ ++ #include ++ #if HAVE_STDINT_H ++ #include ++ #endif ++ ++ #if defined INT64_MAX ++ #define CONDITION (INT64_MAX == LONG_MAX) ++ #elif HAVE_LONG_LONG_INT ++ #define CONDITION (sizeof (long long int) == sizeof (long int)) ++ #else ++ #define CONDITION 0 ++ #endif ++ int test[CONDITION ? 1 : -1]; ++int ++main () + { +- /* This fails on Solaris 8: +- mbrtowc returns 2, and sets wc to 0x00F0. +- mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ +- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) +- { +- char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ +- mbstate_t state; +- wchar_t wc; + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (&wc, input + 3, 6, &state) != 4 +- && mbtowc (&wc, input + 3, 6) == 4) +- return 1; +- } ++ ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbrtowc_sanitycheck=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_sanitycheck=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ gl_cv_test_INT64_MAX_EQ_LONG_MAX=no + fi +- +- +- fi +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 +-$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } +- +- REPLACE_MBSTATE_T=0 +- case "$gl_cv_func_mbrtowc_incomplete_state" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- esac +- case "$gl_cv_func_mbrtowc_sanitycheck" in +- *yes) ;; +- *) REPLACE_MBSTATE_T=1 ;; +- 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 +- REPLACE_MBSTATE_T=1 ++ INT64_MAX_EQ_LONG_MAX=0; + fi +- if test $REPLACE_MBSTATE_T = 1; 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 ++ #if HAVE_STDINT_H ++ #include ++ #endif + ++ #if defined UINT32_MAX && defined UINTMAX_MAX ++ #define CONDITION (UINT32_MAX < UINTMAX_MAX) ++ #elif HAVE_LONG_LONG_INT ++ #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) ++ #else ++ #define CONDITION 0 ++ #endif ++ int test[CONDITION ? 1 : -1]; ++int ++main () ++{ + +- +- +- +- if test $ac_cv_func_mbsrtowcs = no; then +- HAVE_MBSRTOWCS=0 ++ ; ++ 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 +- if test $REPLACE_MBSTATE_T = 1; then +- REPLACE_MBSRTOWCS=1 +- else +- +- +- ++ UINT32_MAX_LT_UINTMAX_MAX=0; ++ fi + + ++ if test $APPLE_UNIVERSAL_BUILD = 0; then + +- { $as_echo "$as_me:$LINENO: checking whether mbsrtowcs works" >&5 +-$as_echo_n "checking whether mbsrtowcs works... " >&6; } +-if test "${gl_cv_func_mbsrtowcs_works+set}" = set; 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 +- +- case "$host_os" in +- # Guess no on HP-UX, Solaris, mingw. +- hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; +- # Guess yes otherwise. +- *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; +- esac +- if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then +- : +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++/* Work also in C++ mode. */ ++ #define __STDC_LIMIT_MACROS 1 + +-#include +-#include +-/* Tru64 with Desktop Toolkit C has a bug: must be included before +- . +- BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +-#include +-#include +-#include +-#include +-int main () +-{ +- int result = 0; +- /* Test whether the function supports a NULL destination argument. +- This fails on native Windows. */ +- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) +- { +- const char input[] = "\337er"; +- const char *src = input; +- mbstate_t state; +- +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbsrtowcs (NULL, &src, 1, &state) != 3 +- || src != input) +- result |= 1; +- } +- /* Test whether the function works when started with a conversion state +- in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ +- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) +- { +- const char input[] = "B\303\274\303\237er"; +- mbstate_t state; +- +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) +- if (!mbsinit (&state)) +- { +- const char *src = input + 2; +- if (mbsrtowcs (NULL, &src, 10, &state) != 4) +- result |= 2; +- } +- } +- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) +- { +- const char input[] = "<\306\374\313\334\270\354>"; +- mbstate_t state; ++ /* Work if build is not clean. */ ++ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) +- if (!mbsinit (&state)) +- { +- const char *src = input + 4; +- if (mbsrtowcs (NULL, &src, 10, &state) != 3) +- result |= 4; +- } +- } +- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) +- { +- const char input[] = "B\250\271\201\060\211\070er"; +- mbstate_t state; ++ #include ++ #if HAVE_STDINT_H ++ #include ++ #endif + +- memset (&state, '\0', sizeof (mbstate_t)); +- if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) +- if (!mbsinit (&state)) +- { +- const char *src = input + 2; +- if (mbsrtowcs (NULL, &src, 10, &state) != 4) +- result |= 8; +- } +- } +- return result; ++ #if defined UINT64_MAX ++ #define CONDITION (UINT64_MAX == ULONG_MAX) ++ #elif HAVE_LONG_LONG_INT ++ #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) ++ #else ++ #define CONDITION 0 ++ #endif ++ int test[CONDITION ? 1 : -1]; ++int ++main () ++{ ++ ++ ; ++ return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mbsrtowcs_works=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbsrtowcs_works=no ++ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++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 + + +- fi +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbsrtowcs_works" >&5 +-$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } +- +- case "$gl_cv_func_mbsrtowcs_works" in +- *yes) ;; +- *) REPLACE_MBSRTOWCS=1 ;; +- esac +- fi ++ else ++ UINT64_MAX_EQ_ULONG_MAX=-1 + fi +- if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then +- +- : + + ++ for gl_func in imaxabs imaxdiv strtoimax strtoumax; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + ++int ++main () ++{ ++#undef $gl_func ++ (void) $gl_func; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" ++else ++ eval "$as_gl_Symbol=no" ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++fi ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 ++$as_echo "$ac_res" >&6; } ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 ++_ACEOF + ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done + + ++ # Code from module iswblank: + + + +- gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" + + + ++ if test $ac_cv_func_iswblank = no; then ++ HAVE_ISWBLANK=0 ++ if test $ac_cv_have_decl_iswblank = yes; then ++ REPLACE_ISWBLANK=1 ++ fi ++ fi ++ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then ++ : ++ else ++ if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then + + + + + + +- gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" + + +- : ++ gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" + ++ fi + fi + + + + +- GNULIB_MBSRTOWCS=1 +- +- + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MBSRTOWCS 1 +-_ACEOF ++ GNULIB_ISWBLANK=1 + + + +- # Code from module mbtowc: ++$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h + + + +- if false; then +- REPLACE_MBTOWC=1 +- fi +- if test $REPLACE_MBTOWC = 1; then ++ # Code from module langinfo: + + + +@@ -35788,56 +19045,198 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" + + +- : + +- fi + + + ++ if test $gl_cv_have_include_next = yes; then ++ gl_cv_next_langinfo_h='<'langinfo.h'>' ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_langinfo_h+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- GNULIB_MBTOWC=1 ++ if test $ac_cv_header_langinfo_h = yes; then + + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MBTOWC 1 + _ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/langinfo.h#{ ++ s#.*"\(.*/langinfo.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ else ++ gl_cv_next_langinfo_h='<'langinfo.h'>' ++ fi + + ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 ++$as_echo "$gl_cv_next_langinfo_h" >&6; } ++ fi ++ NEXT_LANGINFO_H=$gl_cv_next_langinfo_h + +- # Code from module mbuiter: +- +- +- +- : ++ 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='<'langinfo.h'>' ++ else ++ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' ++ gl_next_as_first_directive=$gl_cv_next_langinfo_h ++ fi ++ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive + +- # Code from module memchr: + + + + +- GNULIB_MEMCHR=1 ++ HAVE_LANGINFO_CODESET=0 ++ HAVE_LANGINFO_T_FMT_AMPM=0 ++ HAVE_LANGINFO_ERA=0 ++ HAVE_LANGINFO_YESEXPR=0 + ++ if test $ac_cv_header_langinfo_h = yes; then ++ HAVE_LANGINFO_H=1 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 ++$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } ++if ${gl_cv_header_langinfo_codeset+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int a = CODESET; + ++int ++main () ++{ + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MEMCHR 1 ++ ; ++ return 0; ++} + _ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_langinfo_codeset=yes ++else ++ gl_cv_header_langinfo_codeset=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_langinfo_codeset" >&5 ++$as_echo "$gl_cv_header_langinfo_codeset" >&6; } ++ if test $gl_cv_header_langinfo_codeset = yes; then ++ HAVE_LANGINFO_CODESET=1 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 ++$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } ++if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int a = T_FMT_AMPM; + ++int ++main () ++{ + +- # Code from module mempcpy: +- ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_langinfo_t_fmt_ampm=yes ++else ++ gl_cv_header_langinfo_t_fmt_ampm=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_langinfo_t_fmt_ampm" >&5 ++$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } ++ if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then ++ HAVE_LANGINFO_T_FMT_AMPM=1 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 ++$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } ++if ${gl_cv_header_langinfo_era+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int a = ERA; + ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_langinfo_era=yes ++else ++ gl_cv_header_langinfo_era=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_langinfo_era" >&5 ++$as_echo "$gl_cv_header_langinfo_era" >&6; } ++ if test $gl_cv_header_langinfo_era = yes; then ++ HAVE_LANGINFO_ERA=1 ++ fi ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 ++$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } ++if ${gl_cv_header_langinfo_yesexpr+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int a = YESEXPR; + ++int ++main () ++{ + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_header_langinfo_yesexpr=yes ++else ++ gl_cv_header_langinfo_yesexpr=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_langinfo_yesexpr" >&5 ++$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } ++ if test $gl_cv_header_langinfo_yesexpr = yes; then ++ HAVE_LANGINFO_YESEXPR=1 ++ fi ++ else ++ HAVE_LANGINFO_H=0 ++ fi + + + +@@ -35845,101 +19244,65 @@ + + + +-for ac_func in mempcpy +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ for gl_func in nl_langinfo; do ++ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 ++$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++#include + + int + main () + { +-return $ac_func (); ++#undef $gl_func ++ (void) $gl_func; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ eval "$as_gl_Symbol=no" + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done ++ ++ ++ # Code from module lchown: ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ for ac_func in lchown ++do : ++ ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown" ++if test "x$ac_cv_func_lchown" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LCHOWN 1 + _ACEOF + + else +@@ -35950,40 +19313,41 @@ + done + + +- if test $ac_cv_func_mempcpy = no; then +- HAVE_MEMPCPY=0 ++ if test $ac_cv_func_lchown = no; then ++ HAVE_LCHOWN=0 ++ elif test "$gl_cv_func_chown_slash_works" != yes \ ++ || test "$gl_cv_func_chown_ctime_works" != yes; then + +- : + +- fi + + + + +- GNULIB_MEMPCPY=1 + + ++ gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext" + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MEMPCPY 1 +-_ACEOF ++ REPLACE_LCHOWN=1 ++ fi + + + +- # Code from module memrchr: + ++ GNULIB_LCHOWN=1 + + + ++$as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h + + + ++ # Code from module link: + +- if test $ac_cv_have_decl_memrchr = no; then +- HAVE_DECL_MEMRCHR=0 +- fi + + ++ if test $ac_cv_func_link = no; then ++ HAVE_LINK=0 ++ + + + +@@ -35991,130 +19355,214 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" + +-for ac_func in memrchr +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5 ++$as_echo_n "checking whether link handles trailing slash correctly... " >&6; } ++if ${gl_cv_func_link_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ 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.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_link_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++#include + +-#ifdef __STDC__ +-# include +-#else +-# include ++int ++main () ++{ ++int result = 0; ++ if (!link ("conftest.a", "conftest.b/")) ++ result |= 1; ++#if HAVE_LSTAT ++ if (!link ("conftest.lnk/", "conftest.b")) ++ result |= 2; + #endif ++ return result; + +-#undef $ac_func ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_link_works=yes ++else ++ gl_cv_func_link_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 + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++ rm -f conftest.a conftest.b conftest.lnk ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5 ++$as_echo "$gl_cv_func_link_works" >&6; } ++ if test "$gl_cv_func_link_works" != yes; then ++ REPLACE_LINK=1 ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext" ++ ++ fi ++ fi ++ ++ ++ ++ ++ GNULIB_LINK=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h ++ ++ ++ ++ # Code from module link-follow: + ++ gl_link_follows_symlinks=0 # assume GNU behavior ++ if test $ac_cv_func_readlink = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5 ++$as_echo_n "checking for __xpg4... " >&6; } ++if ${gl_cv_have___xpg4+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++extern int __xpg4; + int + main () + { +-return $ac_func (); ++return __xpg4; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_link "$LINENO"; then : ++ gl_cv_have___xpg4=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_cv_have___xpg4=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_have___xpg4" >&5 ++$as_echo "$gl_cv_have___xpg4" >&6; } ++ if test $gl_cv_have___xpg4 = yes; then ++ gl_link_follows_symlinks=-1 ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5 ++$as_echo_n "checking whether link(2) dereferences a symlink... " >&6; } ++if ${gl_cv_func_link_follows_symlink+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ # Create a regular file. ++ echo > conftest.file ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_link_follows_symlink=unknown ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++# include ++# include ++# include ++# include ++ ++# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ++ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ ++ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) ++ ++ int ++ main () ++ { ++ const char *file = "conftest.file"; ++ const char *sym = "conftest.sym"; ++ const char *hard = "conftest.hard"; ++ struct stat sb_file, sb_hard; ++ ++ /* Create a symlink to the regular file. */ ++ if (symlink (file, sym)) ++ return 2; ++ ++ /* Create a hard link to that symlink. */ ++ if (link (sym, hard)) ++ return 3; ++ ++ if (lstat (hard, &sb_hard)) ++ return 4; ++ if (lstat (file, &sb_file)) ++ return 5; ++ ++ /* If the dev/inode of hard and file are the same, then ++ the link call followed the symlink. */ ++ return SAME_INODE (sb_hard, sb_file) ? 1 : 0; ++ } ++ ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_link_follows_symlink=no ++else ++ gl_cv_func_link_follows_symlink=yes ++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 conftest.sym conftest.hard ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5 ++$as_echo "$gl_cv_func_link_follows_symlink" >&6; } ++ case $gl_cv_func_link_follows_symlink in ++ yes) gl_link_follows_symlinks=1 ;; ++ no) ;; # already defaulted to 0 ++ *) gl_link_follows_symlinks=-2 ;; ++ esac ++ fi ++ fi ++ ++cat >>confdefs.h <<_ACEOF ++#define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks ++_ACEOF ++ + +- eval "$as_ac_var=no" +-fi ++ # Code from module linkat: + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF + +-else + +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +-fi +-done + + +- if test $ac_cv_func_memrchr = no; then +- : +- fi ++ ++ ++ if test $ac_cv_func_linkat = no; then ++ HAVE_LINKAT=0 + + + + +- GNULIB_MEMRCHR=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MEMRCHR 1 +-_ACEOF + ++ gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" + + +- # Code from module mkdir: + + + +@@ -36122,160 +19570,119 @@ + + + +- { $as_echo "$as_me:$LINENO: checking whether mkdir handles trailing slash" >&5 +-$as_echo_n "checking whether mkdir handles trailing slash... " >&6; } +-if test "${gl_cv_func_mkdir_trailing_slash_works+set}" = set; then ++ gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5 ++$as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; } ++if ${gl_cv_func_linkat_follow+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftest.dir +- if test "$cross_compiling" = yes; then +- gl_cv_func_mkdir_trailing_slash_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ rm -rf conftest.f1 conftest.f2 ++ touch conftest.f1 ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-# include +-# include ++#include ++#include ++#ifdef __linux__ ++/* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW ++ until 2.6.18. Always replace linkat to support older kernels. */ ++choke me ++#endif + + int + main () + { +-return mkdir ("conftest.dir/", 0700); ++return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2", ++ AT_SYMLINK_FOLLOW); + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mkdir_trailing_slash_works=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_linkat_follow=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mkdir_trailing_slash_works=no ++ gl_cv_func_linkat_follow="need runtime check" + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- rm -rf conftest.dir +- +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ rm -rf conftest.f1 conftest.f2 + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 +-$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } +- if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then +- REPLACE_MKDIR=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" +- +- fi +- +- { $as_echo "$as_me:$LINENO: checking whether mkdir handles trailing dot" >&5 +-$as_echo_n "checking whether mkdir handles trailing dot... " >&6; } +-if test "${gl_cv_func_mkdir_trailing_dot_works+set}" = set; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5 ++$as_echo "$gl_cv_func_linkat_follow" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5 ++$as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; } ++if ${gl_cv_func_linkat_slash+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftest.dir +- if test "$cross_compiling" = yes; then +- gl_cv_func_mkdir_trailing_dot_works="guessing no" ++ rm -rf conftest.a conftest.b conftest.c conftest.d ++ if test "$cross_compiling" = yes; then : ++ # Guess yes on glibc systems, no otherwise. ++ case "$host_os" in ++ *-gnu*) gl_cv_func_linkat_slash="guessing yes";; ++ *) gl_cv_func_linkat_slash="guessing no";; ++ esac ++ + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-# include +-# include ++#include ++ #include ++ #include ++ #include + + int + main () + { +-return !mkdir ("conftest.dir/./", 0700); ++int result; ++ int fd; ++ /* Create a regular file. */ ++ fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600); ++ if (fd < 0) ++ return 1; ++ if (write (fd, "hello", 5) < 5) ++ return 2; ++ if (close (fd) < 0) ++ return 3; ++ /* Test whether hard links are supported on the current ++ device. */ ++ if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b", ++ AT_SYMLINK_FOLLOW) < 0) ++ return 0; ++ result = 0; ++ /* Test whether a trailing "/" is treated like "/.". */ ++ if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c", ++ AT_SYMLINK_FOLLOW) == 0) ++ result |= 4; ++ if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/", ++ AT_SYMLINK_FOLLOW) == 0) ++ result |= 8; ++ return result; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mkdir_trailing_dot_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_linkat_slash=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mkdir_trailing_dot_works=no ++ gl_cv_func_linkat_slash=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- +- rm -rf conftest.dir +- +- ++ rm -rf conftest.a conftest.b conftest.c conftest.d + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 +-$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } +- if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then +- REPLACE_MKDIR=1 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5 ++$as_echo "$gl_cv_func_linkat_slash" >&6; } ++ case "$gl_cv_func_linkat_slash" in ++ *yes) gl_linkat_slash_bug=0 ;; ++ *) gl_linkat_slash_bug=1 ;; ++ esac ++ if test "$gl_cv_func_linkat_follow" != yes \ ++ || test $gl_linkat_slash_bug = 1; then ++ REPLACE_LINKAT=1 + + + +@@ -36284,354 +19691,286 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext" + + +-cat >>confdefs.h <<\_ACEOF +-#define FUNC_MKDIR_DOT_BUG 1 ++cat >>confdefs.h <<_ACEOF ++#define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug + _ACEOF + ++ fi + fi + +- # Code from module mkdtemp: + + + ++ GNULIB_LINKAT=1 + + + ++$as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h + + + ++ # Code from module localcharset: + + +-for ac_func in mkdtemp +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + ++ ++ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" ++ ++ # Code from module lseek: ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5 ++$as_echo_n "checking whether lseek detects pipes... " >&6; } ++if ${gl_cv_func_lseek_pipe+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test $cross_compiling = no; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include /* for off_t */ ++#include /* for SEEK_CUR */ ++#include + int + main () + { +-return $ac_func (); ++ ++ /* Exit with success only if stdin is seekable. */ ++ return lseek (0, (off_t)0, SEEK_CUR) < 0; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_link "$LINENO"; then : ++ if test -s conftest$ac_exeext \ ++ && ./conftest$ac_exeext < conftest.$ac_ext \ ++ && test 1 = "`echo hi \ ++ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then ++ gl_cv_func_lseek_pipe=yes ++ else ++ gl_cv_func_lseek_pipe=no ++ fi + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ gl_cv_func_lseek_pipe=no + fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__ ++/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */ ++ Choke me. ++#endif + _ACEOF +- ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_lseek_pipe=yes + else ++ gl_cv_func_lseek_pipe=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5 ++$as_echo "$gl_cv_func_lseek_pipe" >&6; } ++ if test $gl_cv_func_lseek_pipe = no; then + +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +-fi +-done + + +- if test $ac_cv_func_mkdtemp = no; then +- HAVE_MKDTEMP=0 +- : + +- fi + + + + +- GNULIB_MKDTEMP=1 ++ gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext" + + ++ REPLACE_LSEEK=1 + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKDTEMP 1 +-_ACEOF ++$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h + + ++ fi + +- # Code from module mkfifo: + + + ++ GNULIB_LSEEK=1 + + + ++$as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h + + +- if test $ac_cv_func_mkfifo = no; then +- HAVE_MKFIFO=0 ++ ++ # Code from module lstat: + + + ++ if test $ac_cv_func_lstat = yes; then ++ ++ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then ++ REPLACE_LSTAT=1 ++ fi ++ # Prerequisites of lib/lstat.c. + ++ else ++ HAVE_LSTAT=0 ++ fi + + + + +- gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" ++ GNULIB_LSTAT=1 + +- else + + ++$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h + + + ++ # Code from module malloc-gnu: + +- { $as_echo "$as_me:$LINENO: checking whether mkfifo rejects trailing slashes" >&5 +-$as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; } +-if test "${gl_cv_func_mkfifo_works+set}" = set; then ++ ++ for ac_header in stdlib.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdlib_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STDLIB_H 1 ++_ACEOF ++ ++fi ++ ++done ++ ++{ $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 +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- ln -s conftest.tmp conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_mkfifo_works="guessing no" ++ if test "$cross_compiling" = yes; then : ++ ac_cv_func_malloc_0_nonnull=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#if defined STDC_HEADERS || defined HAVE_STDLIB_H ++# include ++#else ++char *malloc (); ++#endif + + int + main () + { +-int result = 0; +- if (!mkfifo ("conftest.tmp/", 0600)) +- result |= 1; +-#if HAVE_LSTAT +- if (!mkfifo ("conftest.lnk/", 0600)) +- result |= 2; +-#endif +- return result; +- ++return ! malloc (0); + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mkfifo_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_malloc_0_nonnull=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mkfifo_works=no ++ ac_cv_func_malloc_0_nonnull=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- +- rm -f conftest.tmp conftest.lnk + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mkfifo_works" >&5 +-$as_echo "$gl_cv_func_mkfifo_works" >&6; } +- if test "$gl_cv_func_mkfifo_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define MKFIFO_TRAILING_SLASH_BUG 1 +-_ACEOF +- +- REPLACE_MKFIFO=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" +- +- 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; } ++if test $ac_cv_func_malloc_0_nonnull = yes; then : + ++$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h + ++else ++ $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h + +- GNULIB_MKFIFO=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKFIFO 1 +-_ACEOF + + + +- # Code from module mkfifoat: + + + ++ gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + ++ REPLACE_MALLOC=1 + + ++fi + + + + ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_MALLOC_GNU 1 ++_ACEOF + + +- if test $ac_cv_func_mkfifoat = no; then +- # No known system has mkfifoat but not mknodat +- HAVE_MKFIFOAT=0 +- HAVE_MKNODAT=0 ++ # Code from module malloc-posix: + + + ++ if test $gl_cv_func_malloc_posix = yes; then + ++$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h + ++ else + + + +- gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext" + + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" + ++ REPLACE_MALLOC=1 + ++ fi + +- gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext" + +- fi + + ++ GNULIB_MALLOC_POSIX=1 + + +- GNULIB_MKFIFOAT=1 + ++$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKFIFOAT 1 +-_ACEOF + ++ # Code from module malloca: + + + + ++ # Code from module mbchar: + +- GNULIB_MKNODAT=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKNODAT 1 +-_ACEOF ++ # Code from module mbrtowc: + + + +- # Code from module mknod: + + + +@@ -36639,402 +19978,543 @@ + + + ++ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + + +- if test $ac_cv_func_mknod = no; then +- HAVE_MKNOD=0 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 ++$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } ++if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ case "$host_os" in ++ # Guess no on AIX and OSF/1. ++ aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; ++ esac ++ if test $LOCALE_JA != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) ++ { ++ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) ++ if (mbsinit (&state)) ++ return 1; ++ } ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_incomplete_state=yes ++else ++ gl_cv_func_mbrtowc_incomplete_state=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 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 ++$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + + + +- gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" + +- else +- { $as_echo "$as_me:$LINENO: checking whether mknod can create fifo without root privileges" >&5 +-$as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; } +-if test "${gl_cv_func_mknod_works+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 ++$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } ++if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- gl_cv_func_mknod_works="guessing no" ++ ++ case "$host_os" in ++ # Guess no on Solaris 8. ++ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; ++ esac ++ if test $LOCALE_ZH_CN != none; then ++ if test "$cross_compiling" = yes; then : ++ : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include + +-int +-main () ++#include ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () + { +-/* Indeterminate for super-user, assume no. Why are you running +- configure as root, anyway? */ +- if (!geteuid ()) return 99; +- if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2; +- ; ++ /* This fails on Solaris 8: ++ mbrtowc returns 2, and sets wc to 0x00F0. ++ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ ++ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) ++ { ++ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 6, &state) != 4 ++ && mbtowc (&wc, input + 3, 6) == 4) ++ return 1; ++ } + return 0; + } +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_mknod_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then +- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ { $as_echo "$as_me:$LINENO: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) +-See \`config.log' for more details." >&5 +-$as_echo "$as_me: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) +-See \`config.log' for more details." >&2;} +- { (exit 1); exit 1; }; }; } +- fi +- gl_cv_func_mknod_works=no ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_sanitycheck=yes ++else ++ gl_cv_func_mbrtowc_sanitycheck=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + ++ fi + +- rm -f conftest.fifo + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mknod_works" >&5 +-$as_echo "$gl_cv_func_mknod_works" >&6; } +- if test "$gl_cv_func_mknod_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define MKNOD_FIFO_BUG 1 +-_ACEOF +- +- fi +- if test $REPLACE_MKFIFO = 1 || test "$gl_cv_func_mknod_works" != yes; then +- REPLACE_MKNOD=1 +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 ++$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + ++ REPLACE_MBSTATE_T=0 ++ case "$gl_cv_func_mbrtowc_incomplete_state" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ case "$gl_cv_func_mbrtowc_sanitycheck" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ else ++ REPLACE_MBSTATE_T=1 ++ fi ++ if test $REPLACE_MBSTATE_T = 1; then + ++ : + ++ fi + + + +- gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" ++ if test $ac_cv_func_mbrtowc = no; then ++ HAVE_MBRTOWC=0 ++ else ++ if test $REPLACE_MBSTATE_T = 1; then ++ REPLACE_MBRTOWC=1 ++ else + +- fi +- fi + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 ++$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } ++if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ case "$host_os" in ++ # Guess no on Solaris. ++ solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; ++ esac ++ if test $LOCALE_FR_UTF8 != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- GNULIB_MKNOD=1 ++#include ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ int result = 0; + ++ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) ++ { ++ char input[] = "\303\237er"; ++ mbstate_t state; ++ wchar_t wc; ++ size_t ret; + ++ memset (&state, '\0', sizeof (mbstate_t)); ++ wc = (wchar_t) 0xBADFACE; ++ ret = mbrtowc (&wc, input, 5, &state); ++ if (ret != 2) ++ result |= 1; ++ if (!mbsinit (&state)) ++ result |= 2; + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKNOD 1 ++ memset (&state, '\0', sizeof (mbstate_t)); ++ ret = mbrtowc (NULL, input, 5, &state); ++ if (ret != 2) /* Solaris 7 fails here: ret is -1. */ ++ result |= 4; ++ if (!mbsinit (&state)) ++ result |= 8; ++ } ++ return result; ++} + _ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_null_arg1=yes ++else ++ gl_cv_func_mbrtowc_null_arg1=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 + +- +- # Code from module mktime: ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 ++$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } + + + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 ++$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } ++if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ case "$host_os" in ++ # Guess no on OSF/1. ++ osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; ++ esac ++ if test $LOCALE_FR_UTF8 != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) ++ { ++ mbstate_t state; ++ wchar_t wc; ++ int ret; + ++ memset (&state, '\0', sizeof (mbstate_t)); ++ wc = (wchar_t) 0xBADFACE; ++ mbrtowc (&wc, NULL, 5, &state); ++ /* Check that wc was not modified. */ ++ if (wc != (wchar_t) 0xBADFACE) ++ return 1; ++ } ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_null_arg2=yes ++else ++ gl_cv_func_mbrtowc_null_arg2=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 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 ++$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } + + + + + + +-if test $APPLE_UNIVERSAL_BUILD = 1; then +- # A universal build on Apple MacOS X platforms. +- # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. +- # But we need a configuration result that is valid in both modes. +- ac_cv_func_working_mktime=no +-fi +-{ $as_echo "$as_me:$LINENO: checking for working mktime" >&5 +-$as_echo_n "checking for working mktime... " >&6; } +-if test "${ac_cv_func_working_mktime+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 ++$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } ++if ${gl_cv_func_mbrtowc_retval+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- ac_cv_func_working_mktime=no ++ ++ case "$host_os" in ++ # Guess no on HP-UX, Solaris, native Windows. ++ hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_retval="guessing yes" ;; ++ esac ++ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ ++ || { case "$host_os" in mingw*) true;; *) false;; esac; }; then ++ if test "$cross_compiling" = yes; then : ++ : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Test program from Paul Eggert and Tony Leneis. */ +-#include +-#include +-#include +- +-#ifdef HAVE_UNISTD_H +-# include +-#endif +- +-#ifndef HAVE_ALARM +-# define alarm(X) /* empty */ +-#endif +- +-/* Work around redefinition to rpl_putenv by other config tests. */ +-#undef putenv +- +-static time_t time_t_max; +-static time_t time_t_min; +- +-/* Values we'll use to set the TZ environment variable. */ +-static char *tz_strings[] = { +- (char *) 0, "TZ=GMT0", "TZ=JST-9", +- "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" +-}; +-#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +-/* Return 0 if mktime fails to convert a date in the spring-forward gap. +- Based on a problem report from Andreas Jaeger. */ +-static int +-spring_forward_gap () ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () + { +- /* glibc (up to about 1998-10-07) failed this test. */ +- struct tm tm; +- +- /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" +- instead of "TZ=America/Vancouver" in order to detect the bug even +- on systems that don't support the Olson extension, or don't have the +- full zoneinfo tables installed. */ +- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); +- +- tm.tm_year = 98; +- tm.tm_mon = 3; +- tm.tm_mday = 5; +- tm.tm_hour = 2; +- tm.tm_min = 0; +- tm.tm_sec = 0; +- tm.tm_isdst = -1; +- return mktime (&tm) != (time_t) -1; +-} ++ int result = 0; ++ int found_some_locale = 0; ++ /* This fails on Solaris. */ ++ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) ++ { ++ char input[] = "B\303\274\303\237er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + +-static int +-mktime_test1 (time_t now) +-{ +- struct tm *lt; +- return ! (lt = localtime (&now)) || mktime (lt) == now; +-} ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) ++ { ++ input[1] = '\0'; ++ if (mbrtowc (&wc, input + 2, 5, &state) != 1) ++ result |= 1; ++ } ++ found_some_locale = 1; ++ } ++ /* This fails on HP-UX 11.11. */ ++ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) ++ { ++ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + +-static int +-mktime_test (time_t now) +-{ +- return (mktime_test1 (now) +- && mktime_test1 ((time_t) (time_t_max - now)) +- && mktime_test1 ((time_t) (time_t_min + now))); +-} ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) ++ { ++ input[1] = '\0'; ++ if (mbrtowc (&wc, input + 2, 5, &state) != 2) ++ result |= 2; ++ } ++ found_some_locale = 1; ++ } ++ /* This fails on native Windows. */ ++ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) ++ { ++ char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ ++ mbstate_t state; ++ wchar_t wc; + +-static int +-irix_6_4_bug () +-{ +- /* Based on code from Ariel Faigon. */ +- struct tm tm; +- tm.tm_year = 96; +- tm.tm_mon = 3; +- tm.tm_mday = 0; +- tm.tm_hour = 0; +- tm.tm_min = 0; +- tm.tm_sec = 0; +- tm.tm_isdst = -1; +- mktime (&tm); +- return tm.tm_mon == 2 && tm.tm_mday == 31; +-} ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) ++ { ++ input[3] = '\0'; ++ if (mbrtowc (&wc, input + 4, 4, &state) != 1) ++ result |= 4; ++ } ++ found_some_locale = 1; ++ } ++ if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) ++ { ++ char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ ++ mbstate_t state; ++ wchar_t wc; + +-static int +-bigtime_test (int j) +-{ +- struct tm tm; +- time_t now; +- tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; +- now = mktime (&tm); +- if (now != (time_t) -1) ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) ++ { ++ input[3] = '\0'; ++ if (mbrtowc (&wc, input + 4, 4, &state) != 1) ++ result |= 8; ++ } ++ found_some_locale = 1; ++ } ++ if (setlocale (LC_ALL, "Chinese_China.936") != NULL) + { +- struct tm *lt = localtime (&now); +- if (! (lt +- && lt->tm_year == tm.tm_year +- && lt->tm_mon == tm.tm_mon +- && lt->tm_mday == tm.tm_mday +- && lt->tm_hour == tm.tm_hour +- && lt->tm_min == tm.tm_min +- && lt->tm_sec == tm.tm_sec +- && lt->tm_yday == tm.tm_yday +- && lt->tm_wday == tm.tm_wday +- && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) +- == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) +- return 0; ++ char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ ++ mbstate_t state; ++ wchar_t wc; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) ++ { ++ input[3] = '\0'; ++ if (mbrtowc (&wc, input + 4, 4, &state) != 1) ++ result |= 16; ++ } ++ found_some_locale = 1; + } +- return 1; ++ return (found_some_locale ? result : 77); + } ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_retval=yes ++else ++ if test $? != 77; then ++ gl_cv_func_mbrtowc_retval=no ++ fi + +-static int +-year_2050_test () +-{ +- /* The correct answer for 2050-02-01 00:00:00 in Pacific time, +- ignoring leap seconds. */ +- unsigned long int answer = 2527315200UL; ++fi ++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ ++ conftest.$ac_objext conftest.beam conftest.$ac_ext ++fi + +- struct tm tm; +- time_t t; +- tm.tm_year = 2050 - 1900; +- tm.tm_mon = 2 - 1; +- tm.tm_mday = 1; +- tm.tm_hour = tm.tm_min = tm.tm_sec = 0; +- tm.tm_isdst = -1; ++ fi + +- /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" +- instead of "TZ=America/Vancouver" in order to detect the bug even +- on systems that don't support the Olson extension, or don't have the +- full zoneinfo tables installed. */ +- putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 ++$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } + +- t = mktime (&tm); + +- /* Check that the result is either a failure, or close enough +- to the correct answer that we can assume the discrepancy is +- due to leap seconds. */ +- return (t == (time_t) -1 +- || (0 < t && answer - 120 <= t && t <= answer + 120)); +-} + +-int +-main () +-{ +- int result = 0; +- time_t t, delta; +- int i, j; +- int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; +- int time_t_signed = ! ((time_t) 0 < (time_t) -1); + +- /* This test makes some buggy mktime implementations loop. +- Give up after 60 seconds; a mktime slower than that +- isn't worth using anyway. */ +- alarm (60); ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 ++$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } ++if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + +- time_t_max = (! time_t_signed +- ? (time_t) -1 +- : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) +- * 2 + 1)); +- time_t_min = (! time_t_signed +- ? (time_t) 0 +- : time_t_signed_magnitude +- ? ~ (time_t) 0 +- : ~ time_t_max); ++ case "$host_os" in ++ # Guess no on Solaris 8 and 9. ++ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; ++ esac ++ if test $LOCALE_ZH_CN != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + +- delta = time_t_max / 997; /* a suitable prime number */ +- for (i = 0; i < N_STRINGS; i++) ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ /* This fails on Solaris 8 and 9. */ ++ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) + { +- if (tz_strings[i]) +- putenv (tz_strings[i]); +- +- for (t = 0; t <= time_t_max - delta; t += delta) +- if (! mktime_test (t)) +- result |= 1; +- if (! (mktime_test ((time_t) 1) +- && mktime_test ((time_t) (60 * 60)) +- && mktime_test ((time_t) (60 * 60 * 24)))) +- result |= 2; ++ mbstate_t state; ++ wchar_t wc; + +- for (j = 1; ; j <<= 1) +- if (! bigtime_test (j)) +- result |= 4; +- else if (INT_MAX / 2 < j) +- break; +- if (! bigtime_test (INT_MAX)) +- result |= 8; ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, "", 1, &state) != 0) ++ return 1; + } +- if (! irix_6_4_bug ()) +- result |= 16; +- if (! spring_forward_gap ()) +- result |= 32; +- if (! year_2050_test ()) +- result |= 64; +- return result; ++ return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- ac_cv_func_working_mktime=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_nul_retval=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_cv_func_mbrtowc_nul_retval=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 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 ++$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } ++ ++ case "$gl_cv_func_mbrtowc_null_arg1" in ++ *yes) ;; ++ *) ++$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h ++ ++ REPLACE_MBRTOWC=1 ++ ;; ++ esac ++ case "$gl_cv_func_mbrtowc_null_arg2" in ++ *yes) ;; ++ *) ++$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h ++ ++ REPLACE_MBRTOWC=1 ++ ;; ++ esac ++ case "$gl_cv_func_mbrtowc_retval" in ++ *yes) ;; ++ *) ++$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h ++ ++ REPLACE_MBRTOWC=1 ++ ;; ++ esac ++ case "$gl_cv_func_mbrtowc_nul_retval" in ++ *yes) ;; ++ *) ++$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + +-( exit $ac_status ) +-ac_cv_func_working_mktime=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++ REPLACE_MBRTOWC=1 ++ ;; ++ esac ++ fi ++ fi ++ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then + ++ : + +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5 +-$as_echo "$ac_cv_func_working_mktime" >&6; } +-if test $ac_cv_func_working_mktime = no; then + + + +@@ -37043,163 +20523,213 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" ++ gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" + +-fi + +- if test $ac_cv_func_working_mktime = no; then +- REPLACE_MKTIME=1 ++ : + ++ fi + + +- else +- REPLACE_MKTIME=0 +- fi + + ++ GNULIB_MBRTOWC=1 + + +- GNULIB_MKTIME=1 + ++$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_MKTIME 1 +-_ACEOF + ++ # Code from module mbscasecmp: + + +- # Code from module modechange: + ++ GNULIB_MBSCASECMP=1 + + + ++$as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h + + + ++ # Code from module mbsinit: + + +- gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext" + + +- # Code from module multiarch: + +- # Code from module nl_langinfo: + + + + + + ++ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + + +- if test $ac_cv_func_nl_langinfo = yes; then +- # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. +- { $as_echo "$as_me:$LINENO: checking whether YESEXPR works" >&5 +-$as_echo_n "checking whether YESEXPR works... " >&6; } +-if test "${gl_cv_func_nl_langinfo_yesexpr_works+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 ++$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } ++if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- +- case "$host_os" in +- # Guess no on irix systems. +- irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; +- # Guess yes elsewhere. +- *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; +- esac + ++ case "$host_os" in ++ # Guess no on AIX and OSF/1. ++ aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; ++ esac ++ if test $LOCALE_JA != none; then ++ if test "$cross_compiling" = yes; then : ++ : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + +-int +-main () ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () + { +-return !*nl_langinfo(YESEXPR); ++ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) ++ { ++ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + +- ; ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) ++ if (mbsinit (&state)) ++ return 1; ++ } + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_nl_langinfo_yesexpr_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_incomplete_state=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_nl_langinfo_yesexpr_works=no ++ gl_cv_func_mbrtowc_incomplete_state=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- ++ fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 +-$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } +- case $gl_cv_func_nl_langinfo_yesexpr_works in +- *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; +- *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; +- esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 ++$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + +-cat >>confdefs.h <<_ACEOF +-#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS +-_ACEOF + +- if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ +- && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then +- : +- else +- REPLACE_NL_LANGINFO=1 + +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_NL_LANGINFO 1 +-_ACEOF + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 ++$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } ++if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ case "$host_os" in ++ # Guess no on Solaris 8. ++ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; ++ esac ++ if test $LOCALE_ZH_CN != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++#include ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ /* This fails on Solaris 8: ++ mbrtowc returns 2, and sets wc to 0x00F0. ++ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ ++ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) ++ { ++ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 6, &state) != 4 ++ && mbtowc (&wc, input + 3, 6) == 4) ++ return 1; ++ } ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_sanitycheck=yes ++else ++ gl_cv_func_mbrtowc_sanitycheck=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 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 ++$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + ++ REPLACE_MBSTATE_T=0 ++ case "$gl_cv_func_mbrtowc_incomplete_state" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ case "$gl_cv_func_mbrtowc_sanitycheck" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ else ++ REPLACE_MBSTATE_T=1 ++ fi ++ if test $REPLACE_MBSTATE_T = 1; then + ++ : + ++ fi + + +- gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + +- fi ++ if test $ac_cv_func_mbsinit = no; then ++ HAVE_MBSINIT=0 + else +- HAVE_NL_LANGINFO=0 ++ if test $REPLACE_MBSTATE_T = 1; then ++ REPLACE_MBSINIT=1 ++ else ++ case "$host_os" in ++ mingw*) REPLACE_MBSINIT=1 ;; ++ esac ++ fi ++ fi ++ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then ++ ++ : + + + +@@ -37208,24 +20738,26 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" ++ ++ gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" ++ ++ ++ : + + fi + + + + +- GNULIB_NL_LANGINFO=1 ++ GNULIB_MBSINIT=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_NL_LANGINFO 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h + + + +- # Code from module obstack: ++ # Code from module mbsrtowcs: + + + +@@ -37236,277 +20768,330 @@ + + + ++ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + +-{ $as_echo "$as_me:$LINENO: checking for obstacks" >&5 +-$as_echo_n "checking for obstacks... " >&6; } +-if test "${ac_cv_func_obstack+set}" = set; then ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 ++$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } ++if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ case "$host_os" in ++ # Guess no on AIX and OSF/1. ++ aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; ++ esac ++ if test $LOCALE_JA != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +- #include "obstack.h" +-int +-main () ++ ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () + { +-struct obstack mem; +- #define obstack_chunk_alloc malloc +- #define obstack_chunk_free free +- obstack_init (&mem); +- obstack_free (&mem, 0); +- ; ++ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) ++ { ++ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) ++ if (mbsinit (&state)) ++ return 1; ++ } + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_func_obstack=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_incomplete_state=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_obstack=no ++ gl_cv_func_mbrtowc_incomplete_state=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- 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:$LINENO: result: $ac_cv_func_obstack" >&5 +-$as_echo "$ac_cv_func_obstack" >&6; } +-if test $ac_cv_func_obstack = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_OBSTACK 1 +-_ACEOF +- +-else +- +- + +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" ++ fi + + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 ++$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + +- # Code from module open: +- +- +- case "$host_os" in +- mingw* | pw*) +- +- +- REPLACE_OPEN=1 + + + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 ++$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } ++if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ case "$host_os" in ++ # Guess no on Solaris 8. ++ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; ++ esac ++ if test $LOCALE_ZH_CN != none; then ++ if test "$cross_compiling" = yes; then : ++ : ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include ++int main () ++{ ++ /* This fails on Solaris 8: ++ mbrtowc returns 2, and sets wc to 0x00F0. ++ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ ++ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) ++ { ++ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ ++ mbstate_t state; ++ wchar_t wc; + ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (&wc, input + 3, 6, &state) != 4 ++ && mbtowc (&wc, input + 3, 6) == 4) ++ return 1; ++ } ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbrtowc_sanitycheck=yes ++else ++ gl_cv_func_mbrtowc_sanitycheck=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 + +- gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 ++$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + ++ REPLACE_MBSTATE_T=0 ++ case "$gl_cv_func_mbrtowc_incomplete_state" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ case "$gl_cv_func_mbrtowc_sanitycheck" in ++ *yes) ;; ++ *) REPLACE_MBSTATE_T=1 ;; ++ esac ++ else ++ REPLACE_MBSTATE_T=1 ++ fi ++ if test $REPLACE_MBSTATE_T = 1; then + ++ : + ++ fi + +- : + + +- ;; +- *) ++ if test $ac_cv_func_mbsrtowcs = no; then ++ HAVE_MBSRTOWCS=0 ++ else ++ if test $REPLACE_MBSTATE_T = 1; then ++ REPLACE_MBSRTOWCS=1 ++ else + + + + + + +- { $as_echo "$as_me:$LINENO: checking whether open recognizes a trailing slash" >&5 +-$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } +-if test "${gl_cv_func_open_slash+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 ++$as_echo_n "checking whether mbsrtowcs works... " >&6; } ++if ${gl_cv_func_mbsrtowcs_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- touch conftest.tmp +- ln -s conftest.tmp conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- +- case "$host_os" in +- freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) +- gl_cv_func_open_slash="guessing no" ;; +- *) +- gl_cv_func_open_slash="guessing yes" ;; +- esac + ++ case "$host_os" in ++ # Guess no on HP-UX, Solaris, mingw. ++ hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; ++ # Guess yes otherwise. ++ *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; ++ esac ++ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then ++ if test "$cross_compiling" = yes; then : ++ : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#if HAVE_UNISTD_H +-# include +-#endif ++#include ++#include ++/* Tru64 with Desktop Toolkit C has a bug: must be included before ++ . ++ BSD/OS 4.0.1 has a bug: , and must be ++ included before . */ ++#include ++#include ++#include ++#include + int main () + { + int result = 0; +-#if HAVE_LSTAT +- if (open ("conftest.lnk/", O_RDONLY) != -1) +- result |= 1; +-#endif +- if (open ("conftest.sl/", O_CREAT, 0600) >= 0) +- result |= 2; ++ /* Test whether the function supports a NULL destination argument. ++ This fails on native Windows. */ ++ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) ++ { ++ const char input[] = "\337er"; ++ const char *src = input; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbsrtowcs (NULL, &src, 1, &state) != 3 ++ || src != input) ++ result |= 1; ++ } ++ /* Test whether the function works when started with a conversion state ++ in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ ++ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) ++ { ++ const char input[] = "B\303\274\303\237er"; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) ++ if (!mbsinit (&state)) ++ { ++ const char *src = input + 2; ++ if (mbsrtowcs (NULL, &src, 10, &state) != 4) ++ result |= 2; ++ } ++ } ++ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) ++ { ++ const char input[] = "<\306\374\313\334\270\354>"; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) ++ if (!mbsinit (&state)) ++ { ++ const char *src = input + 4; ++ if (mbsrtowcs (NULL, &src, 10, &state) != 3) ++ result |= 4; ++ } ++ } ++ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) ++ { ++ const char input[] = "B\250\271\201\060\211\070er"; ++ mbstate_t state; ++ ++ memset (&state, '\0', sizeof (mbstate_t)); ++ if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) ++ if (!mbsinit (&state)) ++ { ++ const char *src = input + 2; ++ if (mbsrtowcs (NULL, &src, 10, &state) != 4) ++ result |= 8; ++ } ++ } + return result; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_open_slash=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mbsrtowcs_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_open_slash=no ++ gl_cv_func_mbsrtowcs_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- +- rm -f conftest.sl conftest.tmp conftest.lnk ++ fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_open_slash" >&5 +-$as_echo "$gl_cv_func_open_slash" >&6; } +- case "$gl_cv_func_open_slash" in +- *no) +- +-cat >>confdefs.h <<\_ACEOF +-#define OPEN_TRAILING_SLASH_BUG 1 +-_ACEOF +- +- +- +- REPLACE_OPEN=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 ++$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } + ++ case "$gl_cv_func_mbsrtowcs_works" in ++ *yes) ;; ++ *) REPLACE_MBSRTOWCS=1 ;; ++ esac ++ fi ++ fi ++ if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then + +- : ++ : + + +- ;; +- esac +- ;; +- esac + + + + +- GNULIB_OPEN=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_OPEN 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" + + + +- # Code from module openat: + + +- GNULIB_OPENAT=1 + + +- GNULIB_FCHMODAT=1 +- GNULIB_FSTATAT=1 +- GNULIB_MKDIRAT=1 + + +- GNULIB_FCHOWNAT=1 +- GNULIB_UNLINKAT=1 ++ gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" + + ++ : + ++ fi + + + + ++ GNULIB_MBSRTOWCS=1 + + +- gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + ++$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h + + + ++ # Code from module mbtowc: + + + ++ if false; then ++ REPLACE_MBTOWC=1 ++ fi ++ if test $REPLACE_MBTOWC = 1; then + + + +@@ -37515,33 +21100,44 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" + + ++ : + ++ fi + + + + ++ GNULIB_MBTOWC=1 + + + ++$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h + + + ++ # Code from module mbuiter: + + + ++ : + ++ # Code from module memchr: + + + + ++ GNULIB_MEMCHR=1 + + + ++$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h + + + ++ # Code from module mempcpy: + + + +@@ -37549,101 +21145,19 @@ + + + +-for ac_func in fchmodat fstatat mkdirat openat unlinkat +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in mempcpy ++do : ++ ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" ++if test "x$ac_cv_func_mempcpy" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_MEMPCPY 1 + _ACEOF + + else +@@ -37654,38 +21168,35 @@ + done + + ++ if test $ac_cv_func_mempcpy = no; then ++ HAVE_MEMPCPY=0 + ++ : + +- case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in +- yes+yes) +- # GNU/Hurd has unlinkat, but it has the same bug as unlink. +- if test $REPLACE_UNLINK = 1; then +- ++ fi + + + + ++ GNULIB_MEMPCPY=1 + + + +- gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" ++$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h + +- REPLACE_UNLINKAT=1 +- fi ;; +- yes+*) +- # Solaris 9 has *at functions, but uniformly mishandles trailing +- # slash in all of them. + + ++ # Code from module memrchr: + + + + + ++ if test $ac_cv_have_decl_memrchr = no; then ++ HAVE_DECL_MEMRCHR=0 ++ fi + +- gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" + +- REPLACE_OPENAT=1 + + + +@@ -37693,649 +21204,302 @@ + + + ++ for ac_func in memrchr ++do : ++ ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" ++if test "x$ac_cv_func_memrchr" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_MEMRCHR 1 ++_ACEOF + +- gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" ++else + +- REPLACE_FSTATAT=1 ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + ++fi ++done + + ++ if test $ac_cv_func_memrchr = no; then ++ : ++ fi + + + + ++ GNULIB_MEMRCHR=1 + +- gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + +- REPLACE_UNLINKAT=1 +- ;; +- *) +- HAVE_OPENAT=0 +- HAVE_UNLINKAT=0 # No known system with unlinkat but not openat +- HAVE_FSTATAT=0 # No known system with fstatat but not openat + ++$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h + + +- : +-;; +- esac +- if test $ac_cv_func_fchmodat != yes; then +- HAVE_FCHMODAT=0 +- fi +- if test $ac_cv_func_mkdirat != yes; then +- HAVE_MKDIRAT=0 +- fi + ++ # Code from module mkdir: + + +- { $as_echo "$as_me:$LINENO: checking for fchownat" >&5 +-$as_echo_n "checking for fchownat... " >&6; } +-if test "${ac_cv_func_fchownat+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 ++$as_echo_n "checking whether mkdir handles trailing slash... " >&6; } ++if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ rm -rf conftest.dir ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_mkdir_trailing_slash_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define fchownat to an innocuous variant, in case declares fchownat. +- For example, HP-UX 11i declares gettimeofday. */ +-#define fchownat innocuous_fchownat +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char fchownat (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef fchownat + +-/* 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 fchownat (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_fchownat || defined __stub___fchownat +-choke me +-#endif ++# include ++# include + + int + main () + { +-return fchownat (); ++return mkdir ("conftest.dir/", 0700); + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_func_fchownat=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mkdir_trailing_slash_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_func_fchownat=no ++ gl_cv_func_mkdir_trailing_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 -rf conftest.dir ++ + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fchownat" >&5 +-$as_echo "$ac_cv_func_fchownat" >&6; } +-if test "x$ac_cv_func_fchownat" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 ++$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } ++ if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then ++ REPLACE_MKDIR=1 + + + +- { $as_echo "$as_me:$LINENO: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 +-$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } +-if test "${gl_cv_func_fchownat_nofollow_works+set}" = set; then ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" ++ ++ fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 ++$as_echo_n "checking whether mkdir handles trailing dot... " >&6; } ++if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- gl_dangle=conftest.dangle +- # Remove any remnants of a previous test. +- rm -f $gl_dangle +- # Arrange for deletion of the temporary file this test creates. +- ac_clean_files="$ac_clean_files $gl_dangle" +- ln -s conftest.no-such $gl_dangle +- if test "$cross_compiling" = yes; then +- gl_cv_func_fchownat_nofollow_works=no ++ rm -rf conftest.dir ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_mkdir_trailing_dot_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-#include +-#include +-#include +-#include +-#include ++# include ++# include ++ + int + main () + { +- return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), +- AT_SYMLINK_NOFOLLOW) != 0 +- && errno == ENOENT); ++return !mkdir ("conftest.dir/./", 0700); ++ ; ++ return 0; + } +- + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fchownat_nofollow_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mkdir_trailing_dot_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_fchownat_nofollow_works=no ++ gl_cv_func_mkdir_trailing_dot_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + ++ rm -rf conftest.dir + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_nofollow_works" >&5 +-$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } +- if test $gl_cv_func_fchownat_nofollow_works = no; then +- REPLACE_FCHOWNAT=1 +- +-cat >>confdefs.h <<\_ACEOF +-#define FCHOWNAT_NOFOLLOW_BUG 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 ++$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } ++ if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then ++ REPLACE_MKDIR=1 + + +-fi + + + + + +- { $as_echo "$as_me:$LINENO: checking whether fchownat works with an empty file name" >&5 +-$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } +-if test "${gl_cv_func_fchownat_empty_filename_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_fchownat_empty_filename_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-int fd; +- int ret; +- if (mkdir ("conftestdir", 0700) < 0) +- return 2; +- fd = open ("conftestdir", O_RDONLY); +- if (fd < 0) +- return 3; +- ret = fchownat (fd, "", -1, -1, 0); +- close (fd); +- rmdir ("conftestdir"); +- return ret == 0; ++ gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_fchownat_empty_filename_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_fchownat_empty_filename_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h + ++ fi + ++ # Code from module mkdtemp: + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_fchownat_empty_filename_works" >&5 +-$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } +- if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then +- REPLACE_FCHOWNAT=1 + +-cat >>confdefs.h <<\_ACEOF +-#define FCHOWNAT_EMPTY_FILENAME_BUG 1 +-_ACEOF + + +-fi + + +- if test $REPLACE_CHOWN = 1; then +- REPLACE_FCHOWNAT=1 +- fi +-else +- HAVE_FCHOWNAT=0 +-fi + +- if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + + + ++ for ac_func in mkdtemp ++do : ++ ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" ++if test "x$ac_cv_func_mkdtemp" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_MKDTEMP 1 ++_ACEOF + ++else + ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + ++fi ++done + + +- gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" ++ if test $ac_cv_func_mkdtemp = no; then ++ HAVE_MKDTEMP=0 ++ : + + fi + + +- # Code from module openat-die: +- # Code from module parse-datetime: + + ++ GNULIB_MKDTEMP=1 + + + ++$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h + +- { $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5 +-$as_echo_n "checking for struct tm.tm_zone... " >&6; } +-if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include <$ac_cv_struct_tm> + + +-int +-main () +-{ +-static struct tm ac_aggr; +-if (ac_aggr.tm_zone) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_tm_tm_zone=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module mkfifo: + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include <$ac_cv_struct_tm> + + +-int +-main () +-{ +-static struct tm ac_aggr; +-if (sizeof ac_aggr.tm_zone) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_tm_tm_zone=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ if test $ac_cv_func_mkfifo = no; then ++ HAVE_MKFIFO=0 + +- ac_cv_member_struct_tm_tm_zone=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 +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5 +-$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; } +-if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_TM_TM_ZONE 1 +-_ACEOF + + +-fi + +-if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_TM_ZONE 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" + +-else +- { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5 +-$as_echo_n "checking whether tzname is declared... " >&6; } +-if test "${ac_cv_have_decl_tzname+set}" = set; then ++ else ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5 ++$as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; } ++if ${gl_cv_func_mkfifo_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ ln -s conftest.tmp conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_mkfifo_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + int + main () + { +-#ifndef tzname +- (void) tzname; ++int result = 0; ++ if (!mkfifo ("conftest.tmp/", 0600)) ++ result |= 1; ++#if HAVE_LSTAT ++ if (!mkfifo ("conftest.lnk/", 0600)) ++ result |= 2; + #endif ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_tzname=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mkfifo_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_tzname=no ++ gl_cv_func_mkfifo_works=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:$LINENO: result: $ac_cv_have_decl_tzname" >&5 +-$as_echo "$ac_cv_have_decl_tzname" >&6; } +-if test "x$ac_cv_have_decl_tzname" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_TZNAME 1 +-_ACEOF ++ rm -f conftest.tmp conftest.lnk ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5 ++$as_echo "$gl_cv_func_mkfifo_works" >&6; } ++ if test "$gl_cv_func_mkfifo_works" != yes; then + ++$as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_TZNAME 0 +-_ACEOF ++ REPLACE_MKFIFO=1 + + +-fi + + +- { $as_echo "$as_me:$LINENO: checking for tzname" >&5 +-$as_echo_n "checking for tzname... " >&6; } +-if test "${ac_cv_var_tzname+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#if !HAVE_DECL_TZNAME +-extern char *tzname[]; +-#endif + +-int +-main () +-{ +-return tzname[0][0]; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_var_tzname=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_var_tzname=no +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5 +-$as_echo "$ac_cv_var_tzname" >&6; } +- if test $ac_cv_var_tzname = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_TZNAME 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext" + ++ fi + fi +-fi + + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include /* for time_t */ +-#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ +-#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))) +-typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; +-typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; ++ GNULIB_MKFIFO=1 + +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then + +-cat >>confdefs.h <<\_ACEOF +-#define TIME_T_FITS_IN_LONG_INT 1 +-_ACEOF + ++$as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h ++ ++ ++ ++ # Code from module mkfifoat: ++ ++ ++ ++ ++ ++ if test $ac_cv_func_mkfifoat = no; then ++ # No known system has mkfifoat but not mknodat ++ HAVE_MKFIFOAT=0 ++ HAVE_MKNODAT=0 + +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + + +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- # Code from module pathmax: + + + ++ gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext" + + + +@@ -38345,436 +21509,385 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext" + ++ fi + +- # Code from module priv-set: + + + +-for ac_func in getppriv +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func ++ GNULIB_MKFIFOAT=1 + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif + +-#undef $ac_func ++$as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF + +-fi +-done + ++ GNULIB_MKNODAT=1 + + + ++$as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h + + + ++ # Code from module mknod: + +- # Code from module progname: +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_name is declared" >&5 +-$as_echo_n "checking whether program_invocation_name is declared... " >&6; } +-if test "${ac_cv_have_decl_program_invocation_name+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-#ifndef program_invocation_name +- (void) program_invocation_name; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_program_invocation_name=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_program_invocation_name=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_program_invocation_name" >&5 +-$as_echo "$ac_cv_have_decl_program_invocation_name" >&6; } +-if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then ++ if test $ac_cv_func_mknod = no; then ++ HAVE_MKNOD=0 ++ ++ + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0 +-_ACEOF + + +-fi + ++ gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" + +- { $as_echo "$as_me:$LINENO: checking whether program_invocation_short_name is declared" >&5 +-$as_echo_n "checking whether program_invocation_short_name is declared... " >&6; } +-if test "${ac_cv_have_decl_program_invocation_short_name+set}" = set; then ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5 ++$as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; } ++if ${gl_cv_func_mknod_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_mknod_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ #include + + int + main () + { +-#ifndef program_invocation_short_name +- (void) program_invocation_short_name; +-#endif +- ++/* Indeterminate for super-user, assume no. Why are you running ++ configure as root, anyway? */ ++ if (!geteuid ()) return 99; ++ if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_program_invocation_short_name=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_mknod_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_program_invocation_short_name=no ++ if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; 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 $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check) ++See \`config.log' for more details" "$LINENO" 5; } ++ fi ++ gl_cv_func_mknod_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 core conftest.err conftest.$ac_objext conftest.$ac_ext ++ rm -f conftest.fifo + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_program_invocation_short_name" >&5 +-$as_echo "$ac_cv_have_decl_program_invocation_short_name" >&6; } +-if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5 ++$as_echo "$gl_cv_func_mknod_works" >&6; } ++ if test "$gl_cv_func_mknod_works" != yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1 +-_ACEOF ++$as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h + ++ fi ++ if test $REPLACE_MKFIFO = 1 || test "$gl_cv_func_mknod_works" != yes; then ++ REPLACE_MKNOD=1 + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0 +-_ACEOF + + +-fi + + +- # Code from module quote: + + + ++ gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext" ++ ++ fi ++ fi + + + + ++ GNULIB_MKNOD=1 + + +- gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext" + ++$as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h + + +- # Code from module quotearg: + ++ # Code from module mktime: + + + + + ++if test $APPLE_UNIVERSAL_BUILD = 1; then ++ # A universal build on Apple MacOS X platforms. ++ # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. ++ # But we need a configuration result that is valid in both modes. ++ ac_cv_func_working_mktime=no ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 ++$as_echo_n "checking for working mktime... " >&6; } ++if ${ac_cv_func_working_mktime+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ ac_cv_func_working_mktime=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++/* Test program from Paul Eggert and Tony Leneis. */ ++#include ++#include ++#include + ++#ifdef HAVE_UNISTD_H ++# include ++#endif + ++#ifndef HAVE_ALARM ++# define alarm(X) /* empty */ ++#endif + +- gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" ++/* Work around redefinition to rpl_putenv by other config tests. */ ++#undef putenv + ++static time_t time_t_max; ++static time_t time_t_min; + +- # Code from module quotearg-simple: +- # Code from module rawmemchr: ++/* Values we'll use to set the TZ environment variable. */ ++static char *tz_strings[] = { ++ (char *) 0, "TZ=GMT0", "TZ=JST-9", ++ "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" ++}; ++#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + ++/* Return 0 if mktime fails to convert a date in the spring-forward gap. ++ Based on a problem report from Andreas Jaeger. */ ++static int ++spring_forward_gap () ++{ ++ /* glibc (up to about 1998-10-07) failed this test. */ ++ struct tm tm; + ++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ++ instead of "TZ=America/Vancouver" in order to detect the bug even ++ on systems that don't support the Olson extension, or don't have the ++ full zoneinfo tables installed. */ ++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + ++ tm.tm_year = 98; ++ tm.tm_mon = 3; ++ tm.tm_mday = 5; ++ tm.tm_hour = 2; ++ tm.tm_min = 0; ++ tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ return mktime (&tm) != (time_t) -1; ++} + ++static int ++mktime_test1 (time_t now) ++{ ++ struct tm *lt; ++ return ! (lt = localtime (&now)) || mktime (lt) == now; ++} + ++static int ++mktime_test (time_t now) ++{ ++ return (mktime_test1 (now) ++ && mktime_test1 ((time_t) (time_t_max - now)) ++ && mktime_test1 ((time_t) (time_t_min + now))); ++} + ++static int ++irix_6_4_bug () ++{ ++ /* Based on code from Ariel Faigon. */ ++ struct tm tm; ++ tm.tm_year = 96; ++ tm.tm_mon = 3; ++ tm.tm_mday = 0; ++ tm.tm_hour = 0; ++ tm.tm_min = 0; ++ tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ mktime (&tm); ++ return tm.tm_mon == 2 && tm.tm_mday == 31; ++} + ++static int ++bigtime_test (int j) ++{ ++ struct tm tm; ++ time_t now; ++ tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; ++ now = mktime (&tm); ++ if (now != (time_t) -1) ++ { ++ struct tm *lt = localtime (&now); ++ if (! (lt ++ && lt->tm_year == tm.tm_year ++ && lt->tm_mon == tm.tm_mon ++ && lt->tm_mday == tm.tm_mday ++ && lt->tm_hour == tm.tm_hour ++ && lt->tm_min == tm.tm_min ++ && lt->tm_sec == tm.tm_sec ++ && lt->tm_yday == tm.tm_yday ++ && lt->tm_wday == tm.tm_wday ++ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) ++ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) ++ return 0; ++ } ++ return 1; ++} + ++static int ++year_2050_test () ++{ ++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ++ ignoring leap seconds. */ ++ unsigned long int answer = 2527315200UL; + ++ struct tm tm; ++ time_t t; ++ tm.tm_year = 2050 - 1900; ++ tm.tm_mon = 2 - 1; ++ tm.tm_mday = 1; ++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0; ++ tm.tm_isdst = -1; + ++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ++ instead of "TZ=America/Vancouver" in order to detect the bug even ++ on systems that don't support the Olson extension, or don't have the ++ full zoneinfo tables installed. */ ++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); + ++ t = mktime (&tm); + ++ /* Check that the result is either a failure, or close enough ++ to the correct answer that we can assume the discrepancy is ++ due to leap seconds. */ ++ return (t == (time_t) -1 ++ || (0 < t && answer - 120 <= t && t <= answer + 120)); ++} + +-for ac_func in rawmemchr +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func ++int ++main () ++{ ++ int result = 0; ++ time_t t, delta; ++ int i, j; ++ int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1; ++ int time_t_signed = ! ((time_t) 0 < (time_t) -1); + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ ++ /* This test makes some buggy mktime implementations loop. ++ Give up after 60 seconds; a mktime slower than that ++ isn't worth using anyway. */ ++ alarm (60); + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif ++ time_t_max = (! time_t_signed ++ ? (time_t) -1 ++ : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1) ++ * 2 + 1)); ++ time_t_min = (! time_t_signed ++ ? (time_t) 0 ++ : time_t_signed_magnitude ++ ? ~ (time_t) 0 ++ : ~ time_t_max); + +-#undef $ac_func ++ delta = time_t_max / 997; /* a suitable prime number */ ++ for (i = 0; i < N_STRINGS; i++) ++ { ++ if (tz_strings[i]) ++ putenv (tz_strings[i]); + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif ++ for (t = 0; t <= time_t_max - delta; t += delta) ++ if (! mktime_test (t)) ++ result |= 1; ++ if (! (mktime_test ((time_t) 1) ++ && mktime_test ((time_t) (60 * 60)) ++ && mktime_test ((time_t) (60 * 60 * 24)))) ++ result |= 2; + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; ++ for (j = 1; ; j <<= 1) ++ if (! bigtime_test (j)) ++ result |= 4; ++ else if (INT_MAX / 2 < j) ++ break; ++ if (! bigtime_test (INT_MAX)) ++ result |= 8; ++ } ++ if (! irix_6_4_bug ()) ++ result |= 16; ++ if (! spring_forward_gap ()) ++ result |= 32; ++ if (! year_2050_test ()) ++ result |= 64; ++ return result; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_run "$LINENO"; then : ++ ac_cv_func_working_mktime=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ ac_cv_func_working_mktime=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.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 ++$as_echo "$ac_cv_func_working_mktime" >&6; } ++if test $ac_cv_func_working_mktime = no; then + +-else + +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +-fi +-done + + +- if test $ac_cv_func_rawmemchr = no; then +- HAVE_RAWMEMCHR=0 +- : +- fi + + + ++ gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext" + +- GNULIB_RAWMEMCHR=1 ++fi + ++ if test $ac_cv_func_working_mktime = no; then ++ REPLACE_MKTIME=1 + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_RAWMEMCHR 1 +-_ACEOF + ++ else ++ REPLACE_MKTIME=0 ++ fi + + +- # Code from module readlink: + + ++ GNULIB_MKTIME=1 + + + ++$as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h + + + +- if test $ac_cv_func_readlink = no; then +- HAVE_READLINK=0 ++ # Code from module modechange: + + + +@@ -38783,562 +21896,308 @@ + + + +- gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + ++ gl_LIBOBJS="$gl_LIBOBJS modechange.$ac_objext" + +- : + +- else +- { $as_echo "$as_me:$LINENO: checking whether readlink signature is correct" >&5 +-$as_echo_n "checking whether readlink signature is correct... " >&6; } +-if test "${gl_cv_decl_readlink_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- /* Cause compilation failure if original declaration has wrong type. */ +- ssize_t readlink (const char *, char *, size_t); +-int +-main () +-{ ++ # Code from module multiarch: + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_decl_readlink_works=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module nl_langinfo: + +- gl_cv_decl_readlink_works=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_decl_readlink_works" >&5 +-$as_echo "$gl_cv_decl_readlink_works" >&6; } +- { $as_echo "$as_me:$LINENO: checking whether readlink handles trailing slash correctly" >&5 +-$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } +-if test "${gl_cv_func_readlink_works+set}" = set; then ++ ++ ++ if test $ac_cv_func_nl_langinfo = yes; then ++ # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 ++$as_echo_n "checking whether YESEXPR works... " >&6; } ++if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- # We have readlink, so assume ln -s works. +- ln -s conftest.no-such conftest.link +- ln -s conftest.link conftest.lnk2 +- if test "$cross_compiling" = yes; then +- gl_cv_func_readlink_works="guessing no" ++ if test "$cross_compiling" = yes; then : ++ ++ case "$host_os" in ++ # Guess no on irix systems. ++ irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; ++ # Guess yes elsewhere. ++ *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; ++ esac ++ + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + int + main () + { +-char buf[20]; +- return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; ++return !*nl_langinfo(YESEXPR); ++ + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_readlink_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_nl_langinfo_yesexpr_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_readlink_works=no ++ gl_cv_func_nl_langinfo_yesexpr_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- rm -f conftest.link conftest.lnk2 + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_readlink_works" >&5 +-$as_echo "$gl_cv_func_readlink_works" >&6; } +- if test "$gl_cv_func_readlink_works" != yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define READLINK_TRAILING_SLASH_BUG 1 +-_ACEOF +- +- REPLACE_READLINK=1 +- +- +- +- +- +- +- +- +- gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" +- +- elif test "$gl_cv_decl_readlink_works" != yes; then +- REPLACE_READLINK=1 +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 ++$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } ++ case $gl_cv_func_nl_langinfo_yesexpr_works in ++ *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; ++ *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; ++ esac + ++cat >>confdefs.h <<_ACEOF ++#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS ++_ACEOF + ++ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ ++ && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then ++ : ++ else ++ REPLACE_NL_LANGINFO=1 + ++$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h + + + + +- gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + +- fi +- fi + + + + +- GNULIB_READLINK=1 ++ gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + ++ fi ++ else ++ HAVE_NL_LANGINFO=0 + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_READLINK 1 +-_ACEOF + + + +- # Code from module readlinkat: + + + ++ gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" + ++ fi + + + + ++ GNULIB_NL_LANGINFO=1 + + +- if test $ac_cv_func_readlinkat = no; then +- HAVE_READLINKAT=0 + ++$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h + + + ++ # Code from module obstack: + + + + +- gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + +- fi + + + + +- GNULIB_READLINKAT=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_READLINKAT 1 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5 ++$as_echo_n "checking for obstacks... " >&6; } ++if ${ac_cv_func_obstack+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$ac_includes_default ++ #include "obstack.h" ++int ++main () ++{ ++struct obstack mem; ++ #define obstack_chunk_alloc malloc ++ #define obstack_chunk_free free ++ obstack_init (&mem); ++ obstack_free (&mem, 0); ++ ; ++ return 0; ++} + _ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_func_obstack=yes ++else ++ ac_cv_func_obstack=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: $ac_cv_func_obstack" >&5 ++$as_echo "$ac_cv_func_obstack" >&6; } ++if test $ac_cv_func_obstack = yes; then + ++$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h + +- +- # Code from module realloc-posix: +- ++else + + +- if test $gl_cv_func_malloc_posix = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_REALLOC_POSIX 1 +-_ACEOF + +- else + + + + ++ gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" + ++fi + ++ # Code from module open: + + ++ case "$host_os" in ++ mingw* | pw*) + +- gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" + +- REPLACE_REALLOC=1 ++ REPLACE_OPEN=1 + +- fi + + + + +- GNULIB_REALLOC_POSIX=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_REALLOC_POSIX 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + + + +- # Code from module regex: + ++ : + +-# Check whether --with-included-regex was given. +-if test "${with_included_regex+set}" = set; then +- withval=$with_included_regex; +-fi + ++ ;; ++ *) + +- case $with_included_regex in #( +- yes|no) ac_use_included_regex=$with_included_regex +- ;; +- '') +- # If the system regex support is good enough that it passes the +- # following run test, then default to *not* using the included regex.c. +- # If cross compiling, assume the test would fail and use the included +- # regex.c. +- { $as_echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5 +-$as_echo_n "checking for working re_compile_pattern... " >&6; } +-if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 ++$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } ++if ${gl_cv_func_open_slash+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- gl_cv_func_re_compile_pattern_working=no ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ touch conftest.tmp ++ ln -s conftest.tmp conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ ++ case "$host_os" in ++ freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) ++ gl_cv_func_open_slash="guessing no" ;; ++ *) ++ gl_cv_func_open_slash="guessing yes" ;; ++ esac ++ + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-$ac_includes_default +- #include +- #include +- #include + +-int +-main () ++#include ++#if HAVE_UNISTD_H ++# include ++#endif ++int main () + { +-int result = 0; +- static struct re_pattern_buffer regex; +- unsigned char folded_chars[UCHAR_MAX + 1]; +- int i; +- const char *s; +- struct re_registers regs; +- +- /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html +- This test needs valgrind to catch the bug on Debian +- GNU/Linux 3.1 x86, but it might catch the bug better +- on other platforms and it shouldn't hurt to try the +- test here. */ +- if (setlocale (LC_ALL, "en_US.UTF-8")) +- { +- static char const pat[] = "insert into"; +- static char const data[] = +- "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; +- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE +- | RE_ICASE); +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern (pat, sizeof pat - 1, ®ex); +- if (s) +- result |= 1; +- else if (re_search (®ex, data, sizeof data - 1, +- 0, sizeof data - 1, ®s) +- != -1) +- result |= 1; +- if (! setlocale (LC_ALL, "C")) +- return 1; +- } +- +- /* This test is from glibc bug 3957, reported by Andrew Mackey. */ +- re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("a[^x]b", 6, ®ex); +- if (s) +- result |= 2; +- /* This should fail, but succeeds for glibc-2.5. */ +- else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) +- result |= 2; +- +- /* This regular expression is from Spencer ere test number 75 +- in grep-2.3. */ +- re_set_syntax (RE_SYNTAX_POSIX_EGREP); +- memset (®ex, 0, sizeof regex); +- for (i = 0; i <= UCHAR_MAX; i++) +- folded_chars[i] = i; +- regex.translate = folded_chars; +- s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); +- /* This should fail with _Invalid character class name_ error. */ +- if (!s) +- result |= 4; +- +- /* Ensure that [b-a] is diagnosed as invalid, when +- using RE_NO_EMPTY_RANGES. */ +- re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("a[b-a]", 6, ®ex); +- if (s == 0) +- result |= 8; +- +- /* This should succeed, but does not for glibc-2.1.3. */ +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("{1", 2, ®ex); +- if (s) +- result |= 8; +- +- /* The following example is derived from a problem report +- against gawk from Jorge Stolfi . */ +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("[an\371]*n", 7, ®ex); +- if (s) +- result |= 8; +- /* This should match, but does not for glibc-2.2.1. */ +- else if (re_match (®ex, "an", 2, 0, ®s) != 2) +- result |= 8; +- +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("x", 1, ®ex); +- if (s) +- result |= 8; +- /* glibc-2.2.93 does not work with a negative RANGE argument. */ +- else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) +- result |= 8; +- +- /* The version of regex.c in older versions of gnulib +- ignored RE_ICASE. Detect that problem too. */ +- re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("x", 1, ®ex); +- if (s) +- result |= 16; +- else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) +- result |= 16; +- +- /* Catch a bug reported by Vin Shelton in +- http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html +- */ +- re_set_syntax (RE_SYNTAX_POSIX_BASIC +- & ~RE_CONTEXT_INVALID_DUP +- & ~RE_NO_EMPTY_RANGES); +- memset (®ex, 0, sizeof regex); +- s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); +- if (s) +- result |= 32; +- +- /* REG_STARTEND was added to glibc on 2004-01-15. +- Reject older versions. */ +- if (! REG_STARTEND) +- result |= 64; +- +-#if 0 +- /* It would be nice to reject hosts whose regoff_t values are too +- narrow (including glibc on hosts with 64-bit ptrdiff_t and +- 32-bit int), but we should wait until glibc implements this +- feature. Otherwise, support for equivalence classes and +- multibyte collation symbols would always be broken except +- when compiling --without-included-regex. */ +- if (sizeof (regoff_t) < sizeof (ptrdiff_t) +- || sizeof (regoff_t) < sizeof (ssize_t)) +- result |= 64; ++ int result = 0; ++#if HAVE_LSTAT ++ if (open ("conftest.lnk/", O_RDONLY) != -1) ++ result |= 1; + #endif +- +- return result; +- +- ; +- return 0; ++ if (open ("conftest.sl/", O_CREAT, 0600) >= 0) ++ result |= 2; ++ return result; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_re_compile_pattern_working=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_open_slash=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_re_compile_pattern_working=no ++ gl_cv_func_open_slash=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + ++ rm -f conftest.sl conftest.tmp conftest.lnk + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_working" >&5 +-$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } +- case $gl_cv_func_re_compile_pattern_working in #( +- yes) ac_use_included_regex=no;; #( +- no) ac_use_included_regex=yes;; +- esac +- ;; +- *) { { $as_echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5 +-$as_echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;} +- { (exit 1); exit 1; }; } +- ;; +- esac +- +- if test $ac_use_included_regex = yes; then +- +-cat >>confdefs.h <<\_ACEOF +-#define _REGEX_LARGE_OFFSETS 1 +-_ACEOF +- +- +-cat >>confdefs.h <<\_ACEOF +-#define re_syntax_options rpl_re_syntax_options +-_ACEOF +- +- +-cat >>confdefs.h <<\_ACEOF +-#define re_set_syntax rpl_re_set_syntax +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 ++$as_echo "$gl_cv_func_open_slash" >&6; } ++ case "$gl_cv_func_open_slash" in ++ *no) + ++$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + +-cat >>confdefs.h <<\_ACEOF +-#define re_compile_pattern rpl_re_compile_pattern +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define re_compile_fastmap rpl_re_compile_fastmap +-_ACEOF ++ REPLACE_OPEN=1 + + +-cat >>confdefs.h <<\_ACEOF +-#define re_search rpl_re_search +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define re_search_2 rpl_re_search_2 +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define re_match rpl_re_match +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define re_match_2 rpl_re_match_2 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" + + +-cat >>confdefs.h <<\_ACEOF +-#define re_set_registers rpl_re_set_registers +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define re_comp rpl_re_comp +-_ACEOF ++ : + + +-cat >>confdefs.h <<\_ACEOF +-#define re_exec rpl_re_exec +-_ACEOF ++ ;; ++ esac ++ ;; ++ esac + + +-cat >>confdefs.h <<\_ACEOF +-#define regcomp rpl_regcomp +-_ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define regexec rpl_regexec +-_ACEOF ++ GNULIB_OPEN=1 + + +-cat >>confdefs.h <<\_ACEOF +-#define regerror rpl_regerror +-_ACEOF + ++$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h + +-cat >>confdefs.h <<\_ACEOF +-#define regfree rpl_regfree +-_ACEOF + + ++ # Code from module openat: + + ++ GNULIB_OPENAT=1 + + ++ GNULIB_FCHMODAT=1 ++ GNULIB_FSTATAT=1 ++ GNULIB_MKDIRAT=1 + + ++ GNULIB_FCHOWNAT=1 ++ GNULIB_UNLINKAT=1 + +- gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" + + + +@@ -39346,155 +22205,16 @@ + + + +-for ac_header in libintl.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_compiler=no +-fi ++ gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_preproc=no +-fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + +-fi + +-done + + + +@@ -39506,80 +22226,19 @@ + + + +- { $as_echo "$as_me:$LINENO: checking whether isblank is declared" >&5 +-$as_echo_n "checking whether isblank is declared... " >&6; } +-if test "${ac_cv_have_decl_isblank+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-#ifndef isblank +- (void) isblank; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_isblank=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_isblank=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5 +-$as_echo "$ac_cv_have_decl_isblank" >&6; } +-if test "x$ac_cv_have_decl_isblank" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISBLANK 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_ISBLANK 0 +-_ACEOF + + +-fi + + + +- fi + +- # Code from module rename: + + + +@@ -39587,613 +22246,458 @@ + + + ++ for ac_func in fchmodat fstatat mkdirat openat unlinkat ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF + ++else + ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +- { $as_echo "$as_me:$LINENO: checking whether rename honors trailing slash on destination" >&5 +-$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } +-if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk +- touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || +- { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +-$as_echo "$as_me: error: cannot create temporary files" >&2;} +- { (exit 1); exit 1; }; } +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- ln -s conftest.f conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_rename_slash_dst_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++fi ++done + +-# include +-# include + +-int +-main () +-{ +-int result = 0; +- if (rename ("conftest.f1", "conftest.f2/") == 0) +- result |= 1; +- if (rename ("conftest.d1", "conftest.d2/") != 0) +- result |= 2; +-#if HAVE_LSTAT +- if (rename ("conftest.f", "conftest.lnk/") == 0) +- result |= 4; +-#endif +- return result; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_rename_slash_dst_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_rename_slash_dst_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++ case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in ++ yes+yes) ++ # GNU/Hurd has unlinkat, but it has the same bug as unlink. ++ if test $REPLACE_UNLINK = 1; then + + +- rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_slash_dst_works" >&5 +-$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } +- if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" + ++ REPLACE_UNLINKAT=1 ++ fi ;; ++ yes+*) ++ # Solaris 9 has *at functions, but uniformly mishandles trailing ++ # slash in all of them. + + +- gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + +- REPLACE_RENAME=1 + +-cat >>confdefs.h <<\_ACEOF +-#define RENAME_TRAILING_SLASH_DEST_BUG 1 +-_ACEOF + +- fi + +- { $as_echo "$as_me:$LINENO: checking whether rename honors trailing slash on source" >&5 +-$as_echo_n "checking whether rename honors trailing slash on source... " >&6; } +-if test "${gl_cv_func_rename_slash_src_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk +- touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || +- { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +-$as_echo "$as_me: error: cannot create temporary files" >&2;} +- { (exit 1); exit 1; }; } +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- ln -s conftest.f conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_rename_slash_src_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-# include +-# include + +-int +-main () +-{ +-int result = 0; +- if (rename ("conftest.f1/", "conftest.d3") == 0) +- result |= 1; +- if (rename ("conftest.d1/", "conftest.d2") != 0) +- result |= 2; +-#if HAVE_LSTAT +- if (rename ("conftest.lnk/", "conftest.f") == 0) +- result |= 4; +-#endif +- return result; ++ gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_rename_slash_src_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ REPLACE_OPENAT=1 + +-( exit $ac_status ) +-gl_cv_func_rename_slash_src_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_slash_src_works" >&5 +-$as_echo "$gl_cv_func_rename_slash_src_works" >&6; } +- if test "x$gl_cv_func_rename_slash_src_works" != xyes; then + + + + ++ gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" + ++ REPLACE_FSTATAT=1 + + + +- gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + +- REPLACE_RENAME=1 + +-cat >>confdefs.h <<\_ACEOF +-#define RENAME_TRAILING_SLASH_SOURCE_BUG 1 +-_ACEOF + ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext" ++ ++ REPLACE_UNLINKAT=1 ++ ;; ++ *) ++ HAVE_OPENAT=0 ++ HAVE_UNLINKAT=0 # No known system with unlinkat but not openat ++ HAVE_FSTATAT=0 # No known system with fstatat but not openat ++ ++ ++ ++ : ++;; ++ esac ++ if test $ac_cv_func_fchmodat != yes; then ++ HAVE_FCHMODAT=0 ++ fi ++ if test $ac_cv_func_mkdirat != yes; then ++ HAVE_MKDIRAT=0 + fi + +- { $as_echo "$as_me:$LINENO: checking whether rename manages hard links correctly" >&5 +-$as_echo_n "checking whether rename manages hard links correctly... " >&6; } +-if test "${gl_cv_func_rename_link_works+set}" = set; then ++ ++ ++ ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat" ++if test "x$ac_cv_func_fchownat" = xyes; then : ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5 ++$as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; } ++if ${gl_cv_func_fchownat_nofollow_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftest.f conftest.f1 +- if touch conftest.f && ln conftest.f conftest.f1 && +- set x `ls -i conftest.f conftest.f1` && test "" = ""; then +- if test "$cross_compiling" = yes; then +- gl_cv_func_rename_link_works="guessing no" ++ ++ gl_dangle=conftest.dangle ++ # Remove any remnants of a previous test. ++ rm -f $gl_dangle ++ # Arrange for deletion of the temporary file this test creates. ++ ac_clean_files="$ac_clean_files $gl_dangle" ++ ln -s conftest.no-such $gl_dangle ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_fchownat_nofollow_works=no + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +-# include +-# include +-# include +- ++#include ++#include ++#include ++#include ++#include + int + main () + { +-int result = 0; +- if (rename ("conftest.f", "conftest.f1")) +- result |= 1; +- if (unlink ("conftest.f1")) +- result |= 2; +- if (rename ("conftest.f", "conftest.f")) +- result |= 4; +- if (rename ("conftest.f1", "conftest.f1") == 0) +- result |= 8; +- return result; +- +- ; +- return 0; ++ return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (), ++ AT_SYMLINK_NOFOLLOW) != 0 ++ && errno == ENOENT); + } ++ + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_rename_link_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fchownat_nofollow_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_rename_link_works=no ++ gl_cv_func_fchownat_nofollow_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- else +- gl_cv_func_rename_link_works="guessing no" +- fi +- rm -rf conftest.f conftest.f1 +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_link_works" >&5 +-$as_echo "$gl_cv_func_rename_link_works" >&6; } +- if test "x$gl_cv_func_rename_link_works" != xyes; then +- +- +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5 ++$as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; } ++ if test $gl_cv_func_fchownat_nofollow_works = no; then : ++ REPLACE_FCHOWNAT=1 + ++$as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h + + +- gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" ++fi + +- REPLACE_RENAME=1 + +-cat >>confdefs.h <<\_ACEOF +-#define RENAME_HARD_LINK_BUG 1 +-_ACEOF + +- fi + +- { $as_echo "$as_me:$LINENO: checking whether rename manages existing destinations correctly" >&5 +-$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } +-if test "${gl_cv_func_rename_dest_works+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5 ++$as_echo_n "checking whether fchownat works with an empty file name... " >&6; } ++if ${gl_cv_func_fchownat_empty_filename_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- rm -rf conftest.f conftest.d1 conftest.d2 +- touch conftest.f && mkdir conftest.d1 conftest.d2 || +- { { $as_echo "$as_me:$LINENO: error: cannot create temporary files" >&5 +-$as_echo "$as_me: error: cannot create temporary files" >&2;} +- { (exit 1); exit 1; }; } +- if test "$cross_compiling" = yes; then +- gl_cv_func_rename_dest_works="guessing no" ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_fchownat_empty_filename_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-# include +-# include ++#include ++ #include + + int + main () + { +-int result = 0; +- if (rename ("conftest.d1", "conftest.d2") != 0) +- result |= 1; +- if (rename ("conftest.d2", "conftest.f") == 0) +- result |= 2; +- return result; ++int fd; ++ int ret; ++ if (mkdir ("conftestdir", 0700) < 0) ++ return 2; ++ fd = open ("conftestdir", O_RDONLY); ++ if (fd < 0) ++ return 3; ++ ret = fchownat (fd, "", -1, -1, 0); ++ close (fd); ++ rmdir ("conftestdir"); ++ return ret == 0; + + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_rename_dest_works=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_fchownat_empty_filename_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_rename_dest_works=no ++ gl_cv_func_fchownat_empty_filename_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- rm -rf conftest.f conftest.d1 conftest.d2 ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5 ++$as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; } ++ if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then : ++ REPLACE_FCHOWNAT=1 ++ ++$as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h ++ + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rename_dest_works" >&5 +-$as_echo "$gl_cv_func_rename_dest_works" >&6; } +- if test "x$gl_cv_func_rename_dest_works" != xyes; then + ++ if test $REPLACE_CHOWN = 1; then ++ REPLACE_FCHOWNAT=1 ++ fi ++else ++ HAVE_FCHOWNAT=0 ++fi + ++ if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then + + + + + + +- gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + +- REPLACE_RENAME=1 + +-cat >>confdefs.h <<\_ACEOF +-#define RENAME_DEST_EXISTS_BUG 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext" + + fi + + ++ # Code from module openat-die: ++ # Code from module parse-datetime: + + +- GNULIB_RENAME=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_RENAME 1 +-_ACEOF + ++ ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include ++#include <$ac_cv_struct_tm> + ++" ++if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : + +- # Code from module renameat: ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_TM_TM_ZONE 1 ++_ACEOF + + ++fi + ++if test "$ac_cv_member_struct_tm_tm_zone" = yes; then + ++$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h + ++else ++ ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include ++" ++if test "x$ac_cv_have_decl_tzname" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_TZNAME $ac_have_decl ++_ACEOF + ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 ++$as_echo_n "checking for tzname... " >&6; } ++if ${ac_cv_var_tzname+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++#if !HAVE_DECL_TZNAME ++extern char *tzname[]; ++#endif + ++int ++main () ++{ ++return tzname[0][0]; ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_var_tzname=yes ++else ++ ac_cv_var_tzname=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: $ac_cv_var_tzname" >&5 ++$as_echo "$ac_cv_var_tzname" >&6; } ++ if test $ac_cv_var_tzname = yes; then + ++$as_echo "#define HAVE_TZNAME 1" >>confdefs.h + ++ fi ++fi + +- if test $ac_cv_func_renameat = no; then +- HAVE_RENAMEAT=0 + + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#include /* for time_t */ ++#include /* for CHAR_BIT, LONG_MIN, LONG_MAX */ ++#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))) ++typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1]; ++typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1]; + ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : + ++$as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h + + ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +- gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" ++ # Code from module pathmax: + + + + ++ # Code from module priv-set: + + ++ for ac_func in getppriv ++do : ++ ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv" ++if test "x$ac_cv_func_getppriv" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETPPRIV 1 ++_ACEOF + ++fi ++done + + +- gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + +- elif test $REPLACE_RENAME = 1; then +- REPLACE_RENAMEAT=1 ++ # Code from module progname: ++ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl ++_ACEOF + ++ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include ++" ++if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 ++fi + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl ++_ACEOF + ++ # Code from module quote: + + + + +- gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext" + + + ++ # Code from module quotearg: + +- gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + +- fi + + + + +- GNULIB_RENAMEAT=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_RENAMEAT 1 +-_ACEOF ++ gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext" + + ++ # Code from module quotearg-simple: ++ # Code from module rawmemchr: + +- # Code from module rmdir: + + +- { $as_echo "$as_me:$LINENO: checking whether rmdir works" >&5 +-$as_echo_n "checking whether rmdir works... " >&6; } +-if test "${gl_cv_func_rmdir_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- mkdir conftest.dir +- touch conftest.file +- if test "$cross_compiling" = yes; then +- gl_cv_func_rmdir_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- #include + +-int +-main () +-{ +-int result = 0; +- if (!rmdir ("conftest.file/")) +- result |= 1; +- else if (errno != ENOTDIR) +- result |= 2; +- if (!rmdir ("conftest.dir/./")) +- result |= 4; +- return result; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_rmdir_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_rmdir_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- rm -rf conftest.dir conftest.file +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_rmdir_works" >&5 +-$as_echo "$gl_cv_func_rmdir_works" >&6; } +- if test x"$gl_cv_func_rmdir_works" != xyes; then +- REPLACE_RMDIR=1 + + + + ++ for ac_func in rawmemchr ++do : ++ ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" ++if test "x$ac_cv_func_rawmemchr" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_RAWMEMCHR 1 ++_ACEOF + ++else + ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + ++fi ++done + +- gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" + ++ if test $ac_cv_func_rawmemchr = no; then ++ HAVE_RAWMEMCHR=0 ++ : + fi + + + + +- GNULIB_RMDIR=1 ++ GNULIB_RAWMEMCHR=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_RMDIR 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h + + + +- # Code from module rpmatch: ++ # Code from module readlink: + + + ++ if test $ac_cv_func_readlink = no; then ++ HAVE_READLINK=0 ++ + + + +@@ -40201,1582 +22705,863 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + + ++ : + +-for ac_func in rpmatch +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 ++$as_echo_n "checking whether readlink signature is correct... " >&6; } ++if ${gl_cv_decl_readlink_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- ++#include ++ /* Cause compilation failure if original declaration has wrong type. */ ++ ssize_t readlink (const char *, char *, size_t); + int + main () + { +-return $ac_func (); ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_decl_readlink_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++ gl_cv_decl_readlink_works=no + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF +- +-else +- +- gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" +- ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-done +- +- +- if test $ac_cv_func_rpmatch = no; then +- HAVE_RPMATCH=0 +- +- { $as_echo "$as_me:$LINENO: checking for nl_langinfo and YESEXPR" >&5 +-$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } +-if test "${gl_cv_langinfo_yesexpr+set}" = set; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 ++$as_echo "$gl_cv_decl_readlink_works" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 ++$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } ++if ${gl_cv_func_readlink_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ # We have readlink, so assume ln -s works. ++ ln -s conftest.no-such conftest.link ++ ln -s conftest.link conftest.lnk2 ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_readlink_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ + int + main () + { +-char* cs = nl_langinfo(YESEXPR); return !cs; ++char buf[20]; ++ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- gl_cv_langinfo_yesexpr=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_readlink_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_cv_func_readlink_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_cv_langinfo_yesexpr=no ++ rm -f conftest.link conftest.lnk2 + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 ++$as_echo "$gl_cv_func_readlink_works" >&6; } ++ if test "$gl_cv_func_readlink_works" != yes; then + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_langinfo_yesexpr" >&5 +-$as_echo "$gl_cv_langinfo_yesexpr" >&6; } +- if test $gl_cv_langinfo_yesexpr = yes; then ++ REPLACE_READLINK=1 + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_LANGINFO_YESEXPR 1 +-_ACEOF + +- fi + +- fi + + + + +- GNULIB_RPMATCH=1 + ++ gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + ++ elif test "$gl_cv_decl_readlink_works" != yes; then ++ REPLACE_READLINK=1 + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_RPMATCH 1 +-_ACEOF + + + +- # Code from module safe-read: + + + + ++ gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + ++ fi ++ fi + + + + +- gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" ++ GNULIB_READLINK=1 + + + ++$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h + + + +- # Code from module safe-write: ++ # Code from module readlinkat: + + + + + ++ if test $ac_cv_func_readlinkat = no; then ++ HAVE_READLINKAT=0 + + + + +- gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" + + + + ++ gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext" + ++ fi + + + +- # Code from module same-inode: +- # Code from module save-cwd: + ++ GNULIB_READLINKAT=1 + + + ++$as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h + + + ++ # Code from module realloc-posix: + + +- gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext" + ++ if test $gl_cv_func_malloc_posix = yes; then ++ ++$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h + ++ else + + + + + + +- # Code from module savedir: + + + ++ gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" + ++ REPLACE_REALLOC=1 + ++ fi + + + + +- gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext" ++ GNULIB_REALLOC_POSIX=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h ++ ++ ++ ++ # Code from module regex: ++ ++ ++# Check whether --with-included-regex was given. ++if test "${with_included_regex+set}" = set; then : ++ withval=$with_included_regex; ++fi + + +- # Code from module setenv: ++ case $with_included_regex in #( ++ yes|no) ac_use_included_regex=$with_included_regex ++ ;; ++ '') ++ # If the system regex support is good enough that it passes the ++ # following run test, then default to *not* using the included regex.c. ++ # If cross compiling, assume the test would fail and use the included ++ # regex.c. ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 ++$as_echo_n "checking for working re_compile_pattern... " >&6; } ++if ${gl_cv_func_re_compile_pattern_working+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_re_compile_pattern_working=no ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++$ac_includes_default ++ #include ++ #include ++ #include + ++int ++main () ++{ ++int result = 0; ++ static struct re_pattern_buffer regex; ++ unsigned char folded_chars[UCHAR_MAX + 1]; ++ int i; ++ const char *s; ++ struct re_registers regs; + +- if test $HAVE_SETENV$REPLACE_SETENV != 10; then ++ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html ++ This test needs valgrind to catch the bug on Debian ++ GNU/Linux 3.1 x86, but it might catch the bug better ++ on other platforms and it shouldn't hurt to try the ++ test here. */ ++ if (setlocale (LC_ALL, "en_US.UTF-8")) ++ { ++ static char const pat[] = "insert into"; ++ static char const data[] = ++ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; ++ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE ++ | RE_ICASE); ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern (pat, sizeof pat - 1, ®ex); ++ if (s) ++ result |= 1; ++ else if (re_search (®ex, data, sizeof data - 1, ++ 0, sizeof data - 1, ®s) ++ != -1) ++ result |= 1; ++ if (! setlocale (LC_ALL, "C")) ++ return 1; ++ } + ++ /* This test is from glibc bug 3957, reported by Andrew Mackey. */ ++ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("a[^x]b", 6, ®ex); ++ if (s) ++ result |= 2; ++ /* This should fail, but succeeds for glibc-2.5. */ ++ else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) ++ result |= 2; + ++ /* This regular expression is from Spencer ere test number 75 ++ in grep-2.3. */ ++ re_set_syntax (RE_SYNTAX_POSIX_EGREP); ++ memset (®ex, 0, sizeof regex); ++ for (i = 0; i <= UCHAR_MAX; i++) ++ folded_chars[i] = i; ++ regex.translate = folded_chars; ++ s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); ++ /* This should fail with _Invalid character class name_ error. */ ++ if (!s) ++ result |= 4; + ++ /* Ensure that [b-a] is diagnosed as invalid, when ++ using RE_NO_EMPTY_RANGES. */ ++ re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("a[b-a]", 6, ®ex); ++ if (s == 0) ++ result |= 8; + ++ /* This should succeed, but does not for glibc-2.1.3. */ ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("{1", 2, ®ex); ++ if (s) ++ result |= 8; + ++ /* The following example is derived from a problem report ++ against gawk from Jorge Stolfi . */ ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("[an\371]*n", 7, ®ex); ++ if (s) ++ result |= 8; ++ /* This should match, but does not for glibc-2.2.1. */ ++ else if (re_match (®ex, "an", 2, 0, ®s) != 2) ++ result |= 8; + ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("x", 1, ®ex); ++ if (s) ++ result |= 8; ++ /* glibc-2.2.93 does not work with a negative RANGE argument. */ ++ else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) ++ result |= 8; + ++ /* The version of regex.c in older versions of gnulib ++ ignored RE_ICASE. Detect that problem too. */ ++ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("x", 1, ®ex); ++ if (s) ++ result |= 16; ++ else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) ++ result |= 16; + +- gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" ++ /* Catch a bug reported by Vin Shelton in ++ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html ++ */ ++ re_set_syntax (RE_SYNTAX_POSIX_BASIC ++ & ~RE_CONTEXT_INVALID_DUP ++ & ~RE_NO_EMPTY_RANGES); ++ memset (®ex, 0, sizeof regex); ++ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); ++ if (s) ++ result |= 32; + +- fi ++ /* REG_STARTEND was added to glibc on 2004-01-15. ++ Reject older versions. */ ++ if (! REG_STARTEND) ++ result |= 64; + ++#if 0 ++ /* It would be nice to reject hosts whose regoff_t values are too ++ narrow (including glibc on hosts with 64-bit ptrdiff_t and ++ 32-bit int), but we should wait until glibc implements this ++ feature. Otherwise, support for equivalence classes and ++ multibyte collation symbols would always be broken except ++ when compiling --without-included-regex. */ ++ if (sizeof (regoff_t) < sizeof (ptrdiff_t) ++ || sizeof (regoff_t) < sizeof (ssize_t)) ++ result |= 64; ++#endif + ++ return result; + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_re_compile_pattern_working=yes ++else ++ gl_cv_func_re_compile_pattern_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 + +- GNULIB_SETENV=1 ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 ++$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } ++ case $gl_cv_func_re_compile_pattern_working in #( ++ yes) ac_use_included_regex=no;; #( ++ no) ac_use_included_regex=yes;; ++ esac ++ ;; ++ *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 ++ ;; ++ esac + ++ if test $ac_use_included_regex = yes; then + ++$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_SETENV 1 +-_ACEOF + ++$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h + + +- # Code from module size_max: ++$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h + + +-for ac_header in stdint.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h + +- ac_header_compiler=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } ++$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h + +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_header_preproc=no +-fi ++$as_echo "#define re_search rpl_re_search" >>confdefs.h + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } ++$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF + +-fi ++$as_echo "#define re_match rpl_re_match" >>confdefs.h + +-done + +- { $as_echo "$as_me:$LINENO: checking for SIZE_MAX" >&5 +-$as_echo_n "checking for SIZE_MAX... " >&6; } +-if test "${gl_cv_size_max+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else ++$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h + +- gl_cv_size_max= +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#if HAVE_STDINT_H +-#include +-#endif +-#ifdef SIZE_MAX +-Found it +-#endif ++$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h + +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "Found it" >/dev/null 2>&1; then +- gl_cv_size_max=yes +-fi +-rm -f conftest* + +- if test -z "$gl_cv_size_max"; then +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= 0)]; +-test_array [0] = 0 ++$as_echo "#define re_comp rpl_re_comp" >>confdefs.h + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define re_exec rpl_re_exec" >>confdefs.h + +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++$as_echo "#define regcomp rpl_regcomp" >>confdefs.h + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) < 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) >= $ac_mid)]; +-test_array [0] = 0 ++$as_echo "#define regexec rpl_regexec" >>confdefs.h + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi ++$as_echo "#define regerror rpl_regerror" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo= ac_hi= +-fi ++$as_echo "#define regfree rpl_regfree" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) * CHAR_BIT - 1) <= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo=`expr '(' $ac_mid ')' + 1` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) size_t_bits_minus_1=$ac_lo;; +-'') size_t_bits_minus_1= ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-static long int longval () { return sizeof (size_t) * CHAR_BIT - 1; } +-static unsigned long int ulongval () { return sizeof (size_t) * CHAR_BIT - 1; } +-#include +-#include +-int +-main () +-{ + +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof (size_t) * CHAR_BIT - 1) < 0) +- { +- long int i = longval (); +- if (i != (sizeof (size_t) * CHAR_BIT - 1)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof (size_t) * CHAR_BIT - 1)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- size_t_bits_minus_1=`cat conftest.val` +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-size_t_bits_minus_1= +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +-test_array [0] = 0 ++ gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) < 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) >= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} ++ for ac_header in libintl.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" ++if test "x$ac_cv_header_libintl_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_LIBINTL_H 1 + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++done + +- ac_lo= ac_hi= +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include ++" ++if test "x$ac_cv_have_decl_isblank" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_ISBLANK $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ ++ fi ++ ++ # Code from module rename: ++ ++ ++ ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5 ++$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } ++if ${gl_cv_func_rename_slash_dst_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk ++ touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || ++ as_fn_error $? "cannot create temporary files" "$LINENO" 5 ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ ln -s conftest.f conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_rename_slash_dst_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++# include ++# include ++ + int + main () + { +-static int test_array [1 - 2 * !((sizeof (size_t) <= sizeof (unsigned int)) <= $ac_mid)]; +-test_array [0] = 0 ++int result = 0; ++ if (rename ("conftest.f1", "conftest.f2/") == 0) ++ result |= 1; ++ if (rename ("conftest.d1", "conftest.d2/") != 0) ++ result |= 2; ++#if HAVE_LSTAT ++ if (rename ("conftest.f", "conftest.lnk/") == 0) ++ result |= 4; ++#endif ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_rename_slash_dst_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ gl_cv_func_rename_slash_dst_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.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk + +- ac_lo=`expr '(' $ac_mid ')' + 1` + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5 ++$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } ++ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) fits_in_uint=$ac_lo;; +-'') fits_in_uint= ;; +-esac ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" ++ ++ REPLACE_RENAME=1 ++ ++$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h ++ ++ fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5 ++$as_echo_n "checking whether rename honors trailing slash on source... " >&6; } ++if ${gl_cv_func_rename_slash_src_works+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk ++ touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || ++ as_fn_error $? "cannot create temporary files" "$LINENO" 5 ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ ln -s conftest.f conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_rename_slash_src_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +-static long int longval () { return sizeof (size_t) <= sizeof (unsigned int); } +-static unsigned long int ulongval () { return sizeof (size_t) <= sizeof (unsigned int); } +-#include +-#include ++ ++# include ++# include ++ + int + main () + { +- +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof (size_t) <= sizeof (unsigned int)) < 0) +- { +- long int i = longval (); +- if (i != (sizeof (size_t) <= sizeof (unsigned int))) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof (size_t) <= sizeof (unsigned int))) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; ++int result = 0; ++ if (rename ("conftest.f1/", "conftest.d3") == 0) ++ result |= 1; ++ if (rename ("conftest.d1/", "conftest.d2") != 0) ++ result |= 2; ++#if HAVE_LSTAT ++ if (rename ("conftest.lnk/", "conftest.f") == 0) ++ result |= 4; ++#endif ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- fits_in_uint=`cat conftest.val` ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_rename_slash_src_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-fits_in_uint= ++ gl_cv_func_rename_slash_src_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 +-rm -f conftest.val +- if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then +- if test $fits_in_uint = 1; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk ++ ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5 ++$as_echo "$gl_cv_func_rename_slash_src_works" >&6; } ++ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" ++ ++ REPLACE_RENAME=1 ++ ++$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h ++ ++ fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5 ++$as_echo_n "checking whether rename manages hard links correctly... " >&6; } ++if ${gl_cv_func_rename_link_works+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ rm -rf conftest.f conftest.f1 ++ if touch conftest.f && ln conftest.f conftest.f1 && ++ set x `ls -i conftest.f conftest.f1` && test "" = ""; then ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_rename_link_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- extern size_t foo; +- extern unsigned long foo; ++ ++# include ++# include ++# include + + int + main () + { ++int result = 0; ++ if (rename ("conftest.f", "conftest.f1")) ++ result |= 1; ++ if (unlink ("conftest.f1")) ++ result |= 2; ++ if (rename ("conftest.f", "conftest.f")) ++ result |= 4; ++ if (rename ("conftest.f1", "conftest.f1") == 0) ++ result |= 8; ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- fits_in_uint=0 ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_rename_link_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_func_rename_link_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 core conftest.err conftest.$ac_objext conftest.$ac_ext +- fi +- if test $fits_in_uint = 1; then +- gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" +- else +- gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" +- fi +- else +- gl_cv_size_max='((size_t)~(size_t)0)' +- fi ++ else ++ gl_cv_func_rename_link_works="guessing no" + fi ++ rm -rf conftest.f conftest.f1 + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_size_max" >&5 +-$as_echo "$gl_cv_size_max" >&6; } +- if test "$gl_cv_size_max" != yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5 ++$as_echo "$gl_cv_func_rename_link_works" >&6; } ++ if test "x$gl_cv_func_rename_link_works" != xyes; then + +-cat >>confdefs.h <<_ACEOF +-#define SIZE_MAX $gl_cv_size_max +-_ACEOF + +- fi + + + +- # Code from module sleep: + + +- { $as_echo "$as_me:$LINENO: checking whether sleep is declared" >&5 +-$as_echo_n "checking whether sleep is declared... " >&6; } +-if test "${ac_cv_have_decl_sleep+set}" = set; then ++ ++ gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" ++ ++ REPLACE_RENAME=1 ++ ++$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h ++ ++ fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5 ++$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } ++if ${gl_cv_func_rename_dest_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ rm -rf conftest.f conftest.d1 conftest.d2 ++ touch conftest.f && mkdir conftest.d1 conftest.d2 || ++ as_fn_error $? "cannot create temporary files" "$LINENO" 5 ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_rename_dest_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++# include ++# include + + int + main () + { +-#ifndef sleep +- (void) sleep; +-#endif ++int result = 0; ++ if (rename ("conftest.d1", "conftest.d2") != 0) ++ result |= 1; ++ if (rename ("conftest.d2", "conftest.f") == 0) ++ result |= 2; ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_sleep=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_rename_dest_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_sleep=no ++ gl_cv_func_rename_dest_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 core conftest.err conftest.$ac_objext conftest.$ac_ext ++ rm -rf conftest.f conftest.d1 conftest.d2 ++ + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sleep" >&5 +-$as_echo "$ac_cv_have_decl_sleep" >&6; } +-if test "x$ac_cv_have_decl_sleep" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5 ++$as_echo "$gl_cv_func_rename_dest_works" >&6; } ++ if test "x$gl_cv_func_rename_dest_works" != xyes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SLEEP 1 +-_ACEOF + + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_SLEEP 0 +-_ACEOF + + +-fi + + + ++ gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" + ++ REPLACE_RENAME=1 + ++$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h + ++ fi + + +- if test $ac_cv_have_decl_sleep != yes; then +- HAVE_SLEEP=0 + + ++ GNULIB_RENAME=1 + + + ++$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h + + + +- gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" ++ # Code from module renameat: + +- else +- { $as_echo "$as_me:$LINENO: checking for working sleep" >&5 +-$as_echo_n "checking for working sleep... " >&6; } +-if test "${gl_cv_func_sleep_works+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- gl_cv_func_sleep_works="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +-#include +-#include +-#include +-static void +-handle_alarm (int sig) +-{ +- if (sig != SIGALRM) +- _exit (2); +-} + +-int +-main () +-{ + +- /* Failure to compile this test due to missing alarm is okay, +- since all such platforms (mingw) also lack sleep. */ +- unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ +- unsigned int remaining; +- signal (SIGALRM, handle_alarm); +- alarm (1); +- remaining = sleep (pentecost); +- if (remaining > pentecost) +- return 3; +- if (remaining <= pentecost - 10) +- return 4; +- return 0; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_sleep_works=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_sleep_works=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++ if test $ac_cv_func_renameat = no; then ++ HAVE_RENAMEAT=0 + + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_sleep_works" >&5 +-$as_echo "$gl_cv_func_sleep_works" >&6; } +- if test "$gl_cv_func_sleep_works" != yes; then +- REPLACE_SLEEP=1 + + + + + + ++ gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" + + +- gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" + +- fi +- fi + + + + +- GNULIB_SLEEP=1 + + ++ gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_SLEEP 1 +-_ACEOF ++ elif test $REPLACE_RENAME = 1; then ++ REPLACE_RENAMEAT=1 + + + +- # Code from module snprintf: + + +- gl_cv_func_snprintf_usable=no + +-for ac_func in snprintf +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func + +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ + +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif ++ gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext" + +-#undef $ac_func + +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- eval "$as_ac_var=no" +-fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +-_ACEOF + +-fi +-done + +- if test $ac_cv_func_snprintf = yes; then + + +- { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 +-$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } +-if test "${gl_cv_func_snprintf_size1+set}" = set; then ++ gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext" ++ ++ fi ++ ++ ++ ++ ++ GNULIB_RENAMEAT=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h ++ ++ ++ ++ # Code from module rmdir: ++ ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 ++$as_echo_n "checking whether rmdir works... " >&6; } ++if ${gl_cv_func_rmdir_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- if test "$cross_compiling" = yes; then +- gl_cv_func_snprintf_size1="guessing yes" ++ mkdir conftest.dir ++ touch conftest.file ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_rmdir_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- + #include +-int main() ++ #include ++ #include ++ ++int ++main () + { +- static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; +- snprintf (buf, 1, "%d", 12345); +- return buf[1] != 'E'; ++int result = 0; ++ if (!rmdir ("conftest.file/")) ++ result |= 1; ++ else if (errno != ENOTDIR) ++ result |= 2; ++ if (!rmdir ("conftest.dir/./")) ++ result |= 4; ++ return result; ++ ++ ; ++ return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_snprintf_size1=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_rmdir_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_snprintf_size1=no ++ gl_cv_func_rmdir_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- +- ++ rm -rf conftest.dir conftest.file + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 +-$as_echo "$gl_cv_func_snprintf_size1" >&6; } +- +- case "$gl_cv_func_snprintf_size1" in +- *yes) +- +- case "$gl_cv_func_snprintf_retval_c99" in +- *yes) +- gl_cv_func_snprintf_usable=yes +- ;; +- esac +- ;; +- esac +- fi +- if test $gl_cv_func_snprintf_usable = no; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 ++$as_echo "$gl_cv_func_rmdir_works" >&6; } ++ if test x"$gl_cv_func_rmdir_works" != xyes; then ++ REPLACE_RMDIR=1 + + + +@@ -41785,306 +23570,137 @@ + + + ++ gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" + ++ fi + +- gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" + +- if test $ac_cv_func_snprintf = yes; then +- REPLACE_SNPRINTF=1 +- fi +- : + +- fi ++ ++ GNULIB_RMDIR=1 + + + ++$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h + +- if test $ac_cv_have_decl_snprintf = no; then +- HAVE_DECL_SNPRINTF=0 +- fi + + ++ # Code from module rpmatch: + + +- GNULIB_SNPRINTF=1 + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_SNPRINTF 1 +-_ACEOF + + + + + +-cat >>confdefs.h <<_ACEOF +-#define GNULIB_SNPRINTF 1 ++ ++ ++ for ac_func in rpmatch ++do : ++ ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch" ++if test "x$ac_cv_func_rpmatch" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_RPMATCH 1 + _ACEOF + ++else + +- # Code from module ssize_t: ++ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext" + +- { $as_echo "$as_me:$LINENO: checking for ssize_t" >&5 +-$as_echo_n "checking for ssize_t... " >&6; } +-if test "${gt_cv_ssize_t+set}" = set; then ++fi ++done ++ ++ ++ if test $ac_cv_func_rpmatch = no; then ++ HAVE_RPMATCH=0 ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5 ++$as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; } ++if ${gl_cv_langinfo_yesexpr+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +-int x = sizeof (ssize_t *) + sizeof (ssize_t); +- return !x; ++char* cs = nl_langinfo(YESEXPR); return !cs; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gt_cv_ssize_t=yes ++if ac_fn_c_try_link "$LINENO"; then : ++ gl_cv_langinfo_yesexpr=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_ssize_t=no ++ gl_cv_langinfo_yesexpr=no + fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5 +-$as_echo "$gt_cv_ssize_t" >&6; } +- if test $gt_cv_ssize_t = no; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5 ++$as_echo "$gl_cv_langinfo_yesexpr" >&6; } ++ if test $gl_cv_langinfo_yesexpr = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define ssize_t int +-_ACEOF ++$as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h + + fi + +- # Code from module stat: ++ fi + + + + ++ GNULIB_RPMATCH=1 + + + ++$as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h + +- { $as_echo "$as_me:$LINENO: checking whether stat handles trailing slashes on directories" >&5 +-$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } +-if test "${gl_cv_func_stat_dir_slash+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- if test "$cross_compiling" = yes; then +- case $host_os in +- mingw*) gl_cv_func_stat_dir_slash="guessing no";; +- *) gl_cv_func_stat_dir_slash="guessing yes";; +- esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-struct stat st; return stat (".", &st) != stat ("./", &st); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_stat_dir_slash=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_stat_dir_slash=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi ++ # Code from module safe-read: + + +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_stat_dir_slash" >&5 +-$as_echo "$gl_cv_func_stat_dir_slash" >&6; } +- { $as_echo "$as_me:$LINENO: checking whether stat handles trailing slashes on files" >&5 +-$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } +-if test "${gl_cv_func_stat_file_slash+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- touch conftest.tmp +- # Assume that if we have lstat, we can also check symlinks. +- if test $ac_cv_func_lstat = yes; then +- ln -s conftest.tmp conftest.lnk +- fi +- if test "$cross_compiling" = yes; then +- gl_cv_func_stat_file_slash="guessing no" +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-int result = 0; +- struct stat st; +- if (!stat ("conftest.tmp/", &st)) +- result |= 1; +-#if HAVE_LSTAT +- if (!stat ("conftest.lnk/", &st)) +- result |= 2; +-#endif +- return result; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_func_stat_file_slash=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-gl_cv_func_stat_file_slash=no +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi + + +- rm -f conftest.tmp conftest.lnk +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_stat_file_slash" >&5 +-$as_echo "$gl_cv_func_stat_file_slash" >&6; } +- case $gl_cv_func_stat_dir_slash in +- *no) REPLACE_STAT=1 + +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_FUNC_STAT_DIR 1 +-_ACEOF +-;; +- esac +- case $gl_cv_func_stat_file_slash in +- *no) REPLACE_STAT=1 + +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_FUNC_STAT_FILE 1 +-_ACEOF +-;; +- esac +- if test $REPLACE_STAT = 1; then ++ gl_LIBOBJS="$gl_LIBOBJS safe-read.$ac_objext" + + + + + + ++ # Code from module safe-write: + + +- gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" + + +- fi + + + + +- GNULIB_STAT=1 + ++ gl_LIBOBJS="$gl_LIBOBJS safe-write.$ac_objext" + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STAT 1 +-_ACEOF + + + +- # Code from module stat-macros: +- # Code from module stat-time: + + + ++ # Code from module same-inode: ++ # Code from module save-cwd: + + + +@@ -42092,1259 +23708,714 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_atim.tv_nsec" >&5 +-$as_echo_n "checking for struct stat.st_atim.tv_nsec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_atim_tv_nsec+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_atim.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atim_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include ++ gl_LIBOBJS="$gl_LIBOBJS save-cwd.$ac_objext" + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_atim.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atim_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_member_struct_stat_st_atim_tv_nsec=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi ++ # Code from module savedir: + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atim_tv_nsec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_atim_tv_nsec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 +-_ACEOF + +-{ $as_echo "$as_me:$LINENO: checking whether struct stat.st_atim is of type struct timespec" >&5 +-$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } +-if test "${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- #include +- #include +- #if HAVE_SYS_TIME_H +- # include +- #endif +- #include +- struct timespec ts; +- struct stat st; + +-int +-main () +-{ + +- st.st_atim = ts; + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 +-$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } +- if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then ++ gl_LIBOBJS="$gl_LIBOBJS savedir.$ac_objext" ++ ++ ++ # Code from module setenv: ++ ++ ++ if test $HAVE_SETENV$REPLACE_SETENV != 10; then ++ ++ ++ ++ ++ ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" ++ ++ fi ++ + +-cat >>confdefs.h <<\_ACEOF +-#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 ++ ++ ++ GNULIB_SETENV=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h ++ ++ ++ ++ # Code from module size_max: ++ ++ for ac_header in stdint.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdint_h" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STDINT_H 1 + _ACEOF + +- fi +-else +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_atimespec.tv_nsec" >&5 +-$as_echo_n "checking for struct stat.st_atimespec.tv_nsec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_atimespec_tv_nsec+set}" = set; then ++fi ++ ++done ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 ++$as_echo_n "checking for SIZE_MAX... " >&6; } ++if ${gl_cv_size_max+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ gl_cv_size_max= ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_atimespec.tv_nsec) +-return 0; +- ; +- return 0; +-} ++#include ++#if HAVE_STDINT_H ++#include ++#endif ++#ifdef SIZE_MAX ++Found it ++#endif ++ + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atimespec_tv_nsec=yes ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "Found it" >/dev/null 2>&1; then : ++ gl_cv_size_max=yes ++fi ++rm -f conftest* ++ ++ if test -z "$gl_cv_size_max"; then ++ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include ++#include "; then : ++ + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ size_t_bits_minus_1= ++fi + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : ++ ++else ++ fits_in_uint= ++fi ++ ++ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then ++ if test $fits_in_uint = 1; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include ++#include ++ extern size_t foo; ++ extern unsigned long foo; + + int + main () + { +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_atimespec.tv_nsec) +-return 0; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atimespec_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_atimespec_tv_nsec=no ++if ac_fn_c_try_compile "$LINENO"; then : ++ fits_in_uint=0 + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi ++ fi ++ if test $fits_in_uint = 1; then ++ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" ++ else ++ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" ++ fi ++ else ++ gl_cv_size_max='((size_t)~(size_t)0)' ++ fi ++ fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimespec_tv_nsec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_atimespec_tv_nsec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 ++$as_echo "$gl_cv_size_max" >&6; } ++ if test "$gl_cv_size_max" != yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 ++#define SIZE_MAX $gl_cv_size_max + _ACEOF + ++ fi + +-else +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_atimensec" >&5 +-$as_echo_n "checking for struct stat.st_atimensec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_atimensec+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_atimensec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atimensec=yes ++ # Code from module sleep: ++ ++ ++ ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include ++" ++if test "x$ac_cv_have_decl_sleep" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_have_decl=0 ++fi + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_SLEEP $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_atimensec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atimensec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_member_struct_stat_st_atimensec=no +-fi ++ if test $ac_cv_have_decl_sleep != yes; then ++ HAVE_SLEEP=0 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atimensec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_atimensec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_atimensec" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 +-_ACEOF + + +-else +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_atim.st__tim.tv_nsec" >&5 +-$as_echo_n "checking for struct stat.st_atim.st__tim.tv_nsec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec+set}" = set; then ++ ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" ++ ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5 ++$as_echo_n "checking for working sleep... " >&6; } ++if ${gl_cv_func_sleep_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_sleep_works="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include + +-int +-main () ++#include ++#include ++#include ++static void ++handle_alarm (int sig) + { +-static struct stat ac_aggr; +-if (ac_aggr.st_atim.st__tim.tv_nsec) +-return 0; +- ; +- return 0; ++ if (sig != SIGALRM) ++ _exit (2); + } +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + + int + main () + { +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_atim.st__tim.tv_nsec) +-return 0; ++ ++ /* Failure to compile this test due to missing alarm is okay, ++ since all such platforms (mingw) also lack sleep. */ ++ unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */ ++ unsigned int remaining; ++ signal (SIGALRM, handle_alarm); ++ alarm (1); ++ remaining = sleep (pentecost); ++ if (remaining > pentecost) ++ return 3; ++ if (remaining <= pentecost - 10) ++ return 4; ++ return 0; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_sleep_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec=no ++ gl_cv_func_sleep_works=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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 +-_ACEOF ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5 ++$as_echo "$gl_cv_func_sleep_works" >&6; } ++ if test "$gl_cv_func_sleep_works" != yes; then ++ REPLACE_SLEEP=1 + + +-fi + +-fi + +-fi + +-fi + + + ++ gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext" + ++ fi ++ fi + + + + ++ GNULIB_SLEEP=1 + + + +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimespec.tv_nsec" >&5 +-$as_echo_n "checking for struct stat.st_birthtimespec.tv_nsec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_birthtimespec_tv_nsec+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include ++$as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_birthtimespec.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_birthtimespec.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # Code from module snprintf: + +- ac_cv_member_struct_stat_st_birthtimespec_tv_nsec=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi ++ gl_cv_func_snprintf_usable=no ++ for ac_func in snprintf ++do : ++ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" ++if test "x$ac_cv_func_snprintf" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SNPRINTF 1 ++_ACEOF + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = x""yes; then ++done + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 +-_ACEOF ++ if test $ac_cv_func_snprintf = yes; then + + +-else +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtimensec" >&5 +-$as_echo_n "checking for struct stat.st_birthtimensec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_birthtimensec+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 ++$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } ++if ${gl_cv_func_snprintf_size1+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_birthtimensec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtimensec=yes ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_snprintf_size1="guessing yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- #include + +-int +-main () ++#include ++int main() + { +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_birthtimensec) +-return 0; +- ; +- return 0; ++ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; ++ snprintf (buf, 1, "%d", 12345); ++ return buf[1] != 'E'; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtimensec=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_snprintf_size1=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_birthtimensec=no ++ gl_cv_func_snprintf_size1=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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtimensec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_birthtimensec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_birthtimensec" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 ++$as_echo "$gl_cv_func_snprintf_size1" >&6; } + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 +-_ACEOF ++ case "$gl_cv_func_snprintf_size1" in ++ *yes) + ++ case "$gl_cv_func_snprintf_retval_c99" in ++ *yes) ++ gl_cv_func_snprintf_usable=yes ++ ;; ++ esac ++ ;; ++ esac ++ fi ++ if test $gl_cv_func_snprintf_usable = no; then + +-else +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtim.tv_nsec" >&5 +-$as_echo_n "checking for struct stat.st_birthtim.tv_nsec... " >&6; } +-if test "${ac_cv_member_struct_stat_st_birthtim_tv_nsec+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_birthtim.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtim_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include + +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_birthtim.tv_nsec) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_birthtim_tv_nsec=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_member_struct_stat_st_birthtim_tv_nsec=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 +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtim_tv_nsec" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_birthtim_tv_nsec" >&6; } +-if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = x""yes; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 +-_ACEOF + + +-fi ++ gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" + +-fi ++ if test $ac_cv_func_snprintf = yes; then ++ REPLACE_SNPRINTF=1 ++ fi ++ : ++ ++ fi ++ ++ if test $ac_cv_have_decl_snprintf = no; then ++ HAVE_DECL_SNPRINTF=0 ++ fi ++ ++ ++ ++ ++ GNULIB_SNPRINTF=1 ++ ++ ++ ++$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h + +-fi + + +- # Code from module stdarg: + +- STDARG_H=''; +- NEXT_STDARG_H=''; +- { $as_echo "$as_me:$LINENO: checking for va_copy" >&5 +-$as_echo_n "checking for va_copy... " >&6; } +- if test "${gl_cv_func_va_copy+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define GNULIB_SNPRINTF 1 + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ ++ ++ # Code from module ssize_t: ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 ++$as_echo_n "checking for ssize_t... " >&6; } ++if ${gt_cv_ssize_t+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + int + main () + { +- +-#ifndef va_copy +-void (*func) (va_list, va_list) = va_copy; +-#endif +- ++int x = sizeof (ssize_t *) + sizeof (ssize_t); ++ return !x; + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func_va_copy=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ gt_cv_ssize_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_va_copy=no ++ gt_cv_ssize_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_ssize_t" >&5 ++$as_echo "$gt_cv_ssize_t" >&6; } ++ if test $gt_cv_ssize_t = no; then + +- { $as_echo "$as_me:$LINENO: result: $gl_cv_func_va_copy" >&5 +-$as_echo "$gl_cv_func_va_copy" >&6; } +- if test $gl_cv_func_va_copy = no; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#if defined _AIX && !defined __GNUC__ +- AIX vaccine +- #endif +- +-_ACEOF +-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "vaccine" >/dev/null 2>&1; then +- gl_aixcc=yes +-else +- gl_aixcc=no +-fi +-rm -f conftest* +- +- if test $gl_aixcc = yes; then +- STDARG_H=stdarg.h +- +- +- ++$as_echo "#define ssize_t int" >>confdefs.h + ++ fi + ++ # Code from module stat: + + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_stdarg_h='<'stdarg.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stdarg_h+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 ++$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } ++if ${gl_cv_func_stat_dir_slash+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ case $host_os in ++ mingw*) gl_cv_func_stat_dir_slash="guessing no";; ++ *) gl_cv_func_stat_dir_slash="guessing yes";; ++ esac ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + ++int ++main () ++{ ++struct stat st; return stat (".", &st) != stat ("./", &st); ++ ; ++ return 0; ++} + _ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/stdarg.h#{ +- s#.*"\(.*/stdarg.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' +- +- ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_stat_dir_slash=yes ++else ++ gl_cv_func_stat_dir_slash=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:$LINENO: result: $gl_cv_next_stdarg_h" >&5 +-$as_echo "$gl_cv_next_stdarg_h" >&6; } +- fi +- NEXT_STDARG_H=$gl_cv_next_stdarg_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='<'stdarg.h'>' +- else +- # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_stdarg_h +- fi +- NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive +- +- +- +- +- if test "$gl_cv_next_stdarg_h" = '""'; then +- gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' +- NEXT_STDARG_H="$gl_cv_next_stdarg_h" +- fi +- else + +- saved_as_echo_n="$as_echo_n" +- as_echo_n=':' +- if test "${gl_cv_func___va_copy+set}" = set; then ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 ++$as_echo "$gl_cv_func_stat_dir_slash" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 ++$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } ++if ${gl_cv_func_stat_file_slash+:} false; then : + $as_echo_n "(cached) " >&6 + else +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ touch conftest.tmp ++ # Assume that if we have lstat, we can also check symlinks. ++ if test $ac_cv_func_lstat = yes; then ++ ln -s conftest.tmp conftest.lnk ++ fi ++ if test "$cross_compiling" = yes; then : ++ gl_cv_func_stat_file_slash="guessing no" ++else ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include ++ + int + main () + { +- +-#ifndef __va_copy +-error, bail out ++int result = 0; ++ struct stat st; ++ if (!stat ("conftest.tmp/", &st)) ++ result |= 1; ++#if HAVE_LSTAT ++ if (!stat ("conftest.lnk/", &st)) ++ result |= 2; + #endif ++ return result; + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_func___va_copy=yes ++if ac_fn_c_try_run "$LINENO"; then : ++ gl_cv_func_stat_file_slash=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func___va_copy=no ++ gl_cv_func_stat_file_slash=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_ext ++ rm -f conftest.tmp conftest.lnk + fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 ++$as_echo "$gl_cv_func_stat_file_slash" >&6; } ++ case $gl_cv_func_stat_dir_slash in ++ *no) REPLACE_STAT=1 + +- as_echo_n="$saved_as_echo_n" ++$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h ++;; ++ esac ++ case $gl_cv_func_stat_file_slash in ++ *no) REPLACE_STAT=1 + +- if test $gl_cv_func___va_copy = yes; then ++$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h ++;; ++ esac ++ if test $REPLACE_STAT = 1; then + +-cat >>confdefs.h <<\_ACEOF +-#define va_copy __va_copy +-_ACEOF + +- else + + + +-cat >>confdefs.h <<\_ACEOF +-#define va_copy gl_va_copy +-_ACEOF + +- fi +- fi ++ ++ ++ gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" ++ ++ + fi + +- # Code from module stdbool: + + + +- # Define two additional variables used in the Makefile substitution. ++ GNULIB_STAT=1 + +- if test "$ac_cv_header_stdbool_h" = yes; then +- STDBOOL_H='' +- else +- STDBOOL_H='stdbool.h' +- fi + + +- if test "$ac_cv_type__Bool" = yes; then +- HAVE__BOOL=1 +- else +- HAVE__BOOL=0 +- fi ++$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h + + +- # Code from module stddef: + ++ # Code from module stat-macros: ++ # Code from module stat-time: + + +- if test $gt_cv_c_wchar_t = no; then +- HAVE_WCHAR_T=0 +- STDDEF_H=stddef.h +- fi +- { $as_echo "$as_me:$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 test "${gl_cv_decl_null_works+set}" = set; then ++ ++ ++ ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 ++_ACEOF ++ ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 ++$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } ++if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include +- int test[2 * (sizeof NULL == sizeof (void *)) -1]; ++ ++ #include ++ #include ++ #if HAVE_SYS_TIME_H ++ # include ++ #endif ++ #include ++ struct timespec ts; ++ struct stat st; + + int + main () + { + ++ st.st_atim = ts; ++ + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- gl_cv_decl_null_works=yes ++if ac_fn_c_try_compile "$LINENO"; then : ++ ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_decl_null_works=no ++ ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$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 +- +- +- ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 ++$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } ++ if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then + ++$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h + ++ fi ++else ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 ++_ACEOF + + +- if test $gl_cv_have_include_next = yes; then +- gl_cv_next_stddef_h='<'stddef.h'>' +- else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stddef_h+set}" = set; then +- $as_echo_n "(cached) " >&6 + else ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 + _ACEOF +- case "$host_os" in +- aix*) gl_absname_cpp="$ac_cpp -C" ;; +- *) gl_absname_cpp="$ac_cpp" ;; +- esac +- gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/stddef.h#{ +- s#.*"\(.*/stddef.h\)".*#\1# +- s#^/[^/]#//&# +- p +- q +- }'`'"' + + +-fi +-{ $as_echo "$as_me:$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 ++else ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : + +- 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 ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 ++_ACEOF + + ++fi + ++fi + +- fi ++fi + +- # Code from module stdint: ++fi + + + +- if test $ac_cv_type_long_long_int = yes; then +- HAVE_LONG_LONG_INT=1 +- else +- HAVE_LONG_LONG_INT=0 +- fi + + +- if test $ac_cv_type_unsigned_long_long_int = yes; then +- HAVE_UNSIGNED_LONG_LONG_INT=1 +- else +- HAVE_UNSIGNED_LONG_LONG_INT=0 +- fi + ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 ++_ACEOF + + ++else ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : + ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 ++_ACEOF + + ++else ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include ++ #include ++" ++if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : + +- if test $ac_cv_header_wchar_h = yes; then +- HAVE_WCHAR_H=1 +- else +- HAVE_WCHAR_H=0 +- fi ++cat >>confdefs.h <<_ACEOF ++#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 ++_ACEOF + + +- if test $ac_cv_header_inttypes_h = yes; then +- HAVE_INTTYPES_H=1 +- else +- HAVE_INTTYPES_H=0 +- fi ++fi + ++fi ++ ++fi + +- if test $ac_cv_header_sys_types_h = yes; then +- HAVE_SYS_TYPES_H=1 +- else +- HAVE_SYS_TYPES_H=0 +- fi + ++ # Code from module stdarg: + ++ STDARG_H=''; ++ NEXT_STDARG_H=''; ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5 ++$as_echo_n "checking for va_copy... " >&6; } ++ if ${gl_cv_func_va_copy+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else + ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include ++int ++main () ++{ + ++#ifndef va_copy ++void (*func) (va_list, va_list) = va_copy; ++#endif + ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func_va_copy=yes ++else ++ gl_cv_func_va_copy=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_va_copy" >&5 ++$as_echo "$gl_cv_func_va_copy" >&6; } ++ if test $gl_cv_func_va_copy = no; then ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#if defined _AIX && !defined __GNUC__ ++ AIX vaccine ++ #endif + ++_ACEOF ++if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ++ $EGREP "vaccine" >/dev/null 2>&1; then : ++ gl_aixcc=yes ++else ++ gl_aixcc=no ++fi ++rm -f conftest* + ++ if test $gl_aixcc = yes; then ++ STDARG_H=stdarg.h + + + +@@ -43354,1001 +24425,343 @@ + + + if test $gl_cv_have_include_next = yes; then +- gl_cv_next_stdint_h='<'stdint.h'>' ++ gl_cv_next_stdarg_h='<'stdarg.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 +-$as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stdint_h+set}" = set; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_stdarg_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- if test $ac_cv_header_stdint_h = yes; then +- +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++#include + + _ACEOF + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac +- gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | +- sed -n '\#/stdint.h#{ +- s#.*"\(.*/stdint.h\)".*#\1# ++ gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/stdarg.h#{ ++ s#.*"\(.*/stdarg.h\)".*#\1# + s#^/[^/]#//&# + p + q + }'`'"' +- else +- gl_cv_next_stdint_h='<'stdint.h'>' +- fi + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5 +-$as_echo "$gl_cv_next_stdint_h" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5 ++$as_echo "$gl_cv_next_stdarg_h" >&6; } + fi +- NEXT_STDINT_H=$gl_cv_next_stdint_h ++ NEXT_STDARG_H=$gl_cv_next_stdarg_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'>' ++ gl_next_as_first_directive='<'stdarg.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' +- gl_next_as_first_directive=$gl_cv_next_stdint_h ++ gl_next_as_first_directive=$gl_cv_next_stdarg_h + fi +- NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive +- ++ NEXT_AS_FIRST_DIRECTIVE_STDARG_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 "$gl_cv_next_stdarg_h" = '""'; then ++ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"' ++ NEXT_STDARG_H="$gl_cv_next_stdarg_h" ++ fi ++ else + +- if test $ac_cv_header_stdint_h = yes; then +- { $as_echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5 +-$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } +-if test "${gl_cv_header_working_stdint_h+set}" = set; then ++ saved_as_echo_n="$as_echo_n" ++ as_echo_n=':' ++ if ${gl_cv_func___va_copy+:} false; then : + $as_echo_n "(cached) " >&6 + else +- gl_cv_header_working_stdint_h=no +- cat >conftest.$ac_ext <<_ACEOF + +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +- +-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +-#include +-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ +-#if !(defined WCHAR_MIN && defined WCHAR_MAX) +-#error "WCHAR_MIN, WCHAR_MAX not defined in " +-#endif +- +- +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #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; +- +-#include /* 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; +- +- /* 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; +-}; +- ++#include + int + main () + { + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- if test "$cross_compiling" = yes; then +- gl_cv_header_working_stdint_h=yes +- +-else +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ +-#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ +-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +-#include +- +- +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif +- +- +-#include +-#include +-#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), ++#ifndef __va_copy ++error, bail out + #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 +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- gl_cv_header_working_stdint_h=yes +-else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +- +- +- ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_func___va_copy=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ++ gl_cv_func___va_copy=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- +-fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5 +-$as_echo "$gl_cv_header_working_stdint_h" >&6; } +- fi +- if test "$gl_cv_header_working_stdint_h" = yes; then +- STDINT_H= +- else +- +- +-for ac_header in sys/inttypes.h sys/bitypes.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi ++ as_echo_n="$saved_as_echo_n" + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } ++ if test $gl_cv_func___va_copy = yes; then + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } ++$as_echo "#define va_copy __va_copy" >>confdefs.h + +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +-_ACEOF ++ else + +-fi + +-done ++$as_echo "#define va_copy gl_va_copy" >>confdefs.h + +- if test $ac_cv_header_sys_inttypes_h = yes; then +- HAVE_SYS_INTTYPES_H=1 +- else +- HAVE_SYS_INTTYPES_H=0 ++ fi + fi ++ fi ++ ++ # Code from module stdbool: + +- if test $ac_cv_header_sys_bitypes_h = yes; then +- HAVE_SYS_BITYPES_H=1 +- else +- HAVE_SYS_BITYPES_H=0 +- fi + + ++ # Define two additional variables used in the Makefile substitution. ++ ++ if test "$ac_cv_header_stdbool_h" = yes; then ++ STDBOOL_H='' ++ else ++ STDBOOL_H='stdbool.h' ++ fi + + +- if test $APPLE_UNIVERSAL_BUILD = 0; then ++ if test "$ac_cv_type__Bool" = yes; then ++ HAVE__BOOL=1 ++ else ++ HAVE__BOOL=0 ++ fi + + ++ # Code from module stddef: + + +- for gltype in ptrdiff_t size_t ; do +- { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 +-$as_echo_n "checking for bit size of $gltype... " >&6; } +-if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then ++ ++ 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 +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include ++ int test[2 * (sizeof NULL == sizeof (void *)) -1]; + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif +- +-#include + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++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 ++ if test -n "$STDDEF_H"; then + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done ++ ++ ++ ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_stddef_h+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ ++#include + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++_ACEOF ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/stddef.h#{ ++ s#.*"\(.*/stddef.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++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 + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ 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 + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ fi + +- ac_lo= ac_hi= +-fi ++ # Code from module stdint: + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ if test $ac_cv_type_long_long_int = yes; then ++ HAVE_LONG_LONG_INT=1 ++ else ++ HAVE_LONG_LONG_INT=0 ++ fi + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ if test $ac_cv_type_unsigned_long_long_int = yes; then ++ HAVE_UNSIGNED_LONG_LONG_INT=1 ++ else ++ HAVE_UNSIGNED_LONG_LONG_INT=0 ++ fi + +- ac_lo=`expr '(' $ac_mid ')' + 1` +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) result=$ac_lo;; +-'') result=unknown ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ if test $ac_cv_header_wchar_h = yes; then ++ HAVE_WCHAR_H=1 ++ else ++ HAVE_WCHAR_H=0 ++ fi + +-#include +-static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +-static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +-#include +-#include +-int +-main () +-{ + +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof ($gltype) * CHAR_BIT) < 0) +- { +- long int i = longval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%ld", i); +- } ++ if test $ac_cv_header_inttypes_h = yes; then ++ HAVE_INTTYPES_H=1 + else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; ++ HAVE_INTTYPES_H=0 ++ fi + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- result=`cat conftest.val` ++ ++ 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 " >&5 ++$as_echo_n "checking absolute name of ... " >&6; } ++if ${gl_cv_next_stdint_h+:} false; then : ++ $as_echo_n "(cached) " >&6 + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +-( exit $ac_status ) +-result=unknown +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +-fi +-rm -f conftest.val +- eval gl_cv_bitsizeof_${gltype}=\$result ++ if test $ac_cv_header_stdint_h = yes; then ++ ++ ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++#include + +-fi +-ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$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 ++ case "$host_os" in ++ aix*) gl_absname_cpp="$ac_cpp -C" ;; ++ *) gl_absname_cpp="$ac_cpp" ;; ++ esac ++ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | ++ sed -n '\#/stdint.h#{ ++ s#.*"\(.*/stdint.h\)".*#\1# ++ s#^/[^/]#//&# ++ p ++ q ++ }'`'"' ++ else ++ gl_cv_next_stdint_h='<'stdint.h'>' ++ fi + +- eval BITSIZEOF_${GLTYPE}=\$result +- done + ++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 + +- fi + + + ++ if test $ac_cv_header_stdint_h = yes; then ++ HAVE_STDINT_H=1 ++ else ++ HAVE_STDINT_H=0 ++ fi + + +- for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking for bit size of $gltype" >&5 +-$as_echo_n "checking for bit size of $gltype... " >&6; } +-if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then ++ 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 +- if test "$cross_compiling" = yes; then +- # Depending upon the size, compute the lo and hi bounds. +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ gl_cv_header_working_stdint_h=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++ ++#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ ++#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ ++#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ ++#include ++/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ ++#if !(defined WCHAR_MIN && defined WCHAR_MAX) ++#error "WCHAR_MIN, WCHAR_MAX not defined in " ++#endif ++ ++ + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include +@@ -44359,156 +24772,161 @@ + # include + #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)]; +-test_array [0] = 0 + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=0 ac_mid=0 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++#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; ++ ++#include /* 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; + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif ++ /* 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; ++}; + +-#include + int + main () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 + + ; + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr $ac_mid + 1` +- if test $ac_lo -le $ac_mid; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid + 1` +-fi ++if ac_fn_c_try_compile "$LINENO"; then : ++ if test "$cross_compiling" = yes; then : ++ gl_cv_header_working_stdint_h=yes + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- done + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +- /* BSD/OS 4.0.1 has a bug: , and must be +- included before . */ +- #include +- #include +- #if HAVE_WCHAR_H +- # include +- # include +- # include +- #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)]; +-test_array [0] = 0 ++#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ ++#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ ++#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ ++#include + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=-1 ac_mid=-1 +- while :; do +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ +@@ -44520,71 +24938,119 @@ + # include + #endif + +-#include ++ ++#include ++#include ++#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 () + { +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)]; +-test_array [0] = 0 ++ ++ 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 +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_lo=$ac_mid; break +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_hi=`expr '(' $ac_mid ')' - 1` +- if test $ac_mid -le $ac_hi; then +- ac_lo= ac_hi= +- break +- fi +- ac_mid=`expr 2 '*' $ac_mid` ++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 +- done +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_lo= ac_hi= + 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 ++ if test "$gl_cv_header_working_stdint_h" = yes; then ++ STDINT_H= ++ else ++ 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 + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-# Binary search between lo and hi bounds. +-while test "x$ac_lo" != "x$ac_hi"; do +- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ ++done ++ ++ if test $ac_cv_header_sys_inttypes_h = yes; then ++ HAVE_SYS_INTTYPES_H=1 ++ else ++ HAVE_SYS_INTTYPES_H=0 ++ fi ++ ++ if test $ac_cv_header_sys_bitypes_h = yes; then ++ HAVE_SYS_BITYPES_H=1 ++ else ++ HAVE_SYS_BITYPES_H=0 ++ 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 ++ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include +@@ -44595,57 +25061,41 @@ + # include + #endif + +-#include +-int +-main () +-{ +-static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)]; +-test_array [0] = 0 ++#include "; then : + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_hi=$ac_mid + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_lo=`expr '(' $ac_mid ')' + 1` ++ result=unknown + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-done +-case $ac_lo in +-?*) result=$ac_lo;; +-'') result=unknown ;; +-esac +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++ 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 +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ + ++ 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 ++ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " + /* BSD/OS 4.0.1 has a bug: , and must be + included before . */ + #include +@@ -44656,81 +25106,17 @@ + # include + #endif + +-#include +-static long int longval () { return sizeof ($gltype) * CHAR_BIT; } +-static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; } +-#include +-#include +-int +-main () +-{ +- +- FILE *f = fopen ("conftest.val", "w"); +- if (! f) +- return 1; +- if ((sizeof ($gltype) * CHAR_BIT) < 0) +- { +- long int i = longval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%ld", i); +- } +- else +- { +- unsigned long int i = ulongval (); +- if (i != (sizeof ($gltype) * CHAR_BIT)) +- return 1; +- fprintf (f, "%lu", i); +- } +- /* Do not output a trailing newline, as this causes \r\n confusion +- on some platforms. */ +- return ferror (f) || fclose (f) != 0; ++#include "; then : + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- result=`cat conftest.val` + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-result=unknown +-fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ++ result=unknown + fi +-rm -f conftest.val ++ + eval gl_cv_bitsizeof_${gltype}=\$result + + fi +-ac_res=`eval 'as_val=${'gl_cv_bitsizeof_${gltype}'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++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 +@@ -44747,20 +25133,13 @@ + + + +- +- +- + for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking whether $gltype is signed" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 + $as_echo_n "checking whether $gltype is signed... " >&6; } +-if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${gl_cv_type_${gltype}_signed+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -44782,39 +25161,17 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + result=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- result=no ++ result=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + + fi +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_signed'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++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_'` +@@ -44835,12 +25192,10 @@ + if test $APPLE_UNIVERSAL_BUILD = 0; then + + +- +- + for gltype in ptrdiff_t size_t ; do +- { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 ++ { $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 { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${gl_cv_type_${gltype}_suffix+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval gl_cv_type_${gltype}_suffix=no +@@ -44861,11 +25216,7 @@ + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -44888,40 +25239,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + 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 +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++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 +@@ -44937,13 +25264,10 @@ + fi + + +- +- +- + for gltype in sig_atomic_t wchar_t wint_t ; do +- { $as_echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5 ++ { $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 { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${gl_cv_type_${gltype}_suffix+:} false; then : + $as_echo_n "(cached) " >&6 + else + eval gl_cv_type_${gltype}_suffix=no +@@ -44964,11 +25288,7 @@ + ull) gltype1='unsigned long long int';; + ui64)gltype1='unsigned __int64';; + esac +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* BSD/OS 4.0.1 has a bug: , and must be +@@ -44991,40 +25311,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval gl_cv_type_${gltype}_suffix=\$glsuf +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + 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 +-ac_res=`eval 'as_val=${'gl_cv_type_${gltype}_suffix'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++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 +@@ -45057,17 +25353,13 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdio_h='<'stdio.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stdio_h+set}" = set; then ++if ${gl_cv_next_stdio_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -45086,7 +25378,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5 ++{ $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 +@@ -45116,30 +25408,14 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do ++ for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -45152,48 +25428,23 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +@@ -45211,17 +25462,13 @@ + if test $gl_cv_have_include_next = yes; then + gl_cv_next_stdlib_h='<'stdlib.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_stdlib_h+set}" = set; then ++if ${gl_cv_next_stdlib_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -45240,7 +25487,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5 ++{ $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 +@@ -45259,42 +25506,14 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do ++ for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt mkdtemp mkostemp mkostemps mkstemp mkstemps ptsname random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unlockpt unsetenv; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #if HAVE_SYS_LOADAVG_H +@@ -45313,162 +25532,47 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_gl_Symbol=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +-_ACEOF +- +- eval ac_cv_have_decl_$gl_func=yes +-fi +- +- done +- +- +- # Code from module stpcpy: +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-for ac_func in stpcpy +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++if ac_fn_c_try_compile "$LINENO"; then : ++ eval "$as_gl_Symbol=yes" ++else ++ eval "$as_gl_Symbol=no" + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++ eval ac_cv_have_decl_$gl_func=yes ++fi ++ done ++ ++ ++ # Code from module stpcpy: ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ for ac_func in stpcpy ++do : ++ ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" ++if test "x$ac_cv_func_stpcpy" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_STPCPY 1 + _ACEOF + + else +@@ -45493,9 +25597,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STPCPY 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h + + + +@@ -45511,102 +25613,12 @@ + + + +- +-for ac_func in strcasecmp +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strcasecmp ++do : ++ ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" ++if test "x$ac_cv_func_strcasecmp" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRCASECMP 1 + _ACEOF + + else +@@ -45634,102 +25646,12 @@ + + + +- +-for ac_func in strncasecmp +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strncasecmp ++do : ++ ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" ++if test "x$ac_cv_func_strncasecmp" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRNCASECMP 1 + _ACEOF + + else +@@ -45745,75 +25667,17 @@ + : + + fi +- { $as_echo "$as_me:$LINENO: checking whether strncasecmp is declared" >&5 +-$as_echo_n "checking whether strncasecmp is declared... " >&6; } +-if test "${ac_cv_have_decl_strncasecmp+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strncasecmp +- (void) strncasecmp; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strncasecmp=yes ++ ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strncasecmp" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strncasecmp=no ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strncasecmp" >&5 +-$as_echo "$ac_cv_have_decl_strncasecmp" >&6; } +-if test "x$ac_cv_have_decl_strncasecmp" = x""yes; then +- + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNCASECMP 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRNCASECMP 0 ++#define HAVE_DECL_STRNCASECMP $ac_have_decl + _ACEOF + +- +-fi +- +- + if test $ac_cv_have_decl_strncasecmp = no; then + HAVE_DECL_STRNCASECMP=0 + fi +@@ -45832,102 +25696,12 @@ + + + +- +-for ac_func in strchrnul +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRCHRNUL 1 + _ACEOF + + else +@@ -45950,9 +25724,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRCHRNUL 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h + + + +@@ -45961,11 +25733,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_strdup = yes; then + if test $gl_cv_func_malloc_posix != yes; then + REPLACE_STRDUP=1 +@@ -45995,9 +25762,6 @@ + : + fi + +- +- +- + if test $ac_cv_have_decl_strdup = no; then + HAVE_DECL_STRDUP=0 + fi +@@ -46009,9 +25773,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRDUP 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h + + + +@@ -46044,9 +25806,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRERROR 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h + + + +@@ -46065,26 +25825,18 @@ + + + +- +- +- +- +- +- +- +- + if test $ac_cv_have_decl_strndup = no; then + HAVE_DECL_STRNDUP=0 + fi + + if test $ac_cv_func_strndup = yes; then + # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. +- { $as_echo "$as_me:$LINENO: checking for working strndup" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 + $as_echo_n "checking for working strndup... " >&6; } +-if test "${gl_cv_func_strndup_works+set}" = set; then ++if ${gl_cv_func_strndup_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + + case $host_os in + aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; +@@ -46092,14 +25844,10 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +- +- /* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include ++ ++ #include + #include + int + main () +@@ -46117,44 +25865,17 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strndup_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_strndup_works=no ++ gl_cv_func_strndup_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_strndup_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 + $as_echo "$gl_cv_func_strndup_works" >&6; } + case $gl_cv_func_strndup_works in + *no) +@@ -46191,9 +25912,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRNDUP 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h + + + +@@ -46204,25 +25923,22 @@ + + + +- +- +- + if test $ac_cv_have_decl_strnlen = no; then + HAVE_DECL_STRNLEN=0 + else +- { $as_echo "$as_me:$LINENO: checking for working strnlen" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 + $as_echo_n "checking for working strnlen... " >&6; } +-if test "${ac_cv_func_strnlen_working+set}" = set; then ++if ${ac_cv_func_strnlen_working+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then +- ac_cv_func_strnlen_working=no ++ 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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default + int +@@ -46248,44 +25964,17 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strnlen_working=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-ac_cv_func_strnlen_working=no ++ ac_cv_func_strnlen_working=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strnlen_working" >&5 ++{ $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 && + +@@ -46323,25 +26012,19 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRNLEN 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h + + + + # Code from module strnlen1: + # Code from module strtoimax: + +- { $as_echo "$as_me:$LINENO: checking whether defines strtoimax as a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines strtoimax as a macro" >&5 + $as_echo_n "checking whether defines strtoimax as a macro... " >&6; } +-if test "${gl_cv_func_strtoimax_macro+set}" = set; then ++if ${gl_cv_func_strtoimax_macro+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #ifdef strtoimax +@@ -46349,7 +26032,7 @@ + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then ++ $EGREP "inttypes_h_defines_strtoimax" >/dev/null 2>&1; then : + gl_cv_func_strtoimax_macro=yes + else + gl_cv_func_strtoimax_macro=no +@@ -46357,7 +26040,7 @@ + rm -f conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_strtoimax_macro" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax_macro" >&5 + $as_echo "$gl_cv_func_strtoimax_macro" >&6; } + + if test "$gl_cv_func_strtoimax_macro" != yes; then +@@ -46369,102 +26052,12 @@ + + + +- +-for ac_func in strtoimax +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strtoimax ++do : ++ ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" ++if test "x$ac_cv_func_strtoimax" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOIMAX 1 + _ACEOF + + else +@@ -46477,76 +26070,18 @@ + + if test $ac_cv_func_strtoimax = no; then + +- { $as_echo "$as_me:$LINENO: checking whether strtoll is declared" >&5 +-$as_echo_n "checking whether strtoll is declared... " >&6; } +-if test "${ac_cv_have_decl_strtoll+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strtoll +- (void) strtoll; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strtoll=yes ++ ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strtoll" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strtoll=no ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoll" >&5 +-$as_echo "$ac_cv_have_decl_strtoll" >&6; } +-if test "x$ac_cv_have_decl_strtoll" = x""yes; then +- + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOLL 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOLL 0 ++#define HAVE_DECL_STRTOLL $ac_have_decl + _ACEOF + + +-fi +- +- +- + + fi + fi +@@ -46567,102 +26102,12 @@ + + + +- +-for ac_func in strtol +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strtol ++do : ++ ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" ++if test "x$ac_cv_func_strtol" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOL 1 + _ACEOF + + else +@@ -46681,108 +26126,18 @@ + if test "$ac_cv_type_long_long_int" = yes; then + + +- +- +- +- +- +- +- +-for ac_func in strtoll +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ ++ ++ ++ ++ ++ ++ for ac_func in strtoll ++do : ++ ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" ++if test "x$ac_cv_func_strtoll" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOLL 1 + _ACEOF + + else +@@ -46808,9 +26163,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRTOLL 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h + + + +@@ -46824,102 +26177,12 @@ + + + +- +-for ac_func in strtoul +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strtoul ++do : ++ ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" ++if test "x$ac_cv_func_strtoul" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOUL 1 + _ACEOF + + else +@@ -46944,102 +26207,12 @@ + + + +- +-for ac_func in strtoull +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strtoull ++do : ++ ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" ++if test "x$ac_cv_func_strtoull" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOULL 1 + _ACEOF + + else +@@ -47065,24 +26238,18 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_STRTOULL 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h + + + + # Code from module strtoumax: + +- { $as_echo "$as_me:$LINENO: checking whether defines strtoumax as a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether defines strtoumax as a macro" >&5 + $as_echo_n "checking whether defines strtoumax as a macro... " >&6; } +-if test "${gl_cv_func_strtoumax_macro+set}" = set; then ++if ${gl_cv_func_strtoumax_macro+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #ifdef strtoumax +@@ -47090,7 +26257,7 @@ + #endif + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then ++ $EGREP "inttypes_h_defines_strtoumax" >/dev/null 2>&1; then : + gl_cv_func_strtoumax_macro=yes + else + gl_cv_func_strtoumax_macro=no +@@ -47098,7 +26265,7 @@ + rm -f conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_strtoumax_macro" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoumax_macro" >&5 + $as_echo "$gl_cv_func_strtoumax_macro" >&6; } + + if test "$gl_cv_func_strtoumax_macro" != yes; then +@@ -47110,102 +26277,12 @@ + + + +- +-for ac_func in strtoumax +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in strtoumax ++do : ++ ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" ++if test "x$ac_cv_func_strtoumax" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_STRTOUMAX 1 + _ACEOF + + else +@@ -47218,76 +26295,18 @@ + + if test $ac_cv_func_strtoumax = no; then + +- { $as_echo "$as_me:$LINENO: checking whether strtoull is declared" >&5 +-$as_echo_n "checking whether strtoull is declared... " >&6; } +-if test "${ac_cv_have_decl_strtoull+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-#ifndef strtoull +- (void) strtoull; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_strtoull=yes ++ ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" ++if test "x$ac_cv_have_decl_strtoull" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_strtoull=no ++ ac_have_decl=0 + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtoull" >&5 +-$as_echo "$ac_cv_have_decl_strtoull" >&6; } +-if test "x$ac_cv_have_decl_strtoull" = x""yes; then +- + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOULL 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_STRTOULL 0 ++#define HAVE_DECL_STRTOULL $ac_have_decl + _ACEOF + + +-fi +- +- +- + + fi + fi +@@ -47302,11 +26321,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_symlink = no; then + HAVE_SYMLINK=0 + +@@ -47320,19 +26334,15 @@ + gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext" + + else +- { $as_echo "$as_me:$LINENO: checking whether symlink handles trailing slash correctly" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5 + $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; } +-if test "${gl_cv_func_symlink_works+set}" = set; then ++if ${gl_cv_func_symlink_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_symlink_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -47352,45 +26362,18 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_symlink_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_symlink_works=no ++ gl_cv_func_symlink_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + rm -f conftest.f conftest.link conftest.lnk2 + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_symlink_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 + $as_echo "$gl_cv_func_symlink_works" >&6; } + if test "$gl_cv_func_symlink_works" != yes; then + REPLACE_SYMLINK=1 +@@ -47414,9 +26397,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_SYMLINK 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h + + + +@@ -47426,11 +26407,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_symlinkat = no; then + HAVE_SYMLINKAT=0 + +@@ -47452,9 +26428,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_SYMLINKAT 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h + + + +@@ -47475,28 +26449,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_stat_h='<'sys/stat.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_sys_stat_h+set}" = set; then ++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 >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -47518,7 +26483,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5 ++{ $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 +@@ -47536,140 +26501,27 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for nlink_t" >&5 +-$as_echo_n "checking for nlink_t... " >&6; } +-if test "${ac_cv_type_nlink_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_nlink_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- #include +- +-int +-main () +-{ +-if (sizeof (nlink_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include ++ ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include + #include ++" ++if test "x$ac_cv_type_nlink_t" = xyes; then : + +-int +-main () +-{ +-if (sizeof ((nlink_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_nlink_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_nlink_t" >&5 +-$as_echo "$ac_cv_type_nlink_t" >&6; } +-if test "x$ac_cv_type_nlink_t" = x""yes; then +- : + else + +-cat >>confdefs.h <<\_ACEOF +-#define nlink_t int +-_ACEOF ++$as_echo "#define nlink_t int" >>confdefs.h + + fi + + + +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do ++ for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -47682,149 +26534,35 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +- { $as_echo "$as_me:$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 +- if test "${ac_cv_path_mkdir+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in mkdir gmkdir; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue +- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( +- 'mkdir (GNU coreutils) '* | \ +- 'mkdir (coreutils) '* | \ +- 'mkdir (fileutils) '4.1*) +- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext +- break 3;; +- esac +- done +- done +-done +-IFS=$as_save_IFS +- +-fi +- +- if test "${ac_cv_path_mkdir+set}" = set; then +- MKDIR_P="$ac_cv_path_mkdir -p" +- else +- # As a last resort, use the slow shell script. Don't cache a +- # value for MKDIR_P within a source directory, because that will +- # break other packages using the cache if that directory is +- # removed, or if the value is a relative name. +- test -d ./--version && rmdir ./--version +- MKDIR_P="$ac_install_sh -d" +- fi +-fi +-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +-$as_echo "$MKDIR_P" >&6; } +- + + # Code from module sys_time: + + + +- { $as_echo "$as_me:$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 +- if test "${ac_cv_path_mkdir+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_prog in mkdir gmkdir; do +- for ac_exec_ext in '' $ac_executable_extensions; do +- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue +- case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( +- 'mkdir (GNU coreutils) '* | \ +- 'mkdir (coreutils) '* | \ +- 'mkdir (fileutils) '4.1*) +- ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext +- break 3;; +- esac +- done +- done +-done +-IFS=$as_save_IFS +- +-fi +- +- if test "${ac_cv_path_mkdir+set}" = set; then +- MKDIR_P="$ac_cv_path_mkdir -p" +- else +- # As a last resort, use the slow shell script. Don't cache a +- # value for MKDIR_P within a source directory, because that will +- # break other packages using the cache if that directory is +- # removed, or if the value is a relative name. +- test -d ./--version && rmdir ./--version +- MKDIR_P="$ac_install_sh -d" +- fi +-fi +-{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 +-$as_echo "$MKDIR_P" >&6; } +- + + # Code from module sysexits: + + +- +- +- +- +- + if test $ac_cv_header_sysexits_h = yes; then + HAVE_SYSEXITS_H=1 + +@@ -47836,28 +26574,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sysexits_h='<'sysexits.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_sysexits_h+set}" = set; then ++if ${gl_cv_next_sysexits_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_sysexits_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -47879,7 +26608,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_sysexits_h" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5 + $as_echo "$gl_cv_next_sysexits_h" >&6; } + fi + NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h +@@ -47896,11 +26625,7 @@ + + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -47931,32 +26656,11 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + SYSEXITS_H= + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- SYSEXITS_H=sysexits.h ++ SYSEXITS_H=sysexits.h + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + HAVE_SYSEXITS_H=0 +@@ -47995,31 +26699,19 @@ + + + +- +- +- + 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:$LINENO: checking whether localtime_r is compatible with its POSIX signature" >&5 ++ { $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 test "${gl_cv_time_r_posix+set}" = set; then ++if ${gl_cv_time_r_posix+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -48038,36 +26730,15 @@ + } + + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_time_r_posix=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_time_r_posix=no ++ gl_cv_time_r_posix=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_time_r_posix" >&5 ++{ $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 +@@ -48100,9 +26771,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_TIME_R 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h + + + +@@ -48124,28 +26793,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_unistd_h='<'unistd.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_unistd_h+set}" = set; then ++if ${gl_cv_next_unistd_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_unistd_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -48167,7 +26827,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5 ++{ $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 +@@ -48192,57 +26852,14 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do ++ for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + /* Some systems declare various items in the wrong headers. */ +@@ -48264,48 +26881,23 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +@@ -48320,11 +26912,6 @@ + + + +- +- +- +- +- + gl_LIBOBJS="$gl_LIBOBJS dup-safer.$ac_objext" + + +@@ -48438,9 +27025,9 @@ + + + +- { $as_echo "$as_me:$LINENO: checking whether unlink honors trailing slashes" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5 + $as_echo_n "checking whether unlink honors trailing slashes... " >&6; } +-if test "${gl_cv_func_unlink_honors_slashes+set}" = set; then ++if ${gl_cv_func_unlink_honors_slashes+:} false; then : + $as_echo_n "(cached) " >&6 + else + touch conftest.file +@@ -48448,14 +27035,10 @@ + if test $ac_cv_func_lstat = yes; then + ln -s conftest.file conftest.lnk + fi +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_unlink_honors_slashes="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -48480,49 +27063,22 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_unlink_honors_slashes=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_unlink_honors_slashes=no ++ gl_cv_func_unlink_honors_slashes=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + rm -f conftest.file conftest.lnk + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_honors_slashes" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5 + $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; } +- { $as_echo "$as_me:$LINENO: checking whether unlink of a parent directory fails as it should" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5 + $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; } +-if test "${gl_cv_func_unlink_parent_fails+set}" = set; then ++if ${gl_cv_func_unlink_parent_fails+:} false; then : + $as_echo_n "(cached) " >&6 + else + case "$host_os" in +@@ -48545,14 +27101,10 @@ + mkdir "$tmp/subdir" + GL_SUBDIR_FOR_UNLINK="$tmp/subdir" + export GL_SUBDIR_FOR_UNLINK +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_unlink_parent_fails="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -48568,42 +27120,15 @@ + } + + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_unlink_parent_fails=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_unlink_parent_fails=no ++ gl_cv_func_unlink_parent_fails=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + unset GL_SUBDIR_FOR_UNLINK + rm -rf "$tmp" + else +@@ -48616,14 +27141,12 @@ + esac + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unlink_parent_fails" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5 + $as_echo "$gl_cv_func_unlink_parent_fails" >&6; } + case "$gl_cv_func_unlink_parent_fails" in + *no) + +-cat >>confdefs.h <<\_ACEOF +-#define UNLINK_PARENT_BUG 1 +-_ACEOF ++$as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h + + ;; + esac +@@ -48653,9 +27176,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_UNLINK 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h + + + +@@ -48672,11 +27193,6 @@ + + + +- +- +- +- +- + gl_LIBOBJS="$gl_LIBOBJS unlinkdir.$ac_objext" + + +@@ -48694,57 +27210,14 @@ + cygwin | \ + mingw*) + +-cat >>confdefs.h <<\_ACEOF +-#define UNLINK_CANNOT_UNLINK_DIR 1 +-_ACEOF ++$as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h + ;; + esac + + # Code from module unlocked-io: + + +-cat >>confdefs.h <<\_ACEOF +-#define USE_UNLOCKED_IO 1 +-_ACEOF +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h + + + +@@ -48767,108 +27240,15 @@ + + + +- +- +- + if test $ac_cv_have_decl_unsetenv = no; then + HAVE_DECL_UNSETENV=0 + fi +- +-for ac_func in unsetenv +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ 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 `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_UNSETENV 1 + _ACEOF + + fi +@@ -48889,22 +27269,13 @@ + + + +- +- +- +- +- + else +- { $as_echo "$as_me:$LINENO: checking for unsetenv() return type" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 + $as_echo_n "checking for unsetenv() return type... " >&6; } +-if test "${gt_cv_func_unsetenv_ret+set}" = set; then ++if ${gt_cv_func_unsetenv_ret+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #undef _BSD +@@ -48928,41 +27299,18 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_func_unsetenv_ret='int' + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_func_unsetenv_ret='void' ++ gt_cv_func_unsetenv_ret='void' + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_unsetenv_ret" >&5 ++{ $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 + +-cat >>confdefs.h <<\_ACEOF +-#define VOID_UNSETENV 1 +-_ACEOF ++$as_echo "#define VOID_UNSETENV 1" >>confdefs.h + + REPLACE_UNSETENV=1 + +@@ -48977,19 +27325,15 @@ + + fi + +- { $as_echo "$as_me:$LINENO: checking whether unsetenv obeys POSIX" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 + $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } +-if test "${gl_cv_func_unsetenv_works+set}" = set; then ++if ${gl_cv_func_unsetenv_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_unsetenv_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -49020,44 +27364,17 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_unsetenv_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_unsetenv_works=no ++ gl_cv_func_unsetenv_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_unsetenv_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 + $as_echo "$gl_cv_func_unsetenv_works" >&6; } + if test "$gl_cv_func_unsetenv_works" != yes; then + REPLACE_UNSETENV=1 +@@ -49081,9 +27398,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_UNSETENV 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h + + + +@@ -49105,34 +27420,17 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- + if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then +- { $as_echo "$as_me:$LINENO: checking whether futimesat handles NULL file" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5 + $as_echo_n "checking whether futimesat handles NULL file... " >&6; } +-if test "${gl_cv_func_futimesat_works+set}" = set; then ++if ${gl_cv_func_futimesat_works+:} false; then : + $as_echo_n "(cached) " >&6 + else + touch conftest.file +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_futimesat_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -49150,51 +27448,22 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_futimesat_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_futimesat_works=no ++ gl_cv_func_futimesat_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + rm -f conftest.file + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_futimesat_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5 + $as_echo "$gl_cv_func_futimesat_works" >&6; } + if test "$gl_cv_func_futimesat_works" != yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define FUTIMESAT_NULL_BUG 1 +-_ACEOF ++$as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h + + fi + fi +@@ -49204,11 +27473,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_utimensat = no; then + HAVE_UTIMENSAT=0 + +@@ -49222,19 +27486,15 @@ + gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext" + + else +- { $as_echo "$as_me:$LINENO: checking whether utimensat works" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5 + $as_echo_n "checking whether utimensat works... " >&6; } +-if test "${gl_cv_func_utimensat_works+set}" = set; then ++if ${gl_cv_func_utimensat_works+:} false; then : + $as_echo_n "(cached) " >&6 + else +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_utimensat_works="guessing no" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -49276,33 +27536,8 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #ifdef __linux__ +@@ -49320,48 +27555,21 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_utimensat_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_utimensat_works="needs runtime check" ++ gl_cv_func_utimensat_works="needs runtime check" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_utimensat_works=no ++ gl_cv_func_utimensat_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_utimensat_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5 + $as_echo "$gl_cv_func_utimensat_works" >&6; } + if test "$gl_cv_func_utimensat_works" != yes; then + REPLACE_UTIMENSAT=1 +@@ -49385,20 +27593,13 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_UTIMENSAT 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h + + + + # Code from module vasnprintf: + + +- +- +- +- +- + if test $ac_cv_func_vasnprintf = no; then + + +@@ -49410,11 +27611,6 @@ + + + +- +- +- +- +- + gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" + + +@@ -49449,9 +27645,7 @@ + + if test $ac_cv_func_vasnprintf = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define REPLACE_VASNPRINTF 1 +-_ACEOF ++$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h + + fi + +@@ -49465,107 +27659,12 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5 +-$as_echo_n "checking for ptrdiff_t... " >&6; } +-if test "${ac_cv_type_ptrdiff_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_ptrdiff_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof (ptrdiff_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-if (sizeof ((ptrdiff_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_ptrdiff_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi ++ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" ++if test "x$ac_cv_type_ptrdiff_t" = xyes; then : + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5 +-$as_echo "$ac_cv_type_ptrdiff_t" >&6; } +-if test "x$ac_cv_type_ptrdiff_t" = x""yes; then +- : + else + +-cat >>confdefs.h <<\_ACEOF +-#define ptrdiff_t long +-_ACEOF ++$as_echo "#define ptrdiff_t long" >>confdefs.h + + + fi +@@ -49580,102 +27679,12 @@ + + # Code from module vasprintf: + +- +-for ac_func in vasprintf +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in vasprintf ++do : ++ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" ++if test "x$ac_cv_func_vasprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_VASPRINTF 1 + _ACEOF + + fi +@@ -49726,9 +27735,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_VASPRINTF 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h + + + +@@ -49744,7 +27751,7 @@ + # Code from module version-etc: + + # Check whether --with-packager was given. +-if test "${with_packager+set}" = set; then ++if test "${with_packager+set}" = set; then : + withval=$with_packager; case $withval in + yes|no) ;; + *) +@@ -49759,7 +27766,7 @@ + + + # Check whether --with-packager-version was given. +-if test "${with_packager_version+set}" = set; then ++if test "${with_packager_version+set}" = set; then : + withval=$with_packager_version; case $withval in + yes|no) ;; + *) +@@ -49774,7 +27781,7 @@ + + + # Check whether --with-packager-bug-reports was given. +-if test "${with_packager_bug_reports+set}" = set; then ++if test "${with_packager_bug_reports+set}" = set; then : + withval=$with_packager_bug_reports; case $withval in + yes|no) ;; + *) +@@ -49790,9 +27797,7 @@ + if test "X$with_packager" = "X" && \ + test "X$with_packager_version$with_packager_bug_reports" != "X" + then +- { { $as_echo "$as_me:$LINENO: error: The --with-packager-{bug-reports,version} options require --with-packager" >&5 +-$as_echo "$as_me: error: The --with-packager-{bug-reports,version} options require --with-packager" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5 + fi + + # Code from module version-etc-fsf: +@@ -49800,102 +27805,12 @@ + + + gl_cv_func_vsnprintf_usable=no +- +-for ac_func in vsnprintf +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif +- +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_func in vsnprintf ++do : ++ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" ++if test "x$ac_cv_func_vsnprintf" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++#define HAVE_VSNPRINTF 1 + _ACEOF + + fi +@@ -49904,20 +27819,16 @@ + if test $ac_cv_func_vsnprintf = yes; then + + +- { $as_echo "$as_me:$LINENO: checking whether snprintf respects a size of 1" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 + $as_echo_n "checking whether snprintf respects a size of 1... " >&6; } +-if test "${gl_cv_func_snprintf_size1+set}" = set; then ++if ${gl_cv_func_snprintf_size1+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + gl_cv_func_snprintf_size1="guessing yes" + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -49928,45 +27839,18 @@ + return buf[1] != 'E'; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_snprintf_size1=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_snprintf_size1=no ++ gl_cv_func_snprintf_size1=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_snprintf_size1" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 + $as_echo "$gl_cv_func_snprintf_size1" >&6; } + + case "$gl_cv_func_snprintf_size1" in +@@ -50000,9 +27884,6 @@ + + fi + +- +- +- + if test $ac_cv_have_decl_vsnprintf = no; then + HAVE_DECL_VSNPRINTF=0 + fi +@@ -50014,9 +27895,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_VSNPRINTF 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h + + + +@@ -50034,28 +27913,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wchar_h='<'wchar.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_wchar_h+set}" = set; then ++if ${gl_cv_next_wchar_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_wchar_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -50077,7 +27947,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5 ++{ $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 +@@ -50112,57 +27982,14 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do ++ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Tru64 with Desktop Toolkit C has a bug: must be included before +@@ -50183,50 +28010,25 @@ + (void) $gl_func; + ; + return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +@@ -50241,23 +28043,13 @@ + + + +- +- +- +- +- +- +- +- +- +- + if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 + $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } +-if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then ++if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -50268,14 +28060,10 @@ + *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; + esac + if test $LOCALE_JA != none; then +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -50304,54 +28092,27 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_incomplete_state=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_incomplete_state=no ++ gl_cv_func_mbrtowc_incomplete_state=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 + $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } + + + + +- { $as_echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 + $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } +-if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then ++if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -50362,14 +28123,10 @@ + *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; + esac + if test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -50402,46 +28159,19 @@ + return 0; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_sanitycheck=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_mbrtowc_sanitycheck=no ++ gl_cv_func_mbrtowc_sanitycheck=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 + $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } + + REPLACE_MBSTATE_T=0 +@@ -50464,11 +28194,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_wcrtomb = no; then + HAVE_WCRTOMB=0 + else +@@ -50480,9 +28205,9 @@ + + + +- { $as_echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 + $as_echo_n "checking whether wcrtomb return value is correct... " >&6; } +-if test "${gl_cv_func_wcrtomb_retval+set}" = set; then ++if ${gl_cv_func_wcrtomb_retval+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -50493,14 +28218,10 @@ + *) gl_cv_func_wcrtomb_retval="guessing yes" ;; + esac + if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + : + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -50539,46 +28260,19 @@ + return result; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_wcrtomb_retval=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_wcrtomb_retval=no ++ gl_cv_func_wcrtomb_retval=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_wcrtomb_retval" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5 + $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } + case "$gl_cv_func_wcrtomb_retval" in + *yes) ;; +@@ -50612,9 +28306,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_WCRTOMB 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h + + + +@@ -50624,11 +28316,6 @@ + + + +- +- +- +- +- + if test $ac_cv_func_iswcntrl = yes; then + HAVE_ISWCNTRL=1 + else +@@ -50655,28 +28342,19 @@ + + + +- +- +- +- +- + if test $gl_cv_have_include_next = yes; then + gl_cv_next_wctype_h='<'wctype.h'>' + else +- { $as_echo "$as_me:$LINENO: checking absolute name of " >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 + $as_echo_n "checking absolute name of ... " >&6; } +-if test "${gl_cv_next_wctype_h+set}" = set; then ++if ${gl_cv_next_wctype_h+:} false; then : + $as_echo_n "(cached) " >&6 + else + + if test $ac_cv_header_wctype_h = yes; then + + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + +@@ -50698,7 +28376,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5 ++{ $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 +@@ -50717,18 +28395,14 @@ + + if test $ac_cv_header_wctype_h = yes; then + if test $ac_cv_func_iswcntrl = yes; then +- { $as_echo "$as_me:$LINENO: checking whether iswcntrl works" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 + $as_echo_n "checking whether iswcntrl works... " >&6; } +-if test "${gl_cv_func_iswcntrl_works+set}" = set; then ++if ${gl_cv_func_iswcntrl_works+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- if test "$cross_compiling" = yes; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ if test "$cross_compiling" = yes; then : ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #if __GNU_LIBRARY__ == 1 +@@ -50742,40 +28416,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_iswcntrl_works=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_func_iswcntrl_works=no ++ gl_cv_func_iswcntrl_works=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Tru64 with Desktop Toolkit C has a bug: must be +@@ -50790,45 +28439,18 @@ + int main () { return iswprint ('x') == 0; } + + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_iswcntrl_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_iswcntrl_works=no ++ gl_cv_func_iswcntrl_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_iswcntrl_works" >&5 ++{ $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 +@@ -50848,16 +28470,12 @@ + : + fi + +- { $as_echo "$as_me:$LINENO: checking for wctype_t" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 + $as_echo_n "checking for wctype_t... " >&6; } +-if test "${gl_cv_type_wctype_t+set}" = set; then ++if ${gl_cv_type_wctype_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . +@@ -50880,51 +28498,26 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctype_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_type_wctype_t=no ++ gl_cv_type_wctype_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_type_wctype_t" >&5 ++{ $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:$LINENO: checking for wctrans_t" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 + $as_echo_n "checking for wctrans_t... " >&6; } +-if test "${gl_cv_type_wctrans_t+set}" = set; then ++if ${gl_cv_type_wctrans_t+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + /* Tru64 with Desktop Toolkit C has a bug: must be + included before . +@@ -50945,58 +28538,29 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_wctrans_t=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gl_cv_type_wctrans_t=no ++ gl_cv_type_wctrans_t=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_type_wctrans_t" >&5 ++{ $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 + + +- +- +- +- +- for gl_func in wctype iswctype wctrans towctrans ; do ++ for gl_func in wctype iswctype wctrans towctrans ; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` +- { $as_echo "$as_me:$LINENO: checking whether $gl_func is declared without a macro" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 + $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Tru64 with Desktop Toolkit C has a bug: must be included before +@@ -51020,48 +28584,23 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_gl_Symbol=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_gl_Symbol=no" ++ eval "$as_gl_Symbol=no" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$as_gl_Symbol ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- as_val=`eval 'as_val=${'$as_gl_Symbol'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 + _ACEOF + + eval ac_cv_have_decl_$gl_func=yes + fi +- + done + + +@@ -51077,28 +28616,7 @@ + + + +- +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking whether wcwidth is declared" >&5 +-$as_echo_n "checking whether wcwidth is declared... " >&6; } +-if test "${ac_cv_have_decl_wcwidth+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" " + /* AIX 3.2.5 declares wcwidth in . */ + #include + /* Tru64 with Desktop Toolkit C has a bug: must be included before +@@ -51110,76 +28628,29 @@ + #include + #include + +- +-int +-main () +-{ +-#ifndef wcwidth +- (void) wcwidth; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_wcwidth=yes ++" ++if test "x$ac_cv_have_decl_wcwidth" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_wcwidth=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_wcwidth" >&5 +-$as_echo "$ac_cv_have_decl_wcwidth" >&6; } +-if test "x$ac_cv_have_decl_wcwidth" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_WCWIDTH 1 +-_ACEOF +- +- +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_WCWIDTH 0 ++#define HAVE_DECL_WCWIDTH $ac_have_decl + _ACEOF + +- +-fi +- +- + if test $ac_cv_have_decl_wcwidth != yes; then + HAVE_DECL_WCWIDTH=0 + fi + + if test $ac_cv_func_wcwidth = yes; then +- { $as_echo "$as_me:$LINENO: checking whether wcwidth works reasonably in UTF-8 locales" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 + $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } +-if test "${gl_cv_func_wcwidth_works+set}" = set; then ++if ${gl_cv_func_wcwidth_works+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + + case "$host_os" in + # Guess yes on glibc and AIX 7 systems. +@@ -51188,11 +28659,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -51226,45 +28693,18 @@ + return result; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_wcwidth_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-gl_cv_func_wcwidth_works=no ++ gl_cv_func_wcwidth_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + + +- + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_func_wcwidth_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5 + $as_echo "$gl_cv_func_wcwidth_works" >&6; } + case "$gl_cv_func_wcwidth_works" in + *yes) ;; +@@ -51297,9 +28737,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_WCWIDTH 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h + + + +@@ -51315,9 +28753,7 @@ + + + +-cat >>confdefs.h <<\_ACEOF +-#define GNULIB_TEST_WRITE 1 +-_ACEOF ++$as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h + + + +@@ -51362,151 +28798,12 @@ + + + +- +-for ac_header in stdint.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_header in stdint.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" ++if test "x$ac_cv_header_stdint_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_STDINT_H 1 + _ACEOF + + fi +@@ -51610,16 +28907,12 @@ + + + +-{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 + $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +-if test "${ac_cv_header_time+set}" = set; then ++if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + #include +@@ -51634,149 +28927,30 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_time=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_header_time=no ++ ac_cv_header_time=no + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 + $as_echo "$ac_cv_header_time" >&6; } + if test $ac_cv_header_time = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define TIME_WITH_SYS_TIME 1 +-_ACEOF +- +-fi +- +-{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +-$as_echo_n "checking for struct stat.st_blksize... " >&6; } +-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_blksize) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blksize=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_blksize) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blksize=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_blksize=no +-fi ++$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } +-if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then ++ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 + _ACEOF + + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ST_BLKSIZE 1 +-_ACEOF ++$as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h + + fi + +@@ -51788,17 +28962,13 @@ + # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary. + pu_save_LIBS=$LIBS + LIB_SETSOCKOPT= +- { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 + $as_echo_n "checking for library containing setsockopt... " >&6; } +-if test "${ac_cv_search_setsockopt+set}" = set; then ++if ${ac_cv_search_setsockopt+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -51823,68 +28993,37 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_setsockopt=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_setsockopt+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_setsockopt+:} false; then : + break + fi + done +-if test "${ac_cv_search_setsockopt+set}" = set; then +- : ++if ${ac_cv_search_setsockopt+:} false; then : ++ + else + ac_cv_search_setsockopt=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5 + $as_echo "$ac_cv_search_setsockopt" >&6; } + ac_res=$ac_cv_search_setsockopt +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + else +- { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 + $as_echo_n "checking for library containing setsockopt... " >&6; } +-if test "${ac_cv_search_setsockopt+set}" = set; then ++if ${ac_cv_search_setsockopt+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -51909,71 +29048,40 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_setsockopt=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_setsockopt+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_setsockopt+:} false; then : + break + fi + done +-if test "${ac_cv_search_setsockopt+set}" = set; then +- : ++if ${ac_cv_search_setsockopt+:} false; then : ++ + else + ac_cv_search_setsockopt=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5 + $as_echo "$ac_cv_search_setsockopt" >&6; } + ac_res=$ac_cv_search_setsockopt +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi + + fi + +- { $as_echo "$as_me:$LINENO: checking for library containing setsockopt" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5 + $as_echo_n "checking for library containing setsockopt... " >&6; } +-if test "${ac_cv_search_setsockopt+set}" = set; then ++if ${ac_cv_search_setsockopt+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -51998,285 +29106,91 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- ac_cv_search_setsockopt=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_setsockopt+set}" = set; then +- break +-fi +-done +-if test "${ac_cv_search_setsockopt+set}" = set; then +- : +-else +- ac_cv_search_setsockopt=no +-fi +-rm conftest.$ac_ext +-LIBS=$ac_func_search_save_LIBS +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_setsockopt" >&5 +-$as_echo "$ac_cv_search_setsockopt" >&6; } +-ac_res=$ac_cv_search_setsockopt +-if test "$ac_res" != no; then +- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" +- +-fi +- +- +- case "$ac_cv_search_setsockopt" in +- -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt +- esac +- +- LIBS=$pu_save_LIBS +- +- enable_rmt() { +- if test $ac_cv_header_sys_mtio_h = yes; then +- { $as_echo "$as_me:$LINENO: checking for remote tape header files" >&5 +-$as_echo_n "checking for remote tape header files... " >&6; } +-if test "${pu_cv_header_rmt+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#if HAVE_SGTTY_H +-# include +-#endif +-#include +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- pu_cv_header_rmt=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- pu_cv_header_rmt=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $pu_cv_header_rmt" >&5 +-$as_echo "$pu_cv_header_rmt" >&6; } +- test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)' +- +- fi +- } +- +- +-for ac_header in sys/mtio.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes ++ if ac_fn_c_try_link "$LINENO"; then : ++ ac_cv_search_setsockopt=$ac_res ++fi ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_setsockopt+:} false; then : ++ break ++fi ++done ++if ${ac_cv_search_setsockopt+:} false; then : ++ + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ ac_cv_search_setsockopt=no ++fi ++rm conftest.$ac_ext ++LIBS=$ac_func_search_save_LIBS ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5 ++$as_echo "$ac_cv_search_setsockopt" >&6; } ++ac_res=$ac_cv_search_setsockopt ++if test "$ac_res" != no; then : ++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +- ac_header_preproc=no + fi + +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } + +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then ++ case "$ac_cv_search_setsockopt" in ++ -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt ++ esac ++ ++ LIBS=$pu_save_LIBS ++ ++ enable_rmt() { ++ if test $ac_cv_header_sys_mtio_h = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5 ++$as_echo_n "checking for remote tape header files... " >&6; } ++if ${pu_cv_header_rmt+:} false; then : + $as_echo_n "(cached) " >&6 + else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ + ++#if HAVE_SGTTY_H ++# include ++#endif ++#include ++_ACEOF ++if ac_fn_c_try_cpp "$LINENO"; then : ++ pu_cv_header_rmt=yes ++else ++ pu_cv_header_rmt=no ++fi ++rm -f conftest.err conftest.i conftest.$ac_ext + fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5 ++$as_echo "$pu_cv_header_rmt" >&6; } ++ test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)' ++ ++ fi ++ } ++ ++ for ac_header in sys/mtio.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default" ++if test "x$ac_cv_header_sys_mtio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_SYS_MTIO_H 1 + _ACEOF + + fi + + done + +- { $as_echo "$as_me:$LINENO: checking which ioctl field to test for reversed bytes" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5 + $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; } +-if test "${pu_cv_header_mtio_check_field+set}" = set; then ++if ${pu_cv_header_mtio_check_field+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "mt_model" >/dev/null 2>&1; then ++ $EGREP "mt_model" >/dev/null 2>&1; then : + pu_cv_header_mtio_check_field=mt_model + else + pu_cv_header_mtio_check_field=mt_type +@@ -52284,7 +29198,7 @@ + rm -f conftest* + + fi +-{ $as_echo "$as_me:$LINENO: result: $pu_cv_header_mtio_check_field" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5 + $as_echo "$pu_cv_header_mtio_check_field" >&6; } + + cat >>confdefs.h <<_ACEOF +@@ -52300,28 +29214,24 @@ + DEFAULT_RMT_DIR='$(libexecdir)' + fi + +- { $as_echo "$as_me:$LINENO: checking whether to build rmt" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5 + $as_echo_n "checking whether to build rmt... " >&6; } + + # Check whether --with-rmt was given. +-if test "${with_rmt+set}" = set; then ++if test "${with_rmt+set}" = set; then : + withval=$with_rmt; case $withval in +- yes|no) { { $as_echo "$as_me:$LINENO: error: Invalid argument to --with-rmt" >&5 +-$as_echo "$as_me: error: Invalid argument to --with-rmt" >&2;} +- { (exit 1); exit 1; }; };; ++ yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;; + /*) DEFAULT_RMT_COMMAND=$withval +- { $as_echo "$as_me:$LINENO: result: no, use $withval instead" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5 + $as_echo "no, use $withval instead" >&6; };; +- *) { { $as_echo "$as_me:$LINENO: error: Argument to --with-rmt must be an absolute file name" >&5 +-$as_echo "$as_me: error: Argument to --with-rmt must be an absolute file name" >&2;} +- { (exit 1); exit 1; }; };; ++ *) as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;; + esac + else +- { $as_echo "$as_me:$LINENO: result: yes" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } + enable_rmt + if test "$PU_RMT_PROG" = ""; then +- { $as_echo "$as_me:$LINENO: WARNING: not building rmt, required header files are missing" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5 + $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;} + fi + fi +@@ -52344,106 +29254,15 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-for ac_header in sys/buf.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#if HAVE_SYS_PARAM_H ++ for ac_header in sys/buf.h ++do : ++ ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H + #include + #endif +- +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- eval "$as_ac_Header=yes" +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_Header=no" +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++" ++if test "x$ac_cv_header_sys_buf_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_SYS_BUF_H 1 + _ACEOF + + fi +@@ -52453,102 +29272,8 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 +-$as_echo_n "checking for struct stat.st_blksize... " >&6; } +-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (ac_aggr.st_blksize) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blksize=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-int +-main () +-{ +-static struct stat ac_aggr; +-if (sizeof ac_aggr.st_blksize) +-return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_member_struct_stat_st_blksize=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_member_struct_stat_st_blksize=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 +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 +-$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; } +-if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then ++ ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" ++if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : + + cat >>confdefs.h <<_ACEOF + #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 +@@ -52563,26 +29288,13 @@ + + + +- +- +- +- +- +- +- +- +- +- { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 + $as_echo_n "checking for library containing gethostbyname... " >&6; } +-if test "${ac_cv_search_gethostbyname+set}" = set; then ++if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 + else + ac_func_search_save_LIBS=$LIBS +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + /* Override any GCC internal prototype to avoid an error. +@@ -52607,54 +29319,27 @@ + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi +- rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++ if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext +- if test "${ac_cv_search_gethostbyname+set}" = set; then ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext ++ if ${ac_cv_search_gethostbyname+:} false; then : + break + fi + done +-if test "${ac_cv_search_gethostbyname+set}" = set; then +- : ++if ${ac_cv_search_gethostbyname+:} false; then : ++ + else + ac_cv_search_gethostbyname=no + fi + rm conftest.$ac_ext + LIBS=$ac_func_search_save_LIBS + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 + $as_echo "$ac_cv_search_gethostbyname" >&6; } + ac_res=$ac_cv_search_gethostbyname +-if test "$ac_res" != no; then ++if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + + fi +@@ -52664,350 +29349,122 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-{ $as_echo "$as_me:$LINENO: checking whether getgrgid is declared" >&5 +-$as_echo_n "checking whether getgrgid is declared... " >&6; } +-if test "${ac_cv_have_decl_getgrgid+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#ifndef getgrgid +- (void) getgrgid; +-#endif +- +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getgrgid=yes ++# Check whether --with-xattrs was given. ++if test "${with_xattrs+set}" = set; then : ++ withval=$with_xattrs; + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_have_decl_getgrgid=no +-fi ++ with_xattrs=maybe + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getgrgid" >&5 +-$as_echo "$ac_cv_have_decl_getgrgid" >&6; } +-if test "x$ac_cv_have_decl_getgrgid" = x""yes; then +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETGRGID 1 +-_ACEOF + + +-else ++ for ac_header in attr/xattr.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default" ++if test "x$ac_cv_header_attr_xattr_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETGRGID 0 ++#define HAVE_ATTR_XATTR_H 1 + _ACEOF + +- + fi + ++done + +-{ $as_echo "$as_me:$LINENO: checking whether getpwuid is declared" >&5 +-$as_echo_n "checking whether getpwuid is declared... " >&6; } +-if test "${ac_cv_have_decl_getpwuid+set}" = set; then +- $as_echo_n "(cached) " >&6 ++ if test "$ac_cv_header_attr_xattr_h" = yes; then ++ TAR_COND_XATTR_H_TRUE= ++ TAR_COND_XATTR_H_FALSE='#' + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +- +-int +-main () +-{ +-#ifndef getpwuid +- (void) getpwuid; +-#endif ++ TAR_COND_XATTR_H_TRUE='#' ++ TAR_COND_XATTR_H_FALSE= ++fi + +- ; +- return 0; +-} ++ if test "$ac_cv_header_attr_xattr_h" = yes; then ++ for ac_func in getxattr fgetxattr lgetxattr \ ++ setxattr fsetxattr lsetxattr \ ++ listxattr flistxattr llistxattr ++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" ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : ++ cat >>confdefs.h <<_ACEOF ++#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_getpwuid=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 ++ # only when functions are present + +- ac_cv_have_decl_getpwuid=no +-fi ++$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_getpwuid" >&5 +-$as_echo "$ac_cv_have_decl_getpwuid" >&6; } +-if test "x$ac_cv_have_decl_getpwuid" = x""yes; then ++ if test "$with_xattrs" != no; then + +-cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETPWUID 1 +-_ACEOF ++$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h + ++ fi + +-else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_GETPWUID 0 +-_ACEOF ++fi ++done + ++ fi + +-fi + + +-{ $as_echo "$as_me:$LINENO: checking whether time is declared" >&5 +-$as_echo_n "checking whether time is declared... " >&6; } +-if test "${ac_cv_have_decl_time+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include + +-int +-main () +-{ +-#ifndef time +- (void) time; +-#endif + +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_have_decl_time=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 + +- ac_cv_have_decl_time=no +-fi + +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include ++" ++if test "x$ac_cv_have_decl_getgrgid" = xyes; then : ++ ac_have_decl=1 ++else ++ ac_have_decl=0 + fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_time" >&5 +-$as_echo "$ac_cv_have_decl_time" >&6; } +-if test "x$ac_cv_have_decl_time" = x""yes; then + + cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_TIME 1 ++#define HAVE_DECL_GETGRGID $ac_have_decl + _ACEOF + +- ++ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include ++" ++if test "x$ac_cv_have_decl_getpwuid" = xyes; then : ++ ac_have_decl=1 + else +- cat >>confdefs.h <<_ACEOF +-#define HAVE_DECL_TIME 0 +-_ACEOF +- +- ++ ac_have_decl=0 + fi + +- +- +- +-for ac_func in waitpid +-do +-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +-$as_echo_n "checking for $ac_func... " >&6; } +-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_GETPWUID $ac_have_decl + _ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-/* Define $ac_func to an innocuous variant, in case declares $ac_func. +- For example, HP-UX 11i declares gettimeofday. */ +-#define $ac_func innocuous_$ac_func +- +-/* System header to define __stub macros and hopefully few prototypes, +- which can conflict with char $ac_func (); below. +- Prefer to if __STDC__ is defined, since +- exists even on freestanding compilers. */ +- +-#ifdef __STDC__ +-# include +-#else +-# include +-#endif +- +-#undef $ac_func +- +-/* 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 $ac_func (); +-/* The GNU C library defines this for functions which it implements +- to always fail with ENOSYS. Some functions are actually named +- something starting with __ and the normal name is an alias. */ +-#if defined __stub_$ac_func || defined __stub___$ac_func +-choke me +-#endif + +-int +-main () +-{ +-return $ac_func (); +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then +- eval "$as_ac_var=yes" ++ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include ++" ++if test "x$ac_cv_have_decl_time" = xyes; then : ++ ac_have_decl=1 + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$as_ac_var=no" ++ ac_have_decl=0 + fi + +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-ac_res=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_var'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++cat >>confdefs.h <<_ACEOF ++#define HAVE_DECL_TIME $ac_have_decl + _ACEOF + ++ ++ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" ++if test "x$ac_cv_func_waitpid" = xyes; then : ++ $as_echo "#define HAVE_WAITPID 1" >>confdefs.h ++ + else + case " $LIBOBJS " in +- *" $ac_func.$ac_objext "* ) ;; +- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ++ *" waitpid.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" + ;; + esac + + fi +-done + + + +-{ $as_echo "$as_me:$LINENO: checking for remote shell" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5 + $as_echo_n "checking for remote shell... " >&6; } +-if test "${tar_cv_path_RSH+set}" = set; then ++if ${tar_cv_path_RSH+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -n "$RSH"; then +@@ -53031,154 +29488,15 @@ + done + fi + fi +-{ $as_echo "$as_me:$LINENO: result: $tar_cv_path_RSH" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5 + $as_echo "$tar_cv_path_RSH" >&6; } + if test $tar_cv_path_RSH = no; then +- +-for ac_header in netdb.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++ for ac_header in netdb.h ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" ++if test "x$ac_cv_header_netdb_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_NETDB_H 1 + _ACEOF + + fi +@@ -53198,7 +29516,7 @@ + + + # Check whether --with-compress was given. +-if test "${with_compress+set}" = set; then ++if test "${with_compress+set}" = set; then : + withval=$with_compress; tar_cv_compressor_compress=${withval} + else + tar_cv_compressor_compress=compress +@@ -53214,7 +29532,7 @@ + + + # Check whether --with-gzip was given. +-if test "${with_gzip+set}" = set; then ++if test "${with_gzip+set}" = set; then : + withval=$with_gzip; tar_cv_compressor_gzip=${withval} + else + tar_cv_compressor_gzip=gzip +@@ -53230,7 +29548,7 @@ + + + # Check whether --with-bzip2 was given. +-if test "${with_bzip2+set}" = set; then ++if test "${with_bzip2+set}" = set; then : + withval=$with_bzip2; tar_cv_compressor_bzip2=${withval} + else + tar_cv_compressor_bzip2=bzip2 +@@ -53246,7 +29564,7 @@ + + + # Check whether --with-lzip was given. +-if test "${with_lzip+set}" = set; then ++if test "${with_lzip+set}" = set; then : + withval=$with_lzip; tar_cv_compressor_lzip=${withval} + else + tar_cv_compressor_lzip=lzip +@@ -53262,7 +29580,7 @@ + + + # Check whether --with-lzma was given. +-if test "${with_lzma+set}" = set; then ++if test "${with_lzma+set}" = set; then : + withval=$with_lzma; tar_cv_compressor_lzma=${withval} + else + tar_cv_compressor_lzma=lzma +@@ -53278,7 +29596,7 @@ + + + # Check whether --with-lzop was given. +-if test "${with_lzop+set}" = set; then ++if test "${with_lzop+set}" = set; then : + withval=$with_lzop; tar_cv_compressor_lzop=${withval} + else + tar_cv_compressor_lzop=lzop +@@ -53294,7 +29612,7 @@ + + + # Check whether --with-xz was given. +-if test "${with_xz+set}" = set; then ++if test "${with_xz+set}" = set; then : + withval=$with_xz; tar_cv_compressor_xz=${withval} + else + tar_cv_compressor_xz=xz +@@ -53306,7 +29624,7 @@ + _ACEOF + + +-{ $as_echo "$as_me:$LINENO: checking for default archive format" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5 + $as_echo_n "checking for default archive format... " >&6; } + + +@@ -53316,19 +29634,17 @@ + fi + case $DEFAULT_ARCHIVE_FORMAT in + V7|OLDGNU|USTAR|POSIX|GNU) ;; +- *) { { $as_echo "$as_me:$LINENO: error: Invalid format name" >&5 +-$as_echo "$as_me: error: Invalid format name" >&2;} +- { (exit 1); exit 1; }; };; ++ *) as_fn_error $? "Invalid format name" "$LINENO" 5;; + esac + + cat >>confdefs.h <<_ACEOF + #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT + _ACEOF + +-{ $as_echo "$as_me:$LINENO: result: $DEFAULT_ARCHIVE_FORMAT" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5 + $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; } + +-{ $as_echo "$as_me:$LINENO: checking for default archive" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5 + $as_echo_n "checking for default archive... " >&6; } + + +@@ -53336,7 +29652,7 @@ + DEFAULT_ARCHIVE=- + else + if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then +- { $as_echo "$as_me:$LINENO: WARNING: DEFAULT_ARCHIVE \`$DEFAULT_ARCHIVE' not found on this system" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE \`$DEFAULT_ARCHIVE' not found on this system" >&5 + $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE \`$DEFAULT_ARCHIVE' not found on this system" >&2;} + fi + # FIXME: Look for DEFTAPE in . +@@ -53345,9 +29661,7 @@ + case $DEFAULT_ARCHIVE in + *[0-7][lmh]) + +-cat >>confdefs.h <<\_ACEOF +-#define DENSITY_LETTER 1 +-_ACEOF ++$as_echo "#define DENSITY_LETTER 1" >>confdefs.h + + device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'` + ;; +@@ -53373,11 +29687,11 @@ + #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE" + _ACEOF + +-{ $as_echo "$as_me:$LINENO: result: $DEFAULT_ARCHIVE" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5 + $as_echo "$DEFAULT_ARCHIVE" >&6; } + + +-{ $as_echo "$as_me:$LINENO: checking for default blocking" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5 + $as_echo_n "checking for default blocking... " >&6; } + DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20} + +@@ -53385,10 +29699,10 @@ + #define DEFAULT_BLOCKING $DEFAULT_BLOCKING + _ACEOF + +-{ $as_echo "$as_me:$LINENO: result: $DEFAULT_BLOCKING" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5 + $as_echo "$DEFAULT_BLOCKING" >&6; } + +-{ $as_echo "$as_me:$LINENO: checking for default quoting style" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5 + $as_echo_n "checking for default quoting style... " >&6; } + + +@@ -53397,11 +29711,9 @@ + + case $DEFAULT_QUOTING_STYLE in + literal|shell|shell-always|c|escape|locale|clocale) ;; +-*) { { $as_echo "$as_me:$LINENO: error: Invalid quoting style" >&5 +-$as_echo "$as_me: error: Invalid quoting style" >&2;} +- { (exit 1); exit 1; }; };; ++*) as_fn_error $? "Invalid quoting style" "$LINENO" 5;; + esac +-{ $as_echo "$as_me:$LINENO: result: $DEFAULT_QUOTING_STYLE" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5 + $as_echo "$DEFAULT_QUOTING_STYLE" >&6; } + DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style + +@@ -53429,7 +29741,7 @@ + + + # Check whether --with-gnu-ld was given. +-if test "${with_gnu_ld+set}" = set; then ++if test "${with_gnu_ld+set}" = set; then : + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes + else + with_gnu_ld=no +@@ -53450,7 +29762,7 @@ + ac_prog=ld + if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. +- { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 + $as_echo_n "checking for ld used by GCC... " >&6; } + case $host in + *-*-mingw*) +@@ -53480,13 +29792,13 @@ + ;; + esac + elif test "$with_gnu_ld" = yes; then +- { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 + $as_echo_n "checking for GNU ld... " >&6; } + else +- { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 + $as_echo_n "checking for non-GNU ld... " >&6; } + fi +-if test "${acl_cv_path_LD+set}" = set; then ++if ${acl_cv_path_LD+:} false; then : + $as_echo_n "(cached) " >&6 + else + if test -z "$LD"; then +@@ -53514,18 +29826,16 @@ + + LD="$acl_cv_path_LD" + if test -n "$LD"; then +- { $as_echo "$as_me:$LINENO: result: $LD" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 + $as_echo "$LD" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi +-test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +-$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} +- { (exit 1); exit 1; }; } +-{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 ++test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 + $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +-if test "${acl_cv_prog_gnu_ld+set}" = set; then ++if ${acl_cv_prog_gnu_ld+:} false; then : + $as_echo_n "(cached) " >&6 + else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +@@ -53536,16 +29846,16 @@ + acl_cv_prog_gnu_ld=no ;; + esac + fi +-{ $as_echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 + $as_echo "$acl_cv_prog_gnu_ld" >&6; } + with_gnu_ld=$acl_cv_prog_gnu_ld + + + + +- { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 + $as_echo_n "checking for shared library run path origin... " >&6; } +-if test "${acl_cv_rpath+set}" = set; then ++if ${acl_cv_rpath+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -53556,7 +29866,7 @@ + acl_cv_rpath=done + + fi +-{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 + $as_echo "$acl_cv_rpath" >&6; } + wl="$acl_cv_wl" + acl_libext="$acl_cv_libext" +@@ -53568,7 +29878,7 @@ + acl_hardcode_direct="$acl_cv_hardcode_direct" + acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" + # Check whether --enable-rpath was given. +-if test "${enable_rpath+set}" = set; then ++if test "${enable_rpath+set}" = set; then : + enableval=$enable_rpath; : + else + enable_rpath=yes +@@ -53581,16 +29891,12 @@ + acl_libdirstem2= + case "$host_os" in + solaris*) +- { $as_echo "$as_me:$LINENO: checking for 64-bit host" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 + $as_echo_n "checking for 64-bit host... " >&6; } +-if test "${gl_cv_solaris_64bit+set}" = set; then ++if ${gl_cv_solaris_64bit+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #ifdef _LP64 +@@ -53599,7 +29905,7 @@ + + _ACEOF + if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | +- $EGREP "sixtyfour bits" >/dev/null 2>&1; then ++ $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + gl_cv_solaris_64bit=yes + else + gl_cv_solaris_64bit=no +@@ -53608,7 +29914,7 @@ + + + fi +-{ $as_echo "$as_me:$LINENO: result: $gl_cv_solaris_64bit" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 + $as_echo "$gl_cv_solaris_64bit" >&6; } + if test $gl_cv_solaris_64bit = yes; then + acl_libdirstem=lib/64 +@@ -53668,7 +29974,7 @@ + + + # Check whether --with-libiconv-prefix was given. +-if test "${with_libiconv_prefix+set}" = set; then ++if test "${with_libiconv_prefix+set}" = set; then : + withval=$with_libiconv_prefix; + if test "X$withval" = "Xno"; then + use_additional=no +@@ -54138,19 +30444,15 @@ + done + + +- { $as_echo "$as_me:$LINENO: checking for iconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 + $as_echo_n "checking for iconv... " >&6; } +-if test "${am_cv_func_iconv+set}" = set; then ++if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 + else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -54166,46 +30468,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -54221,49 +30492,22 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 + $as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then +- { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 + $as_echo_n "checking for working iconv... " >&6; } +-if test "${am_cv_func_iconv_works+set}" = set; then ++if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -54271,7 +30515,7 @@ + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; +@@ -54279,11 +30523,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -54377,54 +30617,27 @@ + iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) + /* Try IRIX, OSF/1 names. */ + && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) +- /* Try AIX names. */ +- && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) +- /* Try HP-UX names. */ +- && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) +- result |= 16; +- return result; +-} +-_ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++ /* Try AIX names. */ ++ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) ++ /* Try HP-UX names. */ ++ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) ++ result |= 16; ++ return result; ++} ++_ACEOF ++if ac_fn_c_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-am_cv_func_iconv_works=no ++ am_cv_func_iconv_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + LIBS="$am_save_LIBS" + + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 + $as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; +@@ -54435,15 +30648,13 @@ + fi + if test "$am_func_iconv" = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ICONV 1 +-_ACEOF ++$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then +- { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 + $as_echo_n "checking how to link with libiconv... " >&6; } +- { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 + $as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" +@@ -54454,17 +30665,13 @@ + + + if test "$am_cv_func_iconv" = yes; then +- { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 + $as_echo_n "checking for iconv declaration... " >&6; } +- if test "${am_cv_proto_iconv+set}" = set; then ++ if ${am_cv_proto_iconv+:} false; then : + $as_echo_n "(cached) " >&6 + else + +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -54487,38 +30694,17 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then ++if ac_fn_c_try_compile "$LINENO"; then : + am_cv_proto_iconv_arg1="" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- am_cv_proto_iconv_arg1="const" ++ am_cv_proto_iconv_arg1="const" + fi +- + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" + fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` +- { $as_echo "$as_me:$LINENO: result: ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: + $am_cv_proto_iconv" >&5 + $as_echo " + $am_cv_proto_iconv" >&6; } +@@ -54530,285 +30716,45 @@ + + fi + +- +- + for ac_header in iconv.h +-do +-as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-else +- # Is the header compilable? +-{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +-$as_echo_n "checking $ac_header usability... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-$ac_includes_default +-#include <$ac_header> +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_header_compiler=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_compiler=no +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +-$as_echo "$ac_header_compiler" >&6; } +- +-# Is the header present? +-{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +-$as_echo_n "checking $ac_header presence... " >&6; } +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include <$ac_header> +-_ACEOF +-if { (ac_try="$ac_cpp conftest.$ac_ext" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } >/dev/null && { +- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || +- test ! -s conftest.err +- }; then +- ac_header_preproc=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_header_preproc=no +-fi +- +-rm -f conftest.err conftest.$ac_ext +-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +-$as_echo "$ac_header_preproc" >&6; } +- +-# So? What about this header? +-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +- yes:no: ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +-$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} +- ac_header_preproc=yes +- ;; +- no:yes:* ) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +-$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +-$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +-$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +-$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +-$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} +- { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +-$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} +- ( cat <<\_ASBOX +-## ------------------------------ ## +-## Report this to bug-tar@gnu.org ## +-## ------------------------------ ## +-_ASBOX +- ) | sed "s/^/$as_me: WARNING: /" >&2 +- ;; +-esac +-{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +-$as_echo_n "checking for $ac_header... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- eval "$as_ac_Header=\$ac_header_preproc" +-fi +-ac_res=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +- +-fi +-as_val=`eval 'as_val=${'$as_ac_Header'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then ++do : ++ ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default" ++if test "x$ac_cv_header_iconv_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 ++#define HAVE_ICONV_H 1 + _ACEOF + + fi + + done + +-{ $as_echo "$as_me:$LINENO: checking for iconv_t" >&5 +-$as_echo_n "checking for iconv_t... " >&6; } +-if test "${ac_cv_type_iconv_t+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_type_iconv_t=no +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- +-#ifdef HAVE_ICONV_H +-# include +-#endif +- +- +-int +-main () +-{ +-if (sizeof (iconv_t)) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +- ++ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" " + #ifdef HAVE_ICONV_H + # include + #endif + +- +-int +-main () +-{ +-if (sizeof ((iconv_t))) +- return 0; +- ; +- return 0; +-} +-_ACEOF +-rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- : +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- ac_cv_type_iconv_t=yes +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +-fi +-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_iconv_t" >&5 +-$as_echo "$ac_cv_type_iconv_t" >&6; } +-if test "x$ac_cv_type_iconv_t" = x""yes; then ++" ++if test "x$ac_cv_type_iconv_t" = xyes; then : + : + else + +-cat >>confdefs.h <<\_ACEOF +-#define iconv_t int +-_ACEOF ++$as_echo "#define iconv_t int" >>confdefs.h + + fi + + + # Gettext. + +- { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 + $as_echo_n "checking whether NLS is requested... " >&6; } + # Check whether --enable-nls was given. +-if test "${enable_nls+set}" = set; then ++if test "${enable_nls+set}" = set; then : + enableval=$enable_nls; USE_NLS=$enableval + else + USE_NLS=yes + fi + +- { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 + $as_echo "$USE_NLS" >&6; } + + +@@ -54848,9 +30794,9 @@ + + # Extract the first word of "msgfmt", so it can be a program name with args. + set dummy msgfmt; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_MSGFMT+set}" = set; then ++if ${ac_cv_path_MSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 + else + case "$MSGFMT" in +@@ -54880,18 +30826,18 @@ + fi + MSGFMT="$ac_cv_path_MSGFMT" + if test "$MSGFMT" != ":"; then +- { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 + $as_echo "$MSGFMT" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. + set dummy gmsgfmt; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_GMSGFMT+set}" = set; then ++if ${ac_cv_path_GMSGFMT+:} false; then : + $as_echo_n "(cached) " >&6 + else + case $GMSGFMT in +@@ -54904,14 +30850,14 @@ + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do ++ for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi + done +-done ++ done + IFS=$as_save_IFS + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" +@@ -54920,10 +30866,10 @@ + fi + GMSGFMT=$ac_cv_path_GMSGFMT + if test -n "$GMSGFMT"; then +- { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 + $as_echo "$GMSGFMT" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -54970,9 +30916,9 @@ + + # Extract the first word of "xgettext", so it can be a program name with args. + set dummy xgettext; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_XGETTEXT+set}" = set; then ++if ${ac_cv_path_XGETTEXT+:} false; then : + $as_echo_n "(cached) " >&6 + else + case "$XGETTEXT" in +@@ -55002,10 +30948,10 @@ + fi + XGETTEXT="$ac_cv_path_XGETTEXT" + if test "$XGETTEXT" != ":"; then +- { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 + $as_echo "$XGETTEXT" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -55047,9 +30993,9 @@ + + # Extract the first word of "msgmerge", so it can be a program name with args. + set dummy msgmerge; ac_word=$2 +-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 + $as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_MSGMERGE+set}" = set; then ++if ${ac_cv_path_MSGMERGE+:} false; then : + $as_echo_n "(cached) " >&6 + else + case "$MSGMERGE" in +@@ -55078,10 +31024,10 @@ + fi + MSGMERGE="$ac_cv_path_MSGMERGE" + if test "$MSGMERGE" != ":"; then +- { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 + $as_echo "$MSGMERGE" >&6; } + else +- { $as_echo "$as_me:$LINENO: result: no" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi + +@@ -55119,18 +31065,14 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 + $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } +-if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then ++if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : + $as_echo_n "(cached) " >&6 + else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -55141,61 +31083,30 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFPreferencesCopyAppValue=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_func_CFPreferencesCopyAppValue=no ++ gt_cv_func_CFPreferencesCopyAppValue=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 + $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_CFPREFERENCESCOPYAPPVALUE 1 +-_ACEOF ++$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h + + fi +- { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 + $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } +-if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then ++if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + $as_echo_n "(cached) " >&6 + else + gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + #include + int +@@ -55206,47 +31117,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + gt_cv_func_CFLocaleCopyCurrent=yes + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- gt_cv_func_CFLocaleCopyCurrent=no ++ gt_cv_func_CFLocaleCopyCurrent=no + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS="$gt_save_LIBS" + fi +-{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 + $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } + if test $gt_cv_func_CFLocaleCopyCurrent = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_CFLOCALECOPYCURRENT 1 +-_ACEOF ++$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h + + fi + INTL_MACOSX_LIBS= +@@ -55291,16 +31175,12 @@ + gt_expression_test_code= + fi + +- { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 + $as_echo_n "checking for GNU gettext in libc... " >&6; } +-if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$gt_func_gnugettext_libc+:} false; then : + $as_echo_n "(cached) " >&6 + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -55319,42 +31199,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libc=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$gt_func_gnugettext_libc=no" ++ eval "$gt_func_gnugettext_libc=no" + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi +-ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$gt_func_gnugettext_libc ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + + if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then +@@ -55388,19 +31242,15 @@ + done + + +- { $as_echo "$as_me:$LINENO: checking for iconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 + $as_echo_n "checking for iconv... " >&6; } +-if test "${am_cv_func_iconv+set}" = set; then ++if ${am_cv_func_iconv+:} false; then : + $as_echo_n "(cached) " >&6 + else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -55416,46 +31266,15 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + am_cv_func_iconv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -55471,49 +31290,22 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 + $as_echo "$am_cv_func_iconv" >&6; } + if test "$am_cv_func_iconv" = yes; then +- { $as_echo "$as_me:$LINENO: checking for working iconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 + $as_echo_n "checking for working iconv... " >&6; } +-if test "${am_cv_func_iconv_works+set}" = set; then ++if ${am_cv_func_iconv_works+:} false; then : + $as_echo_n "(cached) " >&6 + else + +@@ -55521,7 +31313,7 @@ + if test $am_cv_lib_iconv = yes; then + LIBS="$LIBS $LIBICONV" + fi +- if test "$cross_compiling" = yes; then ++ if test "$cross_compiling" = yes; then : + + case "$host_os" in + aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; +@@ -55529,11 +31321,7 @@ + esac + + else +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -55635,46 +31423,19 @@ + return result; + } + _ACEOF +-rm -f conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { ac_try='./conftest$ac_exeext' +- { (case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_try") 2>&5 +- ac_status=$? +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); }; }; then ++if ac_fn_c_try_run "$LINENO"; then : + am_cv_func_iconv_works=yes + else +- $as_echo "$as_me: program exited with status $ac_status" >&5 +-$as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +-( exit $ac_status ) +-am_cv_func_iconv_works=no ++ am_cv_func_iconv_works=no + fi +-rm -rf conftest.dSYM +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext 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 + +- + LIBS="$am_save_LIBS" + + fi +-{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 + $as_echo "$am_cv_func_iconv_works" >&6; } + case "$am_cv_func_iconv_works" in + *no) am_func_iconv=no am_cv_lib_iconv=no ;; +@@ -55685,15 +31446,13 @@ + fi + if test "$am_func_iconv" = yes; then + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_ICONV 1 +-_ACEOF ++$as_echo "#define HAVE_ICONV 1" >>confdefs.h + + fi + if test "$am_cv_lib_iconv" = yes; then +- { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 + $as_echo_n "checking how to link with libiconv... " >&6; } +- { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 + $as_echo "$LIBICONV" >&6; } + else + CPPFLAGS="$am_save_CPPFLAGS" +@@ -55726,7 +31485,7 @@ + + + # Check whether --with-libintl-prefix was given. +-if test "${with_libintl_prefix+set}" = set; then ++if test "${with_libintl_prefix+set}" = set; then : + withval=$with_libintl_prefix; + if test "X$withval" = "Xno"; then + use_additional=no +@@ -56165,20 +31924,16 @@ + + + +- { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 + $as_echo_n "checking for GNU gettext in libintl... " >&6; } +-if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then ++if eval \${$gt_func_gnugettext_libintl+:} false; then : + $as_echo_n "(cached) " >&6 + else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -56201,45 +31956,16 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + eval "$gt_func_gnugettext_libintl=yes" + else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- eval "$gt_func_gnugettext_libintl=no" ++ eval "$gt_func_gnugettext_libintl=no" + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" +- cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + + #include +@@ -56262,48 +31988,20 @@ + return 0; + } + _ACEOF +-rm -f conftest.$ac_objext conftest$ac_exeext +-if { (ac_try="$ac_link" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_link") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_test_x conftest$ac_exeext +- }; then ++if ac_fn_c_try_link "$LINENO"; then : + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- + fi +- +-rm -rf conftest.dSYM +-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ +- conftest$ac_exeext conftest.$ac_ext ++rm -f core conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" + fi +-ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 ++eval ac_res=\$$gt_func_gnugettext_libintl ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } + fi + +@@ -56331,21 +32029,19 @@ + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +-cat >>confdefs.h <<\_ACEOF +-#define ENABLE_NLS 1 +-_ACEOF ++$as_echo "#define ENABLE_NLS 1" >>confdefs.h + + else + USE_NLS=no + fi + fi + +- { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 + $as_echo_n "checking whether to use NLS... " >&6; } +- { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 + $as_echo "$USE_NLS" >&6; } + if test "$USE_NLS" = "yes"; then +- { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 + $as_echo_n "checking where the gettext function comes from... " >&6; } + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then +@@ -56356,7 +32052,7 @@ + else + gt_source="included intl directory" + fi +- { $as_echo "$as_me:$LINENO: result: $gt_source" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 + $as_echo "$gt_source" >&6; } + fi + +@@ -56364,9 +32060,9 @@ + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then +- { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 + $as_echo_n "checking how to link with libintl... " >&6; } +- { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 + $as_echo "$LIBINTL" >&6; } + + for element in $INCINTL; do +@@ -56394,14 +32090,10 @@ + fi + + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_GETTEXT 1 +-_ACEOF ++$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h + + +-cat >>confdefs.h <<\_ACEOF +-#define HAVE_DCGETTEXT 1 +-_ACEOF ++$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h + + fi + +@@ -56422,7 +32114,6 @@ + # Initialize the test suite. + ac_config_commands="$ac_config_commands tests/atconfig" + +- + ac_config_files="$ac_config_files tests/Makefile tests/atlocal" + # FIXME: tests/preset? + +@@ -56432,7 +32123,7 @@ + + + # Check whether --enable-backup-scripts was given. +-if test "${enable_backup_scripts+set}" = set; then ++if test "${enable_backup_scripts+set}" = set; then : + enableval=$enable_backup_scripts; case $enableval in + yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)' + BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)' +@@ -56477,13 +32168,13 @@ + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( +- *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 ++ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 + $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( +- *) $as_unset $ac_var ;; ++ *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done +@@ -56491,8 +32182,8 @@ + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) +- # `set' does not quote correctly, so add quotes (double-quote +- # substitution turns \\\\ into \\, and sed turns \\ into \). ++ # `set' does not quote correctly, so add quotes: double-quote ++ # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" +@@ -56514,12 +32205,23 @@ + :end' >>confcache + if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then +- test "x$cache_file" != "x/dev/null" && +- { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 ++ if test "x$cache_file" != "x/dev/null"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 + $as_echo "$as_me: updating cache $cache_file" >&6;} +- cat confcache >$cache_file ++ if test ! -f "$cache_file" || test -h "$cache_file"; then ++ cat confcache >"$cache_file" ++ else ++ case $cache_file in #( ++ */* | ?:*) ++ mv -f confcache "$cache_file"$$ && ++ mv -f "$cache_file"$$ "$cache_file" ;; #( ++ *) ++ mv -f confcache "$cache_file" ;; ++ esac ++ fi ++ fi + else +- { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 + $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi + fi +@@ -56533,14 +32235,15 @@ + + ac_libobjs= + ac_ltlibobjs= ++U= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. +- ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" +- ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' ++ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" ++ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' + done + LIBOBJS=$ac_libobjs + +@@ -56556,32 +32259,20 @@ + fi + + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then +- { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "conditional \"AMDEP\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then +- { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "conditional \"am__fastdepCC\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then +- { { $as_echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-$as_echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ 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 "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then +- { { $as_echo "$as_me:$LINENO: error: conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&5 +-$as_echo "$as_me: error: conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. +-Usually this means the macro was only invoked conditionally." >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 + fi + + gl_libobjs= +@@ -56615,14 +32306,19 @@ + gltests_LTLIBOBJS=$gltests_ltlibobjs + + ++if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then ++ as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined. ++Usually this means the macro was only invoked conditionally." "$LINENO" 5 ++fi + +-: ${CONFIG_STATUS=./config.status} ++: "${CONFIG_STATUS=./config.status}" + ac_write_fail=0 + ac_clean_files_save=$ac_clean_files + ac_clean_files="$ac_clean_files $CONFIG_STATUS" +-{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 + $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +-cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++as_write_fail=0 ++cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 + #! $SHELL + # Generated by $as_me. + # Run this file to recreate the current configuration. +@@ -56632,17 +32328,18 @@ + debug=false + ac_cs_recheck=false + ac_cs_silent=false +-SHELL=\${CONFIG_SHELL-$SHELL} +-_ACEOF + +-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +-## --------------------- ## +-## M4sh Initialization. ## +-## --------------------- ## ++SHELL=\${CONFIG_SHELL-$SHELL} ++export SHELL ++_ASEOF ++cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ++## -------------------- ## ++## M4sh Initialization. ## ++## -------------------- ## + + # Be more Bourne compatible + DUALCASE=1; export DUALCASE # for MKS sh +-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which +@@ -56650,23 +32347,15 @@ + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST + else +- case `(set -o) 2>/dev/null` in +- *posix*) set -o posix ;; ++ case `(set -o) 2>/dev/null` in #( ++ *posix*) : ++ set -o posix ;; #( ++ *) : ++ ;; + esac +- + fi + + +- +- +-# PATH needs CR +-# Avoid depending upon Character Ranges. +-as_cr_letters='abcdefghijklmnopqrstuvwxyz' +-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +-as_cr_Letters=$as_cr_letters$as_cr_LETTERS +-as_cr_digits='0123456789' +-as_cr_alnum=$as_cr_Letters$as_cr_digits +- + as_nl=' + ' + export as_nl +@@ -56674,7 +32363,13 @@ + as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo + as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +-if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then ++# Prefer a ksh shell builtin over an external printf program on Solaris, ++# but without wasting forks for bash or zsh. ++if test -z "$BASH_VERSION$ZSH_VERSION" \ ++ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then ++ as_echo='print -r --' ++ as_echo_n='print -rn --' ++elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' + else +@@ -56685,7 +32380,7 @@ + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; +- case $arg in ++ case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; +@@ -56708,13 +32403,6 @@ + } + fi + +-# Support unset when possible. +-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then +- as_unset=unset +-else +- as_unset=false +-fi +- + + # IFS + # We need space, tab and new line, in precisely that order. Quoting is +@@ -56724,15 +32412,16 @@ + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. +-case $0 in ++as_myself= ++case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + for as_dir in $PATH + do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. +- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +-done ++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break ++ done + IFS=$as_save_IFS + + ;; +@@ -56744,12 +32433,16 @@ + fi + if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 +- { (exit 1); exit 1; } ++ exit 1 + fi + +-# Work around bugs in pre-3.0 UWIN ksh. +-for as_var in ENV MAIL MAILPATH +-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var ++# Unset variables that we do not need and which cause bugs (e.g. in ++# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" ++# suppresses any "Segmentation fault" message there. '((' could ++# trigger a bug in pdksh 5.2.14. ++for as_var in BASH_ENV ENV MAIL MAILPATH ++do eval test x\${$as_var+set} = xset \ ++ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : + done + PS1='$ ' + PS2='> ' +@@ -56761,7 +32454,89 @@ + LANGUAGE=C + export LANGUAGE + +-# Required to use basename. ++# CDPATH. ++(unset CDPATH) >/dev/null 2>&1 && unset CDPATH ++ ++ ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- ++# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are ++# provided, also output the error to LOG_FD, referencing LINENO. Then exit the ++# script with STATUS, using 1 if that was 0. ++as_fn_error () ++{ ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 ++ fi ++ $as_echo "$as_me: error: $2" >&2 ++ as_fn_exit $as_status ++} # as_fn_error ++ ++ ++# as_fn_set_status STATUS ++# ----------------------- ++# Set $? to STATUS, without forking. ++as_fn_set_status () ++{ ++ return $1 ++} # as_fn_set_status ++ ++# as_fn_exit STATUS ++# ----------------- ++# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. ++as_fn_exit () ++{ ++ set +e ++ as_fn_set_status $1 ++ exit $1 ++} # as_fn_exit ++ ++# as_fn_unset VAR ++# --------------- ++# Portably unset VAR. ++as_fn_unset () ++{ ++ { eval $1=; unset $1;} ++} ++as_unset=as_fn_unset ++# as_fn_append VAR VALUE ++# ---------------------- ++# Append the text in VALUE to the end of the definition contained in VAR. Take ++# advantage of any shell optimizations that allow amortized linear growth over ++# repeated appends, instead of the typical quadratic growth present in naive ++# implementations. ++if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : ++ eval 'as_fn_append () ++ { ++ eval $1+=\$2 ++ }' ++else ++ as_fn_append () ++ { ++ eval $1=\$$1\$2 ++ } ++fi # as_fn_append ++ ++# as_fn_arith ARG... ++# ------------------ ++# Perform arithmetic evaluation on the ARGs, and store the result in the ++# global $as_val. Take advantage of shells that can avoid forks. The arguments ++# must be portable across $(()) and expr. ++if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : ++ eval 'as_fn_arith () ++ { ++ as_val=$(( $* )) ++ }' ++else ++ as_fn_arith () ++ { ++ as_val=`expr "$@" || test $? -eq 1` ++ } ++fi # as_fn_arith ++ ++ + if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +@@ -56775,8 +32550,12 @@ + as_basename=false + fi + ++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then ++ as_dirname=dirname ++else ++ as_dirname=false ++fi + +-# Name of the executable. + as_me=`$as_basename -- "$0" || + $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ +@@ -56796,76 +32575,25 @@ + } + s/.*/./; q'` + +-# CDPATH. +-$as_unset CDPATH +- +- +- +- as_lineno_1=$LINENO +- as_lineno_2=$LINENO +- test "x$as_lineno_1" != "x$as_lineno_2" && +- test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { +- +- # Create $as_me.lineno as a copy of $as_myself, but with $LINENO +- # uniformly replaced by the line number. The first 'sed' inserts a +- # line-number line after each line using $LINENO; the second 'sed' +- # does the real work. The second script uses 'N' to pair each +- # line-number line with the line containing $LINENO, and appends +- # trailing '-' during substitution so that $LINENO is not a special +- # case at line end. +- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the +- # scripts with optimization help from Paolo Bonzini. Blame Lee +- # E. McMahon (1931-1989) for sed's syntax. :-) +- sed -n ' +- p +- /[$]LINENO/= +- ' <$as_myself | +- sed ' +- s/[$]LINENO.*/&-/ +- t lineno +- b +- :lineno +- N +- :loop +- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ +- t loop +- s/-\n.*// +- ' >$as_me.lineno && +- chmod +x "$as_me.lineno" || +- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 +- { (exit 1); exit 1; }; } +- +- # Don't try to exec as it changes $[0], causing all sort of problems +- # (the dirname of $[0] is not the place where we might find the +- # original and so on. Autoconf is especially sensitive to this). +- . "./$as_me.lineno" +- # Exit status is that of the last command. +- exit +-} +- +- +-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then +- as_dirname=dirname +-else +- as_dirname=false +-fi ++# Avoid depending upon Character Ranges. ++as_cr_letters='abcdefghijklmnopqrstuvwxyz' ++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ++as_cr_Letters=$as_cr_letters$as_cr_LETTERS ++as_cr_digits='0123456789' ++as_cr_alnum=$as_cr_Letters$as_cr_digits + + ECHO_C= ECHO_N= ECHO_T= +-case `echo -n x` in ++case `echo -n x` in #((((( + -n*) +- case `echo 'x\c'` in ++ case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. +- *) ECHO_C='\c';; ++ xy) ECHO_C='\c';; ++ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ++ ECHO_T=' ';; + esac;; + *) + ECHO_N='-n';; + esac +-if expr a : '\(a\)' >/dev/null 2>&1 && +- test "X`expr 00001 : '.*\(...\)'`" = X001; then +- as_expr=expr +-else +- as_expr=false +-fi + + rm -f conf$$ conf$$.exe conf$$.file + if test -d conf$$.dir; then +@@ -56894,8 +32622,56 @@ + rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file + rmdir conf$$.dir 2>/dev/null + ++ ++# as_fn_mkdir_p ++# ------------- ++# Create "$as_dir" as a directory, including parents if necessary. ++as_fn_mkdir_p () ++{ ++ ++ case $as_dir in #( ++ -*) as_dir=./$as_dir;; ++ esac ++ test -d "$as_dir" || eval $as_mkdir_p || { ++ as_dirs= ++ while :; do ++ case $as_dir in #( ++ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( ++ *) as_qdir=$as_dir;; ++ esac ++ as_dirs="'$as_qdir' $as_dirs" ++ as_dir=`$as_dirname -- "$as_dir" || ++$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ++ X"$as_dir" : 'X\(//\)[^/]' \| \ ++ X"$as_dir" : 'X\(//\)$' \| \ ++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || ++$as_echo X"$as_dir" | ++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)[^/].*/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\/\)$/{ ++ s//\1/ ++ q ++ } ++ /^X\(\/\).*/{ ++ s//\1/ ++ q ++ } ++ s/.*/./; q'` ++ test -d "$as_dir" && break ++ done ++ test -z "$as_dirs" || eval "mkdir $as_dirs" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" ++ ++ ++} # as_fn_mkdir_p + if mkdir -p . 2>/dev/null; then +- as_mkdir_p=: ++ as_mkdir_p='mkdir -p "$as_dir"' + else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +@@ -56914,10 +32690,10 @@ + if test -d "$1"; then + test -d "$1/."; + else +- case $1 in ++ case $1 in #( + -*)set "./$1";; + esac; +- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +@@ -56932,13 +32708,19 @@ + + + exec 6>&1 ++## ----------------------------------- ## ++## Main body of $CONFIG_STATUS script. ## ++## ----------------------------------- ## ++_ASEOF ++test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +-# Save the log message, to keep $[0] and so on meaningful, and to ++cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ++# Save the log message, to keep $0 and so on meaningful, and to + # report actual input values of CONFIG_FILES etc. instead of their + # values after options handling. + ac_log=" + This file was extended by GNU tar $as_me 1.26, which was +-generated by GNU Autoconf 2.63. Invocation command line was ++generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -56970,13 +32752,15 @@ + + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + ac_cs_usage="\ +-\`$as_me' instantiates files from templates according to the +-current configuration. ++\`$as_me' instantiates files and other configuration actions ++from templates according to the current configuration. Unless the files ++and actions are specified as TAGs, all are instantiated by default. + +-Usage: $0 [OPTION]... [FILE]... ++Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit ++ --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files +@@ -56995,16 +32779,19 @@ + Configuration commands: + $config_commands + +-Report bugs to ." ++Report bugs to . ++GNU tar home page: . ++General help using GNU software: ." + + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ++ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + GNU tar config.status 1.26 +-configured by $0, generated by GNU Autoconf 2.63, +- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" ++configured by $0, generated by GNU Autoconf 2.68, ++ with options \\"\$ac_cs_config\\" + +-Copyright (C) 2008 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +@@ -57022,11 +32809,16 @@ + while test $# != 0 + do + case $1 in +- --*=*) ++ --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; ++ --*=) ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg= ++ ac_shift=: ++ ;; + *) + ac_option=$1 + ac_optarg=$2 +@@ -57040,27 +32832,29 @@ + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; ++ --config | --confi | --conf | --con | --co | --c ) ++ $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ '') as_fn_error $? "missing file argument" ;; + esac +- CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ++ as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac +- CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ++ as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +- { $as_echo "$as_me: error: ambiguous option: $1 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; };; ++ as_fn_error $? "ambiguous option: \`$1' ++Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ +@@ -57068,11 +32862,10 @@ + ac_cs_silent=: ;; + + # This is an error. +- -*) { $as_echo "$as_me: error: unrecognized option: $1 +-Try \`$0 --help' for more information." >&2 +- { (exit 1); exit 1; }; } ;; ++ -*) as_fn_error $? "unrecognized option: \`$1' ++Try \`$0 --help' for more information." ;; + +- *) ac_config_targets="$ac_config_targets $1" ++ *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac +@@ -57122,6 +32915,7 @@ + LINGUAS="${LINGUAS-%UNSET%}" + + ++ + _ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +@@ -57145,9 +32939,7 @@ + "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + +- *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +-$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} +- { (exit 1); exit 1; }; };; ++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac + done + +@@ -57170,26 +32962,24 @@ + # after its creation but before its name has been assigned to `$tmp'. + $debug || + { +- tmp= ++ tmp= ac_tmp= + trap 'exit_status=$? +- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ++ : "${ac_tmp:=$tmp}" ++ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status + ' 0 +- trap '{ (exit 1); exit 1; }' 1 2 13 15 ++ trap 'as_fn_exit 1' 1 2 13 15 + } + # Create a (secure) tmp directory for tmp files. + + { + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && +- test -n "$tmp" && test -d "$tmp" ++ test -d "$tmp" + } || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +-} || +-{ +- $as_echo "$as_me: cannot create a temporary directory in ." >&2 +- { (exit 1); exit 1; } +-} ++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ++ac_tmp=$tmp + + # Set up the scripts for CONFIG_FILES section. + # No need to generate them if there are no CONFIG_FILES. +@@ -57197,7 +32987,13 @@ + if test -n "$CONFIG_FILES"; then + + +-ac_cr=' ' ++ac_cr=`echo X | tr X '\015'` ++# On cygwin, bash can eat \r inside `` if the user requested igncr. ++# But we know of no other shell where ac_cr would be empty at this ++# point, so we can use a bashism as a fallback. ++if test "x$ac_cr" = x; then ++ eval ac_cr=\$\'\\r\' ++fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +@@ -57205,7 +33001,7 @@ + ac_cs_awk_cr=$ac_cr + fi + +-echo 'BEGIN {' >"$tmp/subs1.awk" && ++echo 'BEGIN {' >"$ac_tmp/subs1.awk" && + _ACEOF + + +@@ -57214,24 +33010,18 @@ + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" + } >conf$$subs.sh || +- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } +-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || +- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then +- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +-$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +@@ -57239,7 +33029,7 @@ + rm -f conf$$subs.sh + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +-cat >>"\$tmp/subs1.awk" <<\\_ACAWK && ++cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && + _ACEOF + sed -n ' + h +@@ -57253,7 +33043,7 @@ + t delim + :nl + h +-s/\(.\{148\}\).*/\1/ ++s/\(.\{148\}\)..*/\1/ + t more1 + s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ + p +@@ -57267,7 +33057,7 @@ + t nl + :delim + h +-s/\(.\{148\}\).*/\1/ ++s/\(.\{148\}\)..*/\1/ + t more2 + s/["\\]/\\&/g; s/^/"/; s/$/"/ + p +@@ -57287,7 +33077,7 @@ + rm -f conf$$subs.awk + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + _ACAWK +-cat >>"\$tmp/subs1.awk" <<_ACAWK && ++cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +@@ -57319,23 +33109,29 @@ + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" + else + cat +-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +- || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +-$as_echo "$as_me: error: could not setup config files machinery" >&2;} +- { (exit 1); exit 1; }; } ++fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ ++ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# VPATH may cause trouble with some makes, so we remove sole $(srcdir), ++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/ +-s/:*\${srcdir}:*/:/ +-s/:*@srcdir@:*/:/ +-s/^\([^=]*=[ ]*\):*/\1/ ++ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ ++h ++s/// ++s/^/:/ ++s/[ ]*$/:/ ++s/:\$(srcdir):/:/g ++s/:\${srcdir}:/:/g ++s/:@srcdir@:/:/g ++s/^:*// + s/:*$// ++x ++s/\(=[ ]*\).*/\1/ ++G ++s/\n// + s/^[^=]*=[ ]*$// + }' + fi +@@ -57347,7 +33143,7 @@ + # No need to generate them if there are no CONFIG_HEADERS. + # This happens for instance with `./config.status Makefile'. + if test -n "$CONFIG_HEADERS"; then +-cat >"$tmp/defines.awk" <<\_ACAWK || ++cat >"$ac_tmp/defines.awk" <<\_ACAWK || + BEGIN { + _ACEOF + +@@ -57359,13 +33155,11 @@ + # handling of long lines. + ac_delim='%!_!# ' + for ac_last_try in false false :; do +- ac_t=`sed -n "/$ac_delim/p" confdefs.h` +- if test -z "$ac_t"; then ++ ac_tt=`sed -n "/$ac_delim/p" confdefs.h` ++ if test -z "$ac_tt"; then + break + elif $ac_last_try; then +- { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +-$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +@@ -57450,9 +33244,7 @@ + _ACAWK + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +- { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +-$as_echo "$as_me: error: could not setup config headers machinery" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + fi # test -n "$CONFIG_HEADERS" + + +@@ -57465,9 +33257,7 @@ + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +- :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +-$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} +- { (exit 1); exit 1; }; };; ++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +@@ -57486,7 +33276,7 @@ + for ac_f + do + case $ac_f in +- -) ac_f="$tmp/stdin";; ++ -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. +@@ -57495,12 +33285,10 @@ + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +- { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +-$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} +- { (exit 1); exit 1; }; };; ++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac +- ac_file_inputs="$ac_file_inputs '$ac_f'" ++ as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't +@@ -57511,7 +33299,7 @@ + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" +- { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 + $as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. +@@ -57523,10 +33311,8 @@ + esac + + case $ac_tag in +- *:-:* | *:-) cat >"$tmp/stdin" \ +- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +-$as_echo "$as_me: error: could not create $ac_file" >&2;} +- { (exit 1); exit 1; }; } ;; ++ *:-:* | *:-) cat >"$ac_tmp/stdin" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +@@ -57554,47 +33340,7 @@ + q + } + s/.*/./; q'` +- { as_dir="$ac_dir" +- case $as_dir in #( +- -*) as_dir=./$as_dir;; +- esac +- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { +- as_dirs= +- while :; do +- case $as_dir in #( +- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( +- *) as_qdir=$as_dir;; +- esac +- as_dirs="'$as_qdir' $as_dirs" +- as_dir=`$as_dirname -- "$as_dir" || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-$as_echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- test -d "$as_dir" && break +- done +- test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} +- { (exit 1); exit 1; }; }; } ++ as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + + case "$ac_dir" in +@@ -57651,7 +33397,6 @@ + # If the template does not know about datarootdir, expand it. + # FIXME: This hack should be removed a few years after 2.60. + ac_datarootdir_hack=; ac_datarootdir_seen= +- + ac_sed_dataroot=' + /datarootdir/ { + p +@@ -57661,12 +33406,11 @@ + /@docdir@/p + /@infodir@/p + /@localedir@/p +-/@mandir@/p +-' ++/@mandir@/p' + case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in + *datarootdir*) ac_datarootdir_seen=yes;; + *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) +- { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +@@ -57676,7 +33420,7 @@ + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g +- s&\\\${datarootdir}&$datarootdir&g' ;; ++ s&\\\${datarootdir}&$datarootdir&g' ;; + esac + _ACEOF + +@@ -57704,27 +33448,24 @@ + s&@MKDIR_P@&$ac_MKDIR_P&;t t + $ac_datarootdir_hack + " +-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ +- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +-$as_echo "$as_me: error: could not create $ac_file" >&2;} +- { (exit 1); exit 1; }; } ++eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ ++ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && +- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && +- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && +- { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +-which seems to be undefined. Please make sure it is defined." >&5 ++ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && ++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ ++ "$ac_tmp/out"`; test -z "$ac_out"; } && ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' ++which seems to be undefined. Please make sure it is defined" >&5 + $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +-which seems to be undefined. Please make sure it is defined." >&2;} ++which seems to be undefined. Please make sure it is defined" >&2;} + +- rm -f "$tmp/stdin" ++ rm -f "$ac_tmp/stdin" + case $ac_file in +- -) cat "$tmp/out" && rm -f "$tmp/out";; +- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; ++ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; ++ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ +- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +-$as_echo "$as_me: error: could not create $ac_file" >&2;} +- { (exit 1); exit 1; }; } ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # +@@ -57733,27 +33474,21 @@ + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ +- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" +- } >"$tmp/config.h" \ +- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +-$as_echo "$as_me: error: could not create $ac_file" >&2;} +- { (exit 1); exit 1; }; } +- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then +- { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" ++ } >"$ac_tmp/config.h" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ++ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + $as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" +- mv "$tmp/config.h" "$ac_file" \ +- || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +-$as_echo "$as_me: error: could not create $ac_file" >&2;} +- { (exit 1); exit 1; }; } ++ mv "$ac_tmp/config.h" "$ac_file" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ +- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ +- || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +-$as_echo "$as_me: error: could not create -" >&2;} +- { (exit 1); exit 1; }; } ++ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ ++ || as_fn_error $? "could not create -" "$LINENO" 5 + fi + # Compute "$ac_file"'s index in $config_headers. + _am_arg="$ac_file" +@@ -57791,7 +33526,7 @@ + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + +- :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 ++ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 + $as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac +@@ -57886,47 +33621,7 @@ + q + } + s/.*/./; q'` +- { as_dir=$dirpart/$fdir +- case $as_dir in #( +- -*) as_dir=./$as_dir;; +- esac +- test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { +- as_dirs= +- while :; do +- case $as_dir in #( +- *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( +- *) as_qdir=$as_dir;; +- esac +- as_dirs="'$as_qdir' $as_dirs" +- as_dir=`$as_dirname -- "$as_dir" || +-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ +- X"$as_dir" : 'X\(//\)[^/]' \| \ +- X"$as_dir" : 'X\(//\)$' \| \ +- X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +-$as_echo X"$as_dir" | +- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)[^/].*/{ +- s//\1/ +- q +- } +- /^X\(\/\/\)$/{ +- s//\1/ +- q +- } +- /^X\(\/\).*/{ +- s//\1/ +- q +- } +- s/.*/./; q'` +- test -d "$as_dir" && break +- done +- test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +-$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} +- { (exit 1); exit 1; }; }; } ++ as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +@@ -58049,7 +33744,7 @@ + "tests/atconfig":C) cat >tests/atconfig <&5 +-$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} +- { (exit 1); exit 1; }; } ++ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + + # configure is writing to config.log, and then calls config.status. +@@ -58103,10 +33795,10 @@ + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +- $ac_cs_success || { (exit 1); exit 1; } ++ $ac_cs_success || as_fn_exit 1 + fi + if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then +- { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 ++ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 + $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + fi + +Index: tar-1.26/lib/xattr-at.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ tar-1.26/lib/xattr-at.h 2014-04-29 17:14:50.038704504 +0000 +@@ -0,0 +1,66 @@ ++/* Prototypes for openat-style fd-relative functions for operating with ++ extended file attributes. ++ ++ Copyright 2012-2013 Free Software Foundation, Inc. ++ ++ This program is free software: you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef XATTRS_AT_H ++#define XATTRS_AT_H ++ ++#include ++#include ++ ++/* These are the dir-fd-relative variants of the functions without the ++ "at" suffix. For example, setxattrat (AT_FDCWD, path, name, value, size, ++ flags &c) is usually equivalent to setxattr (file, name, value, size, ++ flags). For more info use the setxattr(2), getxattr(2) or listxattr(2) ++ manpages. */ ++ ++/* dir-fd-relative setxattr. Operation sets the VALUE of the extended ++ attribute identified by NAME and associated with the given PATH in the ++ filesystem relatively to directory identified by DIR_FD. See the ++ setxattr(2) manpage for the description of all parameters. */ ++int setxattrat (int dir_fd, const char *path, const char *name, ++ const void *value, size_t size, int flags); ++ ++/* dir-fd-relative lsetxattr. This function is just like setxattrat, ++ except when DIR_FD and FILE specify a symlink: lsetxattrat operates on the ++ symlink, while the setxattrat operates on the referent of the symlink. */ ++int lsetxattrat (int dir_fd, const char *path, const char *name, ++ const void *value, size_t size, int flags); ++ ++/* dir-fd-relative getxattr. Operation gets the VALUE of the extended ++ attribute idenfified by NAME and associated with the given PATH in the ++ filesystem relatively to directory identified by DIR_FD. For more info ++ about all parameters see the getxattr(2) manpage. */ ++ssize_t getxattrat (int dir_fd, const char *path, const char *name, ++ void *value, size_t size); ++ ++/* dir-fd-relative lgetxattr. This function is just like getxattrat, ++ except when DIR_FD and FILE specify a symlink: lgetxattrat operates on the ++ symlink, while the getxattrat operates on the referent of the symlink. */ ++ssize_t lgetxattrat (int dir_fd, const char *path, const char *name, ++ void *value, size_t size); ++ ++/* dir-fd-relative listxattr. Obtain the list of extended attrubtes names. For ++ more info see the listxattr(2) manpage. */ ++ssize_t listxattrat (int dir_fd, const char *path, char *list, size_t size); ++ ++/* dir-fd-relative llistxattr. This function is just like listxattrat, ++ except when DIR_FD and FILE specify a symlink: llistxattr operates on the ++ symlink, while the listxattrat operates on the referent of the symlink. */ ++ssize_t llistxattrat (int dir_fd, const char *path, char *list, size_t size); ++ ++#endif /* XATTRS_AT_H */ diff -Nru tar-1.26/debian/patches/series tar-1.26/debian/patches/series --- tar-1.26/debian/patches/series 2011-11-27 09:13:45.000000000 -0600 +++ tar-1.26/debian/patches/series 2014-04-29 12:14:32.000000000 -0500 @@ -1,3 +1,4 @@ doc-hack.diff longlink-hack.diff listed03-linux-only +implement-xattrs