-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
-printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
- case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
- *yes)
-
-cat >>confdefs.h <<_ACEOF
-#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-_ACEOF
-
- ;;
- esac
-
-
-
-
- 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;
-
-
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-printf %s "checking for mbstate_t... " >&6; }
-if ${ac_cv_type_mbstate_t+:} false; then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$ac_includes_default
-/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
- <wchar.h>.
- BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
- included before <wchar.h>. */
-#include <stddef.h>
-#include <stdio.h>
-#include <time.h>
-#include <wchar.h>
-int
-main ()
-{
-mbstate_t x; return sizeof x;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_mbstate_t=yes
-else
- ac_cv_type_mbstate_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
- if test $ac_cv_type_mbstate_t = yes; then
-
-printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
-
- else
-
-printf "%s\n" "#define mbstate_t int" >>confdefs.h
-
- fi
-
-
-
-
-
-
-
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
-printf %s "checking for a traditional japanese locale... " >&6; }
-if ${gt_cv_locale_ja+:} false; then :
- printf %s "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
- const char *p;
- /* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Windows, setlocale(category, "") looks at the system settings,
- not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
- category of the locale to "C". */
- if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
- || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
- return 1;
-#else
- if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
- /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
- is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
- On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
- succeeds but then nl_langinfo(CODESET) is "646". In this situation,
- some unit tests fail.
- On MirBSD 10, when an unsupported locale is specified, setlocale()
- succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
- {
- const char *cs = nl_langinfo (CODESET);
- if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
- || strcmp (cs, "UTF-8") == 0)
- return 1;
- }
-#endif
-#ifdef __CYGWIN__
- /* On Cygwin, avoid locale names without encoding suffix, because the
- locale_charset() function relies on the encoding suffix. Note that
- LC_ALL is set on the command line. */
- if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
- /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
- on Cygwin 1.5.x. */
- if (MB_CUR_MAX == 1)
- return 1;
- /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
- This excludes the UTF-8 encoding (except on MirBSD). */
- 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\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest$ac_exeext; then
- case "$host_os" in
- # Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
- # "fr" or "fra" as "French" or "French_France.1252",
- # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
- # and similar.
- mingw*)
- # Note that on native Windows, the Japanese locale is
- # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
- # cannot use it here.
- gt_cv_locale_ja=none
- ;;
- *)
- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
- # configure script would override the LC_ALL setting. Likewise for
- # LC_CTYPE, which is also set at the beginning of the configure script.
- # Test for the AIX locale name.
- if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_ja=ja_JP
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_ja=ja_JP.EUC-JP
- else
- # Test for the HP-UX, OSF/1, NetBSD locale name.
- if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_ja=ja_JP.eucJP
- else
- # Test for the IRIX, FreeBSD locale name.
- if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_ja=ja_JP.EUC
- else
- # Test for the Solaris 7 locale name.
- if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_ja=ja
- else
- # Special test for NetBSD 1.6.
- if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
- gt_cv_locale_ja=ja_JP.eucJP
- else
- # None found.
- gt_cv_locale_ja=none
- fi
- fi
- fi
- fi
- fi
- fi
- ;;
- esac
- fi
- rm -fr conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
-printf "%s\n" "$gt_cv_locale_ja" >&6; }
- LOCALE_JA=$gt_cv_locale_ja
-
-
-
-
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
-printf %s "checking for a transitional chinese locale... " >&6; }
-if ${gt_cv_locale_zh_CN+:} false; then :
- printf %s "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <stdlib.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main ()
-{
- const char *p;
- /* Check whether the given locale name is recognized by the system. */
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Windows, setlocale(category, "") looks at the system settings,
- not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
- category of the locale to "C". */
- if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
- || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
- return 1;
-#else
- if (setlocale (LC_ALL, "") == NULL) return 1;
-#endif
- /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
- is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
- On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
- succeeds but then nl_langinfo(CODESET) is "646". In this situation,
- some unit tests fail.
- On MirBSD 10, when an unsupported locale is specified, setlocale()
- succeeds but then nl_langinfo(CODESET) is "UTF-8". */
-#if HAVE_LANGINFO_CODESET
- {
- const char *cs = nl_langinfo (CODESET);
- if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
- || strcmp (cs, "UTF-8") == 0)
- return 1;
- }
-#endif
-#ifdef __CYGWIN__
- /* On Cygwin, avoid locale names without encoding suffix, because the
- locale_charset() function relies on the encoding suffix. Note that
- LC_ALL is set on the command line. */
- if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-#endif
- /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
- This excludes the UTF-8 encoding (except on MirBSD). */
- 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\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest$ac_exeext; then
- case "$host_os" in
- # Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
- # "fr" or "fra" as "French" or "French_France.1252",
- # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
- # and similar.
- mingw*)
- # Test for the hypothetical native Windows locale name.
- if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_zh_CN=Chinese_China.54936
- else
- # None found.
- gt_cv_locale_zh_CN=none
- fi
- ;;
- solaris2.8)
- # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
- # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
- # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
- gt_cv_locale_zh_CN=none
- ;;
- *)
- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
- # configure script would override the LC_ALL setting. Likewise for
- # LC_CTYPE, which is also set at the beginning of the configure script.
- # Test for the locale name without encoding suffix.
- if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_zh_CN=zh_CN
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_zh_CN=zh_CN.GB18030
- else
- # None found.
- gt_cv_locale_zh_CN=none
- fi
- fi
- ;;
- esac
- else
- # If there was a link error, due to mblen(), the system is so old that
- # it certainly doesn't have a chinese locale.
- gt_cv_locale_zh_CN=none
- fi
- rm -fr conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
-printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
- LOCALE_ZH_CN=$gt_cv_locale_zh_CN
-
-
-
-
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
-printf %s "checking for a french Unicode locale... " >&6; }
-if ${gt_cv_locale_fr_utf8+:} false; then :
- printf %s "(cached) " >&6
-else
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <locale.h>
-#include <time.h>
-#if HAVE_LANGINFO_CODESET
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-struct tm t;
-char buf[16];
-int main () {
- /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
- imitates locale dependent behaviour by looking at the environment
- variables, and all locales use the UTF-8 encoding. */
-#if !(defined __BEOS__ || defined __HAIKU__)
- /* Check whether the given locale name is recognized by the system. */
-# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
- /* On native Windows, setlocale(category, "") looks at the system settings,
- not at the environment variables. Also, when an encoding suffix such
- as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
- category of the locale to "C". */
- if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
- || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
- return 1;
-# else
- if (setlocale (LC_ALL, "") == NULL) return 1;
-# endif
- /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
- On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
- is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
- On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
- succeeds but then nl_langinfo(CODESET) is "646". In this situation,
- some unit tests fail. */
-# if HAVE_LANGINFO_CODESET
- {
- const char *cs = nl_langinfo (CODESET);
- if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
- return 1;
- }
-# endif
-# ifdef __CYGWIN__
- /* On Cygwin, avoid locale names without encoding suffix, because the
- locale_charset() function relies on the encoding suffix. Note that
- LC_ALL is set on the command line. */
- if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
-# endif
- /* Check whether in the abbreviation of the second month, the second
- character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
- two bytes long, with UTF-8 encoding. */
- t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
- if (strftime (buf, sizeof (buf), "%b", &t) < 4
- || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
- return 1;
-#endif
-#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
- /* Check whether the decimal separator is a comma.
- On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
- are nl_langinfo(RADIXCHAR) are both ".". */
- if (localeconv () ->decimal_point[0] != ',') return 1;
-#endif
- return 0;
-}
-
-_ACEOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest$ac_exeext; then
- case "$host_os" in
- # Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
- # "fr" or "fra" as "French" or "French_France.1252",
- # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
- # and similar.
- mingw*)
- # Test for the hypothetical native Windows locale name.
- if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=French_France.65001
- else
- # None found.
- gt_cv_locale_fr_utf8=none
- fi
- ;;
- *)
- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
- # configure script would override the LC_ALL setting. Likewise for
- # LC_CTYPE, which is also set at the beginning of the configure script.
- # Test for the usual locale name.
- if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR.UTF-8
- else
- # Test for the Solaris 7 locale name.
- if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr.UTF-8
- else
- # None found.
- gt_cv_locale_fr_utf8=none
- fi
- fi
- fi
- ;;
- esac
- fi
- rm -fr conftest*
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
-printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
- LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
-
-
-
-
-
-
-
- GNULIB_FFSL=0;
- GNULIB_FFSLL=0;
- GNULIB_MEMCHR=0;
- GNULIB_MEMMEM=0;
- GNULIB_MEMPCPY=0;
- GNULIB_MEMRCHR=0;
- GNULIB_RAWMEMCHR=0;
- GNULIB_STPCPY=0;
- GNULIB_STPNCPY=0;
- GNULIB_STRCHRNUL=0;
- GNULIB_STRDUP=0;
- GNULIB_STRNCAT=0;
- GNULIB_STRNDUP=0;
- GNULIB_STRNLEN=0;
- GNULIB_STRPBRK=0;
- GNULIB_STRSEP=0;
- GNULIB_STRSTR=0;
- GNULIB_STRCASESTR=0;
- GNULIB_STRTOK_R=0;
- GNULIB_MBSLEN=0;
- GNULIB_MBSNLEN=0;
- GNULIB_MBSCHR=0;
- GNULIB_MBSRCHR=0;
- GNULIB_MBSSTR=0;
- GNULIB_MBSCASECMP=0;
- GNULIB_MBSNCASECMP=0;
- GNULIB_MBSPCASECMP=0;
- GNULIB_MBSCASESTR=0;
- GNULIB_MBSCSPN=0;
- GNULIB_MBSPBRK=0;
- GNULIB_MBSSPN=0;
- GNULIB_MBSSEP=0;
- GNULIB_MBSTOK_R=0;
- GNULIB_STRERROR=0;
- GNULIB_STRERROR_R=0;
- GNULIB_STRSIGNAL=0;
- GNULIB_STRVERSCMP=0;
- HAVE_MBSLEN=0;
- HAVE_FFSL=1;
- HAVE_FFSLL=1;
- 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_STRCHRNUL=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;
-
-
-
-
-
- # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
- # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
- # irrelevant for anonymous mappings.
- ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
-if test "x$ac_cv_func_mmap" = xyes; then :
- gl_have_mmap=yes
-else
- gl_have_mmap=no
-fi
-
-
- # Try to allow MAP_ANONYMOUS.
- gl_have_mmap_anonymous=no
- if test $gl_have_mmap = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
-printf %s "checking for MAP_ANONYMOUS... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/mman.h>
-#ifdef MAP_ANONYMOUS
- I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
- gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
- if test $gl_have_mmap_anonymous != yes; then
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <sys/mman.h>
-#ifdef MAP_ANON
- I cannot identify this map
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
-
-printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
-
- gl_have_mmap_anonymous=yes
-fi
-rm -rf conftest*
-
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
-printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
- if test $gl_have_mmap_anonymous = yes; then
-
-printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
-
- fi
- fi
-
-
-
-
-
-
- if test $HAVE_MEMCHR = 1; 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.
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
-printf %s "checking whether memchr works... " >&6; }
-if ${gl_cv_func_memchr_works+:} false; then :
- printf %s "(cached) " >&6
-else
- 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 <string.h>
-#if HAVE_SYS_MMAN_H
-# include <fcntl.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <sys/mman.h>
-# ifndef MAP_FILE
-# define MAP_FILE 0
-# endif
-#endif
-
-int
-main ()
-{
-
- 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
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_memchr_works=yes
-else
- gl_cv_func_memchr_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
-printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
- if test "$gl_cv_func_memchr_works" != yes; then
- REPLACE_MEMCHR=1
- fi
- fi
-
-ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_memrchr" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MEMRCHR $ac_have_decl
-_ACEOF
-
-
-
-
- REPLACE_STRERROR_0=0
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
-printf %s "checking whether strerror(0) succeeds... " >&6; }
-if ${gl_cv_func_strerror_0_works+:} false; then :
- printf %s "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, assume the worst.
- *) gl_cv_func_strerror_0_works="guessing no" ;;
- esac
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
- #include <errno.h>
-
-int
-main ()
-{
-int result = 0;
- char *str;
- errno = 0;
- str = strerror (0);
- if (!*str) result |= 1;
- if (errno) result |= 2;
- if (strstr (str, "nknown") || strstr (str, "ndefined"))
- result |= 4;
- return result;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_strerror_0_works=yes
-else
- gl_cv_func_strerror_0_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
- case "$gl_cv_func_strerror_0_works" in
- *yes) ;;
- *)
- REPLACE_STRERROR_0=1
-
-printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
-
- ;;
- esac
-
-
-
-
-
-
-
-
-
-
- if test $ac_cv_func_strerror_r = yes; then
- if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
-printf %s "checking for strerror_r with POSIX signature... " >&6; }
-if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
- printf %s "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
- int strerror_r (int, char *, size_t);
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- gl_cv_func_strerror_r_posix_signature=yes
-else
- gl_cv_func_strerror_r_posix_signature=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
- if test $gl_cv_func_strerror_r_posix_signature = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
-printf %s "checking whether strerror_r works... " >&6; }
-if ${gl_cv_func_strerror_r_works+:} false; then :
- printf %s "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
-
- case "$host_os" in
- # Guess no on AIX.
- aix*) gl_cv_func_strerror_r_works="guessing no";;
- # Guess no on HP-UX.
- hpux*) gl_cv_func_strerror_r_works="guessing no";;
- # Guess no on BSD variants.
- *bsd*) gl_cv_func_strerror_r_works="guessing no";;
- # Guess yes otherwise.
- *) gl_cv_func_strerror_r_works="guessing yes";;
- esac
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <errno.h>
- #include <string.h>
-
-int
-main ()
-{
-int result = 0;
- char buf[79];
- if (strerror_r (EACCES, buf, 0) < 0)
- result |= 1;
- errno = 0;
- if (strerror_r (EACCES, buf, sizeof buf) != 0)
- result |= 2;
- strcpy (buf, "Unknown");
- if (strerror_r (0, buf, sizeof buf) != 0)
- result |= 4;
- if (errno)
- result |= 8;
- if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
- result |= 0x10;
- errno = 0;
- *buf = 0;
- if (strerror_r (-3, buf, sizeof buf) < 0)
- result |= 0x20;
- if (errno)
- result |= 0x40;
- if (!*buf)
- result |= 0x80;
- return result;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_strerror_r_works=yes
-else
- gl_cv_func_strerror_r_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
- else
-
- if test $ac_cv_func___xpg_strerror_r = yes; then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
-printf %s "checking whether __xpg_strerror_r works... " >&6; }
-if ${gl_cv_func_strerror_r_works+:} false; then :
- printf %s "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- gl_cv_func_strerror_r_works="guessing no"
-
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <errno.h>
- #include <string.h>
- extern
- #ifdef __cplusplus
- "C"
- #endif
- int __xpg_strerror_r(int, char *, size_t);
-
-int
-main ()
-{
-int result = 0;
- char buf[256] = "^";
- char copy[256];
- char *str = strerror (-1);
- strcpy (copy, str);
- if (__xpg_strerror_r (-2, buf, 1) == 0)
- result |= 1;
- if (*buf)
- result |= 2;
- __xpg_strerror_r (-2, buf, 256);
- if (strcmp (str, copy))
- result |= 4;
- return result;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- gl_cv_func_strerror_r_works=yes
-else
- gl_cv_func_strerror_r_works=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
-printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
- fi
- fi
- fi
- fi
-
-ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
- ac_have_decl=1
-else
- ac_have_decl=0
-fi
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRERROR_R $ac_have_decl
-_ACEOF
-
-
-
-
-
-
-
-
- if test $ac_cv_have_decl_strerror_r = no; then
- HAVE_DECL_STRERROR_R=0
- fi
-
- if test $ac_cv_func_strerror_r = yes; then
- if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
- if test $gl_cv_func_strerror_r_posix_signature = yes; then
- case "$gl_cv_func_strerror_r_works" in
- *no) REPLACE_STRERROR_R=1 ;;
- esac
- else
- REPLACE_STRERROR_R=1
- fi
- else
- REPLACE_STRERROR_R=1
- fi
- fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- gl_cv_func_vfprintf_posix=no
- case "$gl_cv_func_printf_sizes_c99" in
- *yes)
- case "$gl_cv_func_printf_long_double" in
- *yes)
- case "$gl_cv_func_printf_infinite" in
- *yes)
- case "$gl_cv_func_printf_infinite_long_double" in
- *yes)
- case "$gl_cv_func_printf_directive_a" in
- *yes)
- case "$gl_cv_func_printf_directive_f" in
- *yes)
- case "$gl_cv_func_printf_directive_n" in
- *yes)
- case "$gl_cv_func_printf_directive_ls" in
- *yes)
- case "$gl_cv_func_printf_positions" in
- *yes)
- case "$gl_cv_func_printf_flag_grouping" in
- *yes)
- case "$gl_cv_func_printf_flag_leftadjust" in
- *yes)
- case "$gl_cv_func_printf_flag_zero" in
- *yes)
- case "$gl_cv_func_printf_precision" in
- *yes)
- case "$gl_cv_func_printf_enomem" in
- *yes)
- # vfprintf exists and is
- # already POSIX compliant.
- gl_cv_func_vfprintf_posix=yes
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- ;;
- esac
- if test $gl_cv_func_vfprintf_posix = no; then
-
-
-
- case "$gl_cv_func_printf_infinite" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
-
- ;;
- esac
-
-
-
-
- case "$gl_cv_func_printf_long_double" in
- *yes)
- case "$gl_cv_func_printf_infinite_long_double" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
-
- ;;
- esac
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_directive_a" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
-
- for ac_func in nl_langinfo
-do :
- ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
-if test "x$ac_cv_func_nl_langinfo" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NL_LANGINFO 1
-_ACEOF
-
-fi
-done
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_directive_f" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_directive_ls" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_flag_grouping" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_flag_leftadjust" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_flag_zero" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_precision" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
-
-
-printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
-
-
-printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
-
- ;;
- esac
-
-
-
- case "$gl_cv_func_printf_enomem" in
- *yes)
- ;;
- *)
-
-printf "%s\n" "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
-
-
-printf "%s\n" "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
-
-
-printf "%s\n" "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
-
- ;;
- esac
-
-
-
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
-
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
-
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
-
-
-
-
-
-
-
-
-
- gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
-
- if test $ac_cv_func_vasnprintf = yes; then
-
-printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
-
- fi