2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.197-b8fd7 for GNU diffutils 3.7.
5 # Report bugs to <bug-diffutils@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2017 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 ## -------------------- ##
14 ## M4sh Initialization. ##
15 ## -------------------- ##
17 # Be more Bourne compatible
18 DUALCASE=1; export DUALCASE # for MKS sh
19 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
28 case `(set -o) 2>/dev/null` in #(
37 # The user is always right.
38 if ${PATH_SEPARATOR+false} :; then
40 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
41 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48 # We need space, tab and new line, in precisely that order. Quoting is
49 # there to prevent editors from complaining about space-tab.
50 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
51 # splitting by setting IFS to empty value.)
57 # Find who we are. Look in the path if we contain no directory separator.
60 *[\\/]* ) as_myself=$0 ;;
61 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
70 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
76 # We did not find ourselves, most probably we were run as `sh COMMAND'
77 # in which case we are not to be found in the path.
78 if test "x$as_myself" = x; then
81 if test ! -f "$as_myself"; then
82 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
86 # Unset variables that we do not need and which cause bugs (e.g. in
87 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
88 # suppresses any "Segmentation fault" message there. '((' could
89 # trigger a bug in pdksh 5.2.14.
90 for as_var in BASH_ENV ENV MAIL MAILPATH
91 do eval test \${$as_var+y} \
92 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
105 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
107 # Use a proper internal environment variable to ensure we don't fall
108 # into an infinite loop, continuously re-executing ourselves.
109 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
110 _as_can_reexec=no; export _as_can_reexec;
111 # We cannot yet assume a decent shell, so we have to provide a
112 # neutralization value for shells without unset; and this also
113 # works around shells that cannot unset nonexistent variables.
114 # Preserve -v and -x to the replacement shell.
117 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
119 *v*x* | *x*v* ) as_opts=-vx ;;
124 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
125 # Admittedly, this is quite paranoid, since all the known shells bail
126 # out after a failed `exec'.
127 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
130 # We don't want this to propagate to other subprocesses.
131 { _as_can_reexec=; unset _as_can_reexec;}
132 if test "x$CONFIG_SHELL" = x; then
133 as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
137 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
138 # is contrary to our usage. Disable this feature.
139 alias -g '\${1+\"\$@\"}'='\"\$@\"'
142 case \`(set -o) 2>/dev/null\` in #(
150 as_required="as_fn_return () { (exit \$1); }
151 as_fn_success () { as_fn_return 0; }
152 as_fn_failure () { as_fn_return 1; }
153 as_fn_ret_success () { return 0; }
154 as_fn_ret_failure () { return 1; }
157 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
158 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
159 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
160 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
161 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
165 exitcode=1; echo positional parameters were not saved.
167 test x\$exitcode = x0 || exit 1
169 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
170 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
171 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
172 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
173 test \$(( 1 + 1 )) = 2 || exit 1"
174 if (eval "$as_required") 2>/dev/null
180 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
192 *) as_dir=$as_dir/ ;;
197 for as_base in sh bash ksh sh5; do
198 # Try only shells that exist, to save several forks.
199 as_shell=$as_dir$as_base
200 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
201 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null
203 CONFIG_SHELL=$as_shell as_have_required=yes
204 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null
214 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
215 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null
217 CONFIG_SHELL=$SHELL as_have_required=yes
221 if test "x$CONFIG_SHELL" != x
224 # We cannot yet assume a decent shell, so we have to provide a
225 # neutralization value for shells without unset; and this also
226 # works around shells that cannot unset nonexistent variables.
227 # Preserve -v and -x to the replacement shell.
230 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
232 *v*x* | *x*v* ) as_opts=-vx ;;
237 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
238 # Admittedly, this is quite paranoid, since all the known shells bail
239 # out after a failed `exec'.
240 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
244 if test x$as_have_required = xno
246 printf "%s\n" "$0: This script requires a shell more modern than all"
247 printf "%s\n" "$0: the shells that I found on your system."
248 if test ${ZSH_VERSION+y} ; then
249 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
250 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
252 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
253 $0: bug-diffutils@gnu.org about your system, including any
254 $0: error possibly output before this message. Then install
255 $0: a modern shell, or manually run the script under such a
256 $0: shell if you do have one."
262 SHELL=${CONFIG_SHELL-/bin/sh}
264 # Unset more variables known to interfere with behavior of common tools.
265 CLICOLOR_FORCE= GREP_OPTIONS=
266 unset CLICOLOR_FORCE GREP_OPTIONS
268 ## --------------------- ##
269 ## M4sh Shell Functions. ##
270 ## --------------------- ##
273 # Portably unset VAR.
276 { eval $1=; unset $1;}
280 # as_fn_set_status STATUS
281 # -----------------------
282 # Set $? to STATUS, without forking.
290 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
300 # Create "$as_dir" as a directory, including parents if necessary.
305 -*) as_dir=./$as_dir;;
307 test -d "$as_dir" || eval $as_mkdir_p || {
311 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
314 as_dirs="'$as_qdir' $as_dirs"
315 as_dir=`$as_dirname -- "$as_dir" ||
316 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
317 X"$as_dir" : 'X\(//\)[^/]' \| \
318 X"$as_dir" : 'X\(//\)$' \| \
319 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
320 printf "%s\n" X"$as_dir" |
321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
338 test -d "$as_dir" && break
340 test -z "$as_dirs" || eval "mkdir $as_dirs"
341 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
346 # as_fn_executable_p FILE
347 # -----------------------
348 # Test if FILE is an executable regular file.
349 as_fn_executable_p ()
351 test -f "$1" && test -x "$1"
352 } # as_fn_executable_p
353 # as_fn_append VAR VALUE
354 # ----------------------
355 # Append the text in VALUE to the end of the definition contained in VAR. Take
356 # advantage of any shell optimizations that allow amortized linear growth over
357 # repeated appends, instead of the typical quadratic growth present in naive
359 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
361 eval 'as_fn_append ()
374 # Perform arithmetic evaluation on the ARGs, and store the result in the
375 # global $as_val. Take advantage of shells that can avoid forks. The arguments
376 # must be portable across $(()) and expr.
377 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
386 as_val=`expr "$@" || test $? -eq 1`
391 # as_fn_error STATUS ERROR [LINENO LOG_FD]
392 # ----------------------------------------
393 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
394 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
395 # script with STATUS, using 1 if that was 0.
398 as_status=$1; test $as_status -eq 0 && as_status=1
400 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
401 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
403 printf "%s\n" "$as_me: error: $2" >&2
404 as_fn_exit $as_status
407 if expr a : '\(a\)' >/dev/null 2>&1 &&
408 test "X`expr 00001 : '.*\(...\)'`" = X001; then
414 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
420 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
426 as_me=`$as_basename -- "$0" ||
427 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
428 X"$0" : 'X\(//\)$' \| \
429 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
430 printf "%s\n" X/"$0" |
431 sed '/^.*\/\([^/][^/]*\)\/*$/{
445 # Avoid depending upon Character Ranges.
446 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
447 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
448 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
449 as_cr_digits='0123456789'
450 as_cr_alnum=$as_cr_Letters$as_cr_digits
453 as_lineno_1=$LINENO as_lineno_1a=$LINENO
454 as_lineno_2=$LINENO as_lineno_2a=$LINENO
455 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
456 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
457 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
469 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
473 chmod +x "$as_me.lineno" ||
474 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
476 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
477 # already done that, so ensure we don't try to do so again and fall
478 # in an infinite loop. This has already happened in practice.
479 _as_can_reexec=no; export _as_can_reexec
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
482 # original and so on. Autoconf is especially sensitive to this).
484 # Exit status is that of the last command.
488 ECHO_C= ECHO_N= ECHO_T=
489 case `echo -n x` in #(((((
491 case `echo 'xy\c'` in
492 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
494 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
501 rm -f conf$$ conf$$.exe conf$$.file
502 if test -d conf$$.dir; then
503 rm -f conf$$.dir/conf$$.file
506 mkdir conf$$.dir 2>/dev/null
508 if (echo >conf$$.file) 2>/dev/null; then
509 if ln -s conf$$.file conf$$ 2>/dev/null; then
511 # ... but there are two gotchas:
512 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
513 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
514 # In both cases, we have to default to `cp -pR'.
515 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
517 elif ln conf$$.file conf$$ 2>/dev/null; then
525 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
526 rmdir conf$$.dir 2>/dev/null
528 if mkdir -p . 2>/dev/null; then
529 as_mkdir_p='mkdir -p "$as_dir"'
531 test -d ./-p && rmdir ./-p
536 as_executable_p=as_fn_executable_p
538 # Sed expression to map a string onto a valid CPP name.
539 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
541 # Sed expression to map a string onto a valid variable name.
542 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
545 test -n "$DJDIR" || exec 7<&0 </dev/null
549 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
550 # so uname gets run too.
551 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
556 ac_default_prefix=/usr/local
558 ac_config_libobj_dir=.
565 # Identity of this package.
566 PACKAGE_NAME='GNU diffutils'
567 PACKAGE_TARNAME='diffutils'
568 PACKAGE_VERSION='3.7'
569 PACKAGE_STRING='GNU diffutils 3.7'
570 PACKAGE_BUGREPORT='bug-diffutils@gnu.org'
571 PACKAGE_URL='https://www.gnu.org/software/diffutils/'
573 ac_unique_file="src/diff.c"
574 # Factoring default headers for most tests.
575 ac_includes_default="\
580 #ifdef HAVE_SYS_TYPES_H
581 # include <sys/types.h>
583 #ifdef HAVE_SYS_STAT_H
584 # include <sys/stat.h>
586 #ifdef HAVE_STRINGS_H
587 # include <strings.h>
589 #ifdef HAVE_INTTYPES_H
590 # include <inttypes.h>
601 gl_fnmatch_required=POSIX
602 gl_getopt_required=POSIX
604 ac_subst_vars='gltests_LTLIBOBJS
616 XGETTEXT_EXTRA_OPTIONS
624 GETTEXT_MACRO_VERSION
632 LIBDIFFUTILS_LTLIBDEPS
636 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
638 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
641 GL_GENERATE_STDALIGN_H_FALSE
642 GL_GENERATE_STDALIGN_H_TRUE
644 GL_GENERATE_NETINET_IN_H_FALSE
645 GL_GENERATE_NETINET_IN_H_TRUE
648 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
654 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
663 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
674 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
678 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
679 HAVE_STRUCT_SOCKADDR_STORAGE
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
699 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
700 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
701 LIBUNISTRING_UNIWIDTH_H
702 LIBUNISTRING_UNITYPES_H
703 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE
704 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE
705 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE
706 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE
707 LIBUNISTRING_UNISTR_H
709 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
711 UNISTD_H_DEFINES_STRUCT_TIMESPEC
712 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
713 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
714 TIME_H_DEFINES_STRUCT_TIMESPEC
715 NEXT_AS_FIRST_DIRECTIVE_TIME_H
717 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
722 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
725 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
727 NEXT_AS_FIRST_DIRECTIVE_STRING_H
729 HAVE_DECL_STRNCASECMP
733 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
735 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
738 GL_GENERATE_STDBOOL_H_FALSE
739 GL_GENERATE_STDBOOL_H_TRUE
741 GL_GENERATE_STDARG_H_FALSE
742 GL_GENERATE_STDARG_H_TRUE
744 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
746 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
750 REPLACE_PTHREAD_SIGMASK
752 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
753 HAVE_STRUCT_SIGACTION_SA_SIGACTION
759 HAVE_POSIX_SIGNALBLOCKING
762 GNULIB_SIGNAL_H_SIGPIPE
764 GNULIB_PTHREAD_SIGMASK
839 GNULIB_EXPLICIT_BZERO
857 REPLACE_CANONICALIZE_FILE_NAME
862 HAVE_STRUCT_RANDOM_DATA
889 HAVE_CANONICALIZE_FILE_NAME
922 GNULIB_CANONICALIZE_FILE_NAME
927 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
930 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
932 GL_GENERATE_STDDEF_H_FALSE
933 GL_GENERATE_STDDEF_H_TRUE
951 LOCALCHARSET_TESTS_ENVIRONMENT
952 HAVE_LANGINFO_YESEXPR
955 HAVE_LANGINFO_T_FMT_AMPM
956 HAVE_LANGINFO_CODESET
958 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
966 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
980 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
982 UINT64_MAX_EQ_ULONG_MAX
983 UINT32_MAX_LT_UINTMAX_MAX
986 INT64_MAX_EQ_LONG_MAX
987 INT32_MAX_LT_INTMAX_MAX
999 GL_GENERATE_STDINT_H_FALSE
1000 GL_GENERATE_STDINT_H_TRUE
1012 HAVE_SIGNED_SIG_ATOMIC_T
1015 BITSIZEOF_SIG_ATOMIC_T
1018 APPLE_UNIVERSAL_BUILD
1020 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1025 HAVE_UNSIGNED_LONG_LONG_INT
1027 GNULIB_OVERRIDES_WINT_T
1028 GL_GENERATE_LIMITS_H_FALSE
1029 GL_GENERATE_LIMITS_H_TRUE
1031 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
1033 NEXT_AS_FIRST_DIRECTIVE_ICONV_H
1035 GL_GENERATE_ICONV_H_FALSE
1036 GL_GENERATE_ICONV_H_TRUE
1061 HAVE_DECL_LOCALTIME_R
1072 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1074 REPLACE_STRUCT_TIMEVAL
1075 REPLACE_GETTIMEOFDAY
1082 GNULIB_GL_UNISTD_H_GETOPT
1087 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1089 WINDOWS_64_BIT_ST_SIZE
1090 WINDOWS_STAT_TIMESPEC
1091 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1113 GNULIB_OVERRIDES_STRUCT_STAT
1134 REPLACE_STDIO_WRITE_FUNCS
1135 REPLACE_STDIO_READ_FUNCS
1144 REPLACE_OBSTACK_PRINTF
1169 HAVE_DECL_OBSTACK_PRINTF
1175 GNULIB_VSPRINTF_POSIX
1177 GNULIB_VPRINTF_POSIX
1179 GNULIB_VFPRINTF_POSIX
1186 GNULIB_STDIO_H_SIGPIPE
1187 GNULIB_STDIO_H_NONBLOCKING
1188 GNULIB_SPRINTF_POSIX
1202 GNULIB_OBSTACK_PRINTF_POSIX
1203 GNULIB_OBSTACK_PRINTF
1219 GNULIB_FPRINTF_POSIX
1228 GL_GENERATE_FNMATCH_H_FALSE
1229 GL_GENERATE_FNMATCH_H_TRUE
1232 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1238 GL_GENERATE_FLOAT_H_FALSE
1239 GL_GENERATE_FLOAT_H_TRUE
1241 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1243 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1260 GL_GENERATE_ERRNO_H_FALSE
1261 GL_GENERATE_ERRNO_H_TRUE
1263 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1265 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1268 PRAGMA_SYSTEM_HEADER
1269 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1275 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1276 SYS_IOCTL_H_HAVE_WINSOCK2_H
1278 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1279 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1280 UNISTD_H_HAVE_WINSOCK2_H
1305 REPLACE_GETDTABLESIZE
1306 REPLACE_GETDOMAINNAME
1319 HAVE_DECL_SETHOSTNAME
1320 HAVE_DECL_GETUSERSHELL
1321 HAVE_DECL_GETPAGESIZE
1322 HAVE_DECL_GETLOGIN_R
1324 HAVE_DECL_GETDOMAINNAME
1364 GNULIB_UNISTD_H_SIGPIPE
1365 GNULIB_UNISTD_H_NONBLOCKING
1393 GNULIB_GETDTABLESIZE
1394 GNULIB_GETDOMAINNAME
1512 GL_GENERATE_ALLOCA_H_FALSE
1513 GL_GENERATE_ALLOCA_H_TRUE
1516 GL_COND_LIBTOOL_FALSE
1517 GL_COND_LIBTOOL_TRUE
1550 AM_DEFAULT_VERBOSITY
1561 INSTALL_STRIP_PROGRAM
1604 program_transform_name
1618 enable_option_checking
1620 enable_dependency_tracking
1624 with_libsigsegv_prefix
1625 with_libiconv_prefix
1628 with_packager_version
1629 with_packager_bug_reports
1634 ac_precious_vars='build_alias
1645 # Initialize some variables set by options.
1647 ac_init_version=false
1648 ac_unrecognized_opts=
1649 ac_unrecognized_sep=
1650 # The variables have the same names as the options, with
1651 # dashes changed to underlines.
1652 cache_file=/dev/null
1659 program_transform_name=s,x,x,
1667 # Installation directory options.
1668 # These are left unexpanded so users can "make install exec_prefix=/foo"
1669 # and all the variables that are supposed to be based on exec_prefix
1670 # by default will actually change.
1671 # Use braces instead of parens because sh, perl, etc. also accept them.
1672 # (The list follows the same order as the GNU Coding Standards.)
1673 bindir='${exec_prefix}/bin'
1674 sbindir='${exec_prefix}/sbin'
1675 libexecdir='${exec_prefix}/libexec'
1676 datarootdir='${prefix}/share'
1677 datadir='${datarootdir}'
1678 sysconfdir='${prefix}/etc'
1679 sharedstatedir='${prefix}/com'
1680 localstatedir='${prefix}/var'
1681 runstatedir='${localstatedir}/run'
1682 includedir='${prefix}/include'
1683 oldincludedir='/usr/include'
1684 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1685 infodir='${datarootdir}/info'
1690 libdir='${exec_prefix}/lib'
1691 localedir='${datarootdir}/locale'
1692 mandir='${datarootdir}/man'
1698 # If the previous option needs an argument, assign it.
1699 if test -n "$ac_prev"; then
1700 eval $ac_prev=\$ac_option
1706 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1711 # Accept the important Cygnus configure options, so we can diagnose typos.
1713 case $ac_dashdash$ac_option in
1717 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1719 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1720 bindir=$ac_optarg ;;
1722 -build | --build | --buil | --bui | --bu)
1723 ac_prev=build_alias ;;
1724 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1725 build_alias=$ac_optarg ;;
1727 -cache-file | --cache-file | --cache-fil | --cache-fi \
1728 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1729 ac_prev=cache_file ;;
1730 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1731 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1732 cache_file=$ac_optarg ;;
1734 --config-cache | -C)
1735 cache_file=config.cache ;;
1737 -datadir | --datadir | --datadi | --datad)
1739 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1740 datadir=$ac_optarg ;;
1742 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1743 | --dataroo | --dataro | --datar)
1744 ac_prev=datarootdir ;;
1745 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1746 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1747 datarootdir=$ac_optarg ;;
1749 -disable-* | --disable-*)
1750 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1751 # Reject names that are not valid shell variable names.
1752 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1753 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1754 ac_useropt_orig=$ac_useropt
1755 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1756 case $ac_user_opts in
1758 "enable_$ac_useropt"
1760 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1761 ac_unrecognized_sep=', ';;
1763 eval enable_$ac_useropt=no ;;
1765 -docdir | --docdir | --docdi | --doc | --do)
1767 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1768 docdir=$ac_optarg ;;
1770 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1772 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1773 dvidir=$ac_optarg ;;
1775 -enable-* | --enable-*)
1776 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1777 # Reject names that are not valid shell variable names.
1778 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1779 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1780 ac_useropt_orig=$ac_useropt
1781 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1782 case $ac_user_opts in
1784 "enable_$ac_useropt"
1786 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1787 ac_unrecognized_sep=', ';;
1789 eval enable_$ac_useropt=\$ac_optarg ;;
1791 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1792 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1793 | --exec | --exe | --ex)
1794 ac_prev=exec_prefix ;;
1795 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1796 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1797 | --exec=* | --exe=* | --ex=*)
1798 exec_prefix=$ac_optarg ;;
1800 -gas | --gas | --ga | --g)
1801 # Obsolete; use --with-gas.
1804 -help | --help | --hel | --he | -h)
1805 ac_init_help=long ;;
1806 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1807 ac_init_help=recursive ;;
1808 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1809 ac_init_help=short ;;
1811 -host | --host | --hos | --ho)
1812 ac_prev=host_alias ;;
1813 -host=* | --host=* | --hos=* | --ho=*)
1814 host_alias=$ac_optarg ;;
1816 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1818 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1820 htmldir=$ac_optarg ;;
1822 -includedir | --includedir | --includedi | --included | --include \
1823 | --includ | --inclu | --incl | --inc)
1824 ac_prev=includedir ;;
1825 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1826 | --includ=* | --inclu=* | --incl=* | --inc=*)
1827 includedir=$ac_optarg ;;
1829 -infodir | --infodir | --infodi | --infod | --info | --inf)
1831 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1832 infodir=$ac_optarg ;;
1834 -libdir | --libdir | --libdi | --libd)
1836 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1837 libdir=$ac_optarg ;;
1839 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1840 | --libexe | --libex | --libe)
1841 ac_prev=libexecdir ;;
1842 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1843 | --libexe=* | --libex=* | --libe=*)
1844 libexecdir=$ac_optarg ;;
1846 -localedir | --localedir | --localedi | --localed | --locale)
1847 ac_prev=localedir ;;
1848 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1849 localedir=$ac_optarg ;;
1851 -localstatedir | --localstatedir | --localstatedi | --localstated \
1852 | --localstate | --localstat | --localsta | --localst | --locals)
1853 ac_prev=localstatedir ;;
1854 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1855 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1856 localstatedir=$ac_optarg ;;
1858 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1860 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1861 mandir=$ac_optarg ;;
1863 -nfp | --nfp | --nf)
1864 # Obsolete; use --without-fp.
1867 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1868 | --no-cr | --no-c | -n)
1871 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1872 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1875 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1876 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1877 | --oldin | --oldi | --old | --ol | --o)
1878 ac_prev=oldincludedir ;;
1879 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1880 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1881 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1882 oldincludedir=$ac_optarg ;;
1884 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1886 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1887 prefix=$ac_optarg ;;
1889 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1890 | --program-pre | --program-pr | --program-p)
1891 ac_prev=program_prefix ;;
1892 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1893 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1894 program_prefix=$ac_optarg ;;
1896 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1897 | --program-suf | --program-su | --program-s)
1898 ac_prev=program_suffix ;;
1899 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1900 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1901 program_suffix=$ac_optarg ;;
1903 -program-transform-name | --program-transform-name \
1904 | --program-transform-nam | --program-transform-na \
1905 | --program-transform-n | --program-transform- \
1906 | --program-transform | --program-transfor \
1907 | --program-transfo | --program-transf \
1908 | --program-trans | --program-tran \
1909 | --progr-tra | --program-tr | --program-t)
1910 ac_prev=program_transform_name ;;
1911 -program-transform-name=* | --program-transform-name=* \
1912 | --program-transform-nam=* | --program-transform-na=* \
1913 | --program-transform-n=* | --program-transform-=* \
1914 | --program-transform=* | --program-transfor=* \
1915 | --program-transfo=* | --program-transf=* \
1916 | --program-trans=* | --program-tran=* \
1917 | --progr-tra=* | --program-tr=* | --program-t=*)
1918 program_transform_name=$ac_optarg ;;
1920 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1922 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1923 pdfdir=$ac_optarg ;;
1925 -psdir | --psdir | --psdi | --psd | --ps)
1927 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1930 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1931 | -silent | --silent | --silen | --sile | --sil)
1934 -runstatedir | --runstatedir | --runstatedi | --runstated \
1935 | --runstate | --runstat | --runsta | --runst | --runs \
1936 | --run | --ru | --r)
1937 ac_prev=runstatedir ;;
1938 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1939 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1940 | --run=* | --ru=* | --r=*)
1941 runstatedir=$ac_optarg ;;
1943 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1945 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1947 sbindir=$ac_optarg ;;
1949 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1950 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1951 | --sharedst | --shareds | --shared | --share | --shar \
1953 ac_prev=sharedstatedir ;;
1954 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1955 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1956 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1958 sharedstatedir=$ac_optarg ;;
1960 -site | --site | --sit)
1962 -site=* | --site=* | --sit=*)
1965 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1967 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1968 srcdir=$ac_optarg ;;
1970 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1971 | --syscon | --sysco | --sysc | --sys | --sy)
1972 ac_prev=sysconfdir ;;
1973 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1974 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1975 sysconfdir=$ac_optarg ;;
1977 -target | --target | --targe | --targ | --tar | --ta | --t)
1978 ac_prev=target_alias ;;
1979 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1980 target_alias=$ac_optarg ;;
1982 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1985 -version | --version | --versio | --versi | --vers | -V)
1986 ac_init_version=: ;;
1989 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1990 # Reject names that are not valid shell variable names.
1991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1992 as_fn_error $? "invalid package name: \`$ac_useropt'"
1993 ac_useropt_orig=$ac_useropt
1994 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1995 case $ac_user_opts in
1999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2000 ac_unrecognized_sep=', ';;
2002 eval with_$ac_useropt=\$ac_optarg ;;
2004 -without-* | --without-*)
2005 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2006 # Reject names that are not valid shell variable names.
2007 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2008 as_fn_error $? "invalid package name: \`$ac_useropt'"
2009 ac_useropt_orig=$ac_useropt
2010 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
2011 case $ac_user_opts in
2015 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2016 ac_unrecognized_sep=', ';;
2018 eval with_$ac_useropt=no ;;
2021 # Obsolete; use --with-x.
2024 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2025 | --x-incl | --x-inc | --x-in | --x-i)
2026 ac_prev=x_includes ;;
2027 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2028 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2029 x_includes=$ac_optarg ;;
2031 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2032 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2033 ac_prev=x_libraries ;;
2034 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2035 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2036 x_libraries=$ac_optarg ;;
2038 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2039 Try \`$0 --help' for more information"
2043 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2044 # Reject names that are not valid shell variable names.
2045 case $ac_envvar in #(
2046 '' | [0-9]* | *[!_$as_cr_alnum]* )
2047 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2049 eval $ac_envvar=\$ac_optarg
2050 export $ac_envvar ;;
2053 # FIXME: should be removed in autoconf 3.0.
2054 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
2055 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2056 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
2057 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2063 if test -n "$ac_prev"; then
2064 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2065 as_fn_error $? "missing argument to $ac_option"
2068 if test -n "$ac_unrecognized_opts"; then
2069 case $enable_option_checking in
2071 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2072 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2076 # Check all directory arguments for consistency.
2077 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2078 datadir sysconfdir sharedstatedir localstatedir includedir \
2079 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2080 libdir localedir mandir runstatedir
2082 eval ac_val=\$$ac_var
2083 # Remove trailing slashes.
2086 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2087 eval $ac_var=\$ac_val;;
2089 # Be sure to have absolute directory names.
2091 [\\/$]* | ?:[\\/]* ) continue;;
2092 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2094 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2097 # There might be people who depend on the old broken behavior: `$host'
2098 # used to hold the argument of --host etc.
2099 # FIXME: To remove some day.
2102 target=$target_alias
2104 # FIXME: To remove some day.
2105 if test "x$host_alias" != x; then
2106 if test "x$build_alias" = x; then
2107 cross_compiling=maybe
2108 elif test "x$build_alias" != "x$host_alias"; then
2114 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2116 test "$silent" = yes && exec 6>/dev/null
2119 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2120 ac_ls_di=`ls -di .` &&
2121 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2122 as_fn_error $? "working directory cannot be determined"
2123 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2124 as_fn_error $? "pwd does not report name of working directory"
2127 # Find the source files, if location was not specified.
2128 if test -z "$srcdir"; then
2129 ac_srcdir_defaulted=yes
2130 # Try the directory containing this script, then the parent directory.
2131 ac_confdir=`$as_dirname -- "$as_myself" ||
2132 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2133 X"$as_myself" : 'X\(//\)[^/]' \| \
2134 X"$as_myself" : 'X\(//\)$' \| \
2135 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2136 printf "%s\n" X"$as_myself" |
2137 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2155 if test ! -r "$srcdir/$ac_unique_file"; then
2159 ac_srcdir_defaulted=no
2161 if test ! -r "$srcdir/$ac_unique_file"; then
2162 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2163 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2165 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2167 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2169 # When building in place, set srcdir=.
2170 if test "$ac_abs_confdir" = "$ac_pwd"; then
2173 # Remove unnecessary trailing slashes from srcdir.
2174 # Double slashes in file names in object file debugging info
2175 # mess up M-x gdb in Emacs.
2177 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2179 for ac_var in $ac_precious_vars; do
2180 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2181 eval ac_env_${ac_var}_value=\$${ac_var}
2182 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2183 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2187 # Report the --help message.
2189 if test "$ac_init_help" = "long"; then
2190 # Omit some internal or obsolete options to make the list less imposing.
2191 # This message is too long to be a string in the A/UX 3.1 sh.
2193 \`configure' configures GNU diffutils 3.7 to adapt to many kinds of systems.
2195 Usage: $0 [OPTION]... [VAR=VALUE]...
2197 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2198 VAR=VALUE. See below for descriptions of some of the useful variables.
2200 Defaults for the options are specified in brackets.
2203 -h, --help display this help and exit
2204 --help=short display options specific to this package
2205 --help=recursive display the short help of all the included packages
2206 -V, --version display version information and exit
2207 -q, --quiet, --silent do not print \`checking ...' messages
2208 --cache-file=FILE cache test results in FILE [disabled]
2209 -C, --config-cache alias for \`--cache-file=config.cache'
2210 -n, --no-create do not create output files
2211 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2213 Installation directories:
2214 --prefix=PREFIX install architecture-independent files in PREFIX
2215 [$ac_default_prefix]
2216 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2219 By default, \`make install' will install all the files in
2220 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2221 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2222 for instance \`--prefix=\$HOME'.
2224 For better control, use the options below.
2226 Fine tuning of the installation directories:
2227 --bindir=DIR user executables [EPREFIX/bin]
2228 --sbindir=DIR system admin executables [EPREFIX/sbin]
2229 --libexecdir=DIR program executables [EPREFIX/libexec]
2230 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2231 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2232 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2233 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
2234 --libdir=DIR object code libraries [EPREFIX/lib]
2235 --includedir=DIR C header files [PREFIX/include]
2236 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2237 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2238 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2239 --infodir=DIR info documentation [DATAROOTDIR/info]
2240 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2241 --mandir=DIR man documentation [DATAROOTDIR/man]
2242 --docdir=DIR documentation root [DATAROOTDIR/doc/diffutils]
2243 --htmldir=DIR html documentation [DOCDIR]
2244 --dvidir=DIR dvi documentation [DOCDIR]
2245 --pdfdir=DIR pdf documentation [DOCDIR]
2246 --psdir=DIR ps documentation [DOCDIR]
2252 --program-prefix=PREFIX prepend PREFIX to installed program names
2253 --program-suffix=SUFFIX append SUFFIX to installed program names
2254 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2257 --build=BUILD configure for building on BUILD [guessed]
2258 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2262 if test -n "$ac_init_help"; then
2263 case $ac_init_help in
2264 short | recursive ) echo "Configuration of GNU diffutils 3.7:";;
2269 --disable-option-checking ignore unrecognized --enable/--with options
2270 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2271 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2272 --enable-silent-rules less verbose build output (undo: "make V=1")
2273 --disable-silent-rules verbose build output (undo: "make V=0")
2274 --enable-dependency-tracking
2275 do not reject slow dependency extractors
2276 --disable-dependency-tracking
2277 speeds up one-time build
2278 --disable-largefile omit support for large files
2279 --disable-rpath do not hardcode runtime library paths
2280 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2281 --disable-nls do not use Native Language Support
2284 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2285 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2286 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2287 --with-libsigsegv-prefix[=DIR] search for libsigsegv in DIR/include and DIR/lib
2288 --without-libsigsegv-prefix don't search for libsigsegv in includedir and libdir
2289 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2290 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2291 --without-included-regex
2292 don't compile regex; this is the default on systems
2293 with recent-enough versions of the GNU C Library
2294 (use with caution on other systems).
2295 --with-packager String identifying the packager of this software
2296 --with-packager-version Packager-specific version information
2297 --with-packager-bug-reports
2298 Packager info for bug reports (URL/e-mail/...)
2299 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2300 --without-libintl-prefix don't search for libintl in includedir and libdir
2302 Some influential environment variables:
2303 CC C compiler command
2304 CFLAGS C compiler flags
2305 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2306 nonstandard directory <lib dir>
2307 LIBS libraries to pass to the linker, e.g. -l<library>
2308 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2309 you have headers in a nonstandard directory <include dir>
2312 Use these variables to override the choices made by `configure' or to help
2313 it to find libraries and programs with nonstandard names/locations.
2315 Report bugs to <bug-diffutils@gnu.org>.
2316 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
2317 General help using GNU software: <https://www.gnu.org/gethelp/>.
2322 if test "$ac_init_help" = "recursive"; then
2323 # If there are subdirs, report their specific --help.
2324 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2325 test -d "$ac_dir" ||
2326 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2331 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2333 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
2334 # A ".." for each directory in $ac_dir_suffix.
2335 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2336 case $ac_top_builddir_sub in
2337 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2338 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2341 ac_abs_top_builddir=$ac_pwd
2342 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2343 # for backward compatibility:
2344 ac_top_builddir=$ac_top_build_prefix
2347 .) # We are building in place.
2349 ac_top_srcdir=$ac_top_builddir_sub
2350 ac_abs_top_srcdir=$ac_pwd ;;
2351 [\\/]* | ?:[\\/]* ) # Absolute name.
2352 ac_srcdir=$srcdir$ac_dir_suffix;
2353 ac_top_srcdir=$srcdir
2354 ac_abs_top_srcdir=$srcdir ;;
2356 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2357 ac_top_srcdir=$ac_top_build_prefix$srcdir
2358 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2360 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2362 cd "$ac_dir" || { ac_status=$?; continue; }
2363 # Check for guested configure.
2364 if test -f "$ac_srcdir/configure.gnu"; then
2366 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2367 elif test -f "$ac_srcdir/configure"; then
2369 $SHELL "$ac_srcdir/configure" --help=recursive
2371 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2373 cd "$ac_pwd" || { ac_status=$?; break; }
2377 test -n "$ac_init_help" && exit $ac_status
2378 if $ac_init_version; then
2380 GNU diffutils configure 3.7
2381 generated by GNU Autoconf 2.69.197-b8fd7
2383 Copyright (C) 2017 Free Software Foundation, Inc.
2384 This configure script is free software; the Free Software Foundation
2385 gives unlimited permission to copy, distribute and modify it.
2390 ## ------------------------ ##
2391 ## Autoconf initialization. ##
2392 ## ------------------------ ##
2394 # ac_fn_c_try_compile LINENO
2395 # --------------------------
2396 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2397 ac_fn_c_try_compile ()
2399 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400 rm -f conftest.$ac_objext
2401 if { { ac_try="$ac_compile"
2403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404 *) ac_try_echo=$ac_try;;
2406 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407 printf "%s\n" "$ac_try_echo"; } >&5
2408 (eval "$ac_compile") 2>conftest.err
2410 if test -s conftest.err; then
2411 grep -v '^ *+' conftest.err >conftest.er1
2412 cat conftest.er1 >&5
2413 mv -f conftest.er1 conftest.err
2415 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416 test $ac_status = 0; } && {
2417 test -z "$ac_c_werror_flag" ||
2418 test ! -s conftest.err
2419 } && test -s conftest.$ac_objext
2423 printf "%s\n" "$as_me: failed program was:" >&5
2424 sed 's/^/| /' conftest.$ac_ext >&5
2428 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2429 as_fn_set_status $ac_retval
2431 } # ac_fn_c_try_compile
2433 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2434 # -------------------------------------------------------
2435 # Tests whether HEADER exists and can be compiled using the include files in
2436 # INCLUDES, setting the cache variable VAR accordingly.
2437 ac_fn_c_check_header_compile ()
2439 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2441 printf %s "checking for $2... " >&6; }
2442 if eval test \${$3+y}
2444 printf %s "(cached) " >&6
2446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2447 /* end confdefs.h. */
2451 if ac_fn_c_try_compile "$LINENO"
2457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2461 printf "%s\n" "$ac_res" >&6; }
2462 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2464 } # ac_fn_c_check_header_compile
2466 # ac_fn_c_try_cpp LINENO
2467 # ----------------------
2468 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2471 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2472 if { { ac_try="$ac_cpp conftest.$ac_ext"
2474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2475 *) ac_try_echo=$ac_try;;
2477 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2478 printf "%s\n" "$ac_try_echo"; } >&5
2479 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481 if test -s conftest.err; then
2482 grep -v '^ *+' conftest.err >conftest.er1
2483 cat conftest.er1 >&5
2484 mv -f conftest.er1 conftest.err
2486 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2487 test $ac_status = 0; } > conftest.i && {
2488 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2489 test ! -s conftest.err
2494 printf "%s\n" "$as_me: failed program was:" >&5
2495 sed 's/^/| /' conftest.$ac_ext >&5
2499 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500 as_fn_set_status $ac_retval
2504 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2505 # -------------------------------------------
2506 # Tests whether TYPE exists after having included INCLUDES, setting cache
2507 # variable VAR accordingly.
2508 ac_fn_c_check_type ()
2510 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2512 printf %s "checking for $2... " >&6; }
2513 if eval test \${$3+y}
2515 printf %s "(cached) " >&6
2518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2519 /* end confdefs.h. */
2530 if ac_fn_c_try_compile "$LINENO"
2532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2533 /* end confdefs.h. */
2544 if ac_fn_c_try_compile "$LINENO"
2550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2552 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2556 printf "%s\n" "$ac_res" >&6; }
2557 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2559 } # ac_fn_c_check_type
2561 # ac_fn_c_try_link LINENO
2562 # -----------------------
2563 # Try to link conftest.$ac_ext, and return whether this succeeded.
2566 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2567 rm -f conftest.$ac_objext conftest$ac_exeext
2568 if { { ac_try="$ac_link"
2570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2571 *) ac_try_echo=$ac_try;;
2573 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2574 printf "%s\n" "$ac_try_echo"; } >&5
2575 (eval "$ac_link") 2>conftest.err
2577 if test -s conftest.err; then
2578 grep -v '^ *+' conftest.err >conftest.er1
2579 cat conftest.er1 >&5
2580 mv -f conftest.er1 conftest.err
2582 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2583 test $ac_status = 0; } && {
2584 test -z "$ac_c_werror_flag" ||
2585 test ! -s conftest.err
2586 } && test -s conftest$ac_exeext && {
2587 test "$cross_compiling" = yes ||
2588 test -x conftest$ac_exeext
2593 printf "%s\n" "$as_me: failed program was:" >&5
2594 sed 's/^/| /' conftest.$ac_ext >&5
2598 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2599 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2600 # interfere with the next link command; also delete a directory that is
2601 # left behind by Apple's compiler. We do this before executing the actions.
2602 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2603 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2604 as_fn_set_status $ac_retval
2606 } # ac_fn_c_try_link
2608 # ac_fn_c_check_func LINENO FUNC VAR
2609 # ----------------------------------
2610 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2611 ac_fn_c_check_func ()
2613 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2614 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2615 printf %s "checking for $2... " >&6; }
2616 if eval test \${$3+y}
2618 printf %s "(cached) " >&6
2620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621 /* end confdefs.h. */
2622 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2623 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2624 #define $2 innocuous_$2
2626 /* System header to define __stub macros and hopefully few prototypes,
2627 which can conflict with char $2 (); below. */
2632 /* Override any GCC internal prototype to avoid an error.
2633 Use char because int might match the return type of a GCC
2634 builtin and then its argument prototype would still apply. */
2639 /* The GNU C library defines this for functions which it implements
2640 to always fail with ENOSYS. Some functions are actually named
2641 something starting with __ and the normal name is an alias. */
2642 #if defined __stub_$2 || defined __stub___$2
2654 if ac_fn_c_try_link "$LINENO"
2660 rm -f core conftest.err conftest.$ac_objext \
2661 conftest$ac_exeext conftest.$ac_ext
2664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2665 printf "%s\n" "$ac_res" >&6; }
2666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2668 } # ac_fn_c_check_func
2670 # ac_fn_c_try_run LINENO
2671 # ----------------------
2672 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2673 # executables *can* be run.
2676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2677 if { { ac_try="$ac_link"
2679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2680 *) ac_try_echo=$ac_try;;
2682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2683 printf "%s\n" "$ac_try_echo"; } >&5
2684 (eval "$ac_link") 2>&5
2686 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2687 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2688 { { case "(($ac_try" in
2689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690 *) ac_try_echo=$ac_try;;
2692 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693 printf "%s\n" "$ac_try_echo"; } >&5
2694 (eval "$ac_try") 2>&5
2696 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697 test $ac_status = 0; }; }
2701 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2702 printf "%s\n" "$as_me: failed program was:" >&5
2703 sed 's/^/| /' conftest.$ac_ext >&5
2705 ac_retval=$ac_status
2707 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2709 as_fn_set_status $ac_retval
2713 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2714 # ---------------------------------------------
2715 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2717 ac_fn_c_check_decl ()
2719 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2720 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2721 as_decl_name=`echo $2|sed 's/ *(.*//'`
2722 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2724 printf %s "checking whether $as_decl_name is declared... " >&6; }
2725 if eval test \${$3+y}
2727 printf %s "(cached) " >&6
2729 ac_save_werror_flag=$ac_c_werror_flag
2730 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2732 /* end confdefs.h. */
2737 #ifndef $as_decl_name
2739 (void) $as_decl_use;
2741 (void) $as_decl_name;
2749 if ac_fn_c_try_compile "$LINENO"
2755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2756 ac_c_werror_flag=$ac_save_werror_flag
2759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760 printf "%s\n" "$ac_res" >&6; }
2761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2763 } # ac_fn_c_check_decl
2765 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2766 # --------------------------------------------
2767 # Tries to find the compile-time value of EXPR in a program that includes
2768 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2770 ac_fn_c_compute_int ()
2772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2773 if test "$cross_compiling" = yes; then
2774 # Depending upon the size, compute the lo and hi bounds.
2775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776 /* end confdefs.h. */
2781 static int test_array [1 - 2 * !(($2) >= 0)];
2783 return test_array [0];
2789 if ac_fn_c_try_compile "$LINENO"
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h. */
2799 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2801 return test_array [0];
2807 if ac_fn_c_try_compile "$LINENO"
2809 ac_hi=$ac_mid; break
2811 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2812 if test $ac_lo -le $ac_mid; then
2816 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822 /* end confdefs.h. */
2827 static int test_array [1 - 2 * !(($2) < 0)];
2829 return test_array [0];
2835 if ac_fn_c_try_compile "$LINENO"
2839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2840 /* end confdefs.h. */
2845 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2847 return test_array [0];
2853 if ac_fn_c_try_compile "$LINENO"
2855 ac_lo=$ac_mid; break
2857 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2858 if test $ac_mid -le $ac_hi; then
2862 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872 # Binary search between lo and hi bounds.
2873 while test "x$ac_lo" != "x$ac_hi"; do
2874 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2876 /* end confdefs.h. */
2881 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2883 return test_array [0];
2889 if ac_fn_c_try_compile "$LINENO"
2893 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2898 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903 /* end confdefs.h. */
2905 static long int longval () { return $2; }
2906 static unsigned long int ulongval () { return $2; }
2913 FILE *f = fopen ("conftest.val", "w");
2918 long int i = longval ();
2921 fprintf (f, "%ld", i);
2925 unsigned long int i = ulongval ();
2928 fprintf (f, "%lu", i);
2930 /* Do not output a trailing newline, as this causes \r\n confusion
2931 on some platforms. */
2932 return ferror (f) || fclose (f) != 0;
2938 if ac_fn_c_try_run "$LINENO"
2940 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2944 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2945 conftest.$ac_objext conftest.beam conftest.$ac_ext
2949 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2950 as_fn_set_status $ac_retval
2952 } # ac_fn_c_compute_int
2954 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2955 # ----------------------------------------------------
2956 # Tries to find if the field MEMBER exists in type AGGR, after including
2957 # INCLUDES, setting cache variable VAR accordingly.
2958 ac_fn_c_check_member ()
2960 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2962 printf %s "checking for $2.$3... " >&6; }
2963 if eval test \${$4+y}
2965 printf %s "(cached) " >&6
2967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2968 /* end confdefs.h. */
2980 if ac_fn_c_try_compile "$LINENO"
2984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2985 /* end confdefs.h. */
2991 if (sizeof ac_aggr.$3)
2997 if ac_fn_c_try_compile "$LINENO"
3003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3009 printf "%s\n" "$ac_res" >&6; }
3010 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3012 } # ac_fn_c_check_member
3013 ac_configure_args_raw=
3018 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3020 as_fn_append ac_configure_args_raw " '$ac_arg'"
3023 case $ac_configure_args_raw in
3027 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
3028 ac_unsafe_a="$ac_unsafe_z#~"
3029 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
3030 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
3033 cat >config.log <<_ACEOF
3034 This file contains any messages produced by compilers while
3035 running configure, to aid debugging if configure makes a mistake.
3037 It was created by GNU diffutils $as_me 3.7, which was
3038 generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
3040 $ $0$ac_configure_args_raw
3050 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3051 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3052 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3053 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3054 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3056 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3057 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3059 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3060 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3061 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3062 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3063 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3064 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3065 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3069 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3073 case $as_dir in #(((
3076 *) as_dir=$as_dir/ ;;
3078 printf "%s\n" "PATH: $as_dir"
3094 # Keep a trace of the command line.
3095 # Strip out --no-create and --no-recursion so they do not pile up.
3096 # Strip out --silent because we don't want to record it for future runs.
3097 # Also quote any args containing shell meta-characters.
3098 # Make two passes to allow for proper duplicate-argument suppression.
3102 ac_must_keep_next=false
3108 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3109 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3110 | -silent | --silent | --silen | --sile | --sil)
3113 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3116 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3118 as_fn_append ac_configure_args1 " '$ac_arg'"
3119 if test $ac_must_keep_next = true; then
3120 ac_must_keep_next=false # Got value, back to normal.
3123 *=* | --config-cache | -C | -disable-* | --disable-* \
3124 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3125 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3126 | -with-* | --with-* | -without-* | --without-* | --x)
3127 case "$ac_configure_args0 " in
3128 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3131 -* ) ac_must_keep_next=true ;;
3134 as_fn_append ac_configure_args " '$ac_arg'"
3139 { ac_configure_args0=; unset ac_configure_args0;}
3140 { ac_configure_args1=; unset ac_configure_args1;}
3142 # When interrupted or exit'd, cleanup temporary files, and complete
3143 # config.log. We remove comments because anyway the quotes in there
3144 # would cause problems or look ugly.
3145 # WARNING: Use '\'' to represent an apostrophe within the trap.
3146 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3147 trap 'exit_status=$?
3150 # Save into config.log some information that might help in debugging.
3154 printf "%s\n" "## ---------------- ##
3155 ## Cache variables. ##
3156 ## ---------------- ##"
3158 # The following way of writing the cache mishandles newlines in values,
3160 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3161 eval ac_val=\$$ac_var
3165 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3166 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3169 _ | IFS | as_nl) ;; #(
3170 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3171 *) { eval $ac_var=; unset $ac_var;} ;;
3176 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3177 *${as_nl}ac_space=\ *)
3179 "s/'\''/'\''\\\\'\'''\''/g;
3180 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3183 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3190 printf "%s\n" "## ----------------- ##
3191 ## Output variables. ##
3192 ## ----------------- ##"
3194 for ac_var in $ac_subst_vars
3196 eval ac_val=\$$ac_var
3198 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3200 printf "%s\n" "$ac_var='\''$ac_val'\''"
3204 if test -n "$ac_subst_files"; then
3205 printf "%s\n" "## ------------------- ##
3206 ## File substitutions. ##
3207 ## ------------------- ##"
3209 for ac_var in $ac_subst_files
3211 eval ac_val=\$$ac_var
3213 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3215 printf "%s\n" "$ac_var='\''$ac_val'\''"
3220 if test -s confdefs.h; then
3221 printf "%s\n" "## ----------- ##
3228 test "$ac_signal" != 0 &&
3229 printf "%s\n" "$as_me: caught signal $ac_signal"
3230 printf "%s\n" "$as_me: exit $exit_status"
3232 rm -f core *.core core.conftest.* &&
3233 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3236 for ac_signal in 1 2 13 15; do
3237 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3241 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3242 rm -f -r conftest* confdefs.h
3244 printf "%s\n" "/* confdefs.h */" > confdefs.h
3246 # Predefined preprocessor variables.
3248 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
3250 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
3252 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
3254 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
3256 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
3258 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
3261 # Let the site file select an alternate cache file if it wants to.
3262 # Prefer an explicitly selected file to automatically selected ones.
3265 if test -n "$CONFIG_SITE"; then
3266 # We do not want a PATH search for config.site.
3267 case $CONFIG_SITE in #((
3268 -*) ac_site_file1=./$CONFIG_SITE;;
3269 */*) ac_site_file1=$CONFIG_SITE;;
3270 *) ac_site_file1=./$CONFIG_SITE;;
3272 elif test "x$prefix" != xNONE; then
3273 ac_site_file1=$prefix/share/config.site
3274 ac_site_file2=$prefix/etc/config.site
3276 ac_site_file1=$ac_default_prefix/share/config.site
3277 ac_site_file2=$ac_default_prefix/etc/config.site
3279 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3281 test "x$ac_site_file" = xNONE && continue
3282 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3284 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
3285 sed 's/^/| /' "$ac_site_file" >&5
3287 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3288 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3289 as_fn_error $? "failed to load site script $ac_site_file
3290 See \`config.log' for more details" "$LINENO" 5; }
3294 if test -r "$cache_file"; then
3295 # Some versions of bash will fail to source /dev/null (special files
3296 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3297 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3299 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
3301 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3302 *) . "./$cache_file";;
3306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3307 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
3311 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3312 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3313 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3314 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3315 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3316 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3317 as_fn_append ac_func_c_list " btowc HAVE_BTOWC"
3318 as_fn_append ac_func_c_list " setrlimit HAVE_SETRLIMIT"
3319 as_fn_append ac_header_c_list " ucontext.h ucontext_h HAVE_UCONTEXT_H"
3320 as_fn_append ac_func_c_list " sigaltstack HAVE_SIGALTSTACK"
3321 as_fn_append ac_func_c_list " readlinkat HAVE_READLINKAT"
3322 as_fn_append ac_func_c_list " _set_invalid_parameter_handler HAVE__SET_INVALID_PARAMETER_HANDLER"
3323 as_fn_append ac_header_c_list " sys/socket.h sys_socket_h HAVE_SYS_SOCKET_H"
3324 as_fn_append ac_func_c_list " strerror_r HAVE_STRERROR_R"
3325 as_fn_append ac_func_c_list " fcntl HAVE_FCNTL"
3326 as_fn_append ac_func_c_list " symlink HAVE_SYMLINK"
3327 as_fn_append ac_func_c_list " mempcpy HAVE_MEMPCPY"
3328 as_fn_append ac_header_c_list " fnmatch.h fnmatch_h HAVE_FNMATCH_H"
3329 as_fn_append ac_func_c_list " fnmatch HAVE_FNMATCH"
3330 as_fn_append ac_func_c_list " isblank HAVE_ISBLANK"
3331 as_fn_append ac_func_c_list " iswctype HAVE_ISWCTYPE"
3332 as_fn_append ac_func_c_list " mbsrtowcs HAVE_MBSRTOWCS"
3333 as_fn_append ac_func_c_list " wmemchr HAVE_WMEMCHR"
3334 as_fn_append ac_func_c_list " wmemcpy HAVE_WMEMCPY"
3335 as_fn_append ac_func_c_list " wmempcpy HAVE_WMEMPCPY"
3336 as_fn_append ac_header_c_list " wctype.h wctype_h HAVE_WCTYPE_H"
3337 gl_fnmatch_required=GNU
3338 as_fn_append ac_func_c_list " getdtablesize HAVE_GETDTABLESIZE"
3339 gl_getopt_required=GNU
3340 as_fn_append ac_header_c_list " getopt.h getopt_h HAVE_GETOPT_H"
3341 as_fn_append ac_header_c_list " sys/cdefs.h sys_cdefs_h HAVE_SYS_CDEFS_H"
3342 as_fn_append ac_func_c_list " getprogname HAVE_GETPROGNAME"
3343 as_fn_append ac_func_c_list " getexecname HAVE_GETEXECNAME"
3344 as_fn_append ac_func_c_list " gettimeofday HAVE_GETTIMEOFDAY"
3345 as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
3346 as_fn_append ac_header_c_list " iconv.h iconv_h HAVE_ICONV_H"
3347 as_fn_append ac_header_c_list " limits.h limits_h HAVE_LIMITS_H"
3348 as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3349 as_fn_append ac_func_c_list " iswcntrl HAVE_ISWCNTRL"
3350 as_fn_append ac_header_c_list " crtdefs.h crtdefs_h HAVE_CRTDEFS_H"
3351 as_fn_append ac_func_c_list " iswblank HAVE_ISWBLANK"
3352 as_fn_append ac_header_c_list " langinfo.h langinfo_h HAVE_LANGINFO_H"
3353 as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H"
3354 as_fn_append ac_func_c_list " lstat HAVE_LSTAT"
3355 as_fn_append ac_func_c_list " mbsinit HAVE_MBSINIT"
3356 as_fn_append ac_func_c_list " mbrtowc HAVE_MBRTOWC"
3357 as_fn_append ac_func_c_list " mbslen HAVE_MBSLEN"
3358 as_fn_append ac_header_c_list " sys/mman.h sys_mman_h HAVE_SYS_MMAN_H"
3359 as_fn_append ac_func_c_list " mprotect HAVE_MPROTECT"
3360 as_fn_append ac_func_c_list " mkstemp HAVE_MKSTEMP"
3361 as_fn_append ac_func_c_list " tzset HAVE_TZSET"
3362 as_fn_append ac_func_c_list " nl_langinfo HAVE_NL_LANGINFO"
3363 as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H"
3364 as_fn_append ac_func_c_list " readlink HAVE_READLINK"
3365 as_fn_append ac_header_c_list " malloc.h malloc_h HAVE_MALLOC_H"
3366 as_fn_append ac_func_c_list " setenv HAVE_SETENV"
3367 as_fn_append ac_func_c_list " sigaction HAVE_SIGACTION"
3368 as_fn_append ac_func_c_list " siginterrupt HAVE_SIGINTERRUPT"
3369 as_fn_append ac_func_c_list " __xpg_strerror_r HAVE___XPG_STRERROR_R"
3370 as_fn_append ac_func_c_list " strndup HAVE_STRNDUP"
3371 as_fn_append ac_func_c_list " strptime HAVE_STRPTIME"
3372 as_fn_append ac_func_c_list " strtoumax HAVE_STRTOUMAX"
3373 as_fn_append ac_header_c_list " sys/wait.h sys_wait_h HAVE_SYS_WAIT_H"
3374 as_fn_append ac_func_c_list " localtime_r HAVE_LOCALTIME_R"
3375 as_fn_append ac_func_c_list " timegm HAVE_TIMEGM"
3376 as_fn_append ac_func_c_list " vasnprintf HAVE_VASNPRINTF"
3377 as_fn_append ac_header_c_list " features.h features_h HAVE_FEATURES_H"
3378 as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF"
3379 as_fn_append ac_func_c_list " wcrtomb HAVE_WCRTOMB"
3380 as_fn_append ac_func_c_list " wcwidth HAVE_WCWIDTH"
3381 as_fn_append ac_header_c_list " arpa/inet.h arpa_inet_h HAVE_ARPA_INET_H"
3382 as_fn_append ac_func_c_list " ftruncate HAVE_FTRUNCATE"
3383 as_fn_append ac_header_c_list " netdb.h netdb_h HAVE_NETDB_H"
3384 as_fn_append ac_header_c_list " netinet/in.h netinet_in_h HAVE_NETINET_IN_H"
3385 as_fn_append ac_func_c_list " newlocale HAVE_NEWLOCALE"
3386 as_fn_append ac_header_c_list " sys/select.h sys_select_h HAVE_SYS_SELECT_H"
3387 as_fn_append ac_func_c_list " pipe HAVE_PIPE"
3388 as_fn_append ac_func_c_list " sleep HAVE_SLEEP"
3389 as_fn_append ac_func_c_list " catgets HAVE_CATGETS"
3390 as_fn_append ac_header_c_list " sys/ioctl.h sys_ioctl_h HAVE_SYS_IOCTL_H"
3391 as_fn_append ac_func_c_list " shutdown HAVE_SHUTDOWN"
3392 as_fn_append ac_header_c_list " sys/uio.h sys_uio_h HAVE_SYS_UIO_H"
3393 as_fn_append ac_func_c_list " wctob HAVE_WCTOB"
3394 as_fn_append ac_func_c_list " sigprocmask HAVE_SIGPROCMASK"
3395 as_fn_append ac_func_c_list " strcasecoll HAVE_STRCASECOLL"
3396 as_fn_append ac_func_c_list " stricoll HAVE_STRICOLL"
3397 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3398 as_fn_append ac_func_c_list " fork HAVE_FORK"
3399 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3400 gt_needs="$gt_needs need-ngettext"
3401 # Check that the precious variables saved in the cache have kept the same
3403 ac_cache_corrupted=false
3404 for ac_var in $ac_precious_vars; do
3405 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3406 eval ac_new_set=\$ac_env_${ac_var}_set
3407 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3408 eval ac_new_val=\$ac_env_${ac_var}_value
3409 case $ac_old_set,$ac_new_set in
3411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3412 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3413 ac_cache_corrupted=: ;;
3415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3416 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3417 ac_cache_corrupted=: ;;
3420 if test "x$ac_old_val" != "x$ac_new_val"; then
3421 # differences in whitespace do not lead to failure.
3422 ac_old_val_w=`echo x $ac_old_val`
3423 ac_new_val_w=`echo x $ac_new_val`
3424 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3426 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3427 ac_cache_corrupted=:
3429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3430 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3431 eval $ac_var=\$ac_old_val
3433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3434 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3436 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3439 # Pass precious variables to config.status.
3440 if test "$ac_new_set" = set; then
3442 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3443 *) ac_arg=$ac_var=$ac_new_val ;;
3445 case " $ac_configure_args " in
3446 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3447 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3451 if $ac_cache_corrupted; then
3452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3453 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3455 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3456 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3458 ## -------------------- ##
3459 ## Main body of script. ##
3460 ## -------------------- ##
3463 ac_cpp='$CPP $CPPFLAGS'
3464 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3465 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3466 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3472 for ac_dir in build-aux "$srcdir"/build-aux
3474 if test -f "$ac_dir/install-sh"; then
3476 ac_install_sh="$ac_aux_dir/install-sh -c"
3478 elif test -f "$ac_dir/install.sh"; then
3480 ac_install_sh="$ac_aux_dir/install.sh -c"
3482 elif test -f "$ac_dir/shtool"; then
3484 ac_install_sh="$ac_aux_dir/shtool install -c"
3488 if test -z "$ac_aux_dir"; then
3489 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3492 # These three variables are undocumented and unsupported,
3493 # and are intended to be withdrawn in a future Autoconf release.
3494 # They can cause serious problems if a builder's source tree is in a directory
3495 # whose full name contains unusual characters.
3496 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3497 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3498 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3503 am__api_version='1.16'
3505 # Find a good install program. We prefer a C program (faster),
3506 # so one script is as good as another. But avoid the broken or
3507 # incompatible versions:
3508 # SysV /etc/install, /usr/sbin/install
3509 # SunOS /usr/etc/install
3510 # IRIX /sbin/install
3512 # AmigaOS /C/install, which installs bootblocks on floppy discs
3513 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3514 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3515 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3516 # OS/2's system install, which has a completely different semantic
3517 # ./install, which can be erroneously created by make from ./install.sh.
3518 # Reject install programs that cannot install multiple files.
3519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3520 printf %s "checking for a BSD-compatible install... " >&6; }
3521 if test -z "$INSTALL"; then
3522 if test ${ac_cv_path_install+y}
3524 printf %s "(cached) " >&6
3526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3530 case $as_dir in #(((
3533 *) as_dir=$as_dir/ ;;
3535 # Account for fact that we put trailing slashes in our PATH walk.
3538 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3539 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3542 # OSF1 and SCO ODT 3.0 have their own names for install.
3543 # Don't use installbsd from OSF since it installs stuff as root
3545 for ac_prog in ginstall scoinst install; do
3546 for ac_exec_ext in '' $ac_executable_extensions; do
3547 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3548 if test $ac_prog = install &&
3549 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3550 # AIX install. It has an incompatible calling convention.
3552 elif test $ac_prog = install &&
3553 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3554 # program-specific install script used by HP pwplus--don't use.
3557 rm -rf conftest.one conftest.two conftest.dir
3558 echo one > conftest.one
3559 echo two > conftest.two
3561 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3562 test -s conftest.one && test -s conftest.two &&
3563 test -s conftest.dir/conftest.one &&
3564 test -s conftest.dir/conftest.two
3566 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3579 rm -rf conftest.one conftest.two conftest.dir
3582 if test ${ac_cv_path_install+y}; then
3583 INSTALL=$ac_cv_path_install
3585 # As a last resort, use the slow shell script. Don't cache a
3586 # value for INSTALL within a source directory, because that will
3587 # break other packages using the cache if that directory is
3588 # removed, or if the value is a relative name.
3589 INSTALL=$ac_install_sh
3592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3593 printf "%s\n" "$INSTALL" >&6; }
3595 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3596 # It thinks the first close brace ends the variable substitution.
3597 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3599 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3601 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3604 printf %s "checking whether build environment is sane... " >&6; }
3605 # Reject unsafe characters in $srcdir or the absolute working directory
3606 # name. Accept space and tab only in the latter.
3610 *[\\\"\#\$\&\'\`$am_lf]*)
3611 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3614 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3615 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3618 # Do 'set' in a subshell so we don't clobber the current shell's
3619 # arguments. Must try -L first in case configure is actually a
3620 # symlink; some systems play weird games with the mod time of symlinks
3621 # (eg FreeBSD returns the mod time of the symlink's containing
3625 for am_try in 1 2; do
3626 echo "timestamp, slept: $am_has_slept" > conftest.file
3627 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3628 if test "$*" = "X"; then
3630 set X `ls -t "$srcdir/configure" conftest.file`
3632 if test "$*" != "X $srcdir/configure conftest.file" \
3633 && test "$*" != "X conftest.file $srcdir/configure"; then
3635 # If neither matched, then we have a broken ls. This can happen
3636 # if, for instance, CONFIG_SHELL is bash and it inherits a
3637 # broken ls alias from the environment. This has actually
3638 # happened. Such a system could not be considered "sane".
3639 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3640 alias in your environment" "$LINENO" 5
3642 if test "$2" = conftest.file || test $am_try -eq 2; then
3649 test "$2" = conftest.file
3655 as_fn_error $? "newly created file is older than distributed files!
3656 Check your system clock" "$LINENO" 5
3658 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3659 printf "%s\n" "yes" >&6; }
3660 # If we didn't sleep, we still need to ensure time stamps of config.status and
3661 # generated files are strictly newer.
3663 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3670 test "$program_prefix" != NONE &&
3671 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3672 # Use a double $ so make ignores it.
3673 test "$program_suffix" != NONE &&
3674 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3675 # Double any \ or $.
3676 # By default was `s,x,x', remove it if useless.
3677 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3678 program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3680 # Expand $ac_aux_dir to an absolute path.
3681 am_aux_dir=`cd "$ac_aux_dir" && pwd`
3683 if test x"${MISSING+set}" != xset; then
3686 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3688 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3691 # Use eval to expand $SHELL
3692 if eval "$MISSING --is-lightweight"; then
3693 am_missing_run="$MISSING "
3696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3697 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3700 if test x"${install_sh+set}" != xset; then
3703 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3705 install_sh="\${SHELL} $am_aux_dir/install-sh"
3709 # Installed binaries are usually stripped using 'strip' when the user
3710 # run "make install-strip". However 'strip' might not be the right
3711 # tool to use in cross-compilation environments, therefore Automake
3712 # will honor the 'STRIP' environment variable to overrule this program.
3713 if test "$cross_compiling" != no; then
3714 if test -n "$ac_tool_prefix"; then
3715 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3716 set dummy ${ac_tool_prefix}strip; ac_word=$2
3717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718 printf %s "checking for $ac_word... " >&6; }
3719 if test ${ac_cv_prog_STRIP+y}
3721 printf %s "(cached) " >&6
3723 if test -n "$STRIP"; then
3724 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730 case $as_dir in #(((
3733 *) as_dir=$as_dir/ ;;
3735 for ac_exec_ext in '' $ac_executable_extensions; do
3736 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3737 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3738 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3747 STRIP=$ac_cv_prog_STRIP
3748 if test -n "$STRIP"; then
3749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3750 printf "%s\n" "$STRIP" >&6; }
3752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753 printf "%s\n" "no" >&6; }
3758 if test -z "$ac_cv_prog_STRIP"; then
3760 # Extract the first word of "strip", so it can be a program name with args.
3761 set dummy strip; ac_word=$2
3762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763 printf %s "checking for $ac_word... " >&6; }
3764 if test ${ac_cv_prog_ac_ct_STRIP+y}
3766 printf %s "(cached) " >&6
3768 if test -n "$ac_ct_STRIP"; then
3769 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775 case $as_dir in #(((
3778 *) as_dir=$as_dir/ ;;
3780 for ac_exec_ext in '' $ac_executable_extensions; do
3781 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3782 ac_cv_prog_ac_ct_STRIP="strip"
3783 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3792 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3793 if test -n "$ac_ct_STRIP"; then
3794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3795 printf "%s\n" "$ac_ct_STRIP" >&6; }
3797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798 printf "%s\n" "no" >&6; }
3801 if test "x$ac_ct_STRIP" = x; then
3804 case $cross_compiling:$ac_tool_warned in
3806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3807 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3808 ac_tool_warned=yes ;;
3813 STRIP="$ac_cv_prog_STRIP"
3817 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3820 printf %s "checking for a thread-safe mkdir -p... " >&6; }
3821 if test -z "$MKDIR_P"; then
3822 if test ${ac_cv_path_mkdir+y}
3824 printf %s "(cached) " >&6
3826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3830 case $as_dir in #(((
3833 *) as_dir=$as_dir/ ;;
3835 for ac_prog in mkdir gmkdir; do
3836 for ac_exec_ext in '' $ac_executable_extensions; do
3837 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3838 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3839 'mkdir ('*'coreutils) '* | \
3841 'mkdir (fileutils) '4.1*)
3842 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3852 test -d ./--version && rmdir ./--version
3853 if test ${ac_cv_path_mkdir+y}; then
3854 MKDIR_P="$ac_cv_path_mkdir -p"
3856 # As a last resort, use the slow shell script. Don't cache a
3857 # value for MKDIR_P within a source directory, because that will
3858 # break other packages using the cache if that directory is
3859 # removed, or if the value is a relative name.
3860 MKDIR_P="$ac_install_sh -d"
3863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3864 printf "%s\n" "$MKDIR_P" >&6; }
3866 for ac_prog in gawk mawk nawk awk
3868 # Extract the first word of "$ac_prog", so it can be a program name with args.
3869 set dummy $ac_prog; ac_word=$2
3870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 printf %s "checking for $ac_word... " >&6; }
3872 if test ${ac_cv_prog_AWK+y}
3874 printf %s "(cached) " >&6
3876 if test -n "$AWK"; then
3877 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3883 case $as_dir in #(((
3886 *) as_dir=$as_dir/ ;;
3888 for ac_exec_ext in '' $ac_executable_extensions; do
3889 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3890 ac_cv_prog_AWK="$ac_prog"
3891 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3901 if test -n "$AWK"; then
3902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3903 printf "%s\n" "$AWK" >&6; }
3905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906 printf "%s\n" "no" >&6; }
3910 test -n "$AWK" && break
3913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3914 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3916 ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3917 if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3919 printf %s "(cached) " >&6
3921 cat >conftest.make <<\_ACEOF
3924 @echo '@@@%%%=$(MAKE)=@@@%%%'
3926 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3927 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3929 eval ac_cv_prog_make_${ac_make}_set=yes;;
3931 eval ac_cv_prog_make_${ac_make}_set=no;;
3935 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3937 printf "%s\n" "yes" >&6; }
3940 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941 printf "%s\n" "no" >&6; }
3942 SET_MAKE="MAKE=${MAKE-make}"
3945 rm -rf .tst 2>/dev/null
3946 mkdir .tst 2>/dev/null
3947 if test -d .tst; then
3952 rmdir .tst 2>/dev/null
3954 # Check whether --enable-silent-rules was given.
3955 if test ${enable_silent_rules+y}
3957 enableval=$enable_silent_rules;
3960 case $enable_silent_rules in # (((
3961 yes) AM_DEFAULT_VERBOSITY=0;;
3962 no) AM_DEFAULT_VERBOSITY=1;;
3963 *) AM_DEFAULT_VERBOSITY=1;;
3965 am_make=${MAKE-make}
3966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3967 printf %s "checking whether $am_make supports nested variables... " >&6; }
3968 if test ${am_cv_make_support_nested_variables+y}
3970 printf %s "(cached) " >&6
3972 if printf "%s\n" 'TRUE=$(BAR$(V))
3978 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3979 am_cv_make_support_nested_variables=yes
3981 am_cv_make_support_nested_variables=no
3984 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3985 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
3986 if test $am_cv_make_support_nested_variables = yes; then
3988 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3990 AM_V=$AM_DEFAULT_VERBOSITY
3991 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3995 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3996 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3997 # is not polluted with repeated "-I."
3998 am__isrc=' -I$(srcdir)'
3999 # test to see if srcdir already configured
4000 if test -f $srcdir/config.status; then
4001 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4005 # test whether we have cygpath
4006 if test -z "$CYGPATH_W"; then
4007 if (cygpath --version) >/dev/null 2>/dev/null; then
4008 CYGPATH_W='cygpath -w'
4015 # Define the identity of the package.
4020 printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4023 printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4025 # Some tools Automake needs.
4027 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4030 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4033 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4036 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4039 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4041 # For better backward compatibility. To be removed once Automake 1.9.x
4042 # dies out for good. For more background, see:
4043 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4044 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4045 mkdir_p='$(MKDIR_P)'
4047 # We need awk for the "check" target (and possibly the TAP driver). The
4048 # system "awk" is bad on some platforms.
4049 # Always define AMTAR for backward compatibility. Yes, it's still used
4050 # in the wild :-( We should find a proper way to deprecate it ...
4054 # We'll loop over all known methods to create a tar archive until one works.
4055 _am_tools='gnutar pax cpio none'
4057 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4064 # POSIX will say in a future version that running "rm -f" with no argument
4065 # is OK; and we want to be able to make that assumption in our Makefile
4066 # recipes. So use an aggressive probe to check that the usage we want is
4067 # actually supported "in the wild" to an acceptable degree.
4068 # See automake bug#10828.
4069 # To make any issue more visible, cause the running configure to be aborted
4070 # by default if the 'rm' program in use doesn't match our expectations; the
4071 # user can still override this though.
4072 if rm -f && rm -fr && rm -rf; then : OK; else
4076 Your 'rm' program seems unable to run without file operands specified
4077 on the command line, even when the '-f' option is present. This is contrary
4078 to the behaviour of most rm programs out there, and not conforming with
4079 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4081 Please tell bug-automake@gnu.org about your system, including the value
4082 of your $PATH and any error possibly output before this message. This
4083 can help us improve future automake versions.
4086 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4087 echo 'Configuration will proceed anyway, since you have set the' >&2
4088 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4092 Aborting the configuration process, to ensure you take notice of the issue.
4094 You can download and install GNU coreutils to get an 'rm' implementation
4095 that behaves properly: <https://www.gnu.org/software/coreutils/>.
4097 If you want to complete the configuration process using your problematic
4098 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4099 to "yes", and re-run configure.
4102 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4106 # Check whether --enable-silent-rules was given.
4107 if test ${enable_silent_rules+y}
4109 enableval=$enable_silent_rules;
4112 case $enable_silent_rules in # (((
4113 yes) AM_DEFAULT_VERBOSITY=0;;
4114 no) AM_DEFAULT_VERBOSITY=1;;
4115 *) AM_DEFAULT_VERBOSITY=0;;
4117 am_make=${MAKE-make}
4118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4119 printf %s "checking whether $am_make supports nested variables... " >&6; }
4120 if test ${am_cv_make_support_nested_variables+y}
4122 printf %s "(cached) " >&6
4124 if printf "%s\n" 'TRUE=$(BAR$(V))
4130 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4131 am_cv_make_support_nested_variables=yes
4133 am_cv_make_support_nested_variables=no
4136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4137 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4138 if test $am_cv_make_support_nested_variables = yes; then
4140 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4142 AM_V=$AM_DEFAULT_VERBOSITY
4143 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4146 # make --enable-silent-rules the default.
4148 ac_config_headers="$ac_config_headers lib/config.h:lib/config.hin"
4151 for ac_prog in gawk mawk nawk awk
4153 # Extract the first word of "$ac_prog", so it can be a program name with args.
4154 set dummy $ac_prog; ac_word=$2
4155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4156 printf %s "checking for $ac_word... " >&6; }
4157 if test ${ac_cv_prog_AWK+y}
4159 printf %s "(cached) " >&6
4161 if test -n "$AWK"; then
4162 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168 case $as_dir in #(((
4171 *) as_dir=$as_dir/ ;;
4173 for ac_exec_ext in '' $ac_executable_extensions; do
4174 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4175 ac_cv_prog_AWK="$ac_prog"
4176 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4186 if test -n "$AWK"; then
4187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4188 printf "%s\n" "$AWK" >&6; }
4190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4191 printf "%s\n" "no" >&6; }
4195 test -n "$AWK" && break
4199 ac_cpp='$CPP $CPPFLAGS'
4200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4203 if test -n "$ac_tool_prefix"; then
4204 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4205 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4207 printf %s "checking for $ac_word... " >&6; }
4208 if test ${ac_cv_prog_CC+y}
4210 printf %s "(cached) " >&6
4212 if test -n "$CC"; then
4213 ac_cv_prog_CC="$CC" # Let the user override the test.
4215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219 case $as_dir in #(((
4222 *) as_dir=$as_dir/ ;;
4224 for ac_exec_ext in '' $ac_executable_extensions; do
4225 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4226 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4227 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4237 if test -n "$CC"; then
4238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4239 printf "%s\n" "$CC" >&6; }
4241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242 printf "%s\n" "no" >&6; }
4247 if test -z "$ac_cv_prog_CC"; then
4249 # Extract the first word of "gcc", so it can be a program name with args.
4250 set dummy gcc; ac_word=$2
4251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 printf %s "checking for $ac_word... " >&6; }
4253 if test ${ac_cv_prog_ac_ct_CC+y}
4255 printf %s "(cached) " >&6
4257 if test -n "$ac_ct_CC"; then
4258 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4264 case $as_dir in #(((
4267 *) as_dir=$as_dir/ ;;
4269 for ac_exec_ext in '' $ac_executable_extensions; do
4270 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4271 ac_cv_prog_ac_ct_CC="gcc"
4272 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4281 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4282 if test -n "$ac_ct_CC"; then
4283 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4284 printf "%s\n" "$ac_ct_CC" >&6; }
4286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4287 printf "%s\n" "no" >&6; }
4290 if test "x$ac_ct_CC" = x; then
4293 case $cross_compiling:$ac_tool_warned in
4295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4296 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4297 ac_tool_warned=yes ;;
4305 if test -z "$CC"; then
4306 if test -n "$ac_tool_prefix"; then
4307 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4308 set dummy ${ac_tool_prefix}cc; ac_word=$2
4309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4310 printf %s "checking for $ac_word... " >&6; }
4311 if test ${ac_cv_prog_CC+y}
4313 printf %s "(cached) " >&6
4315 if test -n "$CC"; then
4316 ac_cv_prog_CC="$CC" # Let the user override the test.
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4322 case $as_dir in #(((
4325 *) as_dir=$as_dir/ ;;
4327 for ac_exec_ext in '' $ac_executable_extensions; do
4328 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4329 ac_cv_prog_CC="${ac_tool_prefix}cc"
4330 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4340 if test -n "$CC"; then
4341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4342 printf "%s\n" "$CC" >&6; }
4344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4345 printf "%s\n" "no" >&6; }
4351 if test -z "$CC"; then
4352 # Extract the first word of "cc", so it can be a program name with args.
4353 set dummy cc; ac_word=$2
4354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355 printf %s "checking for $ac_word... " >&6; }
4356 if test ${ac_cv_prog_CC+y}
4358 printf %s "(cached) " >&6
4360 if test -n "$CC"; then
4361 ac_cv_prog_CC="$CC" # Let the user override the test.
4364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4368 case $as_dir in #(((
4371 *) as_dir=$as_dir/ ;;
4373 for ac_exec_ext in '' $ac_executable_extensions; do
4374 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4375 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4376 ac_prog_rejected=yes
4380 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4387 if test $ac_prog_rejected = yes; then
4388 # We found a bogon in the path, so make sure we never use it.
4389 set dummy $ac_cv_prog_CC
4391 if test $# != 0; then
4392 # We chose a different compiler from the bogus one.
4393 # However, it has the same basename, so the bogon will be chosen
4394 # first if we set CC to just the basename; use the full file name.
4396 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4402 if test -n "$CC"; then
4403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4404 printf "%s\n" "$CC" >&6; }
4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407 printf "%s\n" "no" >&6; }
4412 if test -z "$CC"; then
4413 if test -n "$ac_tool_prefix"; then
4414 for ac_prog in cl.exe
4416 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4417 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4419 printf %s "checking for $ac_word... " >&6; }
4420 if test ${ac_cv_prog_CC+y}
4422 printf %s "(cached) " >&6
4424 if test -n "$CC"; then
4425 ac_cv_prog_CC="$CC" # Let the user override the test.
4427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4431 case $as_dir in #(((
4434 *) as_dir=$as_dir/ ;;
4436 for ac_exec_ext in '' $ac_executable_extensions; do
4437 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4438 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4439 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4449 if test -n "$CC"; then
4450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4451 printf "%s\n" "$CC" >&6; }
4453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4454 printf "%s\n" "no" >&6; }
4458 test -n "$CC" && break
4461 if test -z "$CC"; then
4463 for ac_prog in cl.exe
4465 # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468 printf %s "checking for $ac_word... " >&6; }
4469 if test ${ac_cv_prog_ac_ct_CC+y}
4471 printf %s "(cached) " >&6
4473 if test -n "$ac_ct_CC"; then
4474 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4480 case $as_dir in #(((
4483 *) as_dir=$as_dir/ ;;
4485 for ac_exec_ext in '' $ac_executable_extensions; do
4486 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4487 ac_cv_prog_ac_ct_CC="$ac_prog"
4488 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4497 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4498 if test -n "$ac_ct_CC"; then
4499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4500 printf "%s\n" "$ac_ct_CC" >&6; }
4502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4503 printf "%s\n" "no" >&6; }
4507 test -n "$ac_ct_CC" && break
4510 if test "x$ac_ct_CC" = x; then
4513 case $cross_compiling:$ac_tool_warned in
4515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4516 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4517 ac_tool_warned=yes ;;
4524 if test -z "$CC"; then
4525 if test -n "$ac_tool_prefix"; then
4526 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4527 set dummy ${ac_tool_prefix}clang; ac_word=$2
4528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529 printf %s "checking for $ac_word... " >&6; }
4530 if test ${ac_cv_prog_CC+y}
4532 printf %s "(cached) " >&6
4534 if test -n "$CC"; then
4535 ac_cv_prog_CC="$CC" # Let the user override the test.
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4541 case $as_dir in #(((
4544 *) as_dir=$as_dir/ ;;
4546 for ac_exec_ext in '' $ac_executable_extensions; do
4547 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4548 ac_cv_prog_CC="${ac_tool_prefix}clang"
4549 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4559 if test -n "$CC"; then
4560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4561 printf "%s\n" "$CC" >&6; }
4563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4564 printf "%s\n" "no" >&6; }
4569 if test -z "$ac_cv_prog_CC"; then
4571 # Extract the first word of "clang", so it can be a program name with args.
4572 set dummy clang; ac_word=$2
4573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4574 printf %s "checking for $ac_word... " >&6; }
4575 if test ${ac_cv_prog_ac_ct_CC+y}
4577 printf %s "(cached) " >&6
4579 if test -n "$ac_ct_CC"; then
4580 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4586 case $as_dir in #(((
4589 *) as_dir=$as_dir/ ;;
4591 for ac_exec_ext in '' $ac_executable_extensions; do
4592 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4593 ac_cv_prog_ac_ct_CC="clang"
4594 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4603 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4604 if test -n "$ac_ct_CC"; then
4605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4606 printf "%s\n" "$ac_ct_CC" >&6; }
4608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609 printf "%s\n" "no" >&6; }
4612 if test "x$ac_ct_CC" = x; then
4615 case $cross_compiling:$ac_tool_warned in
4617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4618 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4619 ac_tool_warned=yes ;;
4630 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4631 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4632 as_fn_error $? "no acceptable C compiler found in \$PATH
4633 See \`config.log' for more details" "$LINENO" 5; }
4635 # Provide some information about the compiler.
4636 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4639 for ac_option in --version -v -V -qversion -version; do
4640 { { ac_try="$ac_compiler $ac_option >&5"
4642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643 *) ac_try_echo=$ac_try;;
4645 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4646 printf "%s\n" "$ac_try_echo"; } >&5
4647 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4649 if test -s conftest.err; then
4651 ... rest of stderr output deleted ...
4652 10q' conftest.err >conftest.er1
4653 cat conftest.er1 >&5
4655 rm -f conftest.er1 conftest.err
4656 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4657 test $ac_status = 0; }
4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4661 /* end confdefs.h. */
4671 ac_clean_files_save=$ac_clean_files
4672 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4673 # Try to create an executable without -o first, disregard a.out.
4674 # It will help us diagnose broken compilers, and finding out an intuition
4676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4677 printf %s "checking whether the C compiler works... " >&6; }
4678 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4680 # The possible output files:
4681 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4684 for ac_file in $ac_files
4687 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4688 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4693 if { { ac_try="$ac_link_default"
4695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4696 *) ac_try_echo=$ac_try;;
4698 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4699 printf "%s\n" "$ac_try_echo"; } >&5
4700 (eval "$ac_link_default") 2>&5
4702 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4703 test $ac_status = 0; }
4705 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4706 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4707 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4708 # so that the user can short-circuit this test for compilers unknown to
4710 for ac_file in $ac_files ''
4712 test -f "$ac_file" || continue
4714 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4717 # We found the default executable, but exeext='' is most
4721 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4723 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4725 # We set ac_cv_exeext here because the later test for it is not
4726 # safe: cross compilers may not add the suffix if given an `-o'
4727 # argument, so we may need to know it at that point already.
4728 # Even if this section looks crufty: it has the advantage of
4735 test "$ac_cv_exeext" = no && ac_cv_exeext=
4740 if test -z "$ac_file"
4742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743 printf "%s\n" "no" >&6; }
4744 printf "%s\n" "$as_me: failed program was:" >&5
4745 sed 's/^/| /' conftest.$ac_ext >&5
4747 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4748 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4749 as_fn_error 77 "C compiler cannot create executables
4750 See \`config.log' for more details" "$LINENO" 5; }
4752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4753 printf "%s\n" "yes" >&6; }
4755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4756 printf %s "checking for C compiler default output file name... " >&6; }
4757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4758 printf "%s\n" "$ac_file" >&6; }
4759 ac_exeext=$ac_cv_exeext
4761 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4762 ac_clean_files=$ac_clean_files_save
4763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4764 printf %s "checking for suffix of executables... " >&6; }
4765 if { { ac_try="$ac_link"
4767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4768 *) ac_try_echo=$ac_try;;
4770 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4771 printf "%s\n" "$ac_try_echo"; } >&5
4772 (eval "$ac_link") 2>&5
4774 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4775 test $ac_status = 0; }
4777 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4778 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4779 # work properly (i.e., refer to `conftest.exe'), while it won't with
4781 for ac_file in conftest.exe conftest conftest.*; do
4782 test -f "$ac_file" || continue
4784 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4785 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4791 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4792 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4793 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4794 See \`config.log' for more details" "$LINENO" 5; }
4796 rm -f conftest conftest$ac_cv_exeext
4797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4798 printf "%s\n" "$ac_cv_exeext" >&6; }
4800 rm -f conftest.$ac_ext
4801 EXEEXT=$ac_cv_exeext
4803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4804 /* end confdefs.h. */
4809 FILE *f = fopen ("conftest.out", "w");
4810 return ferror (f) || fclose (f) != 0;
4816 ac_clean_files="$ac_clean_files conftest.out"
4817 # Check that the compiler produces executables we can run. If not, either
4818 # the compiler is broken, or we cross compile.
4819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4820 printf %s "checking whether we are cross compiling... " >&6; }
4821 if test "$cross_compiling" = maybe && test "x$build" != "x$host"; then
4823 elif test "$cross_compiling" != yes; then
4824 { { ac_try="$ac_link"
4826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4827 *) ac_try_echo=$ac_try;;
4829 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4830 printf "%s\n" "$ac_try_echo"; } >&5
4831 (eval "$ac_link") 2>&5
4833 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4834 test $ac_status = 0; }
4835 if { ac_try='./conftest$ac_cv_exeext'
4836 { { case "(($ac_try" in
4837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4838 *) ac_try_echo=$ac_try;;
4840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4841 printf "%s\n" "$ac_try_echo"; } >&5
4842 (eval "$ac_try") 2>&5
4844 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4845 test $ac_status = 0; }; }; then
4848 if test "$cross_compiling" = maybe; then
4851 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4852 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4853 as_fn_error $? "cannot run C compiled programs.
4854 If you meant to cross compile, use \`--host'.
4855 See \`config.log' for more details" "$LINENO" 5; }
4859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4860 printf "%s\n" "$cross_compiling" >&6; }
4862 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4863 ac_clean_files=$ac_clean_files_save
4864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4865 printf %s "checking for suffix of object files... " >&6; }
4866 if test ${ac_cv_objext+y}
4868 printf %s "(cached) " >&6
4870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4871 /* end confdefs.h. */
4881 rm -f conftest.o conftest.obj
4882 if { { ac_try="$ac_compile"
4884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4885 *) ac_try_echo=$ac_try;;
4887 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4888 printf "%s\n" "$ac_try_echo"; } >&5
4889 (eval "$ac_compile") 2>&5
4891 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4892 test $ac_status = 0; }
4894 for ac_file in conftest.o conftest.obj conftest.*; do
4895 test -f "$ac_file" || continue;
4897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4898 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4903 printf "%s\n" "$as_me: failed program was:" >&5
4904 sed 's/^/| /' conftest.$ac_ext >&5
4906 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4907 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4908 as_fn_error $? "cannot compute suffix of object files: cannot compile
4909 See \`config.log' for more details" "$LINENO" 5; }
4911 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4914 printf "%s\n" "$ac_cv_objext" >&6; }
4915 OBJEXT=$ac_cv_objext
4917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4918 printf %s "checking whether the compiler supports GNU C... " >&6; }
4919 if test ${ac_cv_c_compiler_gnu+y}
4921 printf %s "(cached) " >&6
4923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924 /* end confdefs.h. */
4937 if ac_fn_c_try_compile "$LINENO"
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4944 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4948 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4949 if test $ac_compiler_gnu = yes; then
4954 ac_test_CFLAGS=${CFLAGS+y}
4955 ac_save_CFLAGS=$CFLAGS
4956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4957 printf %s "checking whether $CC accepts -g... " >&6; }
4958 if test ${ac_cv_prog_cc_g+y}
4960 printf %s "(cached) " >&6
4962 ac_save_c_werror_flag=$ac_c_werror_flag
4963 ac_c_werror_flag=yes
4966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4967 /* end confdefs.h. */
4977 if ac_fn_c_try_compile "$LINENO"
4982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983 /* end confdefs.h. */
4993 if ac_fn_c_try_compile "$LINENO"
4997 ac_c_werror_flag=$ac_save_c_werror_flag
4999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5000 /* end confdefs.h. */
5010 if ac_fn_c_try_compile "$LINENO"
5014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5019 ac_c_werror_flag=$ac_save_c_werror_flag
5021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5022 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5023 if test $ac_test_CFLAGS; then
5024 CFLAGS=$ac_save_CFLAGS
5025 elif test $ac_cv_prog_cc_g = yes; then
5026 if test "$GCC" = yes; then
5032 if test "$GCC" = yes; then
5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5039 printf %s "checking for $CC option to enable C11 features... " >&6; }
5040 if test ${ac_cv_prog_cc_c11+y}
5042 printf %s "(cached) " >&6
5044 ac_cv_prog_cc_c11=no
5046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5047 /* end confdefs.h. */
5049 #include <stdbool.h>
5055 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5056 #define debug(...) fprintf (stderr, __VA_ARGS__)
5057 #define showlist(...) puts (#__VA_ARGS__)
5058 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5060 test_varargs_macros (void)
5065 debug ("X = %d\n", x);
5066 showlist (The first, second, and third items.);
5067 report (x>y, "x is %d but y is %d", x, y);
5070 // Check long long types.
5071 #define BIG64 18446744073709551615ull
5072 #define BIG32 4294967295ul
5073 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5075 your preprocessor is broken;
5079 your preprocessor is broken;
5081 static long long int bignum = -9223372036854775807LL;
5082 static unsigned long long int ubignum = BIG64;
5084 struct incomplete_array
5092 const wchar_t *name;
5096 typedef const char *ccp;
5099 test_restrict (ccp restrict text)
5101 // See if C++-style comments work.
5102 // Iterate through items via the restricted pointer.
5103 // Also check for declarations in for loops.
5104 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5109 // Check varargs and va_copy.
5111 test_varargs (const char *format, ...)
5114 va_start (args, format);
5116 va_copy (args_copy, args);
5118 const char *str = "";
5127 str = va_arg (args_copy, const char *);
5130 number = va_arg (args_copy, int);
5133 fnumber = va_arg (args_copy, double);
5142 return *str && number && fnumber;
5145 char _Alignas (double) aligned_as_double;
5146 char _Alignas (0) no_special_alignment;
5147 extern char aligned_as_int;
5148 char _Alignas (0) _Alignas (int) aligned_as_int;
5153 int_alignment = _Alignof (int),
5154 int_array_alignment = _Alignof (int[100]),
5155 char_alignment = _Alignof (char)
5157 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
5160 int _Noreturn does_not_return (void) { for (;;) continue; }
5162 // Check _Static_assert.
5163 struct test_static_assert
5166 _Static_assert (sizeof (int) <= sizeof (long int),
5167 "_Static_assert does not work in struct");
5171 // Check UTF-8 literals.
5172 #define u8 syntax error!
5173 char const utf8_literal[] = u8"happens to be ASCII" "another string";
5175 // Check duplicate typedefs.
5176 typedef long *long_ptr;
5177 typedef long int *long_ptr;
5178 typedef long_ptr long_ptr;
5180 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
5184 struct { int i; int j; };
5185 struct { int k; long int l; } w;
5195 _Bool success = false;
5198 if (test_restrict ("String literal") == 0)
5200 char *restrict newvar = "Another string";
5203 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5204 test_varargs_macros ();
5206 // Check flexible array members.
5207 struct incomplete_array *ia =
5208 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5210 for (int i = 0; i < ia->datasize; ++i)
5211 ia->data[i] = i * 1.234;
5213 // Check named initializers.
5214 struct named_init ni = {
5216 .name = L"Test wide string",
5217 .average = 543.34343,
5222 int dynamic_array[ni.number];
5223 dynamic_array[ni.number - 1] = 543;
5225 // work around unused variable warnings
5226 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5227 || dynamic_array[ni.number - 1] != 543);
5231 _Static_assert ((offsetof (struct anonymous, i)
5232 == offsetof (struct anonymous, w.k)),
5233 "Anonymous union alignment botch");
5239 for ac_arg in '' -std=gnu11
5241 CC="$ac_save_CC $ac_arg"
5242 if ac_fn_c_try_compile "$LINENO"
5244 ac_cv_prog_cc_c11=$ac_arg
5246 rm -f core conftest.err conftest.$ac_objext
5247 test "x$ac_cv_prog_cc_c11" != "xno" && break
5249 rm -f conftest.$ac_ext
5254 ac_prog_cc_stdc_options=
5255 case "x$ac_cv_prog_cc_c11" in
5257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5258 printf "%s\n" "none needed" >&6; } ;;
5260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5261 printf "%s\n" "unsupported" >&6; } ;;
5263 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
5264 CC=$CC$ac_prog_cc_stdc_options
5265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5266 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } ;;
5268 if test "x$ac_cv_prog_cc_c11" != xno
5271 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5274 printf %s "checking for $CC option to enable C99 features... " >&6; }
5275 if test ${ac_cv_prog_cc_c99+y}
5277 printf %s "(cached) " >&6
5279 ac_cv_prog_cc_c99=no
5281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5282 /* end confdefs.h. */
5284 #include <stdbool.h>
5290 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5291 #define debug(...) fprintf (stderr, __VA_ARGS__)
5292 #define showlist(...) puts (#__VA_ARGS__)
5293 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5295 test_varargs_macros (void)
5300 debug ("X = %d\n", x);
5301 showlist (The first, second, and third items.);
5302 report (x>y, "x is %d but y is %d", x, y);
5305 // Check long long types.
5306 #define BIG64 18446744073709551615ull
5307 #define BIG32 4294967295ul
5308 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5310 your preprocessor is broken;
5314 your preprocessor is broken;
5316 static long long int bignum = -9223372036854775807LL;
5317 static unsigned long long int ubignum = BIG64;
5319 struct incomplete_array
5327 const wchar_t *name;
5331 typedef const char *ccp;
5334 test_restrict (ccp restrict text)
5336 // See if C++-style comments work.
5337 // Iterate through items via the restricted pointer.
5338 // Also check for declarations in for loops.
5339 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5344 // Check varargs and va_copy.
5346 test_varargs (const char *format, ...)
5349 va_start (args, format);
5351 va_copy (args_copy, args);
5353 const char *str = "";
5362 str = va_arg (args_copy, const char *);
5365 number = va_arg (args_copy, int);
5368 fnumber = va_arg (args_copy, double);
5377 return *str && number && fnumber;
5384 _Bool success = false;
5387 if (test_restrict ("String literal") == 0)
5389 char *restrict newvar = "Another string";
5392 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5393 test_varargs_macros ();
5395 // Check flexible array members.
5396 struct incomplete_array *ia =
5397 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5399 for (int i = 0; i < ia->datasize; ++i)
5400 ia->data[i] = i * 1.234;
5402 // Check named initializers.
5403 struct named_init ni = {
5405 .name = L"Test wide string",
5406 .average = 543.34343,
5411 int dynamic_array[ni.number];
5412 dynamic_array[ni.number - 1] = 543;
5414 // work around unused variable warnings
5415 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5416 || dynamic_array[ni.number - 1] != 543);
5422 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5424 CC="$ac_save_CC $ac_arg"
5425 if ac_fn_c_try_compile "$LINENO"
5427 ac_cv_prog_cc_c99=$ac_arg
5429 rm -f core conftest.err conftest.$ac_objext
5430 test "x$ac_cv_prog_cc_c99" != "xno" && break
5432 rm -f conftest.$ac_ext
5437 ac_prog_cc_stdc_options=
5438 case "x$ac_cv_prog_cc_c99" in
5440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5441 printf "%s\n" "none needed" >&6; } ;;
5443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5444 printf "%s\n" "unsupported" >&6; } ;;
5446 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5447 CC=$CC$ac_prog_cc_stdc_options
5448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5449 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } ;;
5451 if test "x$ac_cv_prog_cc_c99" != xno
5454 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5457 printf %s "checking for $CC option to enable C89 features... " >&6; }
5458 if test ${ac_cv_prog_cc_c89+y}
5460 printf %s "(cached) " >&6
5462 ac_cv_prog_cc_c89=no
5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5465 /* end confdefs.h. */
5469 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5470 struct buf { int x; };
5471 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5472 static char *e (p, i)
5478 static char *f (char * (*g) (char **, int), char **p, ...)
5483 s = g (p, va_arg (v,int));
5488 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5489 function prototypes and stuff, but not '\xHH' hex character constants.
5490 These don't provoke an error unfortunately, instead are silently treated
5491 as 'x'. The following induces an error, until -std is added to get
5492 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5493 array size at least. It's necessary to write '\x00'==0 to get something
5494 that's true only with -std. */
5495 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5497 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5498 inside strings and character constants. */
5500 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5502 int test (int i, double x);
5503 struct s1 {int (*f) (int a);};
5504 struct s2 {int (*f) (double a);};
5505 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5511 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5516 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5517 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5519 CC="$ac_save_CC $ac_arg"
5520 if ac_fn_c_try_compile "$LINENO"
5522 ac_cv_prog_cc_c89=$ac_arg
5524 rm -f core conftest.err conftest.$ac_objext
5525 test "x$ac_cv_prog_cc_c89" != "xno" && break
5527 rm -f conftest.$ac_ext
5532 ac_prog_cc_stdc_options=
5533 case "x$ac_cv_prog_cc_c89" in
5535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5536 printf "%s\n" "none needed" >&6; } ;;
5538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5539 printf "%s\n" "unsupported" >&6; } ;;
5541 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5542 CC=$CC$ac_prog_cc_stdc_options
5543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5544 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } ;;
5546 if test "x$ac_cv_prog_cc_c89" != xno
5549 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5552 ac_cv_prog_cc_stdc=no
5560 ac_cpp='$CPP $CPPFLAGS'
5561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5566 ac_cpp='$CPP $CPPFLAGS'
5567 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5568 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5569 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5571 printf %s "checking whether $CC understands -c and -o together... " >&6; }
5572 if test ${am_cv_prog_cc_c_o+y}
5574 printf %s "(cached) " >&6
5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577 /* end confdefs.h. */
5587 # Make sure it works both with $CC and with simple cc.
5588 # Following AC_PROG_CC_C_O, we do the test twice because some
5589 # compilers refuse to overwrite an existing .o file with -o,
5590 # though they will create one.
5591 am_cv_prog_cc_c_o=yes
5593 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5594 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); } \
5598 && test -f conftest2.$ac_objext; then
5601 am_cv_prog_cc_c_o=no
5605 rm -f core conftest*
5608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5609 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5610 if test "$am_cv_prog_cc_c_o" != yes; then
5611 # Losing compiler, so override with the script.
5612 # FIXME: It is wrong to rewrite CC.
5613 # But if we don't then we get into trouble of one sort or another.
5614 # A longer-term fix would be to have automake use am__CC in this case,
5615 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5616 CC="$am_aux_dir/compile $CC"
5619 ac_cpp='$CPP $CPPFLAGS'
5620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5624 DEPDIR="${am__leading_dot}deps"
5626 ac_config_commands="$ac_config_commands depfiles"
5628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
5629 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
5630 cat > confinc.mk << 'END'
5632 @echo this is the am__doit target >confinc.out
5637 # BSD make does it like this.
5638 echo '.include "confinc.mk" # ignored' > confmf.BSD
5639 # Other make implementations (GNU, Solaris 10, AIX) do it like this.
5640 echo 'include confinc.mk # ignored' > confmf.GNU
5642 for s in GNU BSD; do
5643 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
5644 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
5646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5647 (exit $ac_status); }
5648 case $?:`cat confinc.out 2>/dev/null` in #(
5649 '0:this is the am__doit target') :
5652 am__include='.include' am__quote='"' ;; #(
5654 am__include='include' am__quote='' ;;
5659 if test "$am__include" != "#"; then
5660 _am_result="yes ($s style)"
5664 rm -f confinc.* confmf.*
5665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
5666 printf "%s\n" "${_am_result}" >&6; }
5668 # Check whether --enable-dependency-tracking was given.
5669 if test ${enable_dependency_tracking+y}
5671 enableval=$enable_dependency_tracking;
5674 if test "x$enable_dependency_tracking" != xno; then
5675 am_depcomp="$ac_aux_dir/depcomp"
5679 if test "x$enable_dependency_tracking" != xno; then
5689 depcc="$CC" am_compiler_list=
5691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5692 printf %s "checking dependency style of $depcc... " >&6; }
5693 if test ${am_cv_CC_dependencies_compiler_type+y}
5695 printf %s "(cached) " >&6
5697 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5698 # We make a subdir and do the tests there. Otherwise we can end up
5699 # making bogus files that we don't know about and never remove. For
5700 # instance it was reported that on HP-UX the gcc test will end up
5701 # making a dummy file named 'D' -- because '-MD' means "put the output
5705 # Copy depcomp to subdir because otherwise we won't find it if we're
5706 # using a relative directory.
5707 cp "$am_depcomp" conftest.dir
5709 # We will build objects and dependencies in a subdirectory because
5710 # it helps to detect inapplicable dependency modes. For instance
5711 # both Tru64's cc and ICC support -MD to output dependencies as a
5712 # side effect of compilation, but ICC will put the dependencies in
5713 # the current directory while Tru64 will put them in the object
5717 am_cv_CC_dependencies_compiler_type=none
5718 if test "$am_compiler_list" = ""; then
5719 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5722 case " $depcc " in #(
5723 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5726 for depmode in $am_compiler_list; do
5727 # Setup a source with many dependencies, because some compilers
5728 # like to wrap large dependency lists on column 80 (with \), and
5729 # we should not choose a depcomp mode which is confused by this.
5731 # We need to recreate these files for each test, as the compiler may
5732 # overwrite some of them when testing with obscure command lines.
5733 # This happens at least with the AIX C compiler.
5735 for i in 1 2 3 4 5 6; do
5736 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5737 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5738 # Solaris 10 /bin/sh.
5739 echo '/* dummy */' > sub/conftst$i.h
5741 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5743 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5744 # mode. It turns out that the SunPro C++ compiler does not properly
5745 # handle '-M -o', and we need to detect this. Also, some Intel
5746 # versions had trouble with output in subdirs.
5747 am__obj=sub/conftest.${OBJEXT-o}
5748 am__minus_obj="-o $am__obj"
5751 # This depmode causes a compiler race in universal mode.
5752 test "$am__universal" = false || continue
5755 # After this tag, mechanisms are not by side-effect, so they'll
5756 # only be used when explicitly requested.
5757 if test "x$enable_dependency_tracking" = xyes; then
5763 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5764 # This compiler won't grok '-c -o', but also, the minuso test has
5765 # not run yet. These depmodes are late enough in the game, and
5766 # so weak that their functioning should not be impacted.
5767 am__obj=conftest.${OBJEXT-o}
5772 if depmode=$depmode \
5773 source=sub/conftest.c object=$am__obj \
5774 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5775 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5776 >/dev/null 2>conftest.err &&
5777 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5778 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5779 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5780 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5781 # icc doesn't choke on unknown options, it will just issue warnings
5782 # or remarks (even with -Werror). So we grep stderr for any message
5783 # that says an option was ignored or not supported.
5784 # When given -MP, icc 7.0 and 7.1 complain thusly:
5785 # icc: Command line warning: ignoring option '-M'; no argument required
5786 # The diagnosis changed in icc 8.0:
5787 # icc: Command line remark: option '-MP' not supported
5788 if (grep 'ignoring option' conftest.err ||
5789 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5790 am_cv_CC_dependencies_compiler_type=$depmode
5799 am_cv_CC_dependencies_compiler_type=none
5803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5804 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5805 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5808 test "x$enable_dependency_tracking" != xno \
5809 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5811 am__fastdepCC_FALSE='#'
5813 am__fastdepCC_TRUE='#'
5814 am__fastdepCC_FALSE=
5820 HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
5822 if test -n "$ac_tool_prefix"; then
5823 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5824 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826 printf %s "checking for $ac_word... " >&6; }
5827 if test ${ac_cv_prog_RANLIB+y}
5829 printf %s "(cached) " >&6
5831 if test -n "$RANLIB"; then
5832 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838 case $as_dir in #(((
5841 *) as_dir=$as_dir/ ;;
5843 for ac_exec_ext in '' $ac_executable_extensions; do
5844 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5845 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5846 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5855 RANLIB=$ac_cv_prog_RANLIB
5856 if test -n "$RANLIB"; then
5857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5858 printf "%s\n" "$RANLIB" >&6; }
5860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861 printf "%s\n" "no" >&6; }
5866 if test -z "$ac_cv_prog_RANLIB"; then
5867 ac_ct_RANLIB=$RANLIB
5868 # Extract the first word of "ranlib", so it can be a program name with args.
5869 set dummy ranlib; ac_word=$2
5870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5871 printf %s "checking for $ac_word... " >&6; }
5872 if test ${ac_cv_prog_ac_ct_RANLIB+y}
5874 printf %s "(cached) " >&6
5876 if test -n "$ac_ct_RANLIB"; then
5877 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5883 case $as_dir in #(((
5886 *) as_dir=$as_dir/ ;;
5888 for ac_exec_ext in '' $ac_executable_extensions; do
5889 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5890 ac_cv_prog_ac_ct_RANLIB="ranlib"
5891 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5900 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5901 if test -n "$ac_ct_RANLIB"; then
5902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5903 printf "%s\n" "$ac_ct_RANLIB" >&6; }
5905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5906 printf "%s\n" "no" >&6; }
5909 if test "x$ac_ct_RANLIB" = x; then
5912 case $cross_compiling:$ac_tool_warned in
5914 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5915 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5916 ac_tool_warned=yes ;;
5918 RANLIB=$ac_ct_RANLIB
5921 RANLIB="$ac_cv_prog_RANLIB"
5925 ac_header= ac_cache=
5926 for ac_item in $ac_header_c_list
5928 if test $ac_cache; then
5929 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5930 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5931 printf "%s\n" "#define $ac_item 1" >> confdefs.h
5933 ac_header= ac_cache=
5934 elif test $ac_header; then
5946 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
5948 printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
5950 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5953 ac_fn_c_check_header_compile "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5954 if test "x$ac_cv_header_minix_config_h" = xyes
5961 if test "$MINIX" = yes; then
5963 printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
5966 printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
5969 printf "%s\n" "#define _MINIX 1" >>confdefs.h
5972 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5977 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5978 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5979 if test ${ac_cv_safe_to_define___extensions__+y}
5981 printf %s "(cached) " >&6
5983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5984 /* end confdefs.h. */
5986 # define __EXTENSIONS__ 1
5987 $ac_includes_default
5996 if ac_fn_c_try_compile "$LINENO"
5998 ac_cv_safe_to_define___extensions__=yes
6000 ac_cv_safe_to_define___extensions__=no
6002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6004 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6005 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
6006 test $ac_cv_safe_to_define___extensions__ = yes &&
6007 printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
6009 printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
6011 printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6013 printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
6015 printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
6017 printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
6019 printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6021 printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
6023 printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
6025 printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
6027 printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
6029 printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
6031 printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
6033 printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
6035 printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
6037 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6038 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6039 if test ${ac_cv_should_define__xopen_source+y}
6041 printf %s "(cached) " >&6
6043 ac_cv_should_define__xopen_source=no
6044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6045 /* end confdefs.h. */
6057 if ac_fn_c_try_compile "$LINENO"
6061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h. */
6064 #define _XOPEN_SOURCE 500
6075 if ac_fn_c_try_compile "$LINENO"
6077 ac_cv_should_define__xopen_source=yes
6079 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6084 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
6085 test $ac_cv_should_define__xopen_source = yes &&
6086 printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
6088 printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
6098 ac_cpp='$CPP $CPPFLAGS'
6099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6103 printf %s "checking how to run the C preprocessor... " >&6; }
6104 # On Suns, sometimes $CPP names a directory.
6105 if test -n "$CPP" && test -d "$CPP"; then
6108 if test -z "$CPP"; then
6109 if test ${ac_cv_prog_CPP+y}
6111 printf %s "(cached) " >&6
6113 # Double quotes because CPP needs to be expanded
6114 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
6117 for ac_c_preproc_warn_flag in '' yes
6119 # Use a header file that comes with gcc, so configuring glibc
6120 # with a fresh cross-compiler works.
6121 # On the NeXT, cc -E runs the code through the compiler's parser,
6122 # not just through cpp. "Syntax error" is here to catch this case.
6123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6124 /* end confdefs.h. */
6128 if ac_fn_c_try_cpp "$LINENO"
6132 # Broken: fails on valid input.
6135 rm -f conftest.err conftest.i conftest.$ac_ext
6137 # OK, works on sane cases. Now check whether nonexistent headers
6138 # can be detected and how.
6139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6140 /* end confdefs.h. */
6141 #include <ac_nonexistent.h>
6143 if ac_fn_c_try_cpp "$LINENO"
6145 # Broken: success on invalid input.
6148 # Passes both tests.
6152 rm -f conftest.err conftest.i conftest.$ac_ext
6155 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6156 rm -f conftest.i conftest.err conftest.$ac_ext
6170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6171 printf "%s\n" "$CPP" >&6; }
6173 for ac_c_preproc_warn_flag in '' yes
6175 # Use a header file that comes with gcc, so configuring glibc
6176 # with a fresh cross-compiler works.
6177 # On the NeXT, cc -E runs the code through the compiler's parser,
6178 # not just through cpp. "Syntax error" is here to catch this case.
6179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6180 /* end confdefs.h. */
6184 if ac_fn_c_try_cpp "$LINENO"
6188 # Broken: fails on valid input.
6191 rm -f conftest.err conftest.i conftest.$ac_ext
6193 # OK, works on sane cases. Now check whether nonexistent headers
6194 # can be detected and how.
6195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6196 /* end confdefs.h. */
6197 #include <ac_nonexistent.h>
6199 if ac_fn_c_try_cpp "$LINENO"
6201 # Broken: success on invalid input.
6204 # Passes both tests.
6208 rm -f conftest.err conftest.i conftest.$ac_ext
6211 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6212 rm -f conftest.i conftest.err conftest.$ac_ext
6217 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6218 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6219 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6220 See \`config.log' for more details" "$LINENO" 5; }
6224 ac_cpp='$CPP $CPPFLAGS'
6225 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6226 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6227 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6231 printf %s "checking for grep that handles long lines and -e... " >&6; }
6232 if test ${ac_cv_path_GREP+y}
6234 printf %s "(cached) " >&6
6236 if test -z "$GREP"; then
6237 ac_path_GREP_found=false
6238 # Loop through the user's path and test for each of PROGNAME-LIST
6239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6243 case $as_dir in #(((
6246 *) as_dir=$as_dir/ ;;
6248 for ac_prog in grep ggrep
6250 for ac_exec_ext in '' $ac_executable_extensions; do
6251 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
6252 as_fn_executable_p "$ac_path_GREP" || continue
6253 # Check for GNU ac_path_GREP and select it if it is found.
6254 # Check for GNU $ac_path_GREP
6255 case `"$ac_path_GREP" --version 2>&1` in
6257 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6260 printf %s 0123456789 >"conftest.in"
6263 cat "conftest.in" "conftest.in" >"conftest.tmp"
6264 mv "conftest.tmp" "conftest.in"
6265 cp "conftest.in" "conftest.nl"
6266 printf "%s\n" 'GREP' >> "conftest.nl"
6267 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6268 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6269 as_fn_arith $ac_count + 1 && ac_count=$as_val
6270 if test $ac_count -gt ${ac_path_GREP_max-0}; then
6271 # Best one so far, save it but keep looking for a better one
6272 ac_cv_path_GREP="$ac_path_GREP"
6273 ac_path_GREP_max=$ac_count
6275 # 10*(2^10) chars as input seems more than enough
6276 test $ac_count -gt 10 && break
6278 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6281 $ac_path_GREP_found && break 3
6286 if test -z "$ac_cv_path_GREP"; then
6287 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6290 ac_cv_path_GREP=$GREP
6294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6295 printf "%s\n" "$ac_cv_path_GREP" >&6; }
6296 GREP="$ac_cv_path_GREP"
6299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6300 printf %s "checking for egrep... " >&6; }
6301 if test ${ac_cv_path_EGREP+y}
6303 printf %s "(cached) " >&6
6305 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6306 then ac_cv_path_EGREP="$GREP -E"
6308 if test -z "$EGREP"; then
6309 ac_path_EGREP_found=false
6310 # Loop through the user's path and test for each of PROGNAME-LIST
6311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6315 case $as_dir in #(((
6318 *) as_dir=$as_dir/ ;;
6320 for ac_prog in egrep
6322 for ac_exec_ext in '' $ac_executable_extensions; do
6323 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
6324 as_fn_executable_p "$ac_path_EGREP" || continue
6325 # Check for GNU ac_path_EGREP and select it if it is found.
6326 # Check for GNU $ac_path_EGREP
6327 case `"$ac_path_EGREP" --version 2>&1` in
6329 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6332 printf %s 0123456789 >"conftest.in"
6335 cat "conftest.in" "conftest.in" >"conftest.tmp"
6336 mv "conftest.tmp" "conftest.in"
6337 cp "conftest.in" "conftest.nl"
6338 printf "%s\n" 'EGREP' >> "conftest.nl"
6339 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6340 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6341 as_fn_arith $ac_count + 1 && ac_count=$as_val
6342 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6343 # Best one so far, save it but keep looking for a better one
6344 ac_cv_path_EGREP="$ac_path_EGREP"
6345 ac_path_EGREP_max=$ac_count
6347 # 10*(2^10) chars as input seems more than enough
6348 test $ac_count -gt 10 && break
6350 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6353 $ac_path_EGREP_found && break 3
6358 if test -z "$ac_cv_path_EGREP"; then
6359 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6362 ac_cv_path_EGREP=$EGREP
6367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6368 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
6369 EGREP="$ac_cv_path_EGREP"
6375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6376 printf %s "checking for Minix Amsterdam compiler... " >&6; }
6377 if test ${gl_cv_c_amsterdam_compiler+y}
6379 printf %s "(cached) " >&6
6382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6383 /* end confdefs.h. */
6390 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6391 $EGREP "Amsterdam" >/dev/null 2>&1
6393 gl_cv_c_amsterdam_compiler=yes
6395 gl_cv_c_amsterdam_compiler=no
6401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6402 printf "%s\n" "$gl_cv_c_amsterdam_compiler" >&6; }
6404 if test $gl_cv_c_amsterdam_compiler = yes; then
6405 if test -z "$AR"; then
6408 if test -z "$ARFLAGS"; then
6415 if test -n "$ac_tool_prefix"; then
6416 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6417 set dummy ${ac_tool_prefix}ar; ac_word=$2
6418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6419 printf %s "checking for $ac_word... " >&6; }
6420 if test ${ac_cv_prog_AR+y}
6422 printf %s "(cached) " >&6
6424 if test -n "$AR"; then
6425 ac_cv_prog_AR="$AR" # Let the user override the test.
6427 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431 case $as_dir in #(((
6434 *) as_dir=$as_dir/ ;;
6436 for ac_exec_ext in '' $ac_executable_extensions; do
6437 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6438 ac_cv_prog_AR="${ac_tool_prefix}ar"
6439 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6449 if test -n "$AR"; then
6450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6451 printf "%s\n" "$AR" >&6; }
6453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454 printf "%s\n" "no" >&6; }
6459 if test -z "$ac_cv_prog_AR"; then
6461 # Extract the first word of "ar", so it can be a program name with args.
6462 set dummy ar; ac_word=$2
6463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6464 printf %s "checking for $ac_word... " >&6; }
6465 if test ${ac_cv_prog_ac_ct_AR+y}
6467 printf %s "(cached) " >&6
6469 if test -n "$ac_ct_AR"; then
6470 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6472 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6476 case $as_dir in #(((
6479 *) as_dir=$as_dir/ ;;
6481 for ac_exec_ext in '' $ac_executable_extensions; do
6482 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6483 ac_cv_prog_ac_ct_AR="ar"
6484 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6493 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6494 if test -n "$ac_ct_AR"; then
6495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6496 printf "%s\n" "$ac_ct_AR" >&6; }
6498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6499 printf "%s\n" "no" >&6; }
6502 if test "x$ac_ct_AR" = x; then
6505 case $cross_compiling:$ac_tool_warned in
6507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6508 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6509 ac_tool_warned=yes ;;
6517 if test -z "$ARFLAGS"; then
6523 if test -z "$RANLIB"; then
6524 if test $gl_cv_c_amsterdam_compiler = yes; then
6527 if test -n "$ac_tool_prefix"; then
6528 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6529 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6530 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531 printf %s "checking for $ac_word... " >&6; }
6532 if test ${ac_cv_prog_RANLIB+y}
6534 printf %s "(cached) " >&6
6536 if test -n "$RANLIB"; then
6537 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543 case $as_dir in #(((
6546 *) as_dir=$as_dir/ ;;
6548 for ac_exec_ext in '' $ac_executable_extensions; do
6549 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6550 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6551 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6560 RANLIB=$ac_cv_prog_RANLIB
6561 if test -n "$RANLIB"; then
6562 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6563 printf "%s\n" "$RANLIB" >&6; }
6565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566 printf "%s\n" "no" >&6; }
6571 if test -z "$ac_cv_prog_RANLIB"; then
6572 ac_ct_RANLIB=$RANLIB
6573 # Extract the first word of "ranlib", so it can be a program name with args.
6574 set dummy ranlib; ac_word=$2
6575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6576 printf %s "checking for $ac_word... " >&6; }
6577 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6579 printf %s "(cached) " >&6
6581 if test -n "$ac_ct_RANLIB"; then
6582 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6584 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588 case $as_dir in #(((
6591 *) as_dir=$as_dir/ ;;
6593 for ac_exec_ext in '' $ac_executable_extensions; do
6594 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6595 ac_cv_prog_ac_ct_RANLIB="ranlib"
6596 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6605 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6606 if test -n "$ac_ct_RANLIB"; then
6607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6608 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611 printf "%s\n" "no" >&6; }
6614 if test "x$ac_ct_RANLIB" = x; then
6617 case $cross_compiling:$ac_tool_warned in
6619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6620 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6621 ac_tool_warned=yes ;;
6623 RANLIB=$ac_ct_RANLIB
6626 RANLIB="$ac_cv_prog_RANLIB"
6633 # Make sure we can run config.sub.
6634 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6635 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6638 printf %s "checking build system type... " >&6; }
6639 if test ${ac_cv_build+y}
6641 printf %s "(cached) " >&6
6643 ac_build_alias=$build_alias
6644 test "x$ac_build_alias" = x &&
6645 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6646 test "x$ac_build_alias" = x &&
6647 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6648 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6649 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6653 printf "%s\n" "$ac_cv_build" >&6; }
6654 case $ac_cv_build in
6656 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6659 ac_save_IFS=$IFS; IFS='-'
6665 # Remember, the first character of IFS is used to create $*,
6666 # except with old shells:
6669 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6673 printf %s "checking host system type... " >&6; }
6674 if test ${ac_cv_host+y}
6676 printf %s "(cached) " >&6
6678 if test "x$host_alias" = x; then
6679 ac_cv_host=$ac_cv_build
6681 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6682 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6687 printf "%s\n" "$ac_cv_host" >&6; }
6690 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6693 ac_save_IFS=$IFS; IFS='-'
6699 # Remember, the first character of IFS is used to create $*,
6700 # except with old shells:
6703 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6709 # IEEE behaviour is the default on all CPUs except Alpha and SH
6710 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6711 # and the GCC 4.1.2 manual).
6714 # On Alpha systems, a compiler option provides the behaviour.
6715 # See the ieee(3) manual page, also available at
6716 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6717 if test -n "$GCC"; then
6718 # GCC has the option -mieee.
6719 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6720 CPPFLAGS="$CPPFLAGS -mieee"
6722 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6723 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6724 CPPFLAGS="$CPPFLAGS -ieee"
6728 if test -n "$GCC"; then
6729 # GCC has the option -mieee.
6730 CPPFLAGS="$CPPFLAGS -mieee"
6735 # Check whether --enable-largefile was given.
6736 if test ${enable_largefile+y}
6738 enableval=$enable_largefile;
6741 if test "$enable_largefile" != no; then
6743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6744 printf %s "checking for special C compiler options needed for large files... " >&6; }
6745 if test ${ac_cv_sys_largefile_CC+y}
6747 printf %s "(cached) " >&6
6749 ac_cv_sys_largefile_CC=no
6750 if test "$GCC" != yes; then
6753 # IRIX 6.2 and later do not support large files by default,
6754 # so use the C compiler's -n32 option if that helps.
6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756 /* end confdefs.h. */
6757 #include <sys/types.h>
6758 /* Check that off_t can represent 2**63 - 1 correctly.
6759 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6760 since some C++ compilers masquerading as C compilers
6761 incorrectly reject 9223372036854775807. */
6762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6763 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6764 && LARGE_OFF_T % 2147483647 == 1)
6774 if ac_fn_c_try_compile "$LINENO"
6778 rm -f core conftest.err conftest.$ac_objext
6780 if ac_fn_c_try_compile "$LINENO"
6782 ac_cv_sys_largefile_CC=' -n32'; break
6784 rm -f core conftest.err conftest.$ac_objext
6788 rm -f conftest.$ac_ext
6791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6792 printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; }
6793 if test "$ac_cv_sys_largefile_CC" != no; then
6794 CC=$CC$ac_cv_sys_largefile_CC
6797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6798 printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6799 if test ${ac_cv_sys_file_offset_bits+y}
6801 printf %s "(cached) " >&6
6804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6805 /* end confdefs.h. */
6806 #include <sys/types.h>
6807 /* Check that off_t can represent 2**63 - 1 correctly.
6808 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6809 since some C++ compilers masquerading as C compilers
6810 incorrectly reject 9223372036854775807. */
6811 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6812 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6813 && LARGE_OFF_T % 2147483647 == 1)
6823 if ac_fn_c_try_compile "$LINENO"
6825 ac_cv_sys_file_offset_bits=no; break
6827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6829 /* end confdefs.h. */
6830 #define _FILE_OFFSET_BITS 64
6831 #include <sys/types.h>
6832 /* Check that off_t can represent 2**63 - 1 correctly.
6833 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6834 since some C++ compilers masquerading as C compilers
6835 incorrectly reject 9223372036854775807. */
6836 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6837 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6838 && LARGE_OFF_T % 2147483647 == 1)
6848 if ac_fn_c_try_compile "$LINENO"
6850 ac_cv_sys_file_offset_bits=64; break
6852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6853 ac_cv_sys_file_offset_bits=unknown
6857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6858 printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; }
6859 case $ac_cv_sys_file_offset_bits in #(
6862 printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h
6866 if test $ac_cv_sys_file_offset_bits = unknown; then
6867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6868 printf %s "checking for _LARGE_FILES value needed for large files... " >&6; }
6869 if test ${ac_cv_sys_large_files+y}
6871 printf %s "(cached) " >&6
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h. */
6876 #include <sys/types.h>
6877 /* Check that off_t can represent 2**63 - 1 correctly.
6878 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6879 since some C++ compilers masquerading as C compilers
6880 incorrectly reject 9223372036854775807. */
6881 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6882 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6883 && LARGE_OFF_T % 2147483647 == 1)
6893 if ac_fn_c_try_compile "$LINENO"
6895 ac_cv_sys_large_files=no; break
6897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6899 /* end confdefs.h. */
6900 #define _LARGE_FILES 1
6901 #include <sys/types.h>
6902 /* Check that off_t can represent 2**63 - 1 correctly.
6903 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6904 since some C++ compilers masquerading as C compilers
6905 incorrectly reject 9223372036854775807. */
6906 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6907 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6908 && LARGE_OFF_T % 2147483647 == 1)
6918 if ac_fn_c_try_compile "$LINENO"
6920 ac_cv_sys_large_files=1; break
6922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923 ac_cv_sys_large_files=unknown
6927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6928 printf "%s\n" "$ac_cv_sys_large_files" >&6; }
6929 case $ac_cv_sys_large_files in #(
6932 printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h
6939 printf "%s\n" "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6946 # Pre-early section.
6951 # Code from module absolute-header:
6952 # Code from module accept:
6953 # Code from module accept-tests:
6954 # Code from module alloca:
6955 # Code from module alloca-opt:
6956 # Code from module alloca-opt-tests:
6957 # Code from module allocator:
6958 # Code from module announce-gen:
6959 # Code from module areadlink:
6960 # Code from module areadlink-tests:
6961 # Code from module argmatch:
6962 # Code from module argmatch-tests:
6963 # Code from module arpa_inet:
6964 # Code from module arpa_inet-tests:
6965 # Code from module assure:
6966 # Code from module binary-io:
6967 # Code from module binary-io-tests:
6968 # Code from module bind:
6969 # Code from module bind-tests:
6970 # Code from module bitrotate:
6971 # Code from module bitrotate-tests:
6972 # Code from module btowc:
6973 # Code from module btowc-tests:
6974 # Code from module builtin-expect:
6975 # Code from module c-ctype:
6976 # Code from module c-ctype-tests:
6977 # Code from module c-stack:
6978 # Code from module c-stack-tests:
6979 # Code from module c-strcase:
6980 # Code from module c-strcase-tests:
6981 # Code from module c-strcaseeq:
6982 # Code from module careadlinkat:
6983 # Code from module clock-time:
6984 # Code from module cloexec:
6985 # Code from module cloexec-tests:
6986 # Code from module close:
6987 # Code from module close-tests:
6988 # Code from module config-h:
6989 # Code from module connect:
6990 # Code from module connect-tests:
6991 # Code from module ctype:
6992 # Code from module ctype-tests:
6993 # Code from module diffseq:
6994 # Code from module dirname:
6995 # Code from module dirname-lgpl:
6996 # Code from module dirname-tests:
6997 # Code from module do-release-commit-and-tag:
6998 # Code from module dosname:
6999 # Code from module double-slash-root:
7000 # Code from module dtotimespec:
7001 # Code from module dup2:
7002 # Code from module dup2-tests:
7003 # Code from module environ:
7004 # Code from module environ-tests:
7005 # Code from module errno:
7006 # Code from module errno-tests:
7007 # Code from module error:
7008 # Code from module exclude:
7009 # Code from module exclude-tests:
7010 # Code from module exitfail:
7011 # Code from module extensions:
7012 # Code from module extern-inline:
7013 # Code from module fcntl:
7014 # Code from module fcntl-h:
7015 # Code from module fcntl-h-tests:
7016 # Code from module fcntl-tests:
7017 # Code from module fd-hook:
7018 # Code from module fdl:
7019 # Code from module fdopen:
7020 # Code from module fdopen-tests:
7021 # Code from module fgetc-tests:
7022 # Code from module file-type:
7023 # Code from module filename:
7024 # Code from module filenamecat:
7025 # Code from module filenamecat-lgpl:
7026 # Code from module filenamecat-tests:
7027 # Code from module flexmember:
7028 # Code from module float:
7029 # Code from module float-tests:
7030 # Code from module fnmatch:
7031 # Code from module fnmatch-gnu:
7032 # Code from module fnmatch-h:
7033 # Code from module fnmatch-h-tests:
7034 # Code from module fnmatch-tests:
7035 # Code from module fpieee:
7037 # Code from module fpucw:
7038 # Code from module fputc-tests:
7039 # Code from module fread-tests:
7040 # Code from module freopen:
7041 # Code from module freopen-safer:
7042 # Code from module freopen-safer-tests:
7043 # Code from module freopen-tests:
7044 # Code from module fstat:
7045 # Code from module fstat-tests:
7046 # Code from module ftruncate:
7047 # Code from module ftruncate-tests:
7048 # Code from module fwrite-tests:
7049 # Code from module gendocs:
7050 # Code from module getcwd-lgpl:
7051 # Code from module getcwd-lgpl-tests:
7052 # Code from module getdtablesize:
7053 # Code from module getdtablesize-tests:
7054 # Code from module getopt:
7055 # Code from module getopt-gnu:
7056 # Code from module getopt-gnu-tests:
7057 # Code from module getopt-posix:
7058 # Code from module getopt-posix-tests:
7059 # Code from module getpagesize:
7060 # Code from module getprogname:
7061 # Code from module getprogname-tests:
7062 # Code from module gettext-h:
7063 # Code from module gettime:
7064 # Code from module gettimeofday:
7065 # Code from module gettimeofday-tests:
7066 # Code from module git-version-gen:
7067 # Code from module gitlog-to-changelog:
7068 # Code from module gnu-make:
7069 # Code from module gnu-web-doc-update:
7070 # Code from module gnumakefile:
7071 # Code from module gnupload:
7072 # Code from module gperf:
7073 # Code from module hard-locale:
7074 # Code from module hash:
7075 # Code from module hash-pjw:
7076 # Code from module hash-tests:
7077 # Code from module havelib:
7078 # Code from module iconv:
7079 # Code from module iconv-h:
7080 # Code from module iconv-h-tests:
7081 # Code from module iconv-tests:
7082 # Code from module iconv_open:
7083 # Code from module ignore-value:
7084 # Code from module ignore-value-tests:
7085 # Code from module include_next:
7086 # Code from module inet_pton:
7087 # Code from module inet_pton-tests:
7088 # Code from module inline:
7089 # Code from module intprops:
7090 # Code from module intprops-tests:
7091 # Code from module inttostr:
7092 # Code from module inttostr-tests:
7093 # Code from module inttypes:
7094 # Code from module inttypes-incomplete:
7095 # Code from module inttypes-tests:
7096 # Code from module ioctl:
7097 # Code from module ioctl-tests:
7098 # Code from module isblank:
7099 # Code from module isblank-tests:
7100 # Code from module iswblank:
7101 # Code from module iswblank-tests:
7102 # Code from module langinfo:
7103 # Code from module langinfo-tests:
7104 # Code from module largefile:
7106 # Code from module libc-config:
7107 # Code from module libsigsegv:
7108 # Code from module limits-h:
7109 # Code from module limits-h-tests:
7110 # Code from module listen:
7111 # Code from module listen-tests:
7112 # Code from module localcharset:
7113 # Code from module localcharset-tests:
7114 # Code from module locale:
7115 # Code from module locale-tests:
7116 # Code from module localeconv:
7117 # Code from module localeconv-tests:
7118 # Code from module localtime-buffer:
7119 # Code from module lstat:
7120 # Code from module lstat-tests:
7121 # Code from module maintainer-makefile:
7122 # Code from module malloc-posix:
7123 # Code from module malloca:
7124 # Code from module malloca-tests:
7125 # Code from module manywarnings:
7126 # Code from module mbchar:
7127 # Code from module mbiter:
7128 # Code from module mbrtowc:
7129 # Code from module mbrtowc-tests:
7130 # Code from module mbscasecmp:
7131 # Code from module mbscasecmp-tests:
7132 # Code from module mbsinit:
7133 # Code from module mbsinit-tests:
7134 # Code from module mbslen:
7135 # Code from module mbsrtowcs:
7136 # Code from module mbsrtowcs-tests:
7137 # Code from module mbsstr:
7138 # Code from module mbsstr-tests:
7139 # Code from module mbtowc:
7140 # Code from module mbuiter:
7141 # Code from module memchr:
7142 # Code from module memchr-tests:
7143 # Code from module minmax:
7144 # Code from module mkdir:
7145 # Code from module mkdir-tests:
7146 # Code from module mkstemp:
7147 # Code from module mktime:
7148 # Code from module mktime-internal:
7149 # Code from module msvc-inval:
7150 # Code from module msvc-nothrow:
7151 # Code from module multiarch:
7152 # Code from module nanosleep:
7153 # Code from module nanosleep-tests:
7154 # Code from module netinet_in:
7155 # Code from module netinet_in-tests:
7156 # Code from module nl_langinfo:
7157 # Code from module nl_langinfo-tests:
7158 # Code from module nocrash:
7159 # Code from module nstrftime:
7160 # Code from module nstrftime-tests:
7161 # Code from module open:
7162 # Code from module open-tests:
7163 # Code from module pathmax:
7164 # Code from module pathmax-tests:
7165 # Code from module perror:
7166 # Code from module perror-tests:
7167 # Code from module pipe-posix:
7168 # Code from module pipe-posix-tests:
7169 # Code from module progname:
7170 # Code from module propername:
7171 # Code from module putenv:
7172 # Code from module quote:
7173 # Code from module quotearg:
7174 # Code from module quotearg-simple:
7175 # Code from module quotearg-simple-tests:
7176 # Code from module raise:
7177 # Code from module raise-tests:
7178 # Code from module rawmemchr:
7179 # Code from module rawmemchr-tests:
7180 # Code from module readlink:
7181 # Code from module readlink-tests:
7182 # Code from module readme-release:
7183 # Code from module regex:
7184 # Code from module regex-tests:
7185 # Code from module same-inode:
7186 # Code from module select:
7187 # Code from module select-tests:
7188 # Code from module setenv:
7189 # Code from module setenv-tests:
7190 # Code from module setlocale:
7191 # Code from module setlocale-tests:
7192 # Code from module setsockopt:
7193 # Code from module setsockopt-tests:
7194 # Code from module sh-quote:
7195 # Code from module sh-quote-tests:
7196 # Code from module sigaction:
7197 # Code from module sigaction-tests:
7198 # Code from module signal:
7199 # Code from module signal-h:
7200 # Code from module signal-h-tests:
7201 # Code from module sigprocmask:
7202 # Code from module sigprocmask-tests:
7203 # Code from module size_max:
7204 # Code from module sleep:
7205 # Code from module sleep-tests:
7206 # Code from module snippet/_Noreturn:
7207 # Code from module snippet/arg-nonnull:
7208 # Code from module snippet/c++defs:
7209 # Code from module snippet/unused-parameter:
7210 # Code from module snippet/warn-on-use:
7211 # Code from module snprintf:
7212 # Code from module snprintf-tests:
7213 # Code from module socket:
7214 # Code from module socketlib:
7215 # Code from module sockets:
7216 # Code from module sockets-tests:
7217 # Code from module socklen:
7218 # Code from module ssize_t:
7219 # Code from module stat:
7220 # Code from module stat-macros:
7221 # Code from module stat-tests:
7222 # Code from module stat-time:
7223 # Code from module stat-time-tests:
7224 # Code from module stdalign:
7225 # Code from module stdalign-tests:
7226 # Code from module stdarg:
7230 # Code from module stdbool:
7231 # Code from module stdbool-tests:
7232 # Code from module stddef:
7233 # Code from module stddef-tests:
7234 # Code from module stdint:
7235 # Code from module stdint-tests:
7236 # Code from module stdio:
7237 # Code from module stdio-tests:
7238 # Code from module stdlib:
7239 # Code from module stdlib-tests:
7240 # Code from module strcase:
7241 # Code from module streq:
7242 # Code from module strerror:
7243 # Code from module strerror-override:
7244 # Code from module strerror-tests:
7245 # Code from module strerror_r-posix:
7246 # Code from module strerror_r-posix-tests:
7247 # Code from module strftime:
7248 # Code from module striconv:
7249 # Code from module striconv-tests:
7250 # Code from module string:
7251 # Code from module string-tests:
7252 # Code from module strings:
7253 # Code from module strings-tests:
7254 # Code from module strndup:
7255 # Code from module strnlen:
7256 # Code from module strnlen-tests:
7257 # Code from module strnlen1:
7258 # Code from module strptime:
7259 # Code from module strtoull:
7260 # Code from module strtoull-tests:
7261 # Code from module strtoumax:
7262 # Code from module strtoumax-tests:
7263 # Code from module symlink:
7264 # Code from module symlink-tests:
7265 # Code from module sys_ioctl:
7266 # Code from module sys_ioctl-tests:
7267 # Code from module sys_select:
7268 # Code from module sys_select-tests:
7269 # Code from module sys_socket:
7270 # Code from module sys_socket-tests:
7271 # Code from module sys_stat:
7272 # Code from module sys_stat-tests:
7273 # Code from module sys_time:
7274 # Code from module sys_time-tests:
7275 # Code from module sys_types:
7276 # Code from module sys_types-tests:
7277 # Code from module sys_uio:
7278 # Code from module sys_uio-tests:
7279 # Code from module sys_wait:
7280 # Code from module sys_wait-tests:
7281 # Code from module system-quote:
7282 # Code from module tempname:
7283 # Code from module test-framework-sh:
7284 # Code from module test-framework-sh-tests:
7285 # Code from module time:
7286 # Code from module time-tests:
7287 # Code from module time_r:
7288 # Code from module time_rz:
7289 # Code from module timegm:
7290 # Code from module timespec:
7291 # Code from module timespec-add:
7292 # Code from module timespec-sub:
7293 # Code from module timespec-tests:
7294 # Code from module trim:
7295 # Code from module tzset:
7296 # Code from module unistd:
7297 # Code from module unistd-tests:
7298 # Code from module unistr/base:
7299 # Code from module unistr/u8-mbtoucr:
7300 # Code from module unistr/u8-mbtoucr-tests:
7301 # Code from module unistr/u8-uctomb:
7302 # Code from module unistr/u8-uctomb-tests:
7303 # Code from module unitypes:
7304 # Code from module uniwidth/base:
7305 # Code from module uniwidth/width:
7306 # Code from module uniwidth/width-tests:
7307 # Code from module unlocked-io:
7308 # Code from module unsetenv:
7309 # Code from module unsetenv-tests:
7310 # Code from module update-copyright:
7311 # Code from module update-copyright-tests:
7312 # Code from module useless-if-before-free:
7313 # Code from module vararrays:
7314 # Code from module vasnprintf:
7315 # Code from module vasnprintf-tests:
7316 # Code from module vasprintf:
7317 # Code from module vasprintf-tests:
7318 # Code from module vc-list-files:
7319 # Code from module vc-list-files-tests:
7320 # Code from module verify:
7321 # Code from module verify-tests:
7322 # Code from module version-etc:
7323 # Code from module version-etc-fsf:
7324 # Code from module version-etc-tests:
7325 # Code from module warnings:
7326 # Code from module wchar:
7327 # Code from module wchar-tests:
7328 # Code from module wcrtomb:
7329 # Code from module wcrtomb-tests:
7330 # Code from module wctob:
7331 # Code from module wctomb:
7332 # Code from module wctype-h:
7333 # Code from module wctype-h-tests:
7334 # Code from module wcwidth:
7335 # Code from module wcwidth-tests:
7336 # Code from module xalloc:
7337 # Code from module xalloc-die:
7338 # Code from module xalloc-die-tests:
7339 # Code from module xalloc-oversized:
7340 # Code from module xfreopen:
7341 # Code from module xreadlink:
7342 # Code from module xsize:
7343 # Code from module xstriconv:
7344 # Code from module xstrndup:
7345 # Code from module xstrtol:
7346 # Code from module xstrtol-tests:
7347 # Code from module xstrtoumax:
7348 # Code from module xstrtoumax-tests:
7349 # Code from module xvasprintf:
7350 # Code from module xvasprintf-tests:
7358 LIBC_FATAL_STDERR_=1
7359 export LIBC_FATAL_STDERR_
7361 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7362 if test "x$ac_cv_type_size_t" = xyes
7367 printf "%s\n" "#define size_t unsigned int" >>confdefs.h
7371 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7372 # for constant arguments. Useless!
7373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7374 printf %s "checking for working alloca.h... " >&6; }
7375 if test ${ac_cv_working_alloca_h+y}
7377 printf %s "(cached) " >&6
7379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7380 /* end confdefs.h. */
7385 char *p = (char *) alloca (2 * sizeof (int));
7391 if ac_fn_c_try_link "$LINENO"
7393 ac_cv_working_alloca_h=yes
7395 ac_cv_working_alloca_h=no
7397 rm -f core conftest.err conftest.$ac_objext \
7398 conftest$ac_exeext conftest.$ac_ext
7400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7401 printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
7402 if test $ac_cv_working_alloca_h = yes; then
7404 printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
7408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7409 printf %s "checking for alloca... " >&6; }
7410 if test ${ac_cv_func_alloca_works+y}
7412 printf %s "(cached) " >&6
7414 if test $ac_cv_working_alloca_h = yes; then
7415 ac_cv_func_alloca_works=yes
7417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7418 /* end confdefs.h. */
7423 # define alloca __builtin_alloca
7424 # elif defined _MSC_VER
7425 # include <malloc.h>
7426 # define alloca _alloca
7431 void *alloca (size_t);
7438 char *p = (char *) alloca (1);
7444 if ac_fn_c_try_link "$LINENO"
7446 ac_cv_func_alloca_works=yes
7448 ac_cv_func_alloca_works=no
7450 rm -f core conftest.err conftest.$ac_objext \
7451 conftest$ac_exeext conftest.$ac_ext
7453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7454 printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
7457 if test $ac_cv_func_alloca_works = yes; then
7459 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
7462 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7463 # that cause trouble. Some versions do not even contain alloca or
7464 # contain a buggy version. If you still want to use their alloca,
7465 # use ar to extract alloca.o from them instead of compiling alloca.c.
7471 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7473 printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
7476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7477 printf %s "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7478 if test ${ac_cv_os_cray+y}
7480 printf %s "(cached) " >&6
7482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7483 /* end confdefs.h. */
7484 #if defined CRAY && ! defined CRAY2
7491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7492 $EGREP "webecray" >/dev/null 2>&1
7501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7502 printf "%s\n" "$ac_cv_os_cray" >&6; }
7503 if test $ac_cv_os_cray = yes; then
7504 for ac_func in _getb67 GETB67 getb67; do
7505 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
7506 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7507 if eval test \"x\$"$as_ac_var"\" = x"yes"
7510 printf "%s\n" "#define CRAY_STACKSEG_END $ac_func" >>confdefs.h
7518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7519 printf %s "checking stack direction for C alloca... " >&6; }
7520 if test ${ac_cv_c_stack_direction+y}
7522 printf %s "(cached) " >&6
7524 if test "$cross_compiling" = yes
7526 ac_cv_c_stack_direction=0
7528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7529 /* end confdefs.h. */
7530 $ac_includes_default
7532 find_stack_direction (int *addr, int depth)
7537 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7538 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7543 main (int argc, char **argv)
7545 return find_stack_direction (0, argc + !argv + 20) < 0;
7548 if ac_fn_c_try_run "$LINENO"
7550 ac_cv_c_stack_direction=1
7552 ac_cv_c_stack_direction=-1
7554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7555 conftest.$ac_objext conftest.beam conftest.$ac_ext
7559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7560 printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
7561 printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
7573 GNULIB_MBSNRTOWCS=0;
7576 GNULIB_WCSNRTOMBS=0;
7593 GNULIB_WCSCASECMP=0;
7594 GNULIB_WCSNCASECMP=0;
7646 HAVE_DECL_WCWIDTH=1;
7647 REPLACE_MBSTATE_T=0;
7653 REPLACE_MBSRTOWCS=0;
7654 REPLACE_MBSNRTOWCS=0;
7656 REPLACE_WCSRTOMBS=0;
7657 REPLACE_WCSNRTOMBS=0;
7663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7664 printf %s "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7665 if test ${gl_cv_header_wchar_h_correct_inline+y}
7667 printf %s "(cached) " >&6
7669 gl_cv_header_wchar_h_correct_inline=yes
7670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7671 /* end confdefs.h. */
7673 #define wcstod renamed_wcstod
7674 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7676 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7677 included before <wchar.h>. */
7682 extern int zero (void);
7683 int main () { return zero(); }
7686 save_ac_compile="$ac_compile"
7687 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7688 if echo '#include "conftest.c"' >conftest1.c &&
7689 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7690 (eval $ac_compile) 2>&5
7692 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7693 test $ac_status = 0; }; then
7694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695 /* end confdefs.h. */
7697 #define wcstod renamed_wcstod
7698 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
7700 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
7701 included before <wchar.h>. */
7706 int zero (void) { return 0; }
7709 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7710 if echo '#include "conftest.c"' >conftest2.c &&
7711 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7712 (eval $ac_compile) 2>&5
7714 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7715 test $ac_status = 0; }; then
7716 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
7719 gl_cv_header_wchar_h_correct_inline=no
7723 ac_compile="$save_ac_compile"
7724 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext
7727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7728 printf "%s\n" "$gl_cv_header_wchar_h_correct_inline" >&6; }
7729 if test $gl_cv_header_wchar_h_correct_inline = no; then
7730 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7731 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7732 C99 mode. You have four options:
7733 - Add the flag -fgnu89-inline to CC and reconfigure, or
7734 - Fix your include files, using parts of
7735 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7736 - Use a gcc version older than 4.3, or
7737 - Don't use the flags -std=c99 or -std=gnu99.
7738 Configuration aborted." "$LINENO" 5
7742 for ac_item in $ac_func_c_list
7744 if test $ac_func; then
7745 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
7746 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
7747 echo "#define $ac_item 1" >> confdefs.h
7755 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7756 printf %s "checking for nl_langinfo and CODESET... " >&6; }
7757 if test ${am_cv_langinfo_codeset+y}
7759 printf %s "(cached) " >&6
7761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7762 /* end confdefs.h. */
7763 #include <langinfo.h>
7767 char* cs = nl_langinfo(CODESET); return !cs;
7772 if ac_fn_c_try_link "$LINENO"
7774 am_cv_langinfo_codeset=yes
7776 am_cv_langinfo_codeset=no
7778 rm -f core conftest.err conftest.$ac_objext \
7779 conftest$ac_exeext conftest.$ac_ext
7782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7783 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
7784 if test $am_cv_langinfo_codeset = yes; then
7786 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7794 printf %s "checking for a traditional french locale... " >&6; }
7795 if test ${gt_cv_locale_fr+y}
7797 printf %s "(cached) " >&6
7800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801 /* end confdefs.h. */
7805 #if HAVE_LANGINFO_CODESET
7806 # include <langinfo.h>
7813 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7814 imitates locale dependent behaviour by looking at the environment
7815 variables, and all locales use the UTF-8 encoding. */
7816 #if defined __BEOS__ || defined __HAIKU__
7819 /* Check whether the given locale name is recognized by the system. */
7820 # if defined _WIN32 && !defined __CYGWIN__
7821 /* On native Windows, setlocale(category, "") looks at the system settings,
7822 not at the environment variables. Also, when an encoding suffix such
7823 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7824 category of the locale to "C". */
7825 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7826 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7829 if (setlocale (LC_ALL, "") == NULL) return 1;
7831 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7832 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7833 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7834 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7835 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7836 some unit tests fail.
7837 On MirBSD 10, when an unsupported locale is specified, setlocale()
7838 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7839 # if HAVE_LANGINFO_CODESET
7841 const char *cs = nl_langinfo (CODESET);
7842 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7843 || strcmp (cs, "UTF-8") == 0)
7848 /* On Cygwin, avoid locale names without encoding suffix, because the
7849 locale_charset() function relies on the encoding suffix. Note that
7850 LC_ALL is set on the command line. */
7851 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7853 /* Check whether in the abbreviation of the second month, the second
7854 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7855 one byte long. This excludes the UTF-8 encoding. */
7856 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7857 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7858 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7859 /* Check whether the decimal separator is a comma.
7860 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7861 are nl_langinfo(RADIXCHAR) are both ".". */
7862 if (localeconv () ->decimal_point[0] != ',') return 1;
7869 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7870 (eval $ac_link) 2>&5
7872 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7873 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7875 # Handle native Windows specially, because there setlocale() interprets
7876 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7877 # "fr" or "fra" as "French" or "French_France.1252",
7878 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7879 # "ja" as "Japanese" or "Japanese_Japan.932",
7882 # Test for the native Windows locale name.
7883 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7884 gt_cv_locale_fr=French_France.1252
7887 gt_cv_locale_fr=none
7891 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7892 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7893 # configure script would override the LC_ALL setting. Likewise for
7894 # LC_CTYPE, which is also set at the beginning of the configure script.
7895 # Test for the usual locale name.
7896 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7897 gt_cv_locale_fr=fr_FR
7899 # Test for the locale name with explicit encoding suffix.
7900 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7901 gt_cv_locale_fr=fr_FR.ISO-8859-1
7903 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7904 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7905 gt_cv_locale_fr=fr_FR.ISO8859-1
7907 # Test for the HP-UX locale name.
7908 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7909 gt_cv_locale_fr=fr_FR.iso88591
7911 # Test for the Solaris 7 locale name.
7912 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
7916 gt_cv_locale_fr=none
7928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7929 printf "%s\n" "$gt_cv_locale_fr" >&6; }
7930 LOCALE_FR=$gt_cv_locale_fr
7941 sunos4* | freebsd* | dragonfly* | openbsd* | mirbsd* | netbsd* | kfreebsd* | knetbsd*) # BSD systems
7942 FAULT_YIELDS_SIGBUS=1 ;;
7944 FAULT_YIELDS_SIGBUS=1 ;;
7945 macos* | darwin*) # Mac OS X
7946 FAULT_YIELDS_SIGBUS=1 ;;
7948 FAULT_YIELDS_SIGBUS=1 ;;
7950 FAULT_YIELDS_SIGBUS=0 ;;
7953 printf "%s\n" "#define FAULT_YIELDS_SIGBUS $FAULT_YIELDS_SIGBUS" >>confdefs.h
7956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working C stack overflow detection" >&5
7957 printf %s "checking for working C stack overflow detection... " >&6; }
7958 if test ${ac_cv_sys_stack_overflow_works+y}
7960 printf %s "(cached) " >&6
7962 if test "$cross_compiling" = yes
7965 # Guess no on native Windows.
7966 mingw*) ac_cv_sys_stack_overflow_works="guessing no" ;;
7967 *) ac_cv_sys_stack_overflow_works=cross-compiling ;;
7971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7972 /* end confdefs.h. */
7977 # include <sys/types.h>
7978 # include <sys/time.h>
7979 # include <sys/resource.h>
7982 # define SIGSTKSZ 16384
7987 char buffer[2 * SIGSTKSZ];
7991 } alternate_signal_stack;
7994 segv_handler (int signo)
8003 struct sigaction act;
8007 /* Use the midpoint to avoid Irix sigaltstack bug. */
8008 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8009 st.ss_size = SIGSTKSZ;
8010 r = sigaltstack (&st, 0);
8014 sigemptyset (&act.sa_mask);
8015 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND;
8016 act.sa_handler = segv_handler;
8017 #if FAULT_YIELDS_SIGBUS
8018 if (sigaction (SIGBUS, &act, 0) < 0)
8021 if (sigaction (SIGSEGV, &act, 0) < 0)
8025 static volatile int *
8026 recurse_1 (volatile int n, volatile int *p)
8029 *recurse_1 (n + 1, p) += n;
8033 recurse (volatile int n)
8036 return *recurse_1 (n, &sum);
8042 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8043 /* Before starting the endless recursion, try to be friendly
8044 to the user's machine. On some Linux 2.2.x systems, there
8045 is no stack limit for user processes at all. We don't want
8046 to kill such systems. */
8048 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8049 setrlimit (RLIMIT_STACK, &rl);
8052 result = c_stack_action ();
8059 if ac_fn_c_try_run "$LINENO"
8061 ac_cv_sys_stack_overflow_works=yes
8063 ac_cv_sys_stack_overflow_works=no
8065 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8066 conftest.$ac_objext conftest.beam conftest.$ac_ext
8071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_stack_overflow_works" >&5
8072 printf "%s\n" "$ac_cv_sys_stack_overflow_works" >&6; }
8074 if test "$ac_cv_sys_stack_overflow_works" = yes; then
8076 printf "%s\n" "#define HAVE_STACK_OVERFLOW_HANDLING 1" >>confdefs.h
8079 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for correct stack_t interpretation" >&5
8080 printf %s "checking for correct stack_t interpretation... " >&6; }
8081 if test ${gl_cv_sigaltstack_low_base+y}
8083 printf %s "(cached) " >&6
8086 if test "$cross_compiling" = yes
8088 gl_cv_sigaltstack_low_base=cross-compiling
8090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8091 /* end confdefs.h. */
8096 #if HAVE_SYS_SIGNAL_H
8097 # include <sys/signal.h>
8100 # define SIGSTKSZ 16384
8102 volatile char *stack_lower_bound;
8103 volatile char *stack_upper_bound;
8104 static void check_stack_location (volatile char *addr)
8106 if (addr >= stack_lower_bound && addr <= stack_upper_bound)
8111 static void stackoverflow_handler (int sig)
8114 check_stack_location (&dummy);
8118 char mystack[2 * SIGSTKSZ];
8120 struct sigaction action;
8121 /* Install the alternate stack. */
8122 altstack.ss_sp = mystack + SIGSTKSZ;
8123 altstack.ss_size = SIGSTKSZ;
8124 stack_lower_bound = (char *) altstack.ss_sp;
8125 stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
8126 altstack.ss_flags = 0; /* no SS_DISABLE */
8127 if (sigaltstack (&altstack, NULL) < 0)
8129 /* Install the SIGSEGV handler. */
8130 sigemptyset (&action.sa_mask);
8131 action.sa_handler = &stackoverflow_handler;
8132 action.sa_flags = SA_ONSTACK;
8133 if (sigaction (SIGSEGV, &action, (struct sigaction *) NULL) < 0)
8135 /* Provoke a SIGSEGV. */
8140 if ac_fn_c_try_run "$LINENO"
8142 gl_cv_sigaltstack_low_base=yes
8144 gl_cv_sigaltstack_low_base=no
8146 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8147 conftest.$ac_objext conftest.beam conftest.$ac_ext
8151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sigaltstack_low_base" >&5
8152 printf "%s\n" "$gl_cv_sigaltstack_low_base" >&6; }
8153 if test "$gl_cv_sigaltstack_low_base" = no; then
8155 printf "%s\n" "#define SIGALTSTACK_SS_REVERSED 1" >>confdefs.h
8159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for precise C stack overflow detection" >&5
8160 printf %s "checking for precise C stack overflow detection... " >&6; }
8161 if test ${ac_cv_sys_xsi_stack_overflow_heuristic+y}
8163 printf %s "(cached) " >&6
8165 case "${host_os}--${host_cpu}" in
8167 ac_cv_sys_xsi_stack_overflow_heuristic=no
8170 if test "$cross_compiling" = yes
8172 ac_cv_sys_xsi_stack_overflow_heuristic=cross-compiling
8174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8175 /* end confdefs.h. */
8180 # include <ucontext.h>
8183 # include <sys/types.h>
8184 # include <sys/time.h>
8185 # include <sys/resource.h>
8188 # define SIGSTKSZ 16384
8193 char buffer[2 * SIGSTKSZ];
8197 } alternate_signal_stack;
8200 # define find_stack_direction(ptr) STACK_DIRECTION
8203 find_stack_direction (char const *addr)
8206 return (! addr ? find_stack_direction (&dummy)
8207 : addr < &dummy ? 1 : -1);
8212 segv_handler (int signo, siginfo_t *info, void *context)
8214 if (0 < info->si_code)
8216 /* For XSI heuristics to work, we need uc_stack to
8217 describe the interrupted stack (as on Solaris), and
8218 not the currently executing stack (as on Linux). */
8219 ucontext_t const *user_context = context;
8220 char const *stack_min = user_context->uc_stack.ss_sp;
8221 size_t stack_size = user_context->uc_stack.ss_size;
8222 char const *faulting_address = info->si_addr;
8223 size_t s = faulting_address - stack_min;
8224 size_t page_size = sysconf (_SC_PAGESIZE);
8225 if (find_stack_direction (0) < 0)
8227 if (s < stack_size + page_size)
8238 struct sigaction act;
8242 /* Use the midpoint to avoid Irix sigaltstack bug. */
8243 st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
8244 st.ss_size = SIGSTKSZ;
8245 r = sigaltstack (&st, 0);
8249 sigemptyset (&act.sa_mask);
8250 act.sa_flags = SA_NODEFER | SA_ONSTACK | SA_RESETHAND | SA_SIGINFO;
8251 act.sa_sigaction = segv_handler;
8252 #if FAULT_YIELDS_SIGBUS
8253 if (sigaction (SIGBUS, &act, 0) < 0)
8256 if (sigaction (SIGSEGV, &act, 0) < 0)
8260 static volatile int *
8261 recurse_1 (volatile int n, volatile int *p)
8264 *recurse_1 (n + 1, p) += n;
8268 recurse (volatile int n)
8271 return *recurse_1 (n, &sum);
8277 #if HAVE_SETRLIMIT && defined RLIMIT_STACK
8278 /* Before starting the endless recursion, try to be friendly
8279 to the user's machine. On some Linux 2.2.x systems, there
8280 is no stack limit for user processes at all. We don't want
8281 to kill such systems. */
8283 rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */
8284 setrlimit (RLIMIT_STACK, &rl);
8287 result = c_stack_action ();
8294 if ac_fn_c_try_run "$LINENO"
8296 ac_cv_sys_xsi_stack_overflow_heuristic=yes
8298 ac_cv_sys_xsi_stack_overflow_heuristic=no
8300 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8301 conftest.$ac_objext conftest.beam conftest.$ac_ext
8308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_xsi_stack_overflow_heuristic" >&5
8309 printf "%s\n" "$ac_cv_sys_xsi_stack_overflow_heuristic" >&6; }
8311 if test $ac_cv_sys_xsi_stack_overflow_heuristic = yes; then
8313 printf "%s\n" "#define HAVE_XSI_STACK_OVERFLOW_HEURISTIC 1" >>confdefs.h
8318 if test "X$prefix" = "XNONE"; then
8319 acl_final_prefix="$ac_default_prefix"
8321 acl_final_prefix="$prefix"
8323 if test "X$exec_prefix" = "XNONE"; then
8324 acl_final_exec_prefix='${prefix}'
8326 acl_final_exec_prefix="$exec_prefix"
8328 acl_save_prefix="$prefix"
8329 prefix="$acl_final_prefix"
8330 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8331 prefix="$acl_save_prefix"
8335 # Check whether --with-gnu-ld was given.
8336 if test ${with_gnu_ld+y}
8338 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8343 # Prepare PATH_SEPARATOR.
8344 # The user is always right.
8345 if test "${PATH_SEPARATOR+set}" != set; then
8346 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
8347 # contains only /bin. Note that ksh looks also at the FPATH variable,
8348 # so we have to set that as well for the test.
8350 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8351 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
8352 || PATH_SEPARATOR=';'
8356 if test -n "$LD"; then
8357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5
8358 printf %s "checking for ld... " >&6; }
8359 elif test "$GCC" = yes; then
8360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
8361 printf %s "checking for ld used by $CC... " >&6; }
8362 elif test "$with_gnu_ld" = yes; then
8363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8364 printf %s "checking for GNU ld... " >&6; }
8366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8367 printf %s "checking for non-GNU ld... " >&6; }
8369 if test -n "$LD"; then
8370 # Let the user override the test with a path.
8373 if test ${acl_cv_path_LD+y}
8375 printf %s "(cached) " >&6
8378 acl_cv_path_LD= # Final result of this test
8379 ac_prog=ld # Program to search in $PATH
8380 if test "$GCC" = yes; then
8381 # Check if gcc -print-prog-name=ld gives a path.
8384 # gcc leaves a trailing carriage return which upsets mingw
8385 acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8387 acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
8390 # Accept absolute paths.
8392 re_direlt='/[^/][^/]*/\.\./'
8393 # Canonicalize the pathname of ld
8394 acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
8395 while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
8396 acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
8398 # Got the pathname. No search in PATH is needed.
8399 acl_cv_path_LD="$acl_output"
8403 # If it fails, then pretend we aren't using GCC.
8406 # If it is relative, then search for the first ld in PATH.
8411 if test -n "$ac_prog"; then
8412 # Search for $ac_prog in $PATH.
8413 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8414 for ac_dir in $PATH; do
8416 test -z "$ac_dir" && ac_dir=.
8417 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8418 acl_cv_path_LD="$ac_dir/$ac_prog"
8419 # Check to see if the program is GNU ld. I'd rather use --version,
8420 # but apparently some variants of GNU ld only accept -v.
8421 # Break only if it was the GNU/non-GNU ld that we prefer.
8422 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
8423 *GNU* | *'with BFD'*)
8424 test "$with_gnu_ld" != no && break
8427 test "$with_gnu_ld" != yes && break
8436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8437 /* end confdefs.h. */
8438 #if defined __powerpc64__ || defined _ARCH_PPC64
8445 if ac_fn_c_try_compile "$LINENO"
8447 # The compiler produces 64-bit code. Add option '-b64' so that the
8448 # linker groks 64-bit object files.
8449 case "$acl_cv_path_LD " in
8451 *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
8455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8459 /* end confdefs.h. */
8460 #if defined __sparcv9 || defined __arch64__
8467 if ac_fn_c_try_compile "$LINENO"
8471 # The compiler produces 32-bit code. Add option '-m elf32_sparc'
8472 # so that the linker groks 32-bit object files.
8473 case "$acl_cv_path_LD " in
8474 *" -m elf32_sparc "*) ;;
8475 *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
8479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8485 LD="$acl_cv_path_LD"
8487 if test -n "$LD"; then
8488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8489 printf "%s\n" "$LD" >&6; }
8491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 printf "%s\n" "no" >&6; }
8493 as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8496 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
8497 if test ${acl_cv_prog_gnu_ld+y}
8499 printf %s "(cached) " >&6
8501 # I'd rather use --version here, but apparently some GNU lds only accept -v.
8502 case `$LD -v 2>&1 </dev/null` in
8503 *GNU* | *'with BFD'*)
8504 acl_cv_prog_gnu_ld=yes
8507 acl_cv_prog_gnu_ld=no
8511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8512 printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; }
8513 with_gnu_ld=$acl_cv_prog_gnu_ld
8518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8519 printf %s "checking for shared library run path origin... " >&6; }
8520 if test ${acl_cv_rpath+y}
8522 printf %s "(cached) " >&6
8525 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8526 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8533 printf "%s\n" "$acl_cv_rpath" >&6; }
8535 acl_libext="$acl_cv_libext"
8536 acl_shlibext="$acl_cv_shlibext"
8537 acl_libname_spec="$acl_cv_libname_spec"
8538 acl_library_names_spec="$acl_cv_library_names_spec"
8539 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8540 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8541 acl_hardcode_direct="$acl_cv_hardcode_direct"
8542 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
8543 # Check whether --enable-rpath was given.
8544 if test ${enable_rpath+y}
8546 enableval=$enable_rpath; :
8554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5
8555 printf %s "checking 32-bit host C ABI... " >&6; }
8556 if test ${gl_cv_host_cpu_c_abi_32bit+y}
8558 printf %s "(cached) " >&6
8560 if test -n "$gl_cv_host_cpu_c_abi"; then
8561 case "$gl_cv_host_cpu_c_abi" in
8562 i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
8563 gl_cv_host_cpu_c_abi_32bit=yes ;;
8565 gl_cv_host_cpu_c_abi_32bit=no ;;
8571 gl_cv_host_cpu_c_abi_32bit=yes
8575 # On x86_64 systems, the C compiler may be generating code in one of
8577 # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
8578 # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
8579 # with native Windows (mingw, MSVC).
8580 # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
8581 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
8582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8583 /* end confdefs.h. */
8584 #if (defined __x86_64__ || defined __amd64__ \
8585 || defined _M_X64 || defined _M_AMD64) \
8586 && !(defined __ILP32__ || defined _ILP32)
8593 if ac_fn_c_try_compile "$LINENO"
8595 gl_cv_host_cpu_c_abi_32bit=no
8597 gl_cv_host_cpu_c_abi_32bit=yes
8599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8603 # Assume arm with EABI.
8604 # On arm64 systems, the C compiler may be generating code in one of
8606 # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
8607 # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
8608 # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
8609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8610 /* end confdefs.h. */
8611 #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
8618 if ac_fn_c_try_compile "$LINENO"
8620 gl_cv_host_cpu_c_abi_32bit=no
8622 gl_cv_host_cpu_c_abi_32bit=yes
8624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8627 hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
8628 # On hppa, the C compiler may be generating 32-bit code or 64-bit
8629 # code. In the latter case, it defines _LP64 and __LP64__.
8630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8631 /* end confdefs.h. */
8639 if ac_fn_c_try_compile "$LINENO"
8641 gl_cv_host_cpu_c_abi_32bit=no
8643 gl_cv_host_cpu_c_abi_32bit=yes
8645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8649 # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
8650 # 32-bit code. In the latter case, it defines _ILP32.
8651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8652 /* end confdefs.h. */
8660 if ac_fn_c_try_compile "$LINENO"
8662 gl_cv_host_cpu_c_abi_32bit=yes
8664 gl_cv_host_cpu_c_abi_32bit=no
8666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8670 # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
8672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8673 /* end confdefs.h. */
8674 #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
8681 if ac_fn_c_try_compile "$LINENO"
8683 gl_cv_host_cpu_c_abi_32bit=no
8685 gl_cv_host_cpu_c_abi_32bit=yes
8687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8691 # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
8692 # No need to distinguish them here; the caller may distinguish
8693 # them based on the OS.
8694 # On powerpc64 systems, the C compiler may still be generating
8695 # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
8696 # be generating 64-bit code.
8697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8698 /* end confdefs.h. */
8699 #if defined __powerpc64__ || defined _ARCH_PPC64
8706 if ac_fn_c_try_compile "$LINENO"
8708 gl_cv_host_cpu_c_abi_32bit=no
8710 gl_cv_host_cpu_c_abi_32bit=yes
8712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8716 gl_cv_host_cpu_c_abi_32bit=yes
8720 # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
8721 # Size of 'long' and 'void *':
8722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8723 /* end confdefs.h. */
8724 #if defined __LP64__
8731 if ac_fn_c_try_compile "$LINENO"
8733 gl_cv_host_cpu_c_abi_32bit=no
8735 gl_cv_host_cpu_c_abi_32bit=yes
8737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8741 # On s390x, the C compiler may be generating 64-bit (= s390x) code
8742 # or 31-bit (= s390) code.
8743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744 /* end confdefs.h. */
8745 #if defined __LP64__ || defined __s390x__
8752 if ac_fn_c_try_compile "$LINENO"
8754 gl_cv_host_cpu_c_abi_32bit=no
8756 gl_cv_host_cpu_c_abi_32bit=yes
8758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8762 # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
8763 # C compiler still generates 32-bit code.
8764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8765 /* end confdefs.h. */
8766 #if defined __sparcv9 || defined __arch64__
8773 if ac_fn_c_try_compile "$LINENO"
8775 gl_cv_host_cpu_c_abi_32bit=no
8777 gl_cv_host_cpu_c_abi_32bit=yes
8779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8783 gl_cv_host_cpu_c_abi_32bit=no
8789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5
8790 printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; }
8792 HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
8800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
8801 printf %s "checking for 64-bit host... " >&6; }
8802 if test ${gl_cv_solaris_64bit+y}
8804 printf %s "(cached) " >&6
8806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8807 /* end confdefs.h. */
8815 if ac_fn_c_try_compile "$LINENO"
8817 gl_cv_solaris_64bit=yes
8819 gl_cv_solaris_64bit=no
8821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8824 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
8825 printf "%s\n" "$gl_cv_solaris_64bit" >&6; };;
8828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5
8829 printf %s "checking for the common suffixes of directories in the library search path... " >&6; }
8830 if test ${acl_cv_libdirstems+y}
8832 printf %s "(cached) " >&6
8838 if test $gl_cv_solaris_64bit = yes; then
8839 acl_libdirstem=lib/64
8841 sparc*) acl_libdirstem2=lib/sparcv9 ;;
8842 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
8847 if test "$HOST_CPU_C_ABI_32BIT" != yes; then
8848 searchpath=`(if test -f /usr/bin/gcc \
8849 && LC_ALL=C /usr/bin/gcc -print-search-dirs >/dev/null 2>/dev/null; then \
8850 LC_ALL=C /usr/bin/gcc -print-search-dirs; \
8852 LC_ALL=C $CC -print-search-dirs; \
8854 | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
8855 if test -n "$searchpath"; then
8856 acl_save_IFS="${IFS= }"; IFS=":"
8857 for searchdir in $searchpath; do
8858 if test -d "$searchdir"; then
8859 case "$searchdir" in
8860 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
8862 # Better ignore directories of this form. They are misleading.
8864 *) searchdir=`cd "$searchdir" && pwd`
8865 case "$searchdir" in
8866 */lib64 ) acl_libdirstem=lib64 ;;
8876 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
8877 acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2"
8880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5
8881 printf "%s\n" "$acl_cv_libdirstems" >&6; }
8882 # Decompose acl_cv_libdirstems into acl_libdirstem and acl_libdirstem2.
8883 acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
8884 acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e '/,/s/.*,//'`
8901 acl_save_prefix="$prefix"
8902 prefix="$acl_final_prefix"
8903 acl_save_exec_prefix="$exec_prefix"
8904 exec_prefix="$acl_final_exec_prefix"
8906 eval additional_includedir=\"$includedir\"
8907 eval additional_libdir=\"$libdir\"
8909 exec_prefix="$acl_save_exec_prefix"
8910 prefix="$acl_save_prefix"
8913 # Check whether --with-libsigsegv-prefix was given.
8914 if test ${with_libsigsegv_prefix+y}
8916 withval=$with_libsigsegv_prefix;
8917 if test "X$withval" = "Xno"; then
8920 if test "X$withval" = "X"; then
8922 acl_save_prefix="$prefix"
8923 prefix="$acl_final_prefix"
8924 acl_save_exec_prefix="$exec_prefix"
8925 exec_prefix="$acl_final_exec_prefix"
8927 eval additional_includedir=\"$includedir\"
8928 eval additional_libdir=\"$libdir\"
8930 exec_prefix="$acl_save_exec_prefix"
8931 prefix="$acl_save_prefix"
8934 additional_includedir="$withval/include"
8935 additional_libdir="$withval/$acl_libdirstem"
8936 if test "$acl_libdirstem2" != "$acl_libdirstem" \
8937 && test ! -d "$withval/$acl_libdirstem"; then
8938 additional_libdir="$withval/$acl_libdirstem2"
8952 names_already_handled=
8953 names_next_round='sigsegv '
8954 while test -n "$names_next_round"; do
8955 names_this_round="$names_next_round"
8957 for name in $names_this_round; do
8959 for n in $names_already_handled; do
8960 if test "$n" = "$name"; then
8965 if test -z "$already_handled"; then
8966 names_already_handled="$names_already_handled $name"
8967 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
8968 eval value=\"\$HAVE_LIB$uppername\"
8969 if test -n "$value"; then
8970 if test "$value" = yes; then
8971 eval value=\"\$LIB$uppername\"
8972 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
8973 eval value=\"\$LTLIB$uppername\"
8974 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
8983 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
8984 if test -n "$acl_shlibext"; then
8985 shrext=".$acl_shlibext" # typically: shrext=.so
8989 if test $use_additional = yes; then
8990 dir="$additional_libdir"
8991 if test -n "$acl_shlibext"; then
8992 if test -f "$dir/$libname$shrext"; then
8994 found_so="$dir/$libname$shrext"
8996 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
8997 ver=`(cd "$dir" && \
8998 for f in "$libname$shrext".*; do echo "$f"; done \
8999 | sed -e "s,^$libname$shrext\\\\.,," \
9000 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9001 | sed 1q ) 2>/dev/null`
9002 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9004 found_so="$dir/$libname$shrext.$ver"
9007 eval library_names=\"$acl_library_names_spec\"
9008 for f in $library_names; do
9009 if test -f "$dir/$f"; then
9018 if test "X$found_dir" = "X"; then
9019 if test -f "$dir/$libname.$acl_libext"; then
9021 found_a="$dir/$libname.$acl_libext"
9024 if test "X$found_dir" != "X"; then
9025 if test -f "$dir/$libname.la"; then
9026 found_la="$dir/$libname.la"
9030 if test "X$found_dir" = "X"; then
9031 for x in $LDFLAGS $LTLIBSIGSEGV; do
9033 acl_save_prefix="$prefix"
9034 prefix="$acl_final_prefix"
9035 acl_save_exec_prefix="$exec_prefix"
9036 exec_prefix="$acl_final_exec_prefix"
9038 exec_prefix="$acl_save_exec_prefix"
9039 prefix="$acl_save_prefix"
9043 dir=`echo "X$x" | sed -e 's/^X-L//'`
9044 if test -n "$acl_shlibext"; then
9045 if test -f "$dir/$libname$shrext"; then
9047 found_so="$dir/$libname$shrext"
9049 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
9050 ver=`(cd "$dir" && \
9051 for f in "$libname$shrext".*; do echo "$f"; done \
9052 | sed -e "s,^$libname$shrext\\\\.,," \
9053 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
9054 | sed 1q ) 2>/dev/null`
9055 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
9057 found_so="$dir/$libname$shrext.$ver"
9060 eval library_names=\"$acl_library_names_spec\"
9061 for f in $library_names; do
9062 if test -f "$dir/$f"; then
9071 if test "X$found_dir" = "X"; then
9072 if test -f "$dir/$libname.$acl_libext"; then
9074 found_a="$dir/$libname.$acl_libext"
9077 if test "X$found_dir" != "X"; then
9078 if test -f "$dir/$libname.la"; then
9079 found_la="$dir/$libname.la"
9084 if test "X$found_dir" != "X"; then
9089 if test "X$found_dir" != "X"; then
9090 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
9091 if test "X$found_so" != "X"; then
9092 if test "$enable_rpath" = no \
9093 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
9094 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
9095 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9098 for x in $ltrpathdirs; do
9099 if test "X$x" = "X$found_dir"; then
9104 if test -z "$haveit"; then
9105 ltrpathdirs="$ltrpathdirs $found_dir"
9107 if test "$acl_hardcode_direct" = yes; then
9108 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9110 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
9111 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9113 for x in $rpathdirs; do
9114 if test "X$x" = "X$found_dir"; then
9119 if test -z "$haveit"; then
9120 rpathdirs="$rpathdirs $found_dir"
9124 for x in $LDFLAGS $LIBSIGSEGV; do
9126 acl_save_prefix="$prefix"
9127 prefix="$acl_final_prefix"
9128 acl_save_exec_prefix="$exec_prefix"
9129 exec_prefix="$acl_final_exec_prefix"
9131 exec_prefix="$acl_save_exec_prefix"
9132 prefix="$acl_save_prefix"
9134 if test "X$x" = "X-L$found_dir"; then
9139 if test -z "$haveit"; then
9140 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
9142 if test "$acl_hardcode_minus_L" != no; then
9143 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
9145 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9151 if test "X$found_a" != "X"; then
9152 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
9154 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
9157 additional_includedir=
9158 case "$found_dir" in
9159 */$acl_libdirstem | */$acl_libdirstem/)
9160 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
9161 if test "$name" = 'sigsegv'; then
9162 LIBSIGSEGV_PREFIX="$basedir"
9164 additional_includedir="$basedir/include"
9166 */$acl_libdirstem2 | */$acl_libdirstem2/)
9167 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
9168 if test "$name" = 'sigsegv'; then
9169 LIBSIGSEGV_PREFIX="$basedir"
9171 additional_includedir="$basedir/include"
9174 if test "X$additional_includedir" != "X"; then
9175 if test "X$additional_includedir" != "X/usr/include"; then
9177 if test "X$additional_includedir" = "X/usr/local/include"; then
9178 if test -n "$GCC"; then
9180 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9184 if test -z "$haveit"; then
9185 for x in $CPPFLAGS $INCSIGSEGV; do
9187 acl_save_prefix="$prefix"
9188 prefix="$acl_final_prefix"
9189 acl_save_exec_prefix="$exec_prefix"
9190 exec_prefix="$acl_final_exec_prefix"
9192 exec_prefix="$acl_save_exec_prefix"
9193 prefix="$acl_save_prefix"
9195 if test "X$x" = "X-I$additional_includedir"; then
9200 if test -z "$haveit"; then
9201 if test -d "$additional_includedir"; then
9202 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
9208 if test -n "$found_la"; then
9209 save_libdir="$libdir"
9211 */* | *\\*) . "$found_la" ;;
9212 *) . "./$found_la" ;;
9214 libdir="$save_libdir"
9215 for dep in $dependency_libs; do
9218 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9219 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
9220 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
9222 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
9223 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
9224 if test -n "$GCC"; then
9226 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
9230 if test -z "$haveit"; then
9232 for x in $LDFLAGS $LIBSIGSEGV; do
9234 acl_save_prefix="$prefix"
9235 prefix="$acl_final_prefix"
9236 acl_save_exec_prefix="$exec_prefix"
9237 exec_prefix="$acl_final_exec_prefix"
9239 exec_prefix="$acl_save_exec_prefix"
9240 prefix="$acl_save_prefix"
9242 if test "X$x" = "X-L$additional_libdir"; then
9247 if test -z "$haveit"; then
9248 if test -d "$additional_libdir"; then
9249 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
9253 for x in $LDFLAGS $LTLIBSIGSEGV; do
9255 acl_save_prefix="$prefix"
9256 prefix="$acl_final_prefix"
9257 acl_save_exec_prefix="$exec_prefix"
9258 exec_prefix="$acl_final_exec_prefix"
9260 exec_prefix="$acl_save_exec_prefix"
9261 prefix="$acl_save_prefix"
9263 if test "X$x" = "X-L$additional_libdir"; then
9268 if test -z "$haveit"; then
9269 if test -d "$additional_libdir"; then
9270 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
9277 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9278 if test "$enable_rpath" != no; then
9280 for x in $rpathdirs; do
9281 if test "X$x" = "X$dir"; then
9286 if test -z "$haveit"; then
9287 rpathdirs="$rpathdirs $dir"
9290 for x in $ltrpathdirs; do
9291 if test "X$x" = "X$dir"; then
9296 if test -z "$haveit"; then
9297 ltrpathdirs="$ltrpathdirs $dir"
9302 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9305 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9308 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
9309 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
9315 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
9316 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
9322 if test "X$rpathdirs" != "X"; then
9323 if test -n "$acl_hardcode_libdir_separator"; then
9325 for found_dir in $rpathdirs; do
9326 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
9328 acl_save_libdir="$libdir"
9330 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9331 libdir="$acl_save_libdir"
9332 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9334 for found_dir in $rpathdirs; do
9335 acl_save_libdir="$libdir"
9337 eval flag=\"$acl_hardcode_libdir_flag_spec\"
9338 libdir="$acl_save_libdir"
9339 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
9343 if test "X$ltrpathdirs" != "X"; then
9344 for found_dir in $ltrpathdirs; do
9345 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
9354 ac_save_CPPFLAGS="$CPPFLAGS"
9356 for element in $INCSIGSEGV; do
9358 for x in $CPPFLAGS; do
9360 acl_save_prefix="$prefix"
9361 prefix="$acl_final_prefix"
9362 acl_save_exec_prefix="$exec_prefix"
9363 exec_prefix="$acl_final_exec_prefix"
9365 exec_prefix="$acl_save_exec_prefix"
9366 prefix="$acl_save_prefix"
9368 if test "X$x" = "X$element"; then
9373 if test -z "$haveit"; then
9374 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
9380 printf %s "checking for libsigsegv... " >&6; }
9381 if test ${ac_cv_libsigsegv+y}
9383 printf %s "(cached) " >&6
9386 ac_save_LIBS="$LIBS"
9387 case " $LIBSIGSEGV" in
9388 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
9389 *) LIBS="$LIBSIGSEGV $LIBS" ;;
9391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9392 /* end confdefs.h. */
9393 #include <sigsegv.h>
9397 sigsegv_deinstall_handler();
9402 if ac_fn_c_try_link "$LINENO"
9404 ac_cv_libsigsegv=yes
9406 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
9408 rm -f core conftest.err conftest.$ac_objext \
9409 conftest$ac_exeext conftest.$ac_ext
9410 LIBS="$ac_save_LIBS"
9413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
9414 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
9415 if test "$ac_cv_libsigsegv" = yes; then
9418 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
9420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
9421 printf %s "checking how to link with libsigsegv... " >&6; }
9422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
9423 printf "%s\n" "$LIBSIGSEGV" >&6; }
9426 CPPFLAGS="$ac_save_CPPFLAGS"
9438 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
9441 # The Clang compiler raises a warning for an undeclared identifier that matches
9442 # a compiler builtin function. All extant Clang versions are affected, as of
9443 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
9444 # C and Objective C languages, but Clang does report an error under C++ and
9447 # Passing -fno-builtin to the compiler would suppress this problem. That
9448 # strategy would have the advantage of being insensitive to stray warnings, but
9449 # it would make tests less realistic.
9450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
9451 printf %s "checking how $CC reports undeclared, standard C functions... " >&6; }
9452 if test ${ac_cv_c_decl_report+y}
9454 printf %s "(cached) " >&6
9456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9457 /* end confdefs.h. */
9467 if ac_fn_c_try_compile "$LINENO"
9469 if test -s conftest.err
9471 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
9472 # valid AC_CHECK_DECL input. No library function is consistently available
9473 # on freestanding implementations, so test against a dummy declaration.
9474 # Include always-available headers on the off chance that they somehow
9476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9477 /* end confdefs.h. */
9482 extern void ac_decl (int, char *);
9487 (void) ac_decl ((int) 0, (char *) 0);
9497 if ac_fn_c_try_compile "$LINENO"
9499 if test -s conftest.err
9501 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9502 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9503 as_fn_error $? "cannot detect from compiler exit status or warnings
9504 See \`config.log' for more details" "$LINENO" 5; }
9506 ac_cv_c_decl_report=warning
9509 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9510 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9511 as_fn_error $? "cannot compile a simple declaration test
9512 See \`config.log' for more details" "$LINENO" 5; }
9514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9516 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9517 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
9518 as_fn_error $? "compiler does not report undeclared identifiers
9519 See \`config.log' for more details" "$LINENO" 5; }
9522 ac_cv_c_decl_report=error
9524 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
9527 printf "%s\n" "$ac_cv_c_decl_report" >&6; }
9529 case $ac_cv_c_decl_report in
9530 warning) ac_c_decl_warn_flag=yes ;;
9531 *) ac_c_decl_warn_flag= ;;
9543 GNULIB_EUIDACCESS=0;
9551 GNULIB_GETDOMAINNAME=0;
9552 GNULIB_GETDTABLESIZE=0;
9554 GNULIB_GETHOSTNAME=0;
9556 GNULIB_GETLOGIN_R=0;
9557 GNULIB_GETPAGESIZE=0;
9559 GNULIB_GETUSERSHELL=0;
9560 GNULIB_GROUP_MEMBER=0;
9572 GNULIB_READLINKAT=0;
9574 GNULIB_SETHOSTNAME=0;
9580 GNULIB_UNISTD_H_NONBLOCKING=0;
9581 GNULIB_UNISTD_H_SIGPIPE=0;
9596 HAVE_GETDTABLESIZE=1;
9602 HAVE_GROUP_MEMBER=1;
9618 HAVE_DECL_ENVIRON=1;
9620 HAVE_DECL_FDATASYNC=1;
9621 HAVE_DECL_GETDOMAINNAME=1;
9622 HAVE_DECL_GETLOGIN=1;
9623 HAVE_DECL_GETLOGIN_R=1;
9624 HAVE_DECL_GETPAGESIZE=1;
9625 HAVE_DECL_GETUSERSHELL=1;
9626 HAVE_DECL_SETHOSTNAME=1;
9627 HAVE_DECL_TRUNCATE=1;
9628 HAVE_DECL_TTYNAME_R=1;
9635 REPLACE_FACCESSAT=0;
9637 REPLACE_FTRUNCATE=0;
9639 REPLACE_GETDOMAINNAME=0;
9640 REPLACE_GETDTABLESIZE=0;
9641 REPLACE_GETLOGIN_R=0;
9642 REPLACE_GETGROUPS=0;
9643 REPLACE_GETPAGESIZE=0;
9654 REPLACE_READLINKAT=0;
9658 REPLACE_SYMLINKAT=0;
9660 REPLACE_TTYNAME_R=0;
9665 UNISTD_H_HAVE_WINSOCK2_H=0;
9666 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9672 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9673 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9675 printf "%s\n" "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9678 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9684 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9685 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9697 printf %s "checking whether the preprocessor supports include_next... " >&6; }
9698 if test ${gl_cv_have_include_next+y}
9700 printf %s "(cached) " >&6
9702 rm -rf conftestd1a conftestd1b conftestd2
9703 mkdir conftestd1a conftestd1b conftestd2
9704 cat <<EOF > conftestd1a/conftest.h
9705 #define DEFINED_IN_CONFTESTD1
9706 #include_next <conftest.h>
9707 #ifdef DEFINED_IN_CONFTESTD2
9710 #error "include_next doesn't work"
9713 cat <<EOF > conftestd1b/conftest.h
9714 #define DEFINED_IN_CONFTESTD1
9716 #include_next <conftest.h>
9717 #ifdef DEFINED_IN_CONFTESTD2
9720 #error "include_next doesn't work"
9723 cat <<EOF > conftestd2/conftest.h
9724 #ifndef DEFINED_IN_CONFTESTD1
9725 #error "include_next test doesn't work"
9727 #define DEFINED_IN_CONFTESTD2
9729 gl_save_CPPFLAGS="$CPPFLAGS"
9730 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9732 /* end confdefs.h. */
9733 #include <conftest.h>
9735 if ac_fn_c_try_compile "$LINENO"
9737 gl_cv_have_include_next=yes
9739 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741 /* end confdefs.h. */
9742 #include <conftest.h>
9744 if ac_fn_c_try_compile "$LINENO"
9746 gl_cv_have_include_next=buggy
9748 gl_cv_have_include_next=no
9750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9753 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9754 CPPFLAGS="$gl_save_CPPFLAGS"
9755 rm -rf conftestd1a conftestd1b conftestd2
9758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9759 printf "%s\n" "$gl_cv_have_include_next" >&6; }
9760 PRAGMA_SYSTEM_HEADER=
9761 if test $gl_cv_have_include_next = yes; then
9762 INCLUDE_NEXT=include_next
9763 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9764 if test -n "$GCC"; then
9765 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9768 if test $gl_cv_have_include_next = buggy; then
9769 INCLUDE_NEXT=include
9770 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9772 INCLUDE_NEXT=include
9773 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9780 printf %s "checking whether system header files limit the line length... " >&6; }
9781 if test ${gl_cv_pragma_columns+y}
9783 printf %s "(cached) " >&6
9785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786 /* end confdefs.h. */
9793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9794 $EGREP "choke me" >/dev/null 2>&1
9796 gl_cv_pragma_columns=yes
9798 gl_cv_pragma_columns=no
9804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9805 printf "%s\n" "$gl_cv_pragma_columns" >&6; }
9806 if test $gl_cv_pragma_columns = yes; then
9807 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9815 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9816 printf %s "checking whether // is distinct from /... " >&6; }
9817 if test ${gl_cv_double_slash_root+y}
9819 printf %s "(cached) " >&6
9821 if test x"$cross_compiling" = xyes ; then
9822 # When cross-compiling, there is no way to tell whether // is special
9823 # short of a list of hosts. However, the only known hosts to date
9824 # that have a distinct // are Apollo DomainOS (too old to port to),
9825 # Cygwin, and z/OS. If anyone knows of another system for which // has
9826 # special semantics and is distinct from /, please report it to
9827 # <bug-gnulib@gnu.org>.
9829 *-cygwin | i370-ibm-openedition)
9830 gl_cv_double_slash_root=yes ;;
9832 # Be optimistic and assume that / and // are the same when we
9834 gl_cv_double_slash_root='unknown, assuming no' ;;
9837 set x `ls -di / // 2>/dev/null`
9838 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9839 gl_cv_double_slash_root=no
9841 gl_cv_double_slash_root=yes
9845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9846 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
9847 if test "$gl_cv_double_slash_root" = yes; then
9849 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9865 printf %s "checking if environ is properly declared... " >&6; }
9866 if test ${gt_cv_var_environ_declaration+y}
9868 printf %s "(cached) " >&6
9870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9871 /* end confdefs.h. */
9875 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9878 extern struct { int foo; } environ;
9887 if ac_fn_c_try_compile "$LINENO"
9889 gt_cv_var_environ_declaration=no
9891 gt_cv_var_environ_declaration=yes
9893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9896 printf "%s\n" "$gt_cv_var_environ_declaration" >&6; }
9897 if test $gt_cv_var_environ_declaration = yes; then
9899 printf "%s\n" "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9904 if test $gt_cv_var_environ_declaration != yes; then
9910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9911 printf %s "checking for complete errno.h... " >&6; }
9912 if test ${gl_cv_header_errno_h_complete+y}
9914 printf %s "(cached) " >&6
9917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9918 /* end confdefs.h. */
9921 #if !defined ETXTBSY
9930 #if !defined ENOLINK
9936 #if !defined EMULTIHOP
9939 #if !defined EBADMSG
9942 #if !defined EOVERFLOW
9945 #if !defined ENOTSUP
9948 #if !defined ENETRESET
9951 #if !defined ECONNABORTED
9960 #if !defined ECANCELED
9963 #if !defined EOWNERDEAD
9966 #if !defined ENOTRECOVERABLE
9974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9975 $EGREP "booboo" >/dev/null 2>&1
9977 gl_cv_header_errno_h_complete=no
9979 gl_cv_header_errno_h_complete=yes
9985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9986 printf "%s\n" "$gl_cv_header_errno_h_complete" >&6; }
9987 if test $gl_cv_header_errno_h_complete = yes; then
9998 if test $gl_cv_have_include_next = yes; then
9999 gl_cv_next_errno_h='<'errno.h'>'
10001 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10002 printf %s "checking absolute name of <errno.h>... " >&6; }
10003 if test ${gl_cv_next_errno_h+y}
10005 printf %s "(cached) " >&6
10010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10011 /* end confdefs.h. */
10015 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10016 *) gl_absname_cpp="$ac_cpp" ;;
10021 gl_dirsep_regex='[/\\]'
10024 gl_dirsep_regex='\/'
10027 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10028 gl_header_literal_regex=`echo 'errno.h' \
10029 | sed -e "$gl_make_literal_regex_sed"`
10030 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10031 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10037 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10038 sed -n "$gl_absolute_header_sed"`
10040 gl_header=$gl_cv_absolute_errno_h
10041 gl_cv_next_errno_h='"'$gl_header'"'
10045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10046 printf "%s\n" "$gl_cv_next_errno_h" >&6; }
10048 NEXT_ERRNO_H=$gl_cv_next_errno_h
10050 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10051 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10052 gl_next_as_first_directive='<'errno.h'>'
10054 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10055 gl_next_as_first_directive=$gl_cv_next_errno_h
10057 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10065 if test -n "$ERRNO_H"; then
10066 GL_GENERATE_ERRNO_H_TRUE=
10067 GL_GENERATE_ERRNO_H_FALSE='#'
10069 GL_GENERATE_ERRNO_H_TRUE='#'
10070 GL_GENERATE_ERRNO_H_FALSE=
10074 if test -n "$ERRNO_H"; then
10075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10076 printf %s "checking for EMULTIHOP value... " >&6; }
10077 if test ${gl_cv_header_errno_h_EMULTIHOP+y}
10079 printf %s "(cached) " >&6
10082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10083 /* end confdefs.h. */
10091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10092 $EGREP "yes" >/dev/null 2>&1
10094 gl_cv_header_errno_h_EMULTIHOP=yes
10096 gl_cv_header_errno_h_EMULTIHOP=no
10100 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10102 /* end confdefs.h. */
10104 #define _XOPEN_SOURCE_EXTENDED 1
10111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10112 $EGREP "yes" >/dev/null 2>&1
10114 gl_cv_header_errno_h_EMULTIHOP=hidden
10118 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10119 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10120 #define _XOPEN_SOURCE_EXTENDED 1
10122 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10124 #include <stdlib.h>
10134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10135 printf "%s\n" "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10136 case $gl_cv_header_errno_h_EMULTIHOP in
10138 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10141 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10149 if test -n "$ERRNO_H"; then
10150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10151 printf %s "checking for ENOLINK value... " >&6; }
10152 if test ${gl_cv_header_errno_h_ENOLINK+y}
10154 printf %s "(cached) " >&6
10157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10158 /* end confdefs.h. */
10166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10167 $EGREP "yes" >/dev/null 2>&1
10169 gl_cv_header_errno_h_ENOLINK=yes
10171 gl_cv_header_errno_h_ENOLINK=no
10175 if test $gl_cv_header_errno_h_ENOLINK = no; then
10176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177 /* end confdefs.h. */
10179 #define _XOPEN_SOURCE_EXTENDED 1
10186 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10187 $EGREP "yes" >/dev/null 2>&1
10189 gl_cv_header_errno_h_ENOLINK=hidden
10193 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10194 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10195 #define _XOPEN_SOURCE_EXTENDED 1
10197 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10199 #include <stdlib.h>
10209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10210 printf "%s\n" "$gl_cv_header_errno_h_ENOLINK" >&6; }
10211 case $gl_cv_header_errno_h_ENOLINK in
10213 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10216 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10224 if test -n "$ERRNO_H"; then
10225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10226 printf %s "checking for EOVERFLOW value... " >&6; }
10227 if test ${gl_cv_header_errno_h_EOVERFLOW+y}
10229 printf %s "(cached) " >&6
10232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233 /* end confdefs.h. */
10241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10242 $EGREP "yes" >/dev/null 2>&1
10244 gl_cv_header_errno_h_EOVERFLOW=yes
10246 gl_cv_header_errno_h_EOVERFLOW=no
10250 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10252 /* end confdefs.h. */
10254 #define _XOPEN_SOURCE_EXTENDED 1
10261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10262 $EGREP "yes" >/dev/null 2>&1
10264 gl_cv_header_errno_h_EOVERFLOW=hidden
10268 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10269 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10270 #define _XOPEN_SOURCE_EXTENDED 1
10272 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10274 #include <stdlib.h>
10284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10285 printf "%s\n" "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10286 case $gl_cv_header_errno_h_EOVERFLOW in
10288 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10291 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10299 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10300 if test "x$ac_cv_have_decl_strerror_r" = xyes
10307 printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
10312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10313 printf %s "checking whether strerror_r returns char *... " >&6; }
10314 if test ${ac_cv_func_strerror_r_char_p+y}
10316 printf %s "(cached) " >&6
10319 ac_cv_func_strerror_r_char_p=no
10320 if test $ac_cv_have_decl_strerror_r = yes; then
10321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10322 /* end confdefs.h. */
10323 $ac_includes_default
10329 char x = *strerror_r (0, buf, sizeof buf);
10330 char *p = strerror_r (0, buf, sizeof buf);
10337 if ac_fn_c_try_compile "$LINENO"
10339 ac_cv_func_strerror_r_char_p=yes
10341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10343 # strerror_r is not declared. Choose between
10344 # systems that have relatively inaccessible declarations for the
10345 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10346 # former has a strerror_r that returns char*, while the latter
10347 # has a strerror_r that returns `int'.
10348 # This test should segfault on the DEC system.
10349 if test "$cross_compiling" = yes
10353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10354 /* end confdefs.h. */
10355 $ac_includes_default
10356 extern char *strerror_r ();
10361 char x = *strerror_r (0, buf, sizeof buf);
10362 return ! isalpha (x);
10367 if ac_fn_c_try_run "$LINENO"
10369 ac_cv_func_strerror_r_char_p=yes
10371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10372 conftest.$ac_objext conftest.beam conftest.$ac_ext
10378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10379 printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
10380 if test $ac_cv_func_strerror_r_char_p = yes; then
10382 printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10387 XGETTEXT_EXTRA_OPTIONS=
10394 GNULIB_NONBLOCKING=0;
10410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10411 printf %s "checking for working fcntl.h... " >&6; }
10412 if test ${gl_cv_header_working_fcntl_h+y}
10414 printf %s "(cached) " >&6
10416 if test "$cross_compiling" = yes
10419 # Guess 'no' on native Windows.
10420 mingw*) gl_cv_header_working_fcntl_h='no' ;;
10421 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
10425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10426 /* end confdefs.h. */
10427 #include <sys/types.h>
10428 #include <sys/stat.h>
10430 # include <unistd.h>
10431 #else /* on Windows with MSVC */
10433 # include <stdlib.h>
10434 # defined sleep(n) _sleep ((n) * 1000)
10438 #define O_NOATIME 0
10441 #define O_NOFOLLOW 0
10443 static int const constants[] =
10445 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10446 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10453 int result = !constants;
10456 static char const sym[] = "conftest.sym";
10457 if (symlink ("/dev/null", sym) != 0)
10461 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10468 if (unlink (sym) != 0 || symlink (".", sym) != 0)
10472 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10483 static char const file[] = "confdefs.h";
10484 int fd = open (file, O_RDONLY | O_NOATIME);
10490 if (fstat (fd, &st0) != 0)
10496 if (read (fd, &c, 1) != 1)
10500 if (close (fd) != 0)
10505 if (stat (file, &st1) != 0)
10508 if (st0.st_atime != st1.st_atime)
10520 if ac_fn_c_try_run "$LINENO"
10522 gl_cv_header_working_fcntl_h=yes
10525 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10526 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10527 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10528 *) gl_cv_header_working_fcntl_h='no';;
10531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10532 conftest.$ac_objext conftest.beam conftest.$ac_ext
10537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10538 printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; }
10540 case $gl_cv_header_working_fcntl_h in #(
10541 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10545 printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h
10548 case $gl_cv_header_working_fcntl_h in #(
10549 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10553 printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h
10556 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10557 if test "x$ac_cv_type_pid_t" = xyes
10562 printf "%s\n" "#define pid_t int" >>confdefs.h
10566 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10567 if test "x$ac_cv_type_mode_t" = xyes
10572 printf "%s\n" "#define mode_t int" >>confdefs.h
10599 if test $gl_cv_have_include_next = yes; then
10600 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
10603 printf %s "checking absolute name of <fnmatch.h>... " >&6; }
10604 if test ${gl_cv_next_fnmatch_h+y}
10606 printf %s "(cached) " >&6
10609 if test $ac_cv_header_fnmatch_h = yes; then
10614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10615 /* end confdefs.h. */
10616 #include <fnmatch.h>
10619 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10620 *) gl_absname_cpp="$ac_cpp" ;;
10625 gl_dirsep_regex='[/\\]'
10628 gl_dirsep_regex='\/'
10631 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10632 gl_header_literal_regex=`echo 'fnmatch.h' \
10633 | sed -e "$gl_make_literal_regex_sed"`
10634 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10635 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10641 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10642 sed -n "$gl_absolute_header_sed"`
10644 gl_header=$gl_cv_absolute_fnmatch_h
10645 gl_cv_next_fnmatch_h='"'$gl_header'"'
10647 gl_cv_next_fnmatch_h='<'fnmatch.h'>'
10652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
10653 printf "%s\n" "$gl_cv_next_fnmatch_h" >&6; }
10655 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h
10657 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10658 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10659 gl_next_as_first_directive='<'fnmatch.h'>'
10661 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10662 gl_next_as_first_directive=$gl_cv_next_fnmatch_h
10664 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive
10672 if test $ac_cv_header_fnmatch_h = yes; then
10681 FNMATCH_H=fnmatch.h
10683 if test $ac_cv_header_fnmatch_h != yes; then
10684 FNMATCH_H=fnmatch.h
10689 if test -n "$FNMATCH_H"; then
10690 GL_GENERATE_FNMATCH_H_TRUE=
10691 GL_GENERATE_FNMATCH_H_FALSE='#'
10693 GL_GENERATE_FNMATCH_H_TRUE='#'
10694 GL_GENERATE_FNMATCH_H_FALSE=
10705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10706 printf %s "checking for mbstate_t... " >&6; }
10707 if test ${ac_cv_type_mbstate_t+y}
10709 printf %s "(cached) " >&6
10711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10712 /* end confdefs.h. */
10713 $ac_includes_default
10714 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10716 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10717 included before <wchar.h>. */
10718 #include <stddef.h>
10725 mbstate_t x; return sizeof x;
10730 if ac_fn_c_try_compile "$LINENO"
10732 ac_cv_type_mbstate_t=yes
10734 ac_cv_type_mbstate_t=no
10736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10739 printf "%s\n" "$ac_cv_type_mbstate_t" >&6; }
10740 if test $ac_cv_type_mbstate_t = yes; then
10742 printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h
10746 printf "%s\n" "#define mbstate_t int" >>confdefs.h
10766 GNULIB_FPRINTF_POSIX=0;
10782 GNULIB_OBSTACK_PRINTF=0;
10783 GNULIB_OBSTACK_PRINTF_POSIX=0;
10788 GNULIB_PRINTF_POSIX=0;
10797 GNULIB_SPRINTF_POSIX=0;
10798 GNULIB_STDIO_H_NONBLOCKING=0;
10799 GNULIB_STDIO_H_SIGPIPE=0;
10801 GNULIB_VASPRINTF=0;
10806 GNULIB_VFPRINTF_POSIX=0;
10808 GNULIB_VPRINTF_POSIX=0;
10809 GNULIB_VSNPRINTF=0;
10810 GNULIB_VSPRINTF_POSIX=0;
10811 HAVE_DECL_FPURGE=1;
10812 HAVE_DECL_FSEEKO=1;
10813 HAVE_DECL_FTELLO=1;
10814 HAVE_DECL_GETDELIM=1;
10815 HAVE_DECL_GETLINE=1;
10816 HAVE_DECL_OBSTACK_PRINTF=1;
10817 HAVE_DECL_SNPRINTF=1;
10818 HAVE_DECL_VSNPRINTF=1;
10839 REPLACE_GETDELIM=0;
10841 REPLACE_OBSTACK_PRINTF=0;
10847 REPLACE_RENAMEAT=0;
10848 REPLACE_SNPRINTF=0;
10850 REPLACE_STDIO_READ_FUNCS=0;
10851 REPLACE_STDIO_WRITE_FUNCS=0;
10853 REPLACE_VASPRINTF=0;
10854 REPLACE_VDPRINTF=0;
10855 REPLACE_VFPRINTF=0;
10857 REPLACE_VSNPRINTF=0;
10858 REPLACE_VSPRINTF=0;
10873 GNULIB_UTIMENSAT=0;
10874 GNULIB_OVERRIDES_STRUCT_STAT=0;
10888 REPLACE_FUTIMENS=0;
10894 REPLACE_UTIMENSAT=0;
10896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10897 printf %s "checking whether stat file-mode macros are broken... " >&6; }
10898 if test ${ac_cv_header_stat_broken+y}
10900 printf %s "(cached) " >&6
10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10903 /* end confdefs.h. */
10904 #include <sys/types.h>
10905 #include <sys/stat.h>
10907 #if defined S_ISBLK && defined S_IFDIR
10908 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10911 #if defined S_ISBLK && defined S_IFCHR
10912 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10915 #if defined S_ISLNK && defined S_IFREG
10916 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10919 #if defined S_ISSOCK && defined S_IFREG
10920 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10924 if ac_fn_c_try_compile "$LINENO"
10926 ac_cv_header_stat_broken=no
10928 ac_cv_header_stat_broken=yes
10930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10933 printf "%s\n" "$ac_cv_header_stat_broken" >&6; }
10934 if test $ac_cv_header_stat_broken = yes; then
10936 printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10945 printf %s "checking for 64-bit off_t... " >&6; }
10946 if test ${gl_cv_type_off_t_64+y}
10948 printf %s "(cached) " >&6
10950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10951 /* end confdefs.h. */
10952 #include <sys/types.h>
10953 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10963 if ac_fn_c_try_compile "$LINENO"
10965 gl_cv_type_off_t_64=yes
10967 gl_cv_type_off_t_64=no
10969 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10973 printf "%s\n" "$gl_cv_type_off_t_64" >&6; }
10974 if test $gl_cv_type_off_t_64 = no; then
10975 WINDOWS_64_BIT_OFF_T=1
10977 WINDOWS_64_BIT_OFF_T=0
10979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10980 printf %s "checking for 64-bit st_size... " >&6; }
10981 if test ${gl_cv_member_st_size_64+y}
10983 printf %s "(cached) " >&6
10985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10986 /* end confdefs.h. */
10987 #include <sys/types.h>
10989 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10999 if ac_fn_c_try_compile "$LINENO"
11001 gl_cv_member_st_size_64=yes
11003 gl_cv_member_st_size_64=no
11005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
11009 printf "%s\n" "$gl_cv_member_st_size_64" >&6; }
11010 if test $gl_cv_member_st_size_64 = no; then
11011 WINDOWS_64_BIT_ST_SIZE=1
11013 WINDOWS_64_BIT_ST_SIZE=0
11017 WINDOWS_64_BIT_OFF_T=0
11018 WINDOWS_64_BIT_ST_SIZE=0
11036 if test $gl_cv_have_include_next = yes; then
11037 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11040 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
11041 if test ${gl_cv_next_sys_stat_h+y}
11043 printf %s "(cached) " >&6
11046 if test $ac_cv_header_sys_stat_h = yes; then
11051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11052 /* end confdefs.h. */
11053 #include <sys/stat.h>
11056 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11057 *) gl_absname_cpp="$ac_cpp" ;;
11062 gl_dirsep_regex='[/\\]'
11065 gl_dirsep_regex='\/'
11068 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11069 gl_header_literal_regex=`echo 'sys/stat.h' \
11070 | sed -e "$gl_make_literal_regex_sed"`
11071 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11072 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11078 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11079 sed -n "$gl_absolute_header_sed"`
11081 gl_header=$gl_cv_absolute_sys_stat_h
11082 gl_cv_next_sys_stat_h='"'$gl_header'"'
11084 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11090 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
11092 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11094 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11095 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11096 gl_next_as_first_directive='<'sys/stat.h'>'
11098 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11099 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11101 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11110 WINDOWS_STAT_TIMESPEC=0
11119 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11120 #include <sys/stat.h>
11122 if test "x$ac_cv_type_nlink_t" = xyes
11127 printf "%s\n" "#define nlink_t int" >>confdefs.h
11137 ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11138 if test "x$ac_cv_have_decl_getdtablesize" = xyes
11145 printf "%s\n" "#define HAVE_DECL_GETDTABLESIZE $ac_have_decl" >>confdefs.h
11161 if test $gl_cv_have_include_next = yes; then
11162 gl_cv_next_getopt_h='<'getopt.h'>'
11164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11165 printf %s "checking absolute name of <getopt.h>... " >&6; }
11166 if test ${gl_cv_next_getopt_h+y}
11168 printf %s "(cached) " >&6
11171 if test $ac_cv_header_getopt_h = yes; then
11176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11177 /* end confdefs.h. */
11178 #include <getopt.h>
11181 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11182 *) gl_absname_cpp="$ac_cpp" ;;
11187 gl_dirsep_regex='[/\\]'
11190 gl_dirsep_regex='\/'
11193 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11194 gl_header_literal_regex=`echo 'getopt.h' \
11195 | sed -e "$gl_make_literal_regex_sed"`
11196 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11197 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11203 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11204 sed -n "$gl_absolute_header_sed"`
11206 gl_header=$gl_cv_absolute_getopt_h
11207 gl_cv_next_getopt_h='"'$gl_header'"'
11209 gl_cv_next_getopt_h='<'getopt.h'>'
11214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11215 printf "%s\n" "$gl_cv_next_getopt_h" >&6; }
11217 NEXT_GETOPT_H=$gl_cv_next_getopt_h
11219 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11220 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11221 gl_next_as_first_directive='<'getopt.h'>'
11223 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11224 gl_next_as_first_directive=$gl_cv_next_getopt_h
11226 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11231 if test $ac_cv_header_getopt_h = yes; then
11240 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11241 for ac_header in getopt.h
11243 ac_fn_c_check_header_compile "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11244 if test "x$ac_cv_header_getopt_h" = xyes
11246 printf "%s\n" "#define HAVE_GETOPT_H 1" >>confdefs.h
11249 gl_replace_getopt=yes
11255 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11256 for ac_func in getopt_long_only
11258 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11259 if test "x$ac_cv_func_getopt_long_only" = xyes
11261 printf "%s\n" "#define HAVE_GETOPT_LONG_ONLY 1" >>confdefs.h
11264 gl_replace_getopt=yes
11270 if test -z "$gl_replace_getopt"; then
11271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11272 printf %s "checking whether getopt is POSIX compatible... " >&6; }
11273 if test ${gl_cv_func_getopt_posix+y}
11275 printf %s "(cached) " >&6
11278 if test $cross_compiling = no; then
11279 if test "$cross_compiling" = yes
11281 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11282 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11283 as_fn_error $? "cannot run test program while cross compiling
11284 See \`config.log' for more details" "$LINENO" 5; }
11286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11287 /* end confdefs.h. */
11289 #include <unistd.h>
11290 #include <stdlib.h>
11291 #include <string.h>
11296 static char program[] = "program";
11297 static char a[] = "-a";
11298 static char foo[] = "foo";
11299 static char bar[] = "bar";
11300 char *argv[] = { program, a, foo, bar, NULL };
11303 c = getopt (4, argv, "ab");
11306 c = getopt (4, argv, "ab");
11309 if (!(optind == 2))
11315 if ac_fn_c_try_run "$LINENO"
11317 gl_cv_func_getopt_posix=maybe
11319 gl_cv_func_getopt_posix=no
11321 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11322 conftest.$ac_objext conftest.beam conftest.$ac_ext
11325 if test $gl_cv_func_getopt_posix = maybe; then
11326 if test "$cross_compiling" = yes
11328 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11329 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11330 as_fn_error $? "cannot run test program while cross compiling
11331 See \`config.log' for more details" "$LINENO" 5; }
11333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334 /* end confdefs.h. */
11336 #include <unistd.h>
11337 #include <stdlib.h>
11338 #include <string.h>
11343 static char program[] = "program";
11344 static char donald[] = "donald";
11345 static char p[] = "-p";
11346 static char billy[] = "billy";
11347 static char duck[] = "duck";
11348 static char a[] = "-a";
11349 static char bar[] = "bar";
11350 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11353 c = getopt (7, argv, "+abp:q:");
11356 if (!(strcmp (argv[0], "program") == 0))
11358 if (!(strcmp (argv[1], "donald") == 0))
11360 if (!(strcmp (argv[2], "-p") == 0))
11362 if (!(strcmp (argv[3], "billy") == 0))
11364 if (!(strcmp (argv[4], "duck") == 0))
11366 if (!(strcmp (argv[5], "-a") == 0))
11368 if (!(strcmp (argv[6], "bar") == 0))
11370 if (!(optind == 1))
11376 if ac_fn_c_try_run "$LINENO"
11378 gl_cv_func_getopt_posix=maybe
11380 gl_cv_func_getopt_posix=no
11382 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11383 conftest.$ac_objext conftest.beam conftest.$ac_ext
11387 if test $gl_cv_func_getopt_posix = maybe; then
11388 if test "$cross_compiling" = yes
11390 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11391 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
11392 as_fn_error $? "cannot run test program while cross compiling
11393 See \`config.log' for more details" "$LINENO" 5; }
11395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11396 /* end confdefs.h. */
11398 #include <unistd.h>
11399 #include <stdlib.h>
11400 #include <string.h>
11405 static char program[] = "program";
11406 static char ab[] = "-ab";
11407 char *argv[3] = { program, ab, NULL };
11408 if (getopt (2, argv, "ab:") != 'a')
11410 if (getopt (2, argv, "ab:") != '?')
11420 if ac_fn_c_try_run "$LINENO"
11422 gl_cv_func_getopt_posix=yes
11424 gl_cv_func_getopt_posix=no
11426 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11427 conftest.$ac_objext conftest.beam conftest.$ac_ext
11433 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11434 *) gl_cv_func_getopt_posix="guessing yes";;
11439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11440 printf "%s\n" "$gl_cv_func_getopt_posix" >&6; }
11441 case "$gl_cv_func_getopt_posix" in
11442 *no) gl_replace_getopt=yes ;;
11446 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11448 printf %s "checking for working GNU getopt function... " >&6; }
11449 if test ${gl_cv_func_getopt_gnu+y}
11451 printf %s "(cached) " >&6
11453 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11454 # optstring is necessary for programs like m4 that have POSIX-mandated
11455 # semantics for supporting options interspersed with files.
11456 # Also, since getopt_long is a GNU extension, we require optind=0.
11457 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11458 # so take care to revert to the correct (non-)export state.
11459 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11460 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11461 xx) gl_had_POSIXLY_CORRECT=exported ;;
11462 x) gl_had_POSIXLY_CORRECT=yes ;;
11463 *) gl_had_POSIXLY_CORRECT= ;;
11466 export POSIXLY_CORRECT
11467 if test "$cross_compiling" = yes
11469 gl_cv_func_getopt_gnu="guessing no"
11472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11473 /* end confdefs.h. */
11474 #include <getopt.h>
11475 #include <stddef.h>
11476 #include <string.h>
11478 #include <stdlib.h>
11479 #if defined __MACH__ && defined __APPLE__
11480 /* Avoid a crash on Mac OS X. */
11481 #include <mach/mach.h>
11482 #include <mach/mach_error.h>
11483 #include <mach/thread_status.h>
11484 #include <mach/exception.h>
11485 #include <mach/task.h>
11486 #include <pthread.h>
11487 /* The exception port on which our thread listens. */
11488 static mach_port_t our_exception_port;
11489 /* The main function of the thread listening for exceptions of type
11492 mach_exception_thread (void *arg)
11494 /* Buffer for a message to be received. */
11496 mach_msg_header_t head;
11497 mach_msg_body_t msgh_body;
11500 mach_msg_return_t retval;
11501 /* Wait for a message on the exception port. */
11502 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11503 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11504 if (retval != MACH_MSG_SUCCESS)
11509 nocrash_init (void)
11511 mach_port_t self = mach_task_self ();
11512 /* Allocate a port on which the thread shall listen for exceptions. */
11513 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11515 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11516 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11517 MACH_MSG_TYPE_MAKE_SEND)
11519 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11521 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11522 /* Create the thread listening on the exception port. */
11523 pthread_attr_t attr;
11525 if (pthread_attr_init (&attr) == 0
11526 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11527 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11528 pthread_attr_destroy (&attr);
11529 /* Replace the exception port info for these exceptions with our own.
11530 Note that we replace the exception port for the entire task, not only
11531 for a particular thread. This has the effect that when our exception
11532 port gets the message, the thread specific exception port has already
11533 been asked, and we don't need to bother about it.
11534 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11535 task_set_exception_ports (self, mask, our_exception_port,
11536 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11541 #elif defined _WIN32 && ! defined __CYGWIN__
11542 /* Avoid a crash on native Windows. */
11543 #define WIN32_LEAN_AND_MEAN
11544 #include <windows.h>
11545 #include <winerror.h>
11547 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11549 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11551 case EXCEPTION_ACCESS_VIOLATION:
11552 case EXCEPTION_IN_PAGE_ERROR:
11553 case EXCEPTION_STACK_OVERFLOW:
11554 case EXCEPTION_GUARD_PAGE:
11555 case EXCEPTION_PRIV_INSTRUCTION:
11556 case EXCEPTION_ILLEGAL_INSTRUCTION:
11557 case EXCEPTION_DATATYPE_MISALIGNMENT:
11558 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11559 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11562 return EXCEPTION_CONTINUE_SEARCH;
11565 nocrash_init (void)
11567 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11570 /* Avoid a crash on POSIX systems. */
11571 #include <signal.h>
11572 #include <unistd.h>
11573 /* A POSIX signal handler. */
11575 exception_handler (int sig)
11580 nocrash_init (void)
11583 signal (SIGSEGV, exception_handler);
11586 signal (SIGBUS, exception_handler);
11600 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11601 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11602 OSF/1 5.1, Solaris 10. */
11604 static char conftest[] = "conftest";
11605 static char plus[] = "-+";
11606 char *argv[3] = { conftest, plus, NULL };
11608 if (getopt (2, argv, "+a") != '?')
11611 /* This code succeeds on glibc 2.8, mingw,
11612 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11613 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
11615 static char program[] = "program";
11616 static char p[] = "-p";
11617 static char foo[] = "foo";
11618 static char bar[] = "bar";
11619 char *argv[] = { program, p, foo, bar, NULL };
11622 if (getopt (4, argv, "p::") != 'p')
11624 else if (optarg != NULL)
11626 else if (getopt (4, argv, "p::") != -1)
11628 else if (optind != 2)
11631 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
11633 static char program[] = "program";
11634 static char foo[] = "foo";
11635 static char p[] = "-p";
11636 char *argv[] = { program, foo, p, NULL };
11638 if (getopt (3, argv, "-p") != 1)
11640 else if (getopt (3, argv, "-p") != 'p')
11643 /* This code fails on glibc 2.11. */
11645 static char program[] = "program";
11646 static char b[] = "-b";
11647 static char a[] = "-a";
11648 char *argv[] = { program, b, a, NULL };
11649 optind = opterr = 0;
11650 if (getopt (3, argv, "+:a:b") != 'b')
11652 else if (getopt (3, argv, "+:a:b") != ':')
11655 /* This code dumps core on glibc 2.14. */
11657 static char program[] = "program";
11658 static char w[] = "-W";
11659 static char dummy[] = "dummy";
11660 char *argv[] = { program, w, dummy, NULL };
11661 optind = opterr = 1;
11662 if (getopt (3, argv, "W;") != 'W')
11671 if ac_fn_c_try_run "$LINENO"
11673 gl_cv_func_getopt_gnu=yes
11675 gl_cv_func_getopt_gnu=no
11677 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11678 conftest.$ac_objext conftest.beam conftest.$ac_ext
11681 case $gl_had_POSIXLY_CORRECT in
11683 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11684 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11689 printf "%s\n" "$gl_cv_func_getopt_gnu" >&6; }
11690 if test "$gl_cv_func_getopt_gnu" != yes; then
11691 gl_replace_getopt=yes
11693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11694 printf %s "checking for working GNU getopt_long function... " >&6; }
11695 if test ${gl_cv_func_getopt_long_gnu+y}
11697 printf %s "(cached) " >&6
11699 if test "$cross_compiling" = yes
11702 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11703 *) gl_cv_func_getopt_long_gnu="guessing yes";;
11707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11708 /* end confdefs.h. */
11709 #include <getopt.h>
11710 #include <stddef.h>
11711 #include <string.h>
11716 static const struct option long_options[] =
11718 { "xtremely-",no_argument, NULL, 1003 },
11719 { "xtra", no_argument, NULL, 1001 },
11720 { "xtreme", no_argument, NULL, 1002 },
11721 { "xtremely", no_argument, NULL, 1003 },
11722 { NULL, 0, NULL, 0 }
11724 /* This code fails on OpenBSD 5.0. */
11726 static char program[] = "program";
11727 static char xtremel[] = "--xtremel";
11728 char *argv[] = { program, xtremel, NULL };
11730 optind = 1; opterr = 0;
11731 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11740 if ac_fn_c_try_run "$LINENO"
11742 gl_cv_func_getopt_long_gnu=yes
11744 gl_cv_func_getopt_long_gnu=no
11746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
11752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11753 printf "%s\n" "$gl_cv_func_getopt_long_gnu" >&6; }
11754 case "$gl_cv_func_getopt_long_gnu" in
11756 *) gl_replace_getopt=yes ;;
11767 GNULIB_GETTIMEOFDAY=0;
11768 HAVE_GETTIMEOFDAY=1;
11769 HAVE_STRUCT_TIMEVAL=1;
11771 REPLACE_GETTIMEOFDAY=0;
11772 REPLACE_STRUCT_TIMEVAL=0;
11774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
11775 printf %s "checking for C/C++ restrict keyword... " >&6; }
11776 if test ${ac_cv_c_restrict+y}
11778 printf %s "(cached) " >&6
11780 ac_cv_c_restrict=no
11781 # The order here caters to the fact that C++ does not require restrict.
11782 for ac_kw in __restrict __restrict__ _Restrict restrict; do
11783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h. */
11785 typedef int *int_ptr;
11786 int foo (int_ptr $ac_kw ip) { return ip[0]; }
11787 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
11788 int bar (int ip[$ac_kw]) { return ip[0]; }
11796 return foo (t) + bar (t);
11802 if ac_fn_c_try_compile "$LINENO"
11804 ac_cv_c_restrict=$ac_kw
11806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11807 test "$ac_cv_c_restrict" != no && break
11811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
11812 printf "%s\n" "$ac_cv_c_restrict" >&6; }
11814 case $ac_cv_c_restrict in
11816 no) printf "%s\n" "#define restrict /**/" >>confdefs.h
11818 *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h
11836 if test $gl_cv_have_include_next = yes; then
11837 gl_cv_next_sys_time_h='<'sys/time.h'>'
11839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11840 printf %s "checking absolute name of <sys/time.h>... " >&6; }
11841 if test ${gl_cv_next_sys_time_h+y}
11843 printf %s "(cached) " >&6
11846 if test $ac_cv_header_sys_time_h = yes; then
11851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11852 /* end confdefs.h. */
11853 #include <sys/time.h>
11856 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11857 *) gl_absname_cpp="$ac_cpp" ;;
11862 gl_dirsep_regex='[/\\]'
11865 gl_dirsep_regex='\/'
11868 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11869 gl_header_literal_regex=`echo 'sys/time.h' \
11870 | sed -e "$gl_make_literal_regex_sed"`
11871 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11872 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11878 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11879 sed -n "$gl_absolute_header_sed"`
11881 gl_header=$gl_cv_absolute_sys_time_h
11882 gl_cv_next_sys_time_h='"'$gl_header'"'
11884 gl_cv_next_sys_time_h='<'sys/time.h'>'
11889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11890 printf "%s\n" "$gl_cv_next_sys_time_h" >&6; }
11892 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11894 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11895 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11896 gl_next_as_first_directive='<'sys/time.h'>'
11898 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11899 gl_next_as_first_directive=$gl_cv_next_sys_time_h
11901 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11907 if test $ac_cv_header_sys_time_h != yes; then
11915 if test $ac_cv_header_sys_socket_h != yes; then
11916 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11917 if test "x$ac_cv_header_winsock2_h" = xyes
11919 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
11924 if test "$ac_cv_header_winsock2_h" = yes; then
11926 UNISTD_H_HAVE_WINSOCK2_H=1
11927 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11934 printf %s "checking for struct timeval... " >&6; }
11935 if test ${gl_cv_sys_struct_timeval+y}
11937 printf %s "(cached) " >&6
11939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940 /* end confdefs.h. */
11941 #if HAVE_SYS_TIME_H
11942 #include <sys/time.h>
11945 #if HAVE_WINSOCK2_H
11946 # include <winsock2.h>
11952 static struct timeval x; x.tv_sec = x.tv_usec;
11957 if ac_fn_c_try_compile "$LINENO"
11959 gl_cv_sys_struct_timeval=yes
11961 gl_cv_sys_struct_timeval=no
11963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11967 printf "%s\n" "$gl_cv_sys_struct_timeval" >&6; }
11968 if test $gl_cv_sys_struct_timeval != yes; then
11969 HAVE_STRUCT_TIMEVAL=0
11971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11972 printf %s "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11973 if test ${gl_cv_sys_struct_timeval_tv_sec+y}
11975 printf %s "(cached) " >&6
11977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11978 /* end confdefs.h. */
11979 #if HAVE_SYS_TIME_H
11980 #include <sys/time.h>
11983 #if HAVE_WINSOCK2_H
11984 # include <winsock2.h>
11990 static struct timeval x;
11991 typedef int verify_tv_sec_type[
11992 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11999 if ac_fn_c_try_compile "$LINENO"
12001 gl_cv_sys_struct_timeval_tv_sec=yes
12003 gl_cv_sys_struct_timeval_tv_sec=no
12005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12009 printf "%s\n" "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12010 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12011 REPLACE_STRUCT_TIMEVAL=1
12023 NEED_LOCALTIME_BUFFER=0
12028 GNULIB_LOCALTIME=0;
12029 GNULIB_NANOSLEEP=0;
12036 HAVE_DECL_LOCALTIME_R=1;
12042 REPLACE_CTIME=GNULIB_PORTCHECK;
12043 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
12044 REPLACE_MKTIME=GNULIB_PORTCHECK;
12045 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
12046 REPLACE_STRFTIME=GNULIB_PORTCHECK;
12047 REPLACE_TIMEGM=GNULIB_PORTCHECK;
12048 REPLACE_TZSET=GNULIB_PORTCHECK;
12050 : ${GNULIB_GETTIMEOFDAY=0};
12052 REPLACE_LOCALTIME=0;
12066 acl_save_prefix="$prefix"
12067 prefix="$acl_final_prefix"
12068 acl_save_exec_prefix="$exec_prefix"
12069 exec_prefix="$acl_final_exec_prefix"
12071 eval additional_includedir=\"$includedir\"
12072 eval additional_libdir=\"$libdir\"
12074 exec_prefix="$acl_save_exec_prefix"
12075 prefix="$acl_save_prefix"
12078 # Check whether --with-libiconv-prefix was given.
12079 if test ${with_libiconv_prefix+y}
12081 withval=$with_libiconv_prefix;
12082 if test "X$withval" = "Xno"; then
12085 if test "X$withval" = "X"; then
12087 acl_save_prefix="$prefix"
12088 prefix="$acl_final_prefix"
12089 acl_save_exec_prefix="$exec_prefix"
12090 exec_prefix="$acl_final_exec_prefix"
12092 eval additional_includedir=\"$includedir\"
12093 eval additional_libdir=\"$libdir\"
12095 exec_prefix="$acl_save_exec_prefix"
12096 prefix="$acl_save_prefix"
12099 additional_includedir="$withval/include"
12100 additional_libdir="$withval/$acl_libdirstem"
12101 if test "$acl_libdirstem2" != "$acl_libdirstem" \
12102 && test ! -d "$withval/$acl_libdirstem"; then
12103 additional_libdir="$withval/$acl_libdirstem2"
12117 names_already_handled=
12118 names_next_round='iconv '
12119 while test -n "$names_next_round"; do
12120 names_this_round="$names_next_round"
12122 for name in $names_this_round; do
12124 for n in $names_already_handled; do
12125 if test "$n" = "$name"; then
12126 already_handled=yes
12130 if test -z "$already_handled"; then
12131 names_already_handled="$names_already_handled $name"
12132 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
12133 eval value=\"\$HAVE_LIB$uppername\"
12134 if test -n "$value"; then
12135 if test "$value" = yes; then
12136 eval value=\"\$LIB$uppername\"
12137 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
12138 eval value=\"\$LTLIB$uppername\"
12139 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
12148 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
12149 if test -n "$acl_shlibext"; then
12150 shrext=".$acl_shlibext" # typically: shrext=.so
12154 if test $use_additional = yes; then
12155 dir="$additional_libdir"
12156 if test -n "$acl_shlibext"; then
12157 if test -f "$dir/$libname$shrext"; then
12159 found_so="$dir/$libname$shrext"
12161 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12162 ver=`(cd "$dir" && \
12163 for f in "$libname$shrext".*; do echo "$f"; done \
12164 | sed -e "s,^$libname$shrext\\\\.,," \
12165 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12166 | sed 1q ) 2>/dev/null`
12167 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12169 found_so="$dir/$libname$shrext.$ver"
12172 eval library_names=\"$acl_library_names_spec\"
12173 for f in $library_names; do
12174 if test -f "$dir/$f"; then
12183 if test "X$found_dir" = "X"; then
12184 if test -f "$dir/$libname.$acl_libext"; then
12186 found_a="$dir/$libname.$acl_libext"
12189 if test "X$found_dir" != "X"; then
12190 if test -f "$dir/$libname.la"; then
12191 found_la="$dir/$libname.la"
12195 if test "X$found_dir" = "X"; then
12196 for x in $LDFLAGS $LTLIBICONV; do
12198 acl_save_prefix="$prefix"
12199 prefix="$acl_final_prefix"
12200 acl_save_exec_prefix="$exec_prefix"
12201 exec_prefix="$acl_final_exec_prefix"
12203 exec_prefix="$acl_save_exec_prefix"
12204 prefix="$acl_save_prefix"
12208 dir=`echo "X$x" | sed -e 's/^X-L//'`
12209 if test -n "$acl_shlibext"; then
12210 if test -f "$dir/$libname$shrext"; then
12212 found_so="$dir/$libname$shrext"
12214 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
12215 ver=`(cd "$dir" && \
12216 for f in "$libname$shrext".*; do echo "$f"; done \
12217 | sed -e "s,^$libname$shrext\\\\.,," \
12218 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
12219 | sed 1q ) 2>/dev/null`
12220 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
12222 found_so="$dir/$libname$shrext.$ver"
12225 eval library_names=\"$acl_library_names_spec\"
12226 for f in $library_names; do
12227 if test -f "$dir/$f"; then
12236 if test "X$found_dir" = "X"; then
12237 if test -f "$dir/$libname.$acl_libext"; then
12239 found_a="$dir/$libname.$acl_libext"
12242 if test "X$found_dir" != "X"; then
12243 if test -f "$dir/$libname.la"; then
12244 found_la="$dir/$libname.la"
12249 if test "X$found_dir" != "X"; then
12254 if test "X$found_dir" != "X"; then
12255 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
12256 if test "X$found_so" != "X"; then
12257 if test "$enable_rpath" = no \
12258 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
12259 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
12260 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12263 for x in $ltrpathdirs; do
12264 if test "X$x" = "X$found_dir"; then
12269 if test -z "$haveit"; then
12270 ltrpathdirs="$ltrpathdirs $found_dir"
12272 if test "$acl_hardcode_direct" = yes; then
12273 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12275 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
12276 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12278 for x in $rpathdirs; do
12279 if test "X$x" = "X$found_dir"; then
12284 if test -z "$haveit"; then
12285 rpathdirs="$rpathdirs $found_dir"
12289 for x in $LDFLAGS $LIBICONV; do
12291 acl_save_prefix="$prefix"
12292 prefix="$acl_final_prefix"
12293 acl_save_exec_prefix="$exec_prefix"
12294 exec_prefix="$acl_final_exec_prefix"
12296 exec_prefix="$acl_save_exec_prefix"
12297 prefix="$acl_save_prefix"
12299 if test "X$x" = "X-L$found_dir"; then
12304 if test -z "$haveit"; then
12305 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
12307 if test "$acl_hardcode_minus_L" != no; then
12308 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
12310 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12316 if test "X$found_a" != "X"; then
12317 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
12319 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
12322 additional_includedir=
12323 case "$found_dir" in
12324 */$acl_libdirstem | */$acl_libdirstem/)
12325 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
12326 if test "$name" = 'iconv'; then
12327 LIBICONV_PREFIX="$basedir"
12329 additional_includedir="$basedir/include"
12331 */$acl_libdirstem2 | */$acl_libdirstem2/)
12332 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
12333 if test "$name" = 'iconv'; then
12334 LIBICONV_PREFIX="$basedir"
12336 additional_includedir="$basedir/include"
12339 if test "X$additional_includedir" != "X"; then
12340 if test "X$additional_includedir" != "X/usr/include"; then
12342 if test "X$additional_includedir" = "X/usr/local/include"; then
12343 if test -n "$GCC"; then
12345 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12349 if test -z "$haveit"; then
12350 for x in $CPPFLAGS $INCICONV; do
12352 acl_save_prefix="$prefix"
12353 prefix="$acl_final_prefix"
12354 acl_save_exec_prefix="$exec_prefix"
12355 exec_prefix="$acl_final_exec_prefix"
12357 exec_prefix="$acl_save_exec_prefix"
12358 prefix="$acl_save_prefix"
12360 if test "X$x" = "X-I$additional_includedir"; then
12365 if test -z "$haveit"; then
12366 if test -d "$additional_includedir"; then
12367 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
12373 if test -n "$found_la"; then
12374 save_libdir="$libdir"
12375 case "$found_la" in
12376 */* | *\\*) . "$found_la" ;;
12377 *) . "./$found_la" ;;
12379 libdir="$save_libdir"
12380 for dep in $dependency_libs; do
12383 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
12384 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
12385 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
12387 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
12388 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
12389 if test -n "$GCC"; then
12391 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
12395 if test -z "$haveit"; then
12397 for x in $LDFLAGS $LIBICONV; do
12399 acl_save_prefix="$prefix"
12400 prefix="$acl_final_prefix"
12401 acl_save_exec_prefix="$exec_prefix"
12402 exec_prefix="$acl_final_exec_prefix"
12404 exec_prefix="$acl_save_exec_prefix"
12405 prefix="$acl_save_prefix"
12407 if test "X$x" = "X-L$additional_libdir"; then
12412 if test -z "$haveit"; then
12413 if test -d "$additional_libdir"; then
12414 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
12418 for x in $LDFLAGS $LTLIBICONV; do
12420 acl_save_prefix="$prefix"
12421 prefix="$acl_final_prefix"
12422 acl_save_exec_prefix="$exec_prefix"
12423 exec_prefix="$acl_final_exec_prefix"
12425 exec_prefix="$acl_save_exec_prefix"
12426 prefix="$acl_save_prefix"
12428 if test "X$x" = "X-L$additional_libdir"; then
12433 if test -z "$haveit"; then
12434 if test -d "$additional_libdir"; then
12435 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
12442 dir=`echo "X$dep" | sed -e 's/^X-R//'`
12443 if test "$enable_rpath" != no; then
12445 for x in $rpathdirs; do
12446 if test "X$x" = "X$dir"; then
12451 if test -z "$haveit"; then
12452 rpathdirs="$rpathdirs $dir"
12455 for x in $ltrpathdirs; do
12456 if test "X$x" = "X$dir"; then
12461 if test -z "$haveit"; then
12462 ltrpathdirs="$ltrpathdirs $dir"
12467 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
12470 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
12473 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
12474 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
12480 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
12481 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
12487 if test "X$rpathdirs" != "X"; then
12488 if test -n "$acl_hardcode_libdir_separator"; then
12490 for found_dir in $rpathdirs; do
12491 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
12493 acl_save_libdir="$libdir"
12495 eval flag=\"$acl_hardcode_libdir_flag_spec\"
12496 libdir="$acl_save_libdir"
12497 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12499 for found_dir in $rpathdirs; do
12500 acl_save_libdir="$libdir"
12501 libdir="$found_dir"
12502 eval flag=\"$acl_hardcode_libdir_flag_spec\"
12503 libdir="$acl_save_libdir"
12504 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
12508 if test "X$ltrpathdirs" != "X"; then
12509 for found_dir in $ltrpathdirs; do
12510 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
12524 REPLACE_ICONV_OPEN=0;
12525 REPLACE_ICONV_UTF=0;
12531 if test -n "$ICONV_H"; then
12532 GL_GENERATE_ICONV_H_TRUE=
12533 GL_GENERATE_ICONV_H_FALSE='#'
12535 GL_GENERATE_ICONV_H_TRUE='#'
12536 GL_GENERATE_ICONV_H_FALSE=
12545 am_save_CPPFLAGS="$CPPFLAGS"
12547 for element in $INCICONV; do
12549 for x in $CPPFLAGS; do
12551 acl_save_prefix="$prefix"
12552 prefix="$acl_final_prefix"
12553 acl_save_exec_prefix="$exec_prefix"
12554 exec_prefix="$acl_final_exec_prefix"
12556 exec_prefix="$acl_save_exec_prefix"
12557 prefix="$acl_save_prefix"
12559 if test "X$x" = "X$element"; then
12564 if test -z "$haveit"; then
12565 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
12570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
12571 printf %s "checking for iconv... " >&6; }
12572 if test ${am_cv_func_iconv+y}
12574 printf %s "(cached) " >&6
12577 am_cv_func_iconv="no, consider installing GNU libiconv"
12579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580 /* end confdefs.h. */
12582 #include <stdlib.h>
12588 iconv_t cd = iconv_open("","");
12589 iconv(cd,NULL,NULL,NULL,NULL);
12595 if ac_fn_c_try_link "$LINENO"
12597 am_cv_func_iconv=yes
12599 rm -f core conftest.err conftest.$ac_objext \
12600 conftest$ac_exeext conftest.$ac_ext
12601 if test "$am_cv_func_iconv" != yes; then
12602 am_save_LIBS="$LIBS"
12603 LIBS="$LIBS $LIBICONV"
12604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12605 /* end confdefs.h. */
12607 #include <stdlib.h>
12613 iconv_t cd = iconv_open("","");
12614 iconv(cd,NULL,NULL,NULL,NULL);
12620 if ac_fn_c_try_link "$LINENO"
12622 am_cv_lib_iconv=yes
12623 am_cv_func_iconv=yes
12625 rm -f core conftest.err conftest.$ac_objext \
12626 conftest$ac_exeext conftest.$ac_ext
12627 LIBS="$am_save_LIBS"
12631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
12632 printf "%s\n" "$am_cv_func_iconv" >&6; }
12633 if test "$am_cv_func_iconv" = yes; then
12634 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
12635 printf %s "checking for working iconv... " >&6; }
12636 if test ${am_cv_func_iconv_works+y}
12638 printf %s "(cached) " >&6
12641 am_save_LIBS="$LIBS"
12642 if test $am_cv_lib_iconv = yes; then
12643 LIBS="$LIBS $LIBICONV"
12645 am_cv_func_iconv_works=no
12646 for ac_iconv_const in '' 'const'; do
12647 if test "$cross_compiling" = yes
12650 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
12651 *) am_cv_func_iconv_works="guessing yes" ;;
12654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12655 /* end confdefs.h. */
12658 #include <string.h>
12660 #ifndef ICONV_CONST
12661 # define ICONV_CONST $ac_iconv_const
12668 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
12671 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
12672 if (cd_utf8_to_88591 != (iconv_t)(-1))
12674 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
12676 ICONV_CONST char *inptr = input;
12677 size_t inbytesleft = strlen (input);
12678 char *outptr = buf;
12679 size_t outbytesleft = sizeof (buf);
12680 size_t res = iconv (cd_utf8_to_88591,
12681 &inptr, &inbytesleft,
12682 &outptr, &outbytesleft);
12685 iconv_close (cd_utf8_to_88591);
12688 /* Test against Solaris 10 bug: Failures are not distinguishable from
12689 successful returns. */
12691 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
12692 if (cd_ascii_to_88591 != (iconv_t)(-1))
12694 static ICONV_CONST char input[] = "\263";
12696 ICONV_CONST char *inptr = input;
12697 size_t inbytesleft = strlen (input);
12698 char *outptr = buf;
12699 size_t outbytesleft = sizeof (buf);
12700 size_t res = iconv (cd_ascii_to_88591,
12701 &inptr, &inbytesleft,
12702 &outptr, &outbytesleft);
12705 iconv_close (cd_ascii_to_88591);
12708 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
12710 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
12711 if (cd_88591_to_utf8 != (iconv_t)(-1))
12713 static ICONV_CONST char input[] = "\304";
12714 static char buf[2] = { (char)0xDE, (char)0xAD };
12715 ICONV_CONST char *inptr = input;
12716 size_t inbytesleft = 1;
12717 char *outptr = buf;
12718 size_t outbytesleft = 1;
12719 size_t res = iconv (cd_88591_to_utf8,
12720 &inptr, &inbytesleft,
12721 &outptr, &outbytesleft);
12722 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
12724 iconv_close (cd_88591_to_utf8);
12727 #if 0 /* This bug could be worked around by the caller. */
12728 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
12730 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
12731 if (cd_88591_to_utf8 != (iconv_t)(-1))
12733 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
12735 ICONV_CONST char *inptr = input;
12736 size_t inbytesleft = strlen (input);
12737 char *outptr = buf;
12738 size_t outbytesleft = sizeof (buf);
12739 size_t res = iconv (cd_88591_to_utf8,
12740 &inptr, &inbytesleft,
12741 &outptr, &outbytesleft);
12744 iconv_close (cd_88591_to_utf8);
12748 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
12751 /* Try standardized names. */
12752 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
12753 /* Try IRIX, OSF/1 names. */
12754 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
12755 /* Try AIX names. */
12756 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
12757 /* Try HP-UX names. */
12758 iconv_t cd4 = iconv_open ("utf8", "eucJP");
12759 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
12760 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
12762 if (cd1 != (iconv_t)(-1))
12764 if (cd2 != (iconv_t)(-1))
12766 if (cd3 != (iconv_t)(-1))
12768 if (cd4 != (iconv_t)(-1))
12777 if ac_fn_c_try_run "$LINENO"
12779 am_cv_func_iconv_works=yes
12781 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12782 conftest.$ac_objext conftest.beam conftest.$ac_ext
12785 test "$am_cv_func_iconv_works" = no || break
12787 LIBS="$am_save_LIBS"
12790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
12791 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
12792 case "$am_cv_func_iconv_works" in
12793 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
12794 *) am_func_iconv=yes ;;
12797 am_func_iconv=no am_cv_lib_iconv=no
12799 if test "$am_func_iconv" = yes; then
12801 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
12804 if test "$am_cv_lib_iconv" = yes; then
12805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
12806 printf %s "checking how to link with libiconv... " >&6; }
12807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
12808 printf "%s\n" "$LIBICONV" >&6; }
12810 CPPFLAGS="$am_save_CPPFLAGS"
12817 if test "$am_cv_func_iconv" = yes; then
12818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
12819 printf %s "checking for iconv declaration... " >&6; }
12820 if test ${am_cv_proto_iconv+y}
12822 printf %s "(cached) " >&6
12825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12826 /* end confdefs.h. */
12828 #include <stdlib.h>
12834 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
12835 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
12848 if ac_fn_c_try_compile "$LINENO"
12850 am_cv_proto_iconv_arg1=""
12852 am_cv_proto_iconv_arg1="const"
12854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12855 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);"
12858 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
12859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result:
12860 $am_cv_proto_iconv" >&5
12862 $am_cv_proto_iconv" >&6; }
12864 am_cv_proto_iconv_arg1=""
12867 printf "%s\n" "#define ICONV_CONST $am_cv_proto_iconv_arg1" >>confdefs.h
12870 if test -n "$am_cv_proto_iconv_arg1"; then
12871 ICONV_CONST="const"
12876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12877 printf %s "checking for inline... " >&6; }
12878 if test ${ac_cv_c_inline+y}
12880 printf %s "(cached) " >&6
12883 for ac_kw in inline __inline__ __inline; do
12884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12885 /* end confdefs.h. */
12886 #ifndef __cplusplus
12888 static $ac_kw foo_t static_foo () {return 0; }
12889 $ac_kw foo_t foo () {return 0; }
12893 if ac_fn_c_try_compile "$LINENO"
12895 ac_cv_c_inline=$ac_kw
12897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12898 test "$ac_cv_c_inline" != no && break
12902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12903 printf "%s\n" "$ac_cv_c_inline" >&6; }
12905 case $ac_cv_c_inline in
12908 case $ac_cv_c_inline in
12910 *) ac_val=$ac_cv_c_inline;;
12912 cat >>confdefs.h <<_ACEOF
12913 #ifndef __cplusplus
12914 #define inline $ac_val
12920 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
12921 if test "x$ac_cv_type_off_t" = xyes
12926 printf "%s\n" "#define off_t long int" >>confdefs.h
12941 if test $gl_cv_have_include_next = yes; then
12942 gl_cv_next_limits_h='<'limits.h'>'
12944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12945 printf %s "checking absolute name of <limits.h>... " >&6; }
12946 if test ${gl_cv_next_limits_h+y}
12948 printf %s "(cached) " >&6
12951 if test $ac_cv_header_limits_h = yes; then
12956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12957 /* end confdefs.h. */
12958 #include <limits.h>
12961 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12962 *) gl_absname_cpp="$ac_cpp" ;;
12967 gl_dirsep_regex='[/\\]'
12970 gl_dirsep_regex='\/'
12973 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12974 gl_header_literal_regex=`echo 'limits.h' \
12975 | sed -e "$gl_make_literal_regex_sed"`
12976 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12977 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12983 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12984 sed -n "$gl_absolute_header_sed"`
12986 gl_header=$gl_cv_absolute_limits_h
12987 gl_cv_next_limits_h='"'$gl_header'"'
12989 gl_cv_next_limits_h='<'limits.h'>'
12994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12995 printf "%s\n" "$gl_cv_next_limits_h" >&6; }
12997 NEXT_LIMITS_H=$gl_cv_next_limits_h
12999 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13000 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13001 gl_next_as_first_directive='<'limits.h'>'
13003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13004 gl_next_as_first_directive=$gl_cv_next_limits_h
13006 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
13012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
13013 printf %s "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
13014 if test ${gl_cv_header_limits_width+y}
13016 printf %s "(cached) " >&6
13018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13019 /* end confdefs.h. */
13020 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13021 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13023 #include <limits.h>
13024 long long llm = LLONG_MAX;
13026 int ullw = ULLONG_WIDTH;
13036 if ac_fn_c_try_compile "$LINENO"
13038 gl_cv_header_limits_width=yes
13040 gl_cv_header_limits_width=no
13042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
13045 printf "%s\n" "$gl_cv_header_limits_width" >&6; }
13046 if test "$gl_cv_header_limits_width" = yes; then
13052 if test -n "$LIMITS_H"; then
13053 GL_GENERATE_LIMITS_H_TRUE=
13054 GL_GENERATE_LIMITS_H_FALSE='#'
13056 GL_GENERATE_LIMITS_H_TRUE='#'
13057 GL_GENERATE_LIMITS_H_FALSE=
13062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13063 printf %s "checking for wint_t... " >&6; }
13064 if test ${gt_cv_c_wint_t+y}
13066 printf %s "(cached) " >&6
13068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13069 /* end confdefs.h. */
13071 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13073 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13074 before <wchar.h>. */
13075 #include <stddef.h>
13079 wint_t foo = (wchar_t)'\0';
13088 if ac_fn_c_try_compile "$LINENO"
13094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13097 printf "%s\n" "$gt_cv_c_wint_t" >&6; }
13098 if test $gt_cv_c_wint_t = yes; then
13100 printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
13103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5
13104 printf %s "checking whether wint_t is too small... " >&6; }
13105 if test ${gl_cv_type_wint_t_too_small+y}
13107 printf %s "(cached) " >&6
13109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110 /* end confdefs.h. */
13112 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13114 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13115 included before <wchar.h>. */
13116 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13117 # include <stddef.h>
13118 # include <stdio.h>
13122 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
13132 if ac_fn_c_try_compile "$LINENO"
13134 gl_cv_type_wint_t_too_small=no
13136 gl_cv_type_wint_t_too_small=yes
13138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5
13141 printf "%s\n" "$gl_cv_type_wint_t_too_small" >&6; }
13142 if test $gl_cv_type_wint_t_too_small = yes; then
13143 GNULIB_OVERRIDES_WINT_T=1
13145 GNULIB_OVERRIDES_WINT_T=0
13148 GNULIB_OVERRIDES_WINT_T=0
13153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
13154 printf %s "checking for unsigned long long int... " >&6; }
13155 if test ${ac_cv_type_unsigned_long_long_int+y}
13157 printf %s "(cached) " >&6
13159 ac_cv_type_unsigned_long_long_int=yes
13160 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
13161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162 /* end confdefs.h. */
13164 /* For now, do not test the preprocessor; as of 2007 there are too many
13165 implementations with broken preprocessors. Perhaps this can
13166 be revisited in 2012. In the meantime, code should not expect
13167 #if to work with literals wider than 32 bits. */
13168 /* Test literals. */
13169 long long int ll = 9223372036854775807ll;
13170 long long int nll = -9223372036854775807LL;
13171 unsigned long long int ull = 18446744073709551615ULL;
13172 /* Test constant expressions. */
13173 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
13175 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
13181 /* Test availability of runtime routines for shift and division. */
13182 long long int llmax = 9223372036854775807ll;
13183 unsigned long long int ullmax = 18446744073709551615ull;
13184 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
13185 | (llmax / ll) | (llmax % ll)
13186 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
13187 | (ullmax / ull) | (ullmax % ull));
13193 if ac_fn_c_try_link "$LINENO"
13197 ac_cv_type_unsigned_long_long_int=no
13199 rm -f core conftest.err conftest.$ac_objext \
13200 conftest$ac_exeext conftest.$ac_ext
13203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
13204 printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
13205 if test $ac_cv_type_unsigned_long_long_int = yes; then
13207 printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
13213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
13214 printf %s "checking for long long int... " >&6; }
13215 if test ${ac_cv_type_long_long_int+y}
13217 printf %s "(cached) " >&6
13219 ac_cv_type_long_long_int=yes
13220 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
13221 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
13222 if test $ac_cv_type_long_long_int = yes; then
13223 if test "$cross_compiling" = yes
13227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13228 /* end confdefs.h. */
13229 #include <limits.h>
13232 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
13233 # define LLONG_MAX (HALF - 1 + HALF)
13238 long long int n = 1;
13242 long long int m = n << i;
13245 if (LLONG_MAX / 2 < m)
13253 if ac_fn_c_try_run "$LINENO"
13257 ac_cv_type_long_long_int=no
13259 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13260 conftest.$ac_objext conftest.beam conftest.$ac_ext
13266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
13267 printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
13268 if test $ac_cv_type_long_long_int = yes; then
13270 printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
13276 gl_cv_c_multiarch=no
13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13278 /* end confdefs.h. */
13279 #ifndef __APPLE_CC__
13280 not a universal capable compiler
13285 if ac_fn_c_try_compile "$LINENO"
13290 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
13291 if test -n "$prev"; then
13293 i?86 | x86_64 | ppc | ppc64)
13294 if test -z "$arch" || test "$arch" = "$word"; then
13297 gl_cv_c_multiarch=yes
13303 if test "x$word" = "x-arch"; then
13310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13311 if test $gl_cv_c_multiarch = yes; then
13312 APPLE_UNIVERSAL_BUILD=1
13314 APPLE_UNIVERSAL_BUILD=0
13324 if test $ac_cv_type_long_long_int = yes; then
13325 HAVE_LONG_LONG_INT=1
13327 HAVE_LONG_LONG_INT=0
13331 if test $ac_cv_type_unsigned_long_long_int = yes; then
13332 HAVE_UNSIGNED_LONG_LONG_INT=1
13334 HAVE_UNSIGNED_LONG_LONG_INT=0
13339 if test $ac_cv_header_wchar_h = yes; then
13346 if test $ac_cv_header_inttypes_h = yes; then
13353 if test $ac_cv_header_sys_types_h = yes; then
13369 if test $gl_cv_have_include_next = yes; then
13370 gl_cv_next_stdint_h='<'stdint.h'>'
13372 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
13373 printf %s "checking absolute name of <stdint.h>... " >&6; }
13374 if test ${gl_cv_next_stdint_h+y}
13376 printf %s "(cached) " >&6
13379 if test $ac_cv_header_stdint_h = yes; then
13384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385 /* end confdefs.h. */
13386 #include <stdint.h>
13389 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13390 *) gl_absname_cpp="$ac_cpp" ;;
13395 gl_dirsep_regex='[/\\]'
13398 gl_dirsep_regex='\/'
13401 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13402 gl_header_literal_regex=`echo 'stdint.h' \
13403 | sed -e "$gl_make_literal_regex_sed"`
13404 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13405 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13411 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13412 sed -n "$gl_absolute_header_sed"`
13414 gl_header=$gl_cv_absolute_stdint_h
13415 gl_cv_next_stdint_h='"'$gl_header'"'
13417 gl_cv_next_stdint_h='<'stdint.h'>'
13422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
13423 printf "%s\n" "$gl_cv_next_stdint_h" >&6; }
13425 NEXT_STDINT_H=$gl_cv_next_stdint_h
13427 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13428 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13429 gl_next_as_first_directive='<'stdint.h'>'
13431 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13432 gl_next_as_first_directive=$gl_cv_next_stdint_h
13434 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
13439 if test $ac_cv_header_stdint_h = yes; then
13446 if test $ac_cv_header_stdint_h = yes; then
13447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
13448 printf %s "checking whether stdint.h conforms to C99... " >&6; }
13449 if test ${gl_cv_header_working_stdint_h+y}
13451 printf %s "(cached) " >&6
13453 gl_cv_header_working_stdint_h=no
13454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13455 /* end confdefs.h. */
13458 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13459 #define __STDC_CONSTANT_MACROS 1
13460 #define __STDC_LIMIT_MACROS 1
13461 #include <stdint.h>
13462 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
13463 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
13464 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
13468 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13469 included before <wchar.h>. */
13470 #include <stddef.h>
13471 #include <signal.h>
13473 # include <stdio.h>
13475 # include <wchar.h>
13480 int8_t a1 = INT8_MAX;
13481 int8_t a1min = INT8_MIN;
13484 int16_t a2 = INT16_MAX;
13485 int16_t a2min = INT16_MIN;
13488 int32_t a3 = INT32_MAX;
13489 int32_t a3min = INT32_MIN;
13492 int64_t a4 = INT64_MAX;
13493 int64_t a4min = INT64_MIN;
13496 uint8_t b1 = UINT8_MAX;
13498 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
13501 uint16_t b2 = UINT16_MAX;
13504 uint32_t b3 = UINT32_MAX;
13507 uint64_t b4 = UINT64_MAX;
13509 int_least8_t c1 = INT8_C (0x7f);
13510 int_least8_t c1max = INT_LEAST8_MAX;
13511 int_least8_t c1min = INT_LEAST8_MIN;
13512 int_least16_t c2 = INT16_C (0x7fff);
13513 int_least16_t c2max = INT_LEAST16_MAX;
13514 int_least16_t c2min = INT_LEAST16_MIN;
13515 int_least32_t c3 = INT32_C (0x7fffffff);
13516 int_least32_t c3max = INT_LEAST32_MAX;
13517 int_least32_t c3min = INT_LEAST32_MIN;
13518 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
13519 int_least64_t c4max = INT_LEAST64_MAX;
13520 int_least64_t c4min = INT_LEAST64_MIN;
13521 uint_least8_t d1 = UINT8_C (0xff);
13522 uint_least8_t d1max = UINT_LEAST8_MAX;
13523 uint_least16_t d2 = UINT16_C (0xffff);
13524 uint_least16_t d2max = UINT_LEAST16_MAX;
13525 uint_least32_t d3 = UINT32_C (0xffffffff);
13526 uint_least32_t d3max = UINT_LEAST32_MAX;
13527 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
13528 uint_least64_t d4max = UINT_LEAST64_MAX;
13529 int_fast8_t e1 = INT_FAST8_MAX;
13530 int_fast8_t e1min = INT_FAST8_MIN;
13531 int_fast16_t e2 = INT_FAST16_MAX;
13532 int_fast16_t e2min = INT_FAST16_MIN;
13533 int_fast32_t e3 = INT_FAST32_MAX;
13534 int_fast32_t e3min = INT_FAST32_MIN;
13535 int_fast64_t e4 = INT_FAST64_MAX;
13536 int_fast64_t e4min = INT_FAST64_MIN;
13537 uint_fast8_t f1 = UINT_FAST8_MAX;
13538 uint_fast16_t f2 = UINT_FAST16_MAX;
13539 uint_fast32_t f3 = UINT_FAST32_MAX;
13540 uint_fast64_t f4 = UINT_FAST64_MAX;
13542 intptr_t g = INTPTR_MAX;
13543 intptr_t gmin = INTPTR_MIN;
13546 uintptr_t h = UINTPTR_MAX;
13548 intmax_t i = INTMAX_MAX;
13549 uintmax_t j = UINTMAX_MAX;
13551 /* Check that SIZE_MAX has the correct type, if possible. */
13552 #if 201112 <= __STDC_VERSION__
13553 int k = _Generic (SIZE_MAX, size_t: 0);
13554 #elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
13555 || (0x5110 <= __SUNPRO_C && !__STDC__))
13557 extern __typeof__ (SIZE_MAX) k;
13560 #include <limits.h> /* for CHAR_BIT */
13561 #define TYPE_MINIMUM(t) \
13562 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
13563 #define TYPE_MAXIMUM(t) \
13564 ((t) ((t) 0 < (t) -1 \
13566 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
13569 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
13570 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
13572 /* Detect bug in FreeBSD 6.0 / ia64. */
13573 int check_SIG_ATOMIC:
13574 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
13575 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
13577 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
13579 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
13580 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
13582 /* Detect bug in mingw. */
13584 WINT_MIN == TYPE_MINIMUM (wint_t)
13585 && WINT_MAX == TYPE_MAXIMUM (wint_t)
13588 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
13590 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
13591 int check_UINT16_C:
13592 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
13594 /* Detect bugs in OpenBSD 3.9 stdint.h. */
13596 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
13599 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
13602 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
13605 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
13607 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
13608 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
13609 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
13610 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
13611 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
13612 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
13613 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
13614 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
13615 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
13616 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
13617 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
13628 if ac_fn_c_try_compile "$LINENO"
13630 if test "$cross_compiling" = yes
13633 # Guess yes on native Windows.
13634 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
13635 # In general, assume it works.
13636 *) gl_cv_header_working_stdint_h="guessing yes" ;;
13640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641 /* end confdefs.h. */
13644 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13645 #define __STDC_CONSTANT_MACROS 1
13646 #define __STDC_LIMIT_MACROS 1
13647 #include <stdint.h>
13650 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13651 included before <wchar.h>. */
13652 #include <stddef.h>
13653 #include <signal.h>
13655 # include <stdio.h>
13657 # include <wchar.h>
13662 #include <string.h>
13663 #define MVAL(macro) MVAL1(macro)
13664 #define MVAL1(expression) #expression
13665 static const char *macro_values[] =
13699 for (mv = macro_values; *mv != NULL; mv++)
13701 const char *value = *mv;
13702 /* Test whether it looks like a cast expression. */
13703 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13704 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13705 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13706 || strncmp (value, "((int)"/*)*/, 6) == 0
13707 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13708 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13709 return mv - macro_values + 1;
13717 if ac_fn_c_try_run "$LINENO"
13719 gl_cv_header_working_stdint_h=yes
13721 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13722 conftest.$ac_objext conftest.beam conftest.$ac_ext
13727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13731 printf "%s\n" "$gl_cv_header_working_stdint_h" >&6; }
13734 HAVE_C99_STDINT_H=0
13735 HAVE_SYS_BITYPES_H=0
13736 HAVE_SYS_INTTYPES_H=0
13738 case "$gl_cv_header_working_stdint_h" in
13740 HAVE_C99_STDINT_H=1
13741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5
13742 printf %s "checking whether stdint.h predates C++11... " >&6; }
13743 if test ${gl_cv_header_stdint_predates_cxx11_h+y}
13745 printf %s "(cached) " >&6
13747 gl_cv_header_stdint_predates_cxx11_h=yes
13748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13749 /* end confdefs.h. */
13752 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13753 #include <stdint.h>
13756 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13757 included before <wchar.h>. */
13758 #include <stddef.h>
13759 #include <signal.h>
13761 # include <stdio.h>
13763 # include <wchar.h>
13767 intmax_t im = INTMAX_MAX;
13768 int32_t i32 = INT32_C (0x7fffffff);
13778 if ac_fn_c_try_compile "$LINENO"
13780 gl_cv_header_stdint_predates_cxx11_h=no
13782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5
13785 printf "%s\n" "$gl_cv_header_stdint_predates_cxx11_h" >&6; }
13787 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
13789 printf "%s\n" "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13792 printf "%s\n" "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13796 printf %s "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13797 if test ${gl_cv_header_stdint_width+y}
13799 printf %s "(cached) " >&6
13801 gl_cv_header_stdint_width=no
13802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13803 /* end confdefs.h. */
13805 /* Work if build is not clean. */
13806 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13807 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13808 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13810 #include <stdint.h>
13812 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13813 included before <wchar.h>. */
13814 #include <stddef.h>
13815 #include <signal.h>
13817 # include <stdio.h>
13819 # include <wchar.h>
13822 int iw = UINTMAX_WIDTH;
13832 if ac_fn_c_try_compile "$LINENO"
13834 gl_cv_header_stdint_width=yes
13836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13839 printf "%s\n" "$gl_cv_header_stdint_width" >&6; }
13840 if test "$gl_cv_header_stdint_width" = yes; then
13845 ac_fn_c_check_header_compile "$LINENO" "sys/inttypes.h" "ac_cv_header_sys_inttypes_h" "$ac_includes_default"
13846 if test "x$ac_cv_header_sys_inttypes_h" = xyes
13848 printf "%s\n" "#define HAVE_SYS_INTTYPES_H 1" >>confdefs.h
13851 ac_fn_c_check_header_compile "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
13852 if test "x$ac_cv_header_sys_bitypes_h" = xyes
13854 printf "%s\n" "#define HAVE_SYS_BITYPES_H 1" >>confdefs.h
13858 if test $ac_cv_header_sys_inttypes_h = yes; then
13859 HAVE_SYS_INTTYPES_H=1
13861 if test $ac_cv_header_sys_bitypes_h = yes; then
13862 HAVE_SYS_BITYPES_H=1
13866 if test $APPLE_UNIVERSAL_BUILD = 0; then
13869 for gltype in ptrdiff_t size_t ; do
13870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13871 printf %s "checking for bit size of $gltype... " >&6; }
13872 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13874 printf %s "(cached) " >&6
13876 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13877 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13878 included before <wchar.h>. */
13879 #include <stddef.h>
13880 #include <signal.h>
13882 # include <stdio.h>
13884 # include <wchar.h>
13887 #include <limits.h>"
13894 eval gl_cv_bitsizeof_${gltype}=\$result
13897 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13899 printf "%s\n" "$ac_res" >&6; }
13900 eval result=\$gl_cv_bitsizeof_${gltype}
13901 if test $result = unknown; then
13904 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13905 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13907 eval BITSIZEOF_${GLTYPE}=\$result
13914 for gltype in sig_atomic_t wchar_t wint_t ; do
13915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13916 printf %s "checking for bit size of $gltype... " >&6; }
13917 if eval test \${gl_cv_bitsizeof_${gltype}+y}
13919 printf %s "(cached) " >&6
13921 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13922 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13923 included before <wchar.h>. */
13924 #include <stddef.h>
13925 #include <signal.h>
13927 # include <stdio.h>
13929 # include <wchar.h>
13932 #include <limits.h>"
13939 eval gl_cv_bitsizeof_${gltype}=\$result
13942 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13944 printf "%s\n" "$ac_res" >&6; }
13945 eval result=\$gl_cv_bitsizeof_${gltype}
13946 if test $result = unknown; then
13949 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13950 printf "%s\n" "#define BITSIZEOF_${GLTYPE} $result" >>confdefs.h
13952 eval BITSIZEOF_${GLTYPE}=\$result
13958 for gltype in sig_atomic_t wchar_t wint_t ; do
13959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13960 printf %s "checking whether $gltype is signed... " >&6; }
13961 if eval test \${gl_cv_type_${gltype}_signed+y}
13963 printf %s "(cached) " >&6
13965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13966 /* end confdefs.h. */
13968 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13969 included before <wchar.h>. */
13970 #include <stddef.h>
13971 #include <signal.h>
13973 # include <stdio.h>
13975 # include <wchar.h>
13978 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13987 if ac_fn_c_try_compile "$LINENO"
13993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13994 eval gl_cv_type_${gltype}_signed=\$result
13997 eval ac_res=\$gl_cv_type_${gltype}_signed
13998 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13999 printf "%s\n" "$ac_res" >&6; }
14000 eval result=\$gl_cv_type_${gltype}_signed
14001 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14002 if test "$result" = yes; then
14003 printf "%s\n" "#define HAVE_SIGNED_${GLTYPE} 1" >>confdefs.h
14005 eval HAVE_SIGNED_${GLTYPE}=1
14007 eval HAVE_SIGNED_${GLTYPE}=0
14012 gl_cv_type_ptrdiff_t_signed=yes
14013 gl_cv_type_size_t_signed=no
14014 if test $APPLE_UNIVERSAL_BUILD = 0; then
14017 for gltype in ptrdiff_t size_t ; do
14018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14019 printf %s "checking for $gltype integer literal suffix... " >&6; }
14020 if eval test \${gl_cv_type_${gltype}_suffix+y}
14022 printf %s "(cached) " >&6
14024 eval gl_cv_type_${gltype}_suffix=no
14025 eval result=\$gl_cv_type_${gltype}_signed
14026 if test "$result" = yes; then
14031 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14033 '') gltype1='int';;
14034 l) gltype1='long int';;
14035 ll) gltype1='long long int';;
14036 i64) gltype1='__int64';;
14037 u) gltype1='unsigned int';;
14038 ul) gltype1='unsigned long int';;
14039 ull) gltype1='unsigned long long int';;
14040 ui64)gltype1='unsigned __int64';;
14042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14043 /* end confdefs.h. */
14045 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14046 included before <wchar.h>. */
14047 #include <stddef.h>
14048 #include <signal.h>
14050 # include <stdio.h>
14052 # include <wchar.h>
14055 extern $gltype foo;
14056 extern $gltype1 foo;
14065 if ac_fn_c_try_compile "$LINENO"
14067 eval gl_cv_type_${gltype}_suffix=\$glsuf
14069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14070 eval result=\$gl_cv_type_${gltype}_suffix
14071 test "$result" != no && break
14074 eval ac_res=\$gl_cv_type_${gltype}_suffix
14075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14076 printf "%s\n" "$ac_res" >&6; }
14077 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14078 eval result=\$gl_cv_type_${gltype}_suffix
14079 test "$result" = no && result=
14080 eval ${GLTYPE}_SUFFIX=\$result
14081 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
14089 for gltype in sig_atomic_t wchar_t wint_t ; do
14090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
14091 printf %s "checking for $gltype integer literal suffix... " >&6; }
14092 if eval test \${gl_cv_type_${gltype}_suffix+y}
14094 printf %s "(cached) " >&6
14096 eval gl_cv_type_${gltype}_suffix=no
14097 eval result=\$gl_cv_type_${gltype}_signed
14098 if test "$result" = yes; then
14103 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
14105 '') gltype1='int';;
14106 l) gltype1='long int';;
14107 ll) gltype1='long long int';;
14108 i64) gltype1='__int64';;
14109 u) gltype1='unsigned int';;
14110 ul) gltype1='unsigned long int';;
14111 ull) gltype1='unsigned long long int';;
14112 ui64)gltype1='unsigned __int64';;
14114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14115 /* end confdefs.h. */
14117 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14118 included before <wchar.h>. */
14119 #include <stddef.h>
14120 #include <signal.h>
14122 # include <stdio.h>
14124 # include <wchar.h>
14127 extern $gltype foo;
14128 extern $gltype1 foo;
14137 if ac_fn_c_try_compile "$LINENO"
14139 eval gl_cv_type_${gltype}_suffix=\$glsuf
14141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14142 eval result=\$gl_cv_type_${gltype}_suffix
14143 test "$result" != no && break
14146 eval ac_res=\$gl_cv_type_${gltype}_suffix
14147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14148 printf "%s\n" "$ac_res" >&6; }
14149 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
14150 eval result=\$gl_cv_type_${gltype}_suffix
14151 test "$result" = no && result=
14152 eval ${GLTYPE}_SUFFIX=\$result
14153 printf "%s\n" "#define ${GLTYPE}_SUFFIX $result" >>confdefs.h
14159 if test $GNULIB_OVERRIDES_WINT_T = 1; then
14160 BITSIZEOF_WINT_T=32
14168 LIMITS_H='limits.h'
14169 if test -n "$LIMITS_H"; then
14170 GL_GENERATE_LIMITS_H_TRUE=
14171 GL_GENERATE_LIMITS_H_FALSE='#'
14173 GL_GENERATE_LIMITS_H_TRUE='#'
14174 GL_GENERATE_LIMITS_H_FALSE=
14183 if test -n "$STDINT_H"; then
14184 GL_GENERATE_STDINT_H_TRUE=
14185 GL_GENERATE_STDINT_H_FALSE='#'
14187 GL_GENERATE_STDINT_H_TRUE='#'
14188 GL_GENERATE_STDINT_H_FALSE=
14195 GNULIB_STRTOIMAX=0;
14196 GNULIB_STRTOUMAX=0;
14197 HAVE_DECL_IMAXABS=1;
14198 HAVE_DECL_IMAXDIV=1;
14199 HAVE_DECL_STRTOIMAX=1;
14200 HAVE_DECL_STRTOUMAX=1;
14202 REPLACE_STRTOIMAX=0;
14203 REPLACE_STRTOUMAX=0;
14204 INT32_MAX_LT_INTMAX_MAX=1;
14205 INT64_MAX_EQ_LONG_MAX='defined _LP64';
14206 PRI_MACROS_BROKEN=0;
14207 PRIPTR_PREFIX=__PRIPTR_PREFIX;
14208 UINT32_MAX_LT_UINTMAX_MAX=1;
14209 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
14225 if test $gl_cv_have_include_next = yes; then
14226 gl_cv_next_inttypes_h='<'inttypes.h'>'
14228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
14229 printf %s "checking absolute name of <inttypes.h>... " >&6; }
14230 if test ${gl_cv_next_inttypes_h+y}
14232 printf %s "(cached) " >&6
14235 if test $ac_cv_header_inttypes_h = yes; then
14240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14241 /* end confdefs.h. */
14242 #include <inttypes.h>
14245 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14246 *) gl_absname_cpp="$ac_cpp" ;;
14251 gl_dirsep_regex='[/\\]'
14254 gl_dirsep_regex='\/'
14257 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14258 gl_header_literal_regex=`echo 'inttypes.h' \
14259 | sed -e "$gl_make_literal_regex_sed"`
14260 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14261 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14267 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14268 sed -n "$gl_absolute_header_sed"`
14270 gl_header=$gl_cv_absolute_inttypes_h
14271 gl_cv_next_inttypes_h='"'$gl_header'"'
14273 gl_cv_next_inttypes_h='<'inttypes.h'>'
14278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
14279 printf "%s\n" "$gl_cv_next_inttypes_h" >&6; }
14281 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
14283 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14284 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14285 gl_next_as_first_directive='<'inttypes.h'>'
14287 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14288 gl_next_as_first_directive=$gl_cv_next_inttypes_h
14290 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
14303 ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
14304 if test "x$ac_cv_header_inttypes_h" = xyes
14306 printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
14310 if test $ac_cv_header_inttypes_h = yes; then
14311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
14312 printf %s "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
14313 if test ${gt_cv_inttypes_pri_broken+y}
14315 printf %s "(cached) " >&6
14318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14319 /* end confdefs.h. */
14321 #include <inttypes.h>
14334 if ac_fn_c_try_compile "$LINENO"
14336 gt_cv_inttypes_pri_broken=no
14338 gt_cv_inttypes_pri_broken=yes
14340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
14344 printf "%s\n" "$gt_cv_inttypes_pri_broken" >&6; }
14346 if test "$gt_cv_inttypes_pri_broken" = yes; then
14348 printf "%s\n" "#define PRI_MACROS_BROKEN 1" >>confdefs.h
14350 PRI_MACROS_BROKEN=1
14352 PRI_MACROS_BROKEN=0
14361 GNULIB_TOWCTRANS=0;
14365 REPLACE_ISWBLANK=0;
14371 if test $ac_cv_header_crtdefs_h = yes; then
14383 if test $ac_cv_func_iswcntrl = yes; then
14391 if test $gt_cv_c_wint_t = yes; then
14409 if test $gl_cv_have_include_next = yes; then
14410 gl_cv_next_wctype_h='<'wctype.h'>'
14412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
14413 printf %s "checking absolute name of <wctype.h>... " >&6; }
14414 if test ${gl_cv_next_wctype_h+y}
14416 printf %s "(cached) " >&6
14419 if test $ac_cv_header_wctype_h = yes; then
14424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14425 /* end confdefs.h. */
14426 #include <wctype.h>
14429 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14430 *) gl_absname_cpp="$ac_cpp" ;;
14435 gl_dirsep_regex='[/\\]'
14438 gl_dirsep_regex='\/'
14441 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14442 gl_header_literal_regex=`echo 'wctype.h' \
14443 | sed -e "$gl_make_literal_regex_sed"`
14444 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14445 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14451 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14452 sed -n "$gl_absolute_header_sed"`
14454 gl_header=$gl_cv_absolute_wctype_h
14455 gl_cv_next_wctype_h='"'$gl_header'"'
14457 gl_cv_next_wctype_h='<'wctype.h'>'
14462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
14463 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
14465 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
14467 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14469 gl_next_as_first_directive='<'wctype.h'>'
14471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14472 gl_next_as_first_directive=$gl_cv_next_wctype_h
14474 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
14479 if test $ac_cv_header_wctype_h = yes; then
14480 if test $ac_cv_func_iswcntrl = yes; then
14481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
14482 printf %s "checking whether iswcntrl works... " >&6; }
14483 if test ${gl_cv_func_iswcntrl_works+y}
14485 printf %s "(cached) " >&6
14488 if test "$cross_compiling" = yes
14490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h. */
14492 #include <stdlib.h>
14493 #if __GNU_LIBRARY__ == 1
14494 Linux libc5 i18n is broken.
14504 if ac_fn_c_try_compile "$LINENO"
14506 gl_cv_func_iswcntrl_works="guessing yes"
14508 gl_cv_func_iswcntrl_works="guessing no"
14510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14514 /* end confdefs.h. */
14516 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14517 included before <wchar.h>.
14518 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14519 must be included before <wchar.h>. */
14520 #include <stddef.h>
14524 #include <wctype.h>
14525 int main () { return iswprint ('x') == 0; }
14528 if ac_fn_c_try_run "$LINENO"
14530 gl_cv_func_iswcntrl_works=yes
14532 gl_cv_func_iswcntrl_works=no
14534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14535 conftest.$ac_objext conftest.beam conftest.$ac_ext
14540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
14541 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
14549 case "$gl_cv_func_iswcntrl_works" in
14550 *yes) REPLACE_ISWCNTRL=0 ;;
14551 *) REPLACE_ISWCNTRL=1 ;;
14555 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
14559 if test $REPLACE_ISWCNTRL = 1; then
14562 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14563 if test "x$ac_cv_func_towlower" = xyes
14565 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
14569 if test $ac_cv_func_towlower = yes; then
14572 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14573 included before <wchar.h>.
14574 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14575 must be included before <wchar.h>. */
14576 #include <stddef.h>
14581 # include <wctype.h>
14585 if test "x$ac_cv_have_decl_towlower" = xyes
14592 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
14594 if test $ac_cv_have_decl_towlower = yes; then
14603 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
14607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
14608 printf %s "checking for wctype_t... " >&6; }
14609 if test ${gl_cv_type_wctype_t+y}
14611 printf %s "(cached) " >&6
14613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14614 /* end confdefs.h. */
14615 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14616 included before <wchar.h>.
14617 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14618 must be included before <wchar.h>. */
14619 #include <stddef.h>
14624 # include <wctype.h>
14636 if ac_fn_c_try_compile "$LINENO"
14638 gl_cv_type_wctype_t=yes
14640 gl_cv_type_wctype_t=no
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
14646 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
14647 if test $gl_cv_type_wctype_t = no; then
14651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
14652 printf %s "checking for wctrans_t... " >&6; }
14653 if test ${gl_cv_type_wctrans_t+y}
14655 printf %s "(cached) " >&6
14657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14658 /* end confdefs.h. */
14659 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14660 included before <wchar.h>.
14661 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14662 must be included before <wchar.h>. */
14663 #include <stddef.h>
14667 #include <wctype.h>
14678 if ac_fn_c_try_compile "$LINENO"
14680 gl_cv_type_wctrans_t=yes
14682 gl_cv_type_wctrans_t=no
14684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
14688 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
14689 if test $gl_cv_type_wctrans_t = no; then
14699 GNULIB_NL_LANGINFO=0;
14700 HAVE_NL_LANGINFO=1;
14701 REPLACE_NL_LANGINFO=0;
14705 GNULIB_LOCALECONV=0;
14706 GNULIB_SETLOCALE=0;
14707 GNULIB_DUPLOCALE=0;
14708 GNULIB_LOCALENAME=0;
14712 REPLACE_LOCALECONV=0;
14713 REPLACE_SETLOCALE=0;
14714 REPLACE_NEWLOCALE=0;
14715 REPLACE_DUPLOCALE=0;
14716 REPLACE_FREELOCALE=0;
14717 REPLACE_STRUCT_LCONV=0;
14721 HAVE_MAX_ALIGN_T=1;
14725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14726 printf %s "checking for wchar_t... " >&6; }
14727 if test ${gt_cv_c_wchar_t+y}
14729 printf %s "(cached) " >&6
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14733 #include <stddef.h>
14734 wchar_t foo = (wchar_t)'\0';
14743 if ac_fn_c_try_compile "$LINENO"
14745 gt_cv_c_wchar_t=yes
14749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14752 printf "%s\n" "$gt_cv_c_wchar_t" >&6; }
14753 if test $gt_cv_c_wchar_t = yes; then
14755 printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
14764 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14765 printf %s "checking for good max_align_t... " >&6; }
14766 if test ${gl_cv_type_max_align_t+y}
14768 printf %s "(cached) " >&6
14770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14771 /* end confdefs.h. */
14772 #include <stddef.h>
14773 unsigned int s = sizeof (max_align_t);
14774 #if defined __GNUC__ || defined __IBM__ALIGNOF__
14775 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14776 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14787 if ac_fn_c_try_compile "$LINENO"
14789 gl_cv_type_max_align_t=yes
14791 gl_cv_type_max_align_t=no
14793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14797 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
14798 if test $gl_cv_type_max_align_t = no; then
14803 if test $gt_cv_c_wchar_t = no; then
14808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14809 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
14810 if test ${gl_cv_decl_null_works+y}
14812 printf %s "(cached) " >&6
14814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14815 /* end confdefs.h. */
14816 #include <stddef.h>
14817 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14827 if ac_fn_c_try_compile "$LINENO"
14829 gl_cv_decl_null_works=yes
14831 gl_cv_decl_null_works=no
14833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14836 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
14837 if test $gl_cv_decl_null_works = no; then
14843 if test -n "$STDDEF_H"; then
14844 GL_GENERATE_STDDEF_H_TRUE=
14845 GL_GENERATE_STDDEF_H_FALSE='#'
14847 GL_GENERATE_STDDEF_H_TRUE='#'
14848 GL_GENERATE_STDDEF_H_FALSE=
14851 if test -n "$STDDEF_H"; then
14860 if test $gl_cv_have_include_next = yes; then
14861 gl_cv_next_stddef_h='<'stddef.h'>'
14863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14864 printf %s "checking absolute name of <stddef.h>... " >&6; }
14865 if test ${gl_cv_next_stddef_h+y}
14867 printf %s "(cached) " >&6
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h. */
14874 #include <stddef.h>
14877 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14878 *) gl_absname_cpp="$ac_cpp" ;;
14883 gl_dirsep_regex='[/\\]'
14886 gl_dirsep_regex='\/'
14889 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14890 gl_header_literal_regex=`echo 'stddef.h' \
14891 | sed -e "$gl_make_literal_regex_sed"`
14892 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14893 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14899 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14900 sed -n "$gl_absolute_header_sed"`
14902 gl_header=$gl_cv_absolute_stddef_h
14903 gl_cv_next_stddef_h='"'$gl_header'"'
14907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14908 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
14910 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14912 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14913 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14914 gl_next_as_first_directive='<'stddef.h'>'
14916 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14917 gl_next_as_first_directive=$gl_cv_next_stddef_h
14919 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
14930 printf %s "checking whether lstat correctly handles trailing slash... " >&6; }
14931 if test ${gl_cv_func_lstat_dereferences_slashed_symlink+y}
14933 printf %s "(cached) " >&6
14935 rm -f conftest.sym conftest.file
14936 echo >conftest.file
14937 if test "$cross_compiling" = yes
14941 # Guess yes on Linux systems.
14942 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14944 # Guess yes on glibc systems.
14945 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
14947 # Guess no on native Windows.
14948 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14950 # If we don't know, assume the worst.
14951 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
14955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14956 /* end confdefs.h. */
14957 $ac_includes_default
14962 if (symlink ("conftest.file", "conftest.sym") != 0)
14964 /* Linux will dereference the symlink and fail, as required by
14965 POSIX. That is better in the sense that it means we will not
14966 have to compile and use the lstat wrapper. */
14967 return lstat ("conftest.sym/", &sbuf) == 0;
14973 if ac_fn_c_try_run "$LINENO"
14975 gl_cv_func_lstat_dereferences_slashed_symlink=yes
14977 gl_cv_func_lstat_dereferences_slashed_symlink=no
14979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14980 conftest.$ac_objext conftest.beam conftest.$ac_ext
14983 rm -f conftest.sym conftest.file
14986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
14987 printf "%s\n" "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
14988 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
14991 printf "%s\n" "#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1" >>confdefs.h
14996 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14997 printf %s "checking for a sed that does not truncate output... " >&6; }
14998 if test ${ac_cv_path_SED+y}
15000 printf %s "(cached) " >&6
15002 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
15003 for ac_i in 1 2 3 4 5 6 7; do
15004 ac_script="$ac_script$as_nl$ac_script"
15006 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
15007 { ac_script=; unset ac_script;}
15008 if test -z "$SED"; then
15009 ac_path_SED_found=false
15010 # Loop through the user's path and test for each of PROGNAME-LIST
15011 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15012 for as_dir in $PATH
15015 case $as_dir in #(((
15018 *) as_dir=$as_dir/ ;;
15020 for ac_prog in sed gsed
15022 for ac_exec_ext in '' $ac_executable_extensions; do
15023 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
15024 as_fn_executable_p "$ac_path_SED" || continue
15025 # Check for GNU ac_path_SED and select it if it is found.
15026 # Check for GNU $ac_path_SED
15027 case `"$ac_path_SED" --version 2>&1` in
15029 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
15032 printf %s 0123456789 >"conftest.in"
15035 cat "conftest.in" "conftest.in" >"conftest.tmp"
15036 mv "conftest.tmp" "conftest.in"
15037 cp "conftest.in" "conftest.nl"
15038 printf "%s\n" '' >> "conftest.nl"
15039 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
15040 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
15041 as_fn_arith $ac_count + 1 && ac_count=$as_val
15042 if test $ac_count -gt ${ac_path_SED_max-0}; then
15043 # Best one so far, save it but keep looking for a better one
15044 ac_cv_path_SED="$ac_path_SED"
15045 ac_path_SED_max=$ac_count
15047 # 10*(2^10) chars as input seems more than enough
15048 test $ac_count -gt 10 && break
15050 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
15053 $ac_path_SED_found && break 3
15058 if test -z "$ac_cv_path_SED"; then
15059 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
15062 ac_cv_path_SED=$SED
15066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
15067 printf "%s\n" "$ac_cv_path_SED" >&6; }
15068 SED="$ac_cv_path_SED"
15074 GNULIB_CALLOC_POSIX=0;
15075 GNULIB_CANONICALIZE_FILE_NAME=0;
15076 GNULIB_GETLOADAVG=0;
15077 GNULIB_GETSUBOPT=0;
15079 GNULIB_MALLOC_POSIX=0;
15083 GNULIB_MKOSTEMPS=0;
15086 GNULIB_POSIX_OPENPT=0;
15088 GNULIB_PTSNAME_R=0;
15093 GNULIB_REALLOCARRAY=0;
15094 GNULIB_REALLOC_POSIX=0;
15097 GNULIB_SECURE_GETENV=0;
15102 GNULIB_SYSTEM_POSIX=0;
15108 HAVE_CANONICALIZE_FILE_NAME=1;
15109 HAVE_DECL_GETLOADAVG=1;
15112 HAVE_DECL_INITSTATE=1;
15118 HAVE_POSIX_OPENPT=1;
15125 HAVE_REALLOCARRAY=1;
15128 HAVE_SECURE_GETENV=1;
15130 HAVE_DECL_SETENV=1;
15131 HAVE_DECL_SETSTATE=1;
15135 HAVE_STRUCT_RANDOM_DATA=1;
15136 HAVE_SYS_LOADAVG_H=0;
15138 HAVE_DECL_UNSETENV=1;
15140 REPLACE_CANONICALIZE_FILE_NAME=0;
15145 REPLACE_PTSNAME_R=0;
15148 REPLACE_RANDOM_R=0;
15150 REPLACE_REALPATH=0;
15153 REPLACE_UNSETENV=0;
15157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15158 printf %s "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15159 if test ${gl_cv_func_malloc_posix+y}
15161 printf %s "(cached) " >&6
15164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165 /* end confdefs.h. */
15170 #if defined _WIN32 && ! defined __CYGWIN__
15178 if ac_fn_c_try_compile "$LINENO"
15180 gl_cv_func_malloc_posix=yes
15182 gl_cv_func_malloc_posix=no
15184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15188 printf "%s\n" "$gl_cv_func_malloc_posix" >&6; }
15190 # Autoupdate added the following line to ensure that your configure
15191 # script's behavior did not change. It is probably safe to remove.
15195 ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
15196 if test "x$ac_cv_header_stdlib_h" = xyes
15198 printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
15202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15203 printf %s "checking for GNU libc compatible malloc... " >&6; }
15204 if test ${ac_cv_func_malloc_0_nonnull+y}
15206 printf %s "(cached) " >&6
15208 if test "$cross_compiling" = yes
15211 # Guess yes on platforms where we know the result.
15212 *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \
15213 | hpux* | solaris* | cygwin* | mingw*)
15214 ac_cv_func_malloc_0_nonnull=yes ;;
15215 # If we don't know, assume the worst.
15216 *) ac_cv_func_malloc_0_nonnull=no ;;
15220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15221 /* end confdefs.h. */
15222 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
15223 # include <stdlib.h>
15231 char *p = malloc (0);
15240 if ac_fn_c_try_run "$LINENO"
15242 ac_cv_func_malloc_0_nonnull=yes
15244 ac_cv_func_malloc_0_nonnull=no
15246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15247 conftest.$ac_objext conftest.beam conftest.$ac_ext
15252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15253 printf "%s\n" "$ac_cv_func_malloc_0_nonnull" >&6; }
15254 if test $ac_cv_func_malloc_0_nonnull = yes
15256 gl_cv_func_malloc_0_nonnull=1
15258 gl_cv_func_malloc_0_nonnull=0
15262 printf "%s\n" "#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull" >>confdefs.h
15270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15271 printf %s "checking for a traditional japanese locale... " >&6; }
15272 if test ${gt_cv_locale_ja+y}
15274 printf %s "(cached) " >&6
15277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15278 /* end confdefs.h. */
15280 #include <locale.h>
15282 #if HAVE_LANGINFO_CODESET
15283 # include <langinfo.h>
15285 #include <stdlib.h>
15286 #include <string.h>
15291 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15292 imitates locale dependent behaviour by looking at the environment
15293 variables, and all locales use the UTF-8 encoding. */
15294 #if defined __BEOS__ || defined __HAIKU__
15297 /* Check whether the given locale name is recognized by the system. */
15298 # if defined _WIN32 && !defined __CYGWIN__
15299 /* On native Windows, setlocale(category, "") looks at the system settings,
15300 not at the environment variables. Also, when an encoding suffix such
15301 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15302 category of the locale to "C". */
15303 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15304 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15307 if (setlocale (LC_ALL, "") == NULL) return 1;
15309 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15310 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15311 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15312 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15313 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15314 some unit tests fail.
15315 On MirBSD 10, when an unsupported locale is specified, setlocale()
15316 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15317 # if HAVE_LANGINFO_CODESET
15319 const char *cs = nl_langinfo (CODESET);
15320 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15321 || strcmp (cs, "UTF-8") == 0)
15326 /* On Cygwin, avoid locale names without encoding suffix, because the
15327 locale_charset() function relies on the encoding suffix. Note that
15328 LC_ALL is set on the command line. */
15329 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15331 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15332 on Cygwin 1.5.x. */
15333 if (MB_CUR_MAX == 1)
15335 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15336 This excludes the UTF-8 encoding (except on MirBSD). */
15339 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15340 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15341 for (p = buf; *p != '\0'; p++)
15342 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15350 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15351 (eval $ac_link) 2>&5
15353 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15354 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15356 # Handle native Windows specially, because there setlocale() interprets
15357 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15358 # "fr" or "fra" as "French" or "French_France.1252",
15359 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15360 # "ja" as "Japanese" or "Japanese_Japan.932",
15363 # Note that on native Windows, the Japanese locale is
15364 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15365 # cannot use it here.
15366 gt_cv_locale_ja=none
15369 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15370 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15371 # configure script would override the LC_ALL setting. Likewise for
15372 # LC_CTYPE, which is also set at the beginning of the configure script.
15373 # Test for the AIX locale name.
15374 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15375 gt_cv_locale_ja=ja_JP
15377 # Test for the locale name with explicit encoding suffix.
15378 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15379 gt_cv_locale_ja=ja_JP.EUC-JP
15381 # Test for the HP-UX, OSF/1, NetBSD locale name.
15382 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15383 gt_cv_locale_ja=ja_JP.eucJP
15385 # Test for the IRIX, FreeBSD locale name.
15386 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15387 gt_cv_locale_ja=ja_JP.EUC
15389 # Test for the Solaris 7 locale name.
15390 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15393 # Special test for NetBSD 1.6.
15394 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
15395 gt_cv_locale_ja=ja_JP.eucJP
15398 gt_cv_locale_ja=none
15411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15412 printf "%s\n" "$gt_cv_locale_ja" >&6; }
15413 LOCALE_JA=$gt_cv_locale_ja
15419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15420 printf %s "checking for a transitional chinese locale... " >&6; }
15421 if test ${gt_cv_locale_zh_CN+y}
15423 printf %s "(cached) " >&6
15426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427 /* end confdefs.h. */
15429 #include <locale.h>
15430 #include <stdlib.h>
15432 #if HAVE_LANGINFO_CODESET
15433 # include <langinfo.h>
15435 #include <stdlib.h>
15436 #include <string.h>
15441 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15442 imitates locale dependent behaviour by looking at the environment
15443 variables, and all locales use the UTF-8 encoding. */
15444 #if defined __BEOS__ || defined __HAIKU__
15447 /* Check whether the given locale name is recognized by the system. */
15448 # if defined _WIN32 && !defined __CYGWIN__
15449 /* On native Windows, setlocale(category, "") looks at the system settings,
15450 not at the environment variables. Also, when an encoding suffix such
15451 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15452 category of the locale to "C". */
15453 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15454 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15457 if (setlocale (LC_ALL, "") == NULL) return 1;
15459 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15460 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15461 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15462 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15463 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15464 some unit tests fail.
15465 On MirBSD 10, when an unsupported locale is specified, setlocale()
15466 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15467 # if HAVE_LANGINFO_CODESET
15469 const char *cs = nl_langinfo (CODESET);
15470 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15471 || strcmp (cs, "UTF-8") == 0)
15476 /* On Cygwin, avoid locale names without encoding suffix, because the
15477 locale_charset() function relies on the encoding suffix. Note that
15478 LC_ALL is set on the command line. */
15479 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15481 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15482 This excludes the UTF-8 encoding (except on MirBSD). */
15485 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15486 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15487 for (p = buf; *p != '\0'; p++)
15488 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15491 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15492 single wide character. This excludes the GB2312 and GBK encodings. */
15493 if (mblen ("\203\062\332\066", 5) != 4)
15500 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15501 (eval $ac_link) 2>&5
15503 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15504 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15506 # Handle native Windows specially, because there setlocale() interprets
15507 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15508 # "fr" or "fra" as "French" or "French_France.1252",
15509 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15510 # "ja" as "Japanese" or "Japanese_Japan.932",
15513 # Test for the hypothetical native Windows locale name.
15514 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15515 gt_cv_locale_zh_CN=Chinese_China.54936
15518 gt_cv_locale_zh_CN=none
15522 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15523 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15524 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15525 gt_cv_locale_zh_CN=none
15528 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15529 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15530 # configure script would override the LC_ALL setting. Likewise for
15531 # LC_CTYPE, which is also set at the beginning of the configure script.
15532 # Test for the locale name without encoding suffix.
15533 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15534 gt_cv_locale_zh_CN=zh_CN
15536 # Test for the locale name with explicit encoding suffix.
15537 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15538 gt_cv_locale_zh_CN=zh_CN.GB18030
15541 gt_cv_locale_zh_CN=none
15547 # If there was a link error, due to mblen(), the system is so old that
15548 # it certainly doesn't have a chinese locale.
15549 gt_cv_locale_zh_CN=none
15554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15555 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
15556 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
15561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15562 printf %s "checking for a french Unicode locale... " >&6; }
15563 if test ${gt_cv_locale_fr_utf8+y}
15565 printf %s "(cached) " >&6
15568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15569 /* end confdefs.h. */
15571 #include <locale.h>
15573 #if HAVE_LANGINFO_CODESET
15574 # include <langinfo.h>
15576 #include <stdlib.h>
15577 #include <string.h>
15581 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15582 imitates locale dependent behaviour by looking at the environment
15583 variables, and all locales use the UTF-8 encoding. */
15584 #if !(defined __BEOS__ || defined __HAIKU__)
15585 /* Check whether the given locale name is recognized by the system. */
15586 # if defined _WIN32 && !defined __CYGWIN__
15587 /* On native Windows, setlocale(category, "") looks at the system settings,
15588 not at the environment variables. Also, when an encoding suffix such
15589 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15590 category of the locale to "C". */
15591 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15592 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15595 if (setlocale (LC_ALL, "") == NULL) return 1;
15597 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15598 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15599 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15600 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15601 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15602 some unit tests fail. */
15603 # if HAVE_LANGINFO_CODESET
15605 const char *cs = nl_langinfo (CODESET);
15606 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15611 /* On Cygwin, avoid locale names without encoding suffix, because the
15612 locale_charset() function relies on the encoding suffix. Note that
15613 LC_ALL is set on the command line. */
15614 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15616 /* Check whether in the abbreviation of the second month, the second
15617 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15618 two bytes long, with UTF-8 encoding. */
15619 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15620 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15621 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15624 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15625 /* Check whether the decimal separator is a comma.
15626 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15627 are nl_langinfo(RADIXCHAR) are both ".". */
15628 if (localeconv () ->decimal_point[0] != ',') return 1;
15634 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15635 (eval $ac_link) 2>&5
15637 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15638 test $ac_status = 0; } && test -s conftest$ac_exeext; then
15640 # Handle native Windows specially, because there setlocale() interprets
15641 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15642 # "fr" or "fra" as "French" or "French_France.1252",
15643 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15644 # "ja" as "Japanese" or "Japanese_Japan.932",
15647 # Test for the hypothetical native Windows locale name.
15648 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15649 gt_cv_locale_fr_utf8=French_France.65001
15652 gt_cv_locale_fr_utf8=none
15656 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15657 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15658 # configure script would override the LC_ALL setting. Likewise for
15659 # LC_CTYPE, which is also set at the beginning of the configure script.
15660 # Test for the usual locale name.
15661 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15662 gt_cv_locale_fr_utf8=fr_FR
15664 # Test for the locale name with explicit encoding suffix.
15665 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15666 gt_cv_locale_fr_utf8=fr_FR.UTF-8
15668 # Test for the Solaris 7 locale name.
15669 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
15670 gt_cv_locale_fr_utf8=fr.UTF-8
15673 gt_cv_locale_fr_utf8=none
15683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15684 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
15685 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
15689 GNULIB_EXPLICIT_BZERO=0;
15696 GNULIB_RAWMEMCHR=0;
15699 GNULIB_STRCHRNUL=0;
15707 GNULIB_STRCASESTR=0;
15714 GNULIB_MBSCASECMP=0;
15715 GNULIB_MBSNCASECMP=0;
15716 GNULIB_MBSPCASECMP=0;
15717 GNULIB_MBSCASESTR=0;
15724 GNULIB_STRERROR_R=0;
15725 GNULIB_STRSIGNAL=0;
15726 GNULIB_STRVERSCMP=0;
15728 HAVE_EXPLICIT_BZERO=1;
15732 HAVE_DECL_MEMMEM=1;
15734 HAVE_DECL_MEMRCHR=1;
15739 HAVE_DECL_STRDUP=1;
15740 HAVE_DECL_STRNDUP=1;
15741 HAVE_DECL_STRNLEN=1;
15745 HAVE_DECL_STRTOK_R=1;
15746 HAVE_DECL_STRERROR_R=1;
15747 HAVE_DECL_STRSIGNAL=1;
15752 REPLACE_STRCHRNUL=0;
15758 REPLACE_STRCASESTR=0;
15759 REPLACE_STRTOK_R=0;
15760 REPLACE_STRERROR=0;
15761 REPLACE_STRERROR_R=0;
15762 REPLACE_STRSIGNAL=0;
15763 UNDEFINE_STRTOK_R=0;
15773 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
15774 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
15775 # irrelevant for anonymous mappings.
15776 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15777 if test "x$ac_cv_func_mmap" = xyes
15785 # Try to allow MAP_ANONYMOUS.
15786 gl_have_mmap_anonymous=no
15787 if test $gl_have_mmap = yes; then
15788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
15789 printf %s "checking for MAP_ANONYMOUS... " >&6; }
15790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15791 /* end confdefs.h. */
15793 #include <sys/mman.h>
15794 #ifdef MAP_ANONYMOUS
15795 I cannot identify this map
15799 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15800 $EGREP "I cannot identify this map" >/dev/null 2>&1
15802 gl_have_mmap_anonymous=yes
15806 if test $gl_have_mmap_anonymous != yes; then
15807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15808 /* end confdefs.h. */
15810 #include <sys/mman.h>
15812 I cannot identify this map
15816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15817 $EGREP "I cannot identify this map" >/dev/null 2>&1
15820 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
15822 gl_have_mmap_anonymous=yes
15827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
15828 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
15829 if test $gl_have_mmap_anonymous = yes; then
15831 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
15841 if test $HAVE_MEMCHR = 1; then
15842 # Detect platform-specific bugs in some versions of glibc:
15843 # memchr should not dereference anything with length 0
15844 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
15845 # memchr should not dereference overestimated length after a match
15846 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
15847 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
15848 # Assume that memchr works on platforms that lack mprotect.
15849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
15850 printf %s "checking whether memchr works... " >&6; }
15851 if test ${gl_cv_func_memchr_works+y}
15853 printf %s "(cached) " >&6
15855 if test "$cross_compiling" = yes
15858 # Guess yes on native Windows.
15859 mingw*) gl_cv_func_memchr_works="guessing yes" ;;
15860 # Be pessimistic for now.
15861 *) gl_cv_func_memchr_works="guessing no" ;;
15865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h. */
15868 #include <string.h>
15869 #if HAVE_SYS_MMAN_H
15870 # include <fcntl.h>
15871 # include <unistd.h>
15872 # include <sys/types.h>
15873 # include <sys/mman.h>
15875 # define MAP_FILE 0
15884 char *fence = NULL;
15885 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
15886 # if HAVE_MAP_ANONYMOUS
15887 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
15889 # else /* !HAVE_MAP_ANONYMOUS */
15890 const int flags = MAP_FILE | MAP_PRIVATE;
15891 int fd = open ("/dev/zero", O_RDONLY, 0666);
15895 int pagesize = getpagesize ();
15897 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
15899 if (two_pages != (char *)(-1)
15900 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
15901 fence = two_pages + pagesize;
15906 if (memchr (fence, 0, 0))
15908 strcpy (fence - 9, "12345678");
15909 if (memchr (fence - 9, 0, 79) != fence - 1)
15911 if (memchr (fence - 1, 0, 3) != fence - 1)
15920 if ac_fn_c_try_run "$LINENO"
15922 gl_cv_func_memchr_works=yes
15924 gl_cv_func_memchr_works=no
15926 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15927 conftest.$ac_objext conftest.beam conftest.$ac_ext
15932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
15933 printf "%s\n" "$gl_cv_func_memchr_works" >&6; }
15934 case "$gl_cv_func_memchr_works" in
15936 *) REPLACE_MEMCHR=1 ;;
15944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
15945 printf %s "checking whether <limits.h> defines MIN and MAX... " >&6; }
15946 if test ${gl_cv_minmax_in_limits_h+y}
15948 printf %s "(cached) " >&6
15950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h. */
15952 #include <limits.h>
15953 int x = MIN (42, 17);
15962 if ac_fn_c_try_compile "$LINENO"
15964 gl_cv_minmax_in_limits_h=yes
15966 gl_cv_minmax_in_limits_h=no
15968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
15971 printf "%s\n" "$gl_cv_minmax_in_limits_h" >&6; }
15972 if test $gl_cv_minmax_in_limits_h = yes; then
15974 printf "%s\n" "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
15983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
15984 printf %s "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
15985 if test ${gl_cv_minmax_in_sys_param_h+y}
15987 printf %s "(cached) " >&6
15989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15990 /* end confdefs.h. */
15991 #include <sys/param.h>
15992 int x = MIN (42, 17);
16001 if ac_fn_c_try_compile "$LINENO"
16003 gl_cv_minmax_in_sys_param_h=yes
16005 gl_cv_minmax_in_sys_param_h=no
16007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16010 printf "%s\n" "$gl_cv_minmax_in_sys_param_h" >&6; }
16011 if test $gl_cv_minmax_in_sys_param_h = yes; then
16013 printf "%s\n" "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether time_t is signed" >&5
16023 printf %s "checking whether time_t is signed... " >&6; }
16024 if test ${gl_cv_time_t_is_signed+y}
16026 printf %s "(cached) " >&6
16028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16029 /* end confdefs.h. */
16031 char time_t_signed[(time_t) -1 < 0 ? 1 : -1];
16040 if ac_fn_c_try_compile "$LINENO"
16042 gl_cv_time_t_is_signed=yes
16044 gl_cv_time_t_is_signed=no
16046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_t_is_signed" >&5
16049 printf "%s\n" "$gl_cv_time_t_is_signed" >&6; }
16050 if test $gl_cv_time_t_is_signed = yes; then
16052 printf "%s\n" "#define TIME_T_IS_SIGNED 1" >>confdefs.h
16056 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
16057 if test "x$ac_cv_have_decl_alarm" = xyes
16064 printf "%s\n" "#define HAVE_DECL_ALARM $ac_have_decl" >>confdefs.h
16074 if test $APPLE_UNIVERSAL_BUILD = 1; then
16075 # A universal build on Apple Mac OS X platforms.
16076 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
16077 # But we need a configuration result that is valid in both modes.
16078 gl_cv_func_working_mktime=no
16080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
16081 printf %s "checking for working mktime... " >&6; }
16082 if test ${gl_cv_func_working_mktime+y}
16084 printf %s "(cached) " >&6
16086 if test "$cross_compiling" = yes
16089 # Guess no on native Windows.
16090 mingw*) gl_cv_func_working_mktime="guessing no" ;;
16091 *) gl_cv_func_working_mktime="guessing no" ;;
16095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16096 /* end confdefs.h. */
16097 /* Test program from Paul Eggert and Tony Leneis. */
16098 #include <limits.h>
16099 #include <stdlib.h>
16102 #ifdef HAVE_UNISTD_H
16103 # include <unistd.h>
16106 #if HAVE_DECL_ALARM
16107 # include <signal.h>
16110 #ifndef TIME_T_IS_SIGNED
16111 # define TIME_T_IS_SIGNED 0
16114 /* Work around redefinition to rpl_putenv by other config tests. */
16117 static time_t time_t_max;
16118 static time_t time_t_min;
16120 /* Values we'll use to set the TZ environment variable. */
16121 static char *tz_strings[] = {
16122 (char *) 0, "TZ=GMT0", "TZ=JST-9",
16123 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16125 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
16127 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
16128 Based on a problem report from Andreas Jaeger. */
16130 spring_forward_gap ()
16132 /* glibc (up to about 1998-10-07) failed this test. */
16135 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16136 instead of "TZ=America/Vancouver" in order to detect the bug even
16137 on systems that don't support the Olson extension, or don't have the
16138 full zoneinfo tables installed. */
16139 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16148 return mktime (&tm) != (time_t) -1;
16152 mktime_test1 (time_t now)
16155 return ! (lt = localtime (&now)) || mktime (lt) == now;
16159 mktime_test (time_t now)
16161 return (mktime_test1 (now)
16162 && mktime_test1 ((time_t) (time_t_max - now))
16163 && mktime_test1 ((time_t) (time_t_min + now)));
16169 /* Based on code from Ariel Faigon. */
16179 return tm.tm_mon == 2 && tm.tm_mday == 31;
16183 bigtime_test (int j)
16187 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16188 now = mktime (&tm);
16189 if (now != (time_t) -1)
16191 struct tm *lt = localtime (&now);
16193 && lt->tm_year == tm.tm_year
16194 && lt->tm_mon == tm.tm_mon
16195 && lt->tm_mday == tm.tm_mday
16196 && lt->tm_hour == tm.tm_hour
16197 && lt->tm_min == tm.tm_min
16198 && lt->tm_sec == tm.tm_sec
16199 && lt->tm_yday == tm.tm_yday
16200 && lt->tm_wday == tm.tm_wday
16201 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16202 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
16211 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16212 ignoring leap seconds. */
16213 unsigned long int answer = 2527315200UL;
16217 tm.tm_year = 2050 - 1900;
16220 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16223 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16224 instead of "TZ=America/Vancouver" in order to detect the bug even
16225 on systems that don't support the Olson extension, or don't have the
16226 full zoneinfo tables installed. */
16227 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16231 /* Check that the result is either a failure, or close enough
16232 to the correct answer that we can assume the discrepancy is
16233 due to leap seconds. */
16234 return (t == (time_t) -1
16235 || (0 < t && answer - 120 <= t && t <= answer + 120));
16244 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
16246 #if HAVE_DECL_ALARM
16247 /* This test makes some buggy mktime implementations loop.
16248 Give up after 60 seconds; a mktime slower than that
16249 isn't worth using anyway. */
16250 signal (SIGALRM, SIG_DFL);
16254 time_t_max = (! TIME_T_IS_SIGNED
16256 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
16258 time_t_min = (! TIME_T_IS_SIGNED
16260 : time_t_signed_magnitude
16264 delta = time_t_max / 997; /* a suitable prime number */
16265 for (i = 0; i < N_STRINGS; i++)
16268 putenv (tz_strings[i]);
16270 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
16271 if (! mktime_test (t))
16273 if ((result & 2) == 0
16274 && ! (mktime_test ((time_t) 1)
16275 && mktime_test ((time_t) (60 * 60))
16276 && mktime_test ((time_t) (60 * 60 * 24))))
16279 for (j = 1; (result & 4) == 0; j <<= 1)
16281 if (! bigtime_test (j))
16283 if (INT_MAX / 2 < j)
16286 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
16289 if (! irix_6_4_bug ())
16291 if (! spring_forward_gap ())
16293 if (! year_2050_test ())
16298 if ac_fn_c_try_run "$LINENO"
16300 gl_cv_func_working_mktime=yes
16302 gl_cv_func_working_mktime=no
16304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16305 conftest.$ac_objext conftest.beam conftest.$ac_ext
16310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
16311 printf "%s\n" "$gl_cv_func_working_mktime" >&6; }
16317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
16318 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
16319 if test ${ac_cv_struct_tm+y}
16321 printf %s "(cached) " >&6
16323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324 /* end confdefs.h. */
16325 #include <sys/types.h>
16332 int *p = &tm.tm_sec;
16338 if ac_fn_c_try_compile "$LINENO"
16340 ac_cv_struct_tm=time.h
16342 ac_cv_struct_tm=sys/time.h
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
16347 printf "%s\n" "$ac_cv_struct_tm" >&6; }
16348 if test $ac_cv_struct_tm = sys/time.h; then
16350 printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
16354 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
16355 #include <$ac_cv_struct_tm>
16358 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes
16361 printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h
16366 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16368 printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h
16371 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
16373 if test "x$ac_cv_have_decl_tzname" = xyes
16380 printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h
16382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
16383 printf %s "checking for tzname... " >&6; }
16384 if test ${ac_cv_var_tzname+y}
16386 printf %s "(cached) " >&6
16388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16389 /* end confdefs.h. */
16391 #if !HAVE_DECL_TZNAME
16392 extern char *tzname[];
16398 return tzname[0][0];
16403 if ac_fn_c_try_link "$LINENO"
16405 ac_cv_var_tzname=yes
16407 ac_cv_var_tzname=no
16409 rm -f core conftest.err conftest.$ac_objext \
16410 conftest$ac_exeext conftest.$ac_ext
16412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
16413 printf "%s\n" "$ac_cv_var_tzname" >&6; }
16414 if test $ac_cv_var_tzname = yes; then
16416 printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h
16422 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
16424 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes
16427 printf "%s\n" "#define HAVE_TM_GMTOFF 1" >>confdefs.h
16433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16434 printf %s "checking for O_CLOEXEC... " >&6; }
16435 if test ${gl_cv_macro_O_CLOEXEC+y}
16437 printf %s "(cached) " >&6
16439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16440 /* end confdefs.h. */
16454 if ac_fn_c_try_compile "$LINENO"
16456 gl_cv_macro_O_CLOEXEC=yes
16458 gl_cv_macro_O_CLOEXEC=no
16460 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16463 printf "%s\n" "$gl_cv_macro_O_CLOEXEC" >&6; }
16467 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16468 printf %s "checking for promoted mode_t type... " >&6; }
16469 if test ${gl_cv_promoted_mode_t+y}
16471 printf %s "(cached) " >&6
16474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16475 /* end confdefs.h. */
16476 #include <sys/types.h>
16480 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16485 if ac_fn_c_try_compile "$LINENO"
16487 gl_cv_promoted_mode_t='int'
16489 gl_cv_promoted_mode_t='mode_t'
16491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16495 printf "%s\n" "$gl_cv_promoted_mode_t" >&6; }
16497 printf "%s\n" "#define PROMOTED_MODE_T $gl_cv_promoted_mode_t" >>confdefs.h
16502 GNULIB_PTHREAD_SIGMASK=0;
16504 GNULIB_SIGNAL_H_SIGPIPE=0;
16505 GNULIB_SIGPROCMASK=0;
16506 GNULIB_SIGACTION=0;
16507 HAVE_POSIX_SIGNALBLOCKING=1;
16508 HAVE_PTHREAD_SIGMASK=1;
16513 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
16515 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
16517 HAVE_SIGHANDLER_T=1;
16518 REPLACE_PTHREAD_SIGMASK=0;
16522 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16523 #include <signal.h>
16524 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16525 #include <sys/types.h>
16528 if test "x$ac_cv_type_sigset_t" = xyes
16531 printf "%s\n" "#define HAVE_SIGSET_T 1" >>confdefs.h
16533 gl_cv_type_sigset_t=yes
16535 gl_cv_type_sigset_t=no
16538 if test $gl_cv_type_sigset_t != yes; then
16545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
16546 printf %s "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
16547 if test ${ac_cv_gnu_library_2_1+y}
16549 printf %s "(cached) " >&6
16551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16552 /* end confdefs.h. */
16554 #include <features.h>
16555 #ifdef __GNU_LIBRARY__
16556 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
16565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16566 $EGREP "Lucky" >/dev/null 2>&1
16568 ac_cv_gnu_library_2_1=yes
16570 ac_cv_gnu_library_2_1=no
16577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
16578 printf "%s\n" "$ac_cv_gnu_library_2_1" >&6; }
16580 GLIBC21="$ac_cv_gnu_library_2_1"
16583 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16584 if test "x$ac_cv_have_decl_setenv" = xyes
16591 printf "%s\n" "#define HAVE_DECL_SETENV $ac_have_decl" >>confdefs.h
16597 if test $ac_cv_have_decl_setenv = no; then
16605 ac_fn_c_check_header_compile "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16606 if test "x$ac_cv_header_search_h" = xyes
16608 printf "%s\n" "#define HAVE_SEARCH_H 1" >>confdefs.h
16612 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
16613 if test "x$ac_cv_func_tsearch" = xyes
16615 printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h
16622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
16623 printf %s "checking for uid_t in sys/types.h... " >&6; }
16624 if test ${ac_cv_type_uid_t+y}
16626 printf %s "(cached) " >&6
16628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16629 /* end confdefs.h. */
16630 #include <sys/types.h>
16633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16634 $EGREP "uid_t" >/dev/null 2>&1
16636 ac_cv_type_uid_t=yes
16638 ac_cv_type_uid_t=no
16643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
16644 printf "%s\n" "$ac_cv_type_uid_t" >&6; }
16645 if test $ac_cv_type_uid_t = no; then
16647 printf "%s\n" "#define uid_t int" >>confdefs.h
16650 printf "%s\n" "#define gid_t int" >>confdefs.h
16656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16657 printf %s "checking for stdbool.h that conforms to C99... " >&6; }
16658 if test ${ac_cv_header_stdbool_h+y}
16660 printf %s "(cached) " >&6
16662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16663 /* end confdefs.h. */
16665 #include <stdbool.h>
16670 typedef _Bool Bool;
16672 "error: bool is not defined"
16675 "error: false is not defined"
16678 "error: false is not 0"
16681 "error: true is not defined"
16684 "error: true is not 1"
16688 #ifndef __bool_true_false_are_defined
16689 "error: __bool_true_false_are_defined is not defined"
16692 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16694 char a[true == 1 ? 1 : -1];
16695 char b[false == 0 ? 1 : -1];
16696 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16697 char d[(bool) 0.5 == true ? 1 : -1];
16698 /* See body of main program for 'e'. */
16699 char f[(Bool) 0.0 == false ? 1 : -1];
16701 char h[sizeof (Bool)];
16702 char i[sizeof s.t];
16703 enum { j = false, k = true, l = false * true, m = true * 256 };
16704 /* The following fails for
16705 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16707 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16708 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16709 /* Catch a bug in an HP-UX C compiler. See
16710 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16711 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16722 *pq |= q; *pq |= ! q;
16723 *qq |= q; *qq |= ! q;
16724 /* Refer to every declared value, to avoid compiler optimizations. */
16725 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16726 + !m + !n + !o + !p + !q + !pq + !qq);
16732 if ac_fn_c_try_compile "$LINENO"
16734 ac_cv_header_stdbool_h=yes
16736 ac_cv_header_stdbool_h=no
16738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16741 printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
16742 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16743 if test "x$ac_cv_type__Bool" = xyes
16746 printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
16756 HAVE_DECL_STRNCASECMP=1;
16759 REPLACE_STRERROR_0=0
16760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16761 printf %s "checking whether strerror(0) succeeds... " >&6; }
16762 if test ${gl_cv_func_strerror_0_works+y}
16764 printf %s "(cached) " >&6
16766 if test "$cross_compiling" = yes
16769 # Guess yes on glibc systems.
16770 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
16771 # Guess yes on native Windows.
16772 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
16773 # If we don't know, assume the worst.
16774 *) gl_cv_func_strerror_0_works="guessing no" ;;
16778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16779 /* end confdefs.h. */
16780 #include <string.h>
16789 str = strerror (0);
16790 if (!*str) result |= 1;
16791 if (errno) result |= 2;
16792 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16799 if ac_fn_c_try_run "$LINENO"
16801 gl_cv_func_strerror_0_works=yes
16803 gl_cv_func_strerror_0_works=no
16805 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16806 conftest.$ac_objext conftest.beam conftest.$ac_ext
16811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16812 printf "%s\n" "$gl_cv_func_strerror_0_works" >&6; }
16813 case "$gl_cv_func_strerror_0_works" in
16816 REPLACE_STRERROR_0=1
16818 printf "%s\n" "#define REPLACE_STRERROR_0 1" >>confdefs.h
16829 if test $ac_cv_func_strerror_r = yes; then
16830 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16832 printf %s "checking for strerror_r with POSIX signature... " >&6; }
16833 if test ${gl_cv_func_strerror_r_posix_signature+y}
16835 printf %s "(cached) " >&6
16837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16838 /* end confdefs.h. */
16839 #include <string.h>
16840 int strerror_r (int, char *, size_t);
16850 if ac_fn_c_try_compile "$LINENO"
16852 gl_cv_func_strerror_r_posix_signature=yes
16854 gl_cv_func_strerror_r_posix_signature=no
16856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16860 printf "%s\n" "$gl_cv_func_strerror_r_posix_signature" >&6; }
16861 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16863 printf %s "checking whether strerror_r works... " >&6; }
16864 if test ${gl_cv_func_strerror_r_works+y}
16866 printf %s "(cached) " >&6
16868 if test "$cross_compiling" = yes
16873 aix*) gl_cv_func_strerror_r_works="guessing no";;
16874 # Guess no on HP-UX.
16875 hpux*) gl_cv_func_strerror_r_works="guessing no";;
16876 # Guess no on BSD variants.
16877 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
16878 # Guess yes otherwise.
16879 *) gl_cv_func_strerror_r_works="guessing yes";;
16883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16884 /* end confdefs.h. */
16886 #include <string.h>
16893 if (strerror_r (EACCES, buf, 0) < 0)
16896 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16898 strcpy (buf, "Unknown");
16899 if (strerror_r (0, buf, sizeof buf) != 0)
16903 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16907 if (strerror_r (-3, buf, sizeof buf) < 0)
16919 if ac_fn_c_try_run "$LINENO"
16921 gl_cv_func_strerror_r_works=yes
16923 gl_cv_func_strerror_r_works=no
16925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16926 conftest.$ac_objext conftest.beam conftest.$ac_ext
16931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16932 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
16935 if test $ac_cv_func___xpg_strerror_r = yes; then
16936 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16937 printf %s "checking whether __xpg_strerror_r works... " >&6; }
16938 if test ${gl_cv_func_strerror_r_works+y}
16940 printf %s "(cached) " >&6
16942 if test "$cross_compiling" = yes
16944 gl_cv_func_strerror_r_works="guessing no"
16947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16948 /* end confdefs.h. */
16950 #include <string.h>
16955 int __xpg_strerror_r(int, char *, size_t);
16961 char buf[256] = "^";
16963 char *str = strerror (-1);
16964 strcpy (copy, str);
16965 if (__xpg_strerror_r (-2, buf, 1) == 0)
16969 __xpg_strerror_r (-2, buf, 256);
16970 if (strcmp (str, copy))
16978 if ac_fn_c_try_run "$LINENO"
16980 gl_cv_func_strerror_r_works=yes
16982 gl_cv_func_strerror_r_works=no
16984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16985 conftest.$ac_objext conftest.beam conftest.$ac_ext
16990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16991 printf "%s\n" "$gl_cv_func_strerror_r_works" >&6; }
17008 if test $gl_cv_have_include_next = yes; then
17009 gl_cv_next_string_h='<'string.h'>'
17011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
17012 printf %s "checking absolute name of <string.h>... " >&6; }
17013 if test ${gl_cv_next_string_h+y}
17015 printf %s "(cached) " >&6
17020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17021 /* end confdefs.h. */
17022 #include <string.h>
17025 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17026 *) gl_absname_cpp="$ac_cpp" ;;
17031 gl_dirsep_regex='[/\\]'
17034 gl_dirsep_regex='\/'
17037 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17038 gl_header_literal_regex=`echo 'string.h' \
17039 | sed -e "$gl_make_literal_regex_sed"`
17040 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17041 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17047 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17048 sed -n "$gl_absolute_header_sed"`
17050 gl_header=$gl_cv_absolute_string_h
17051 gl_cv_next_string_h='"'$gl_header'"'
17055 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17056 printf "%s\n" "$gl_cv_next_string_h" >&6; }
17058 NEXT_STRING_H=$gl_cv_next_string_h
17060 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17061 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17062 gl_next_as_first_directive='<'string.h'>'
17064 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17065 gl_next_as_first_directive=$gl_cv_next_string_h
17067 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
17089 if test $gl_cv_have_include_next = yes; then
17090 gl_cv_next_strings_h='<'strings.h'>'
17092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17093 printf %s "checking absolute name of <strings.h>... " >&6; }
17094 if test ${gl_cv_next_strings_h+y}
17096 printf %s "(cached) " >&6
17099 if test $ac_cv_header_strings_h = yes; then
17104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17105 /* end confdefs.h. */
17106 #include <strings.h>
17109 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17110 *) gl_absname_cpp="$ac_cpp" ;;
17115 gl_dirsep_regex='[/\\]'
17118 gl_dirsep_regex='\/'
17121 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17122 gl_header_literal_regex=`echo 'strings.h' \
17123 | sed -e "$gl_make_literal_regex_sed"`
17124 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17125 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17131 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17132 sed -n "$gl_absolute_header_sed"`
17134 gl_header=$gl_cv_absolute_strings_h
17135 gl_cv_next_strings_h='"'$gl_header'"'
17137 gl_cv_next_strings_h='<'strings.h'>'
17142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17143 printf "%s\n" "$gl_cv_next_strings_h" >&6; }
17145 NEXT_STRINGS_H=$gl_cv_next_strings_h
17147 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17148 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17149 gl_next_as_first_directive='<'strings.h'>'
17151 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17152 gl_next_as_first_directive=$gl_cv_next_strings_h
17154 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
17159 if test $ac_cv_header_strings_h = yes; then
17170 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
17171 if test "x$ac_cv_have_decl_strndup" = xyes
17178 printf "%s\n" "#define HAVE_DECL_STRNDUP $ac_have_decl" >>confdefs.h
17181 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17182 if test "x$ac_cv_have_decl_strnlen" = xyes
17189 printf "%s\n" "#define HAVE_DECL_STRNLEN $ac_have_decl" >>confdefs.h
17193 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
17194 if test "x$ac_cv_have_decl_strtoumax" = xyes
17201 printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h
17213 printf "%s\n" "#define _USE_STD_STAT 1" >>confdefs.h
17225 if test $gl_cv_have_include_next = yes; then
17226 gl_cv_next_sys_types_h='<'sys/types.h'>'
17228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17229 printf %s "checking absolute name of <sys/types.h>... " >&6; }
17230 if test ${gl_cv_next_sys_types_h+y}
17232 printf %s "(cached) " >&6
17237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17238 /* end confdefs.h. */
17239 #include <sys/types.h>
17242 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17243 *) gl_absname_cpp="$ac_cpp" ;;
17248 gl_dirsep_regex='[/\\]'
17251 gl_dirsep_regex='\/'
17254 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17255 gl_header_literal_regex=`echo 'sys/types.h' \
17256 | sed -e "$gl_make_literal_regex_sed"`
17257 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17258 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17264 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17265 sed -n "$gl_absolute_header_sed"`
17267 gl_header=$gl_cv_absolute_sys_types_h
17268 gl_cv_next_sys_types_h='"'$gl_header'"'
17272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17273 printf "%s\n" "$gl_cv_next_sys_types_h" >&6; }
17275 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
17277 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17278 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17279 gl_next_as_first_directive='<'sys/types.h'>'
17281 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17282 gl_next_as_first_directive=$gl_cv_next_sys_types_h
17284 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
17297 WINDOWS_STAT_INODES=0
17307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17308 printf %s "checking for struct timespec in <time.h>... " >&6; }
17309 if test ${gl_cv_sys_struct_timespec_in_time_h+y}
17311 printf %s "(cached) " >&6
17313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17314 /* end confdefs.h. */
17320 static struct timespec x; x.tv_sec = x.tv_nsec;
17325 if ac_fn_c_try_compile "$LINENO"
17327 gl_cv_sys_struct_timespec_in_time_h=yes
17329 gl_cv_sys_struct_timespec_in_time_h=no
17331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17334 printf "%s\n" "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17336 TIME_H_DEFINES_STRUCT_TIMESPEC=0
17337 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
17338 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
17339 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0
17340 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17341 TIME_H_DEFINES_STRUCT_TIMESPEC=1
17343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17344 printf %s "checking for struct timespec in <sys/time.h>... " >&6; }
17345 if test ${gl_cv_sys_struct_timespec_in_sys_time_h+y}
17347 printf %s "(cached) " >&6
17349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17350 /* end confdefs.h. */
17351 #include <sys/time.h>
17356 static struct timespec x; x.tv_sec = x.tv_nsec;
17361 if ac_fn_c_try_compile "$LINENO"
17363 gl_cv_sys_struct_timespec_in_sys_time_h=yes
17365 gl_cv_sys_struct_timespec_in_sys_time_h=no
17367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17370 printf "%s\n" "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17371 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17372 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
17374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17375 printf %s "checking for struct timespec in <pthread.h>... " >&6; }
17376 if test ${gl_cv_sys_struct_timespec_in_pthread_h+y}
17378 printf %s "(cached) " >&6
17380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17381 /* end confdefs.h. */
17382 #include <pthread.h>
17387 static struct timespec x; x.tv_sec = x.tv_nsec;
17392 if ac_fn_c_try_compile "$LINENO"
17394 gl_cv_sys_struct_timespec_in_pthread_h=yes
17396 gl_cv_sys_struct_timespec_in_pthread_h=no
17398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17401 printf "%s\n" "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17402 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17403 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
17405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17406 printf %s "checking for struct timespec in <unistd.h>... " >&6; }
17407 if test ${gl_cv_sys_struct_timespec_in_unistd_h+y}
17409 printf %s "(cached) " >&6
17411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17412 /* end confdefs.h. */
17413 #include <unistd.h>
17418 static struct timespec x; x.tv_sec = x.tv_nsec;
17423 if ac_fn_c_try_compile "$LINENO"
17425 gl_cv_sys_struct_timespec_in_unistd_h=yes
17427 gl_cv_sys_struct_timespec_in_unistd_h=no
17429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17431 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17432 printf "%s\n" "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17433 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17434 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1
17455 if test $gl_cv_have_include_next = yes; then
17456 gl_cv_next_time_h='<'time.h'>'
17458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17459 printf %s "checking absolute name of <time.h>... " >&6; }
17460 if test ${gl_cv_next_time_h+y}
17462 printf %s "(cached) " >&6
17467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17468 /* end confdefs.h. */
17472 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17473 *) gl_absname_cpp="$ac_cpp" ;;
17478 gl_dirsep_regex='[/\\]'
17481 gl_dirsep_regex='\/'
17484 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17485 gl_header_literal_regex=`echo 'time.h' \
17486 | sed -e "$gl_make_literal_regex_sed"`
17487 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17488 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17494 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17495 sed -n "$gl_absolute_header_sed"`
17497 gl_header=$gl_cv_absolute_time_h
17498 gl_cv_next_time_h='"'$gl_header'"'
17502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17503 printf "%s\n" "$gl_cv_next_time_h" >&6; }
17505 NEXT_TIME_H=$gl_cv_next_time_h
17507 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17508 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17509 gl_next_as_first_directive='<'time.h'>'
17511 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17512 gl_next_as_first_directive=$gl_cv_next_time_h
17514 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
17529 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
17534 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
17539 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;}
17546 if test "$HAVE_LIBUNISTRING" = yes; then
17547 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
17548 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
17549 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
17552 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
17553 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes
17560 printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h
17562 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
17563 if test "x$ac_cv_have_decl_feof_unlocked" = xyes
17570 printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h
17572 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
17573 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes
17580 printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h
17582 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
17583 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes
17590 printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h
17592 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
17593 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes
17600 printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h
17602 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
17603 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes
17610 printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h
17612 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
17613 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes
17620 printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h
17622 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
17623 if test "x$ac_cv_have_decl_fread_unlocked" = xyes
17630 printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h
17632 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
17633 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes
17640 printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h
17642 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
17643 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
17650 printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h
17652 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
17653 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes
17660 printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
17662 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
17663 if test "x$ac_cv_have_decl_putc_unlocked" = xyes
17670 printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h
17672 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
17673 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes
17680 printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h
17682 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17683 if test "x$ac_cv_have_decl_unsetenv" = xyes
17690 printf "%s\n" "#define HAVE_DECL_UNSETENV $ac_have_decl" >>confdefs.h
17696 if test $ac_cv_header_features_h = yes; then
17704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
17705 printf %s "checking for inttypes.h... " >&6; }
17706 if test ${gl_cv_header_inttypes_h+y}
17708 printf %s "(cached) " >&6
17710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711 /* end confdefs.h. */
17713 #include <sys/types.h>
17714 #include <inttypes.h>
17719 uintmax_t i = (uintmax_t) -1; return !i;
17724 if ac_fn_c_try_compile "$LINENO"
17726 gl_cv_header_inttypes_h=yes
17728 gl_cv_header_inttypes_h=no
17730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
17733 printf "%s\n" "$gl_cv_header_inttypes_h" >&6; }
17734 if test $gl_cv_header_inttypes_h = yes; then
17736 printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h
17741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
17742 printf %s "checking for stdint.h... " >&6; }
17743 if test ${gl_cv_header_stdint_h+y}
17745 printf %s "(cached) " >&6
17747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17748 /* end confdefs.h. */
17749 #include <sys/types.h>
17750 #include <stdint.h>
17754 uintmax_t i = (uintmax_t) -1; return !i;
17759 if ac_fn_c_try_compile "$LINENO"
17761 gl_cv_header_stdint_h=yes
17763 gl_cv_header_stdint_h=no
17765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
17768 printf "%s\n" "$gl_cv_header_stdint_h" >&6; }
17769 if test $gl_cv_header_stdint_h = yes; then
17771 printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h
17778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
17779 printf %s "checking for intmax_t... " >&6; }
17780 if test ${gt_cv_c_intmax_t+y}
17782 printf %s "(cached) " >&6
17784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17785 /* end confdefs.h. */
17787 #include <stddef.h>
17788 #include <stdlib.h>
17789 #if HAVE_STDINT_H_WITH_UINTMAX
17790 #include <stdint.h>
17792 #if HAVE_INTTYPES_H_WITH_UINTMAX
17793 #include <inttypes.h>
17799 intmax_t x = -1; return !x;
17804 if ac_fn_c_try_compile "$LINENO"
17806 gt_cv_c_intmax_t=yes
17808 gt_cv_c_intmax_t=no
17810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
17813 printf "%s\n" "$gt_cv_c_intmax_t" >&6; }
17814 if test $gt_cv_c_intmax_t = yes; then
17816 printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
17820 test $ac_cv_type_long_long_int = yes \
17821 && ac_type='long long' \
17824 printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
17829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
17830 printf %s "checking where to find the exponent in a 'double'... " >&6; }
17831 if test ${gl_cv_cc_double_expbit0+y}
17833 printf %s "(cached) " >&6
17836 if test "$cross_compiling" = yes
17839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17840 /* end confdefs.h. */
17842 #if defined arm || defined __arm || defined __arm__
17847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17848 $EGREP "mixed_endianness" >/dev/null 2>&1
17850 gl_cv_cc_double_expbit0="unknown"
17854 if test ${ac_cv_c_bigendian+y}
17856 printf %s "(cached) " >&6
17858 ac_cv_c_bigendian=unknown
17859 # See if we're dealing with a universal compiler.
17860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861 /* end confdefs.h. */
17862 #ifndef __APPLE_CC__
17863 not a universal capable compiler
17868 if ac_fn_c_try_compile "$LINENO"
17871 # Check for potential -arch flags. It is not universal unless
17872 # there are at least two -arch flags with different values.
17875 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17876 if test -n "$ac_prev"; then
17878 i?86 | x86_64 | ppc | ppc64)
17879 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17882 ac_cv_c_bigendian=universal
17888 elif test "x$ac_word" = "x-arch"; then
17893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17894 if test $ac_cv_c_bigendian = unknown; then
17895 # See if sys/param.h defines the BYTE_ORDER macro.
17896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17897 /* end confdefs.h. */
17898 #include <sys/types.h>
17899 #include <sys/param.h>
17904 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17905 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17907 bogus endian macros
17914 if ac_fn_c_try_compile "$LINENO"
17916 # It does; now see whether it defined to BIG_ENDIAN or not.
17917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17918 /* end confdefs.h. */
17919 #include <sys/types.h>
17920 #include <sys/param.h>
17925 #if BYTE_ORDER != BIG_ENDIAN
17933 if ac_fn_c_try_compile "$LINENO"
17935 ac_cv_c_bigendian=yes
17937 ac_cv_c_bigendian=no
17939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17943 if test $ac_cv_c_bigendian = unknown; then
17944 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17946 /* end confdefs.h. */
17947 #include <limits.h>
17952 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17953 bogus endian macros
17960 if ac_fn_c_try_compile "$LINENO"
17962 # It does; now see whether it defined to _BIG_ENDIAN or not.
17963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17964 /* end confdefs.h. */
17965 #include <limits.h>
17970 #ifndef _BIG_ENDIAN
17978 if ac_fn_c_try_compile "$LINENO"
17980 ac_cv_c_bigendian=yes
17982 ac_cv_c_bigendian=no
17984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17986 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17988 if test $ac_cv_c_bigendian = unknown; then
17989 # Compile a test program.
17990 if test "$cross_compiling" = yes
17992 # Try to guess by grepping values from an object file.
17993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17994 /* end confdefs.h. */
17995 short int ascii_mm[] =
17996 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17997 short int ascii_ii[] =
17998 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17999 int use_ascii (int i) {
18000 return ascii_mm[i] + ascii_ii[i];
18002 short int ebcdic_ii[] =
18003 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18004 short int ebcdic_mm[] =
18005 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18006 int use_ebcdic (int i) {
18007 return ebcdic_mm[i] + ebcdic_ii[i];
18014 return use_ascii (foo) == use_ebcdic (foo);
18019 if ac_fn_c_try_compile "$LINENO"
18021 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
18022 ac_cv_c_bigendian=yes
18024 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
18025 if test "$ac_cv_c_bigendian" = unknown; then
18026 ac_cv_c_bigendian=no
18028 # finding both strings is unlikely to happen, but who knows?
18029 ac_cv_c_bigendian=unknown
18033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18036 /* end confdefs.h. */
18037 $ac_includes_default
18042 /* Are we little or big endian? From Harbison&Steele. */
18046 char c[sizeof (long int)];
18049 return u.c[sizeof (long int) - 1] == 1;
18055 if ac_fn_c_try_run "$LINENO"
18057 ac_cv_c_bigendian=no
18059 ac_cv_c_bigendian=yes
18061 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18062 conftest.$ac_objext conftest.beam conftest.$ac_ext
18068 case $ac_cv_c_bigendian in #(
18070 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
18072 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
18075 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
18079 gl_cv_cc_double_expbit0="unknown" ;;
18088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18089 /* end confdefs.h. */
18092 #include <stddef.h>
18094 #include <string.h>
18096 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
18097 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
18098 static unsigned int ored_words[NWORDS];
18099 static unsigned int anded_words[NWORDS];
18100 static void add_to_ored_words (double x)
18104 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
18105 memset (&m, 0, sizeof (memory_double));
18107 for (i = 0; i < NWORDS; i++)
18109 ored_words[i] |= m.word[i];
18110 anded_words[i] &= m.word[i];
18116 FILE *fp = fopen ("conftest.out", "w");
18119 for (j = 0; j < NWORDS; j++)
18120 anded_words[j] = ~ (unsigned int) 0;
18121 add_to_ored_words (0.25);
18122 add_to_ored_words (0.5);
18123 add_to_ored_words (1.0);
18124 add_to_ored_words (2.0);
18125 add_to_ored_words (4.0);
18126 /* Remove bits that are common (e.g. if representation of the first mantissa
18127 bit is explicit). */
18128 for (j = 0; j < NWORDS; j++)
18129 ored_words[j] &= ~anded_words[j];
18130 /* Now find the nonzero word. */
18131 for (j = 0; j < NWORDS; j++)
18132 if (ored_words[j] != 0)
18137 for (i = j + 1; i < NWORDS; i++)
18138 if (ored_words[i] != 0)
18140 fprintf (fp, "unknown");
18141 return (fclose (fp) != 0);
18144 if ((ored_words[j] >> i) & 1)
18146 fprintf (fp, "word %d bit %d", (int) j, (int) i);
18147 return (fclose (fp) != 0);
18150 fprintf (fp, "unknown");
18151 return (fclose (fp) != 0);
18155 if ac_fn_c_try_run "$LINENO"
18157 gl_cv_cc_double_expbit0=`cat conftest.out`
18159 gl_cv_cc_double_expbit0="unknown"
18161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18162 conftest.$ac_objext conftest.beam conftest.$ac_ext
18168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
18169 printf "%s\n" "$gl_cv_cc_double_expbit0" >&6; }
18170 case "$gl_cv_cc_double_expbit0" in
18172 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
18173 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
18175 printf "%s\n" "#define DBL_EXPBIT0_WORD $word" >>confdefs.h
18178 printf "%s\n" "#define DBL_EXPBIT0_BIT $bit" >>confdefs.h
18190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
18191 printf %s "checking whether snprintf returns a byte count as in C99... " >&6; }
18192 if test ${gl_cv_func_snprintf_retval_c99+y}
18194 printf %s "(cached) " >&6
18197 if test "$cross_compiling" = yes
18200 # Guess yes on glibc systems.
18201 *-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18202 # Guess yes on FreeBSD >= 5.
18203 freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
18204 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18205 # Guess yes on Mac OS X >= 10.3.
18206 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
18207 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18208 # Guess yes on OpenBSD >= 3.9.
18209 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18210 gl_cv_func_snprintf_retval_c99="guessing no";;
18211 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18212 # Guess yes on Solaris >= 2.10.
18213 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18214 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
18215 # Guess yes on AIX >= 4.
18216 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
18217 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18218 # Guess yes on NetBSD >= 3.
18219 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18220 gl_cv_func_snprintf_retval_c99="guessing no";;
18221 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18222 # Guess yes on BeOS.
18223 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18224 # Guess yes on MSVC, no on mingw.
18225 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18226 /* end confdefs.h. */
18233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18234 $EGREP "Known" >/dev/null 2>&1
18236 gl_cv_func_snprintf_retval_c99="guessing yes"
18238 gl_cv_func_snprintf_retval_c99="guessing no"
18243 # If we don't know, assume the worst.
18244 *) gl_cv_func_snprintf_retval_c99="guessing no";;
18248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18249 /* end confdefs.h. */
18252 #include <string.h>
18254 # define my_snprintf snprintf
18256 # include <stdarg.h>
18257 static int my_snprintf (char *buf, int size, const char *format, ...)
18261 va_start (args, format);
18262 ret = vsnprintf (buf, size, format, args);
18267 static char buf[100];
18270 strcpy (buf, "ABCDEF");
18271 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
18273 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
18275 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
18280 if ac_fn_c_try_run "$LINENO"
18282 gl_cv_func_snprintf_retval_c99=yes
18284 gl_cv_func_snprintf_retval_c99=no
18286 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18287 conftest.$ac_objext conftest.beam conftest.$ac_ext
18292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
18293 printf "%s\n" "$gl_cv_func_snprintf_retval_c99" >&6; }
18300 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
18301 if test "x$ac_cv_func_snprintf" = xyes
18303 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
18306 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
18307 if test "x$ac_cv_func_strnlen" = xyes
18309 printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
18312 ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen"
18313 if test "x$ac_cv_func_wcslen" = xyes
18315 printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h
18318 ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen"
18319 if test "x$ac_cv_func_wcsnlen" = xyes
18321 printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h
18324 ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc"
18325 if test "x$ac_cv_func_mbrtowc" = xyes
18327 printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h
18330 ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb"
18331 if test "x$ac_cv_func_wcrtomb" = xyes
18333 printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h
18337 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
18339 if test "x$ac_cv_have_decl__snprintf" = xyes
18346 printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h
18350 case "$gl_cv_func_snprintf_retval_c99" in
18353 printf "%s\n" "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
18365 GNULIB_GETPEERNAME=0;
18366 GNULIB_GETSOCKNAME=0;
18367 GNULIB_GETSOCKOPT=0;
18373 GNULIB_SETSOCKOPT=0;
18376 HAVE_STRUCT_SOCKADDR_STORAGE=1;
18377 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
18379 HAVE_SA_FAMILY_T=1;
18383 if test $ac_cv_header_sys_socket_h = no; then
18384 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18385 if test "x$ac_cv_header_ws2tcpip_h" = xyes
18387 printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h
18400 printf "%s\n" "#define _POSIX_PII_SOCKET 1" >>confdefs.h
18405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
18406 printf %s "checking whether <sys/socket.h> is self-contained... " >&6; }
18407 if test ${gl_cv_header_sys_socket_h_selfcontained+y}
18409 printf %s "(cached) " >&6
18412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18413 /* end confdefs.h. */
18414 #include <sys/socket.h>
18423 if ac_fn_c_try_compile "$LINENO"
18425 gl_cv_header_sys_socket_h_selfcontained=yes
18427 gl_cv_header_sys_socket_h_selfcontained=no
18429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
18433 printf "%s\n" "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
18434 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
18435 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
18436 if test "x$ac_cv_func_shutdown" = xyes
18438 printf "%s\n" "#define HAVE_SHUTDOWN 1" >>confdefs.h
18442 if test $ac_cv_func_shutdown = yes; then
18443 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
18444 printf %s "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
18445 if test ${gl_cv_header_sys_socket_h_shut+y}
18447 printf %s "(cached) " >&6
18450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18451 /* end confdefs.h. */
18452 #include <sys/socket.h>
18456 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
18461 if ac_fn_c_try_compile "$LINENO"
18463 gl_cv_header_sys_socket_h_shut=yes
18465 gl_cv_header_sys_socket_h_shut=no
18467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
18471 printf "%s\n" "$gl_cv_header_sys_socket_h_shut" >&6; }
18472 if test $gl_cv_header_sys_socket_h_shut = no; then
18473 SYS_SOCKET_H='sys/socket.h'
18477 # We need to check for ws2tcpip.h now.
18489 if test $gl_cv_have_include_next = yes; then
18490 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
18492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
18493 printf %s "checking absolute name of <sys/socket.h>... " >&6; }
18494 if test ${gl_cv_next_sys_socket_h+y}
18496 printf %s "(cached) " >&6
18499 if test $ac_cv_header_sys_socket_h = yes; then
18504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18505 /* end confdefs.h. */
18506 #include <sys/socket.h>
18509 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18510 *) gl_absname_cpp="$ac_cpp" ;;
18515 gl_dirsep_regex='[/\\]'
18518 gl_dirsep_regex='\/'
18521 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18522 gl_header_literal_regex=`echo 'sys/socket.h' \
18523 | sed -e "$gl_make_literal_regex_sed"`
18524 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18525 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18531 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18532 sed -n "$gl_absolute_header_sed"`
18534 gl_header=$gl_cv_absolute_sys_socket_h
18535 gl_cv_next_sys_socket_h='"'$gl_header'"'
18537 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
18542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
18543 printf "%s\n" "$gl_cv_next_sys_socket_h" >&6; }
18545 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
18547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18549 gl_next_as_first_directive='<'sys/socket.h'>'
18551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18552 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
18554 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
18559 if test $ac_cv_header_sys_socket_h = yes; then
18560 HAVE_SYS_SOCKET_H=1
18563 HAVE_SYS_SOCKET_H=0
18564 if test $ac_cv_header_ws2tcpip_h = yes; then
18573 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
18574 /* sys/types.h is not needed according to POSIX, but the
18575 sys/socket.h in i386-unknown-freebsd4.10 and
18576 powerpc-apple-darwin5.5 required it. */
18577 #include <sys/types.h>
18578 #ifdef HAVE_SYS_SOCKET_H
18579 #include <sys/socket.h>
18581 #ifdef HAVE_WS2TCPIP_H
18582 #include <ws2tcpip.h>
18586 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
18589 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
18593 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
18594 /* sys/types.h is not needed according to POSIX, but the
18595 sys/socket.h in i386-unknown-freebsd4.10 and
18596 powerpc-apple-darwin5.5 required it. */
18597 #include <sys/types.h>
18598 #ifdef HAVE_SYS_SOCKET_H
18599 #include <sys/socket.h>
18601 #ifdef HAVE_WS2TCPIP_H
18602 #include <ws2tcpip.h>
18606 if test "x$ac_cv_type_sa_family_t" = xyes
18609 printf "%s\n" "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
18614 if test $ac_cv_type_struct_sockaddr_storage = no; then
18615 HAVE_STRUCT_SOCKADDR_STORAGE=0
18617 if test $ac_cv_type_sa_family_t = no; then
18620 if test $ac_cv_type_struct_sockaddr_storage != no; then
18621 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
18622 #ifdef HAVE_SYS_SOCKET_H
18623 #include <sys/socket.h>
18625 #ifdef HAVE_WS2TCPIP_H
18626 #include <ws2tcpip.h>
18630 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
18633 printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1" >>confdefs.h
18637 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
18641 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
18642 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
18643 SYS_SOCKET_H='sys/socket.h'
18649 if test $ac_cv_header_sys_socket_h != yes; then
18650 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18651 if test "x$ac_cv_header_winsock2_h" = xyes
18653 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
18658 if test "$ac_cv_header_winsock2_h" = yes; then
18660 UNISTD_H_HAVE_WINSOCK2_H=1
18661 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18673 GNULIB_INET_NTOP=0;
18674 GNULIB_INET_PTON=0;
18675 HAVE_DECL_INET_NTOP=1;
18676 HAVE_DECL_INET_PTON=1;
18677 REPLACE_INET_NTOP=0;
18678 REPLACE_INET_PTON=0;
18684 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
18685 printf %s "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
18686 if test ${gl_cv_func_getcwd_null+y}
18688 printf %s "(cached) " >&6
18690 if test "$cross_compiling" = yes
18693 # Guess yes on glibc systems.
18694 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
18695 # Guess yes on Cygwin.
18696 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
18697 # If we don't know, assume the worst.
18698 *) gl_cv_func_getcwd_null="guessing no";;
18702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18703 /* end confdefs.h. */
18705 # include <stdlib.h>
18707 # include <unistd.h>
18708 # else /* on Windows with MSVC */
18709 # include <direct.h>
18719 #if defined _WIN32 && ! defined __CYGWIN__
18720 /* mingw cwd does not start with '/', but getcwd does allocate.
18721 However, mingw fails to honor non-zero size. */
18723 if (chdir ("/") != 0)
18727 char *f = getcwd (NULL, 0);
18731 { free (f); return 3; }
18733 { free (f); return 4; }
18743 if ac_fn_c_try_run "$LINENO"
18745 gl_cv_func_getcwd_null=yes
18747 gl_cv_func_getcwd_null=no
18749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18750 conftest.$ac_objext conftest.beam conftest.$ac_ext
18754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
18755 printf "%s\n" "$gl_cv_func_getcwd_null" >&6; }
18758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
18759 printf %s "checking for getcwd with POSIX signature... " >&6; }
18760 if test ${gl_cv_func_getcwd_posix_signature+y}
18762 printf %s "(cached) " >&6
18764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18765 /* end confdefs.h. */
18766 #include <unistd.h>
18774 char *getcwd (char *, size_t);
18781 if ac_fn_c_try_compile "$LINENO"
18783 gl_cv_func_getcwd_posix_signature=yes
18785 gl_cv_func_getcwd_posix_signature=no
18787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18790 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
18791 printf "%s\n" "$gl_cv_func_getcwd_posix_signature" >&6; }
18799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
18800 printf %s "checking for IPv4 sockets... " >&6; }
18801 if test ${gl_cv_socket_ipv4+y}
18803 printf %s "(cached) " >&6
18805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18806 /* end confdefs.h. */
18807 #include <sys/types.h>
18808 #ifdef HAVE_SYS_SOCKET_H
18809 #include <sys/socket.h>
18811 #ifdef HAVE_NETINET_IN_H
18812 #include <netinet/in.h>
18814 #ifdef HAVE_WINSOCK2_H
18815 #include <winsock2.h>
18820 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
18821 if (&x && &y && &z) return 0;
18826 if ac_fn_c_try_compile "$LINENO"
18828 gl_cv_socket_ipv4=yes
18830 gl_cv_socket_ipv4=no
18832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
18835 printf "%s\n" "$gl_cv_socket_ipv4" >&6; }
18836 if test $gl_cv_socket_ipv4 = yes; then
18838 printf "%s\n" "#define HAVE_IPV4 1" >>confdefs.h
18842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
18843 printf %s "checking for IPv6 sockets... " >&6; }
18844 if test ${gl_cv_socket_ipv6+y}
18846 printf %s "(cached) " >&6
18848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18849 /* end confdefs.h. */
18850 #include <sys/types.h>
18851 #ifdef HAVE_SYS_SOCKET_H
18852 #include <sys/socket.h>
18854 #ifdef HAVE_NETINET_IN_H
18855 #include <netinet/in.h>
18857 #ifdef HAVE_WINSOCK2_H
18858 #include <winsock2.h>
18860 #ifdef HAVE_WS2TCPIP_H
18861 #include <ws2tcpip.h>
18866 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
18867 if (&x && &y && &z) return 0;
18872 if ac_fn_c_try_compile "$LINENO"
18874 gl_cv_socket_ipv6=yes
18876 gl_cv_socket_ipv6=no
18878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
18881 printf "%s\n" "$gl_cv_socket_ipv6" >&6; }
18882 if test $gl_cv_socket_ipv6 = yes; then
18884 printf "%s\n" "#define HAVE_IPV6 1" >>confdefs.h
18900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
18901 printf %s "checking whether <sys/select.h> is self-contained... " >&6; }
18902 if test ${gl_cv_header_sys_select_h_selfcontained+y}
18904 printf %s "(cached) " >&6
18907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18908 /* end confdefs.h. */
18909 #include <sys/select.h>
18918 if ac_fn_c_try_compile "$LINENO"
18920 gl_cv_header_sys_select_h_selfcontained=yes
18922 gl_cv_header_sys_select_h_selfcontained=no
18924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18925 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
18926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18927 /* end confdefs.h. */
18928 #include <sys/select.h>
18932 int memset; int bzero;
18938 if ac_fn_c_try_compile "$LINENO"
18940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18941 /* end confdefs.h. */
18942 #include <sys/select.h>
18948 #define memset nonexistent_memset
18953 void *memset (void *, int, unsigned long);
18955 #define bzero nonexistent_bzero
18960 void bzero (void *, unsigned long);
18969 if ac_fn_c_try_link "$LINENO"
18973 gl_cv_header_sys_select_h_selfcontained=no
18975 rm -f core conftest.err conftest.$ac_objext \
18976 conftest$ac_exeext conftest.$ac_ext
18979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
18984 printf "%s\n" "$gl_cv_header_sys_select_h_selfcontained" >&6; }
18994 if test $gl_cv_have_include_next = yes; then
18995 gl_cv_next_sys_select_h='<'sys/select.h'>'
18997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
18998 printf %s "checking absolute name of <sys/select.h>... " >&6; }
18999 if test ${gl_cv_next_sys_select_h+y}
19001 printf %s "(cached) " >&6
19004 if test $ac_cv_header_sys_select_h = yes; then
19009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h. */
19011 #include <sys/select.h>
19014 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19015 *) gl_absname_cpp="$ac_cpp" ;;
19020 gl_dirsep_regex='[/\\]'
19023 gl_dirsep_regex='\/'
19026 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19027 gl_header_literal_regex=`echo 'sys/select.h' \
19028 | sed -e "$gl_make_literal_regex_sed"`
19029 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19030 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19036 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19037 sed -n "$gl_absolute_header_sed"`
19039 gl_header=$gl_cv_absolute_sys_select_h
19040 gl_cv_next_sys_select_h='"'$gl_header'"'
19042 gl_cv_next_sys_select_h='<'sys/select.h'>'
19047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19048 printf "%s\n" "$gl_cv_next_sys_select_h" >&6; }
19050 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19052 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19053 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19054 gl_next_as_first_directive='<'sys/select.h'>'
19056 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19057 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19059 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
19064 if test $ac_cv_header_sys_select_h = yes; then
19065 HAVE_SYS_SELECT_H=1
19067 HAVE_SYS_SELECT_H=0
19074 if test $ac_cv_header_sys_socket_h != yes; then
19075 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19076 if test "x$ac_cv_header_winsock2_h" = xyes
19078 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19083 if test "$ac_cv_header_winsock2_h" = yes; then
19085 UNISTD_H_HAVE_WINSOCK2_H=1
19086 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19102 if test $ac_cv_header_sys_socket_h != yes; then
19103 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19104 if test "x$ac_cv_header_winsock2_h" = xyes
19106 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19111 if test "$ac_cv_header_winsock2_h" = yes; then
19113 UNISTD_H_HAVE_WINSOCK2_H=1
19114 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19120 if test $HAVE_WINSOCK2_H = 1; then
19121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
19122 printf %s "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
19123 if test ${gl_cv_func_wsastartup+y}
19125 printf %s "(cached) " >&6
19128 gl_save_LIBS="$LIBS"
19129 LIBS="$LIBS -lws2_32"
19130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19131 /* end confdefs.h. */
19133 #ifdef HAVE_WINSOCK2_H
19134 # include <winsock2.h>
19140 WORD wVersionRequested = MAKEWORD(1, 1);
19142 int err = WSAStartup(wVersionRequested, &wsaData);
19148 if ac_fn_c_try_link "$LINENO"
19150 gl_cv_func_wsastartup=yes
19152 gl_cv_func_wsastartup=no
19154 rm -f core conftest.err conftest.$ac_objext \
19155 conftest$ac_exeext conftest.$ac_ext
19156 LIBS="$gl_save_LIBS"
19159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
19160 printf "%s\n" "$gl_cv_func_wsastartup" >&6; }
19161 if test "$gl_cv_func_wsastartup" = "yes"; then
19163 printf "%s\n" "#define WINDOWS_SOCKETS 1" >>confdefs.h
19165 LIBSOCKET='-lws2_32'
19168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
19169 printf %s "checking for library containing setsockopt... " >&6; }
19170 if test ${gl_cv_lib_socket+y}
19172 printf %s "(cached) " >&6
19176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19177 /* end confdefs.h. */
19191 if ac_fn_c_try_link "$LINENO"
19195 gl_save_LIBS="$LIBS"
19196 LIBS="$gl_save_LIBS -lsocket"
19197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19198 /* end confdefs.h. */
19212 if ac_fn_c_try_link "$LINENO"
19214 gl_cv_lib_socket="-lsocket"
19216 rm -f core conftest.err conftest.$ac_objext \
19217 conftest$ac_exeext conftest.$ac_ext
19218 if test -z "$gl_cv_lib_socket"; then
19219 LIBS="$gl_save_LIBS -lnetwork"
19220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19221 /* end confdefs.h. */
19235 if ac_fn_c_try_link "$LINENO"
19237 gl_cv_lib_socket="-lnetwork"
19239 rm -f core conftest.err conftest.$ac_objext \
19240 conftest$ac_exeext conftest.$ac_ext
19241 if test -z "$gl_cv_lib_socket"; then
19242 LIBS="$gl_save_LIBS -lnet"
19243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19244 /* end confdefs.h. */
19258 if ac_fn_c_try_link "$LINENO"
19260 gl_cv_lib_socket="-lnet"
19262 rm -f core conftest.err conftest.$ac_objext \
19263 conftest$ac_exeext conftest.$ac_ext
19266 LIBS="$gl_save_LIBS"
19269 rm -f core conftest.err conftest.$ac_objext \
19270 conftest$ac_exeext conftest.$ac_ext
19271 if test -z "$gl_cv_lib_socket"; then
19272 gl_cv_lib_socket="none needed"
19276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
19277 printf "%s\n" "$gl_cv_lib_socket" >&6; }
19278 if test "$gl_cv_lib_socket" != "none needed"; then
19279 LIBSOCKET="$gl_cv_lib_socket"
19295 if test "$ac_cv_header_winsock2_h" = yes; then
19299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
19300 printf %s "checking whether select supports a 0 argument... " >&6; }
19301 if test ${gl_cv_func_select_supports0+y}
19303 printf %s "(cached) " >&6
19306 if test "$cross_compiling" = yes
19310 # Guess no on Interix.
19311 interix*) gl_cv_func_select_supports0="guessing no";;
19312 # Guess yes otherwise.
19313 *) gl_cv_func_select_supports0="guessing yes";;
19317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19318 /* end confdefs.h. */
19320 #include <sys/types.h>
19321 #include <sys/time.h>
19322 #if HAVE_SYS_SELECT_H
19323 #include <sys/select.h>
19327 struct timeval timeout;
19328 timeout.tv_sec = 0;
19329 timeout.tv_usec = 5;
19330 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
19333 if ac_fn_c_try_run "$LINENO"
19335 gl_cv_func_select_supports0=yes
19337 gl_cv_func_select_supports0=no
19339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19340 conftest.$ac_objext conftest.beam conftest.$ac_ext
19345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
19346 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
19347 case "$gl_cv_func_select_supports0" in
19349 *) REPLACE_SELECT=1 ;;
19352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
19353 printf %s "checking whether select detects invalid fds... " >&6; }
19354 if test ${gl_cv_func_select_detects_ebadf+y}
19356 printf %s "(cached) " >&6
19359 if test "$cross_compiling" = yes
19363 # Guess yes on Linux systems.
19364 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
19365 # Guess yes on glibc systems.
19366 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
19367 # If we don't know, assume the worst.
19368 *) gl_cv_func_select_detects_ebadf="guessing no" ;;
19372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19373 /* end confdefs.h. */
19375 #include <sys/types.h>
19376 #include <sys/time.h>
19377 #if HAVE_SYS_SELECT_H
19378 # include <sys/select.h>
19380 #include <unistd.h>
19392 struct timeval timeout;
19393 timeout.tv_sec = 0;
19394 timeout.tv_usec = 5;
19395 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
19401 if ac_fn_c_try_run "$LINENO"
19403 gl_cv_func_select_detects_ebadf=yes
19405 gl_cv_func_select_detects_ebadf=no
19407 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19408 conftest.$ac_objext conftest.beam conftest.$ac_ext
19413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
19414 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
19415 case $gl_cv_func_select_detects_ebadf in
19417 *) REPLACE_SELECT=1 ;;
19421 LIB_SELECT="$LIBSOCKET"
19422 if test $REPLACE_SELECT = 1; then
19425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19426 /* end confdefs.h. */
19428 #define WIN32_LEAN_AND_MEAN
19429 #include <windows.h>
19433 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
19437 if ac_fn_c_try_link "$LINENO"
19441 LIB_SELECT="$LIB_SELECT -luser32"
19443 rm -f core conftest.err conftest.$ac_objext \
19444 conftest$ac_exeext conftest.$ac_ext
19457 if test $ac_cv_have_decl_strerror_r = no; then
19458 HAVE_DECL_STRERROR_R=0
19461 if test $ac_cv_func_strerror_r = yes; then
19462 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
19463 if test $gl_cv_func_strerror_r_posix_signature = yes; then
19464 case "$gl_cv_func_strerror_r_works" in
19465 *no) REPLACE_STRERROR_R=1 ;;
19468 REPLACE_STRERROR_R=1
19471 REPLACE_STRERROR_R=1
19477 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
19478 if test "x$ac_cv_have_decl_snprintf" = xyes
19485 printf "%s\n" "#define HAVE_DECL_SNPRINTF $ac_have_decl" >>confdefs.h
19496 GL_COND_LIBTOOL_TRUE=
19497 GL_COND_LIBTOOL_FALSE='#'
19499 GL_COND_LIBTOOL_TRUE='#'
19500 GL_COND_LIBTOOL_FALSE=
19503 gl_cond_libtool=false
19516 gl_source_base='lib'
19519 if test $ac_cv_func_alloca_works = no; then
19523 # Define an additional variable used in the Makefile substitution.
19524 if test $ac_cv_working_alloca_h = yes; then
19525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
19526 printf %s "checking for alloca as a compiler built-in... " >&6; }
19527 if test ${gl_cv_rpl_alloca+y}
19529 printf %s "(cached) " >&6
19532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19533 /* end confdefs.h. */
19535 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
19540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19541 $EGREP "Need own alloca" >/dev/null 2>&1
19543 gl_cv_rpl_alloca=yes
19545 gl_cv_rpl_alloca=no
19551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
19552 printf "%s\n" "$gl_cv_rpl_alloca" >&6; }
19553 if test $gl_cv_rpl_alloca = yes; then
19555 printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
19565 if test -n "$ALLOCA_H"; then
19566 GL_GENERATE_ALLOCA_H_TRUE=
19567 GL_GENERATE_ALLOCA_H_FALSE='#'
19569 GL_GENERATE_ALLOCA_H_TRUE='#'
19570 GL_GENERATE_ALLOCA_H_FALSE=
19580 if test $ac_cv_func_btowc = no; then
19587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
19588 printf %s "checking whether btowc(0) is correct... " >&6; }
19589 if test ${gl_cv_func_btowc_nul+y}
19591 printf %s "(cached) " >&6
19594 if test "$cross_compiling" = yes
19598 # Guess no on Cygwin.
19599 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
19600 # Guess yes on native Windows.
19601 mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
19602 # Guess yes otherwise.
19603 *) gl_cv_func_btowc_nul="guessing yes" ;;
19607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19608 /* end confdefs.h. */
19610 #include <string.h>
19611 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19613 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19614 included before <wchar.h>. */
19615 #include <stddef.h>
19621 if (btowc ('\0') != 0)
19626 if ac_fn_c_try_run "$LINENO"
19628 gl_cv_func_btowc_nul=yes
19630 gl_cv_func_btowc_nul=no
19632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19633 conftest.$ac_objext conftest.beam conftest.$ac_ext
19638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
19639 printf "%s\n" "$gl_cv_func_btowc_nul" >&6; }
19641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
19642 printf %s "checking whether btowc(EOF) is correct... " >&6; }
19643 if test ${gl_cv_func_btowc_eof+y}
19645 printf %s "(cached) " >&6
19649 # Guess no on IRIX.
19650 irix*) gl_cv_func_btowc_eof="guessing no" ;;
19651 # Guess yes on native Windows.
19652 mingw*) gl_cv_func_btowc_eof="guessing yes" ;;
19653 # Guess yes otherwise.
19654 *) gl_cv_func_btowc_eof="guessing yes" ;;
19656 if test $LOCALE_FR != none; then
19657 if test "$cross_compiling" = yes
19661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19662 /* end confdefs.h. */
19664 #include <locale.h>
19665 #include <string.h>
19666 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19668 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19669 included before <wchar.h>. */
19670 #include <stddef.h>
19676 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
19678 if (btowc (EOF) != WEOF)
19684 if ac_fn_c_try_run "$LINENO"
19686 gl_cv_func_btowc_eof=yes
19688 gl_cv_func_btowc_eof=no
19690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19691 conftest.$ac_objext conftest.beam conftest.$ac_ext
19697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
19698 printf "%s\n" "$gl_cv_func_btowc_eof" >&6; }
19700 case "$gl_cv_func_btowc_nul" in
19702 *) REPLACE_BTOWC=1 ;;
19704 case "$gl_cv_func_btowc_eof" in
19706 *) REPLACE_BTOWC=1 ;;
19710 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
19719 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
19736 printf "%s\n" "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
19741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
19742 printf %s "checking for __builtin_expect... " >&6; }
19743 if test ${gl_cv___builtin_expect+y}
19745 printf %s "(cached) " >&6
19747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19748 /* end confdefs.h. */
19751 main (int argc, char **argv)
19753 argc = __builtin_expect (argc, 100);
19754 return argv[argc != 100][0];
19757 if ac_fn_c_try_link "$LINENO"
19759 gl_cv___builtin_expect=yes
19761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19762 /* end confdefs.h. */
19764 #include <builtins.h>
19766 main (int argc, char **argv)
19768 argc = __builtin_expect (argc, 100);
19769 return argv[argc != 100][0];
19772 if ac_fn_c_try_link "$LINENO"
19774 gl_cv___builtin_expect="in <builtins.h>"
19776 gl_cv___builtin_expect=no
19778 rm -f core conftest.err conftest.$ac_objext \
19779 conftest$ac_exeext conftest.$ac_ext
19781 rm -f core conftest.err conftest.$ac_objext \
19782 conftest$ac_exeext conftest.$ac_ext
19784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
19785 printf "%s\n" "$gl_cv___builtin_expect" >&6; }
19786 if test "$gl_cv___builtin_expect" = yes; then
19787 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
19789 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
19790 printf "%s\n" "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
19799 # for STACK_DIRECTION
19803 ac_fn_c_check_decl "$LINENO" "sigaltstack" "ac_cv_have_decl_sigaltstack" "#include <signal.h>
19805 if test "x$ac_cv_have_decl_sigaltstack" = xyes
19812 printf "%s\n" "#define HAVE_DECL_SIGALTSTACK $ac_have_decl" >>confdefs.h
19817 ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
19819 if test "x$ac_cv_type_stack_t" = xyes
19822 printf "%s\n" "#define HAVE_STACK_T 1" >>confdefs.h
19828 if test "$gl_cv_lib_sigsegv" = yes \
19829 && test $"ac_cv_sys_xsi_stack_overflow_heuristic" != yes ; then
19830 LIBCSTACK=$LIBSIGSEGV
19832 LTLIBCSTACK=$LTLIBSIGSEGV
19841 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
19842 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
19844 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
19845 # programs in the package would end up linked with that potentially-shared
19846 # library, inducing unnecessary run-time overhead.
19849 gl_saved_libs=$LIBS
19850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19851 printf %s "checking for library containing clock_gettime... " >&6; }
19852 if test ${ac_cv_search_clock_gettime+y}
19854 printf %s "(cached) " >&6
19856 ac_func_search_save_LIBS=$LIBS
19857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19858 /* end confdefs.h. */
19860 /* Override any GCC internal prototype to avoid an error.
19861 Use char because int might match the return type of a GCC
19862 builtin and then its argument prototype would still apply. */
19866 char clock_gettime ();
19870 return clock_gettime ();
19875 for ac_lib in '' rt posix4
19877 if test -z "$ac_lib"; then
19878 ac_res="none required"
19881 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19883 if ac_fn_c_try_link "$LINENO"
19885 ac_cv_search_clock_gettime=$ac_res
19887 rm -f core conftest.err conftest.$ac_objext \
19889 if test ${ac_cv_search_clock_gettime+y}
19894 if test ${ac_cv_search_clock_gettime+y}
19898 ac_cv_search_clock_gettime=no
19900 rm conftest.$ac_ext
19901 LIBS=$ac_func_search_save_LIBS
19903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19904 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
19905 ac_res=$ac_cv_search_clock_gettime
19906 if test "$ac_res" != no
19908 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19909 test "$ac_cv_search_clock_gettime" = "none required" ||
19910 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
19913 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
19914 if test "x$ac_cv_func_clock_gettime" = xyes
19916 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
19919 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
19920 if test "x$ac_cv_func_clock_settime" = xyes
19922 printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
19926 LIBS=$gl_saved_libs
19930 printf "%s\n" "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
19937 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19946 if test $ac_cv_header_sys_socket_h != yes; then
19947 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19948 if test "x$ac_cv_header_winsock2_h" = xyes
19950 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
19955 if test "$ac_cv_header_winsock2_h" = yes; then
19957 UNISTD_H_HAVE_WINSOCK2_H=1
19958 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19964 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
19970 if test $REPLACE_CLOSE = 1; then
19979 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
19993 printf "%s\n" "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
20009 if test $gl_cv_have_include_next = yes; then
20010 gl_cv_next_ctype_h='<'ctype.h'>'
20012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
20013 printf %s "checking absolute name of <ctype.h>... " >&6; }
20014 if test ${gl_cv_next_ctype_h+y}
20016 printf %s "(cached) " >&6
20021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20022 /* end confdefs.h. */
20026 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20027 *) gl_absname_cpp="$ac_cpp" ;;
20032 gl_dirsep_regex='[/\\]'
20035 gl_dirsep_regex='\/'
20038 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20039 gl_header_literal_regex=`echo 'ctype.h' \
20040 | sed -e "$gl_make_literal_regex_sed"`
20041 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20042 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20048 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20049 sed -n "$gl_absolute_header_sed"`
20051 gl_header=$gl_cv_absolute_ctype_h
20052 gl_cv_next_ctype_h='"'$gl_header'"'
20056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
20057 printf "%s\n" "$gl_cv_next_ctype_h" >&6; }
20059 NEXT_CTYPE_H=$gl_cv_next_ctype_h
20061 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20062 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20063 gl_next_as_first_directive='<'ctype.h'>'
20065 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20066 gl_next_as_first_directive=$gl_cv_next_ctype_h
20068 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
20083 printf "%s\n" "#define GNULIB_DIRNAME 1" >>confdefs.h
20092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
20093 printf %s "checking whether // is distinct from /... " >&6; }
20094 if test ${gl_cv_double_slash_root+y}
20096 printf %s "(cached) " >&6
20098 if test x"$cross_compiling" = xyes ; then
20099 # When cross-compiling, there is no way to tell whether // is special
20100 # short of a list of hosts. However, the only known hosts to date
20101 # that have a distinct // are Apollo DomainOS (too old to port to),
20102 # Cygwin, and z/OS. If anyone knows of another system for which // has
20103 # special semantics and is distinct from /, please report it to
20104 # <bug-gnulib@gnu.org>.
20106 *-cygwin | i370-ibm-openedition)
20107 gl_cv_double_slash_root=yes ;;
20109 # Be optimistic and assume that / and // are the same when we
20111 gl_cv_double_slash_root='unknown, assuming no' ;;
20114 set x `ls -di / // 2>/dev/null`
20115 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
20116 gl_cv_double_slash_root=no
20118 gl_cv_double_slash_root=yes
20122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
20123 printf "%s\n" "$gl_cv_double_slash_root" >&6; }
20124 if test "$gl_cv_double_slash_root" = yes; then
20126 printf "%s\n" "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
20135 printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h
20138 if test $HAVE_DUP2 = 1; then
20139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
20140 printf %s "checking whether dup2 works... " >&6; }
20141 if test ${gl_cv_func_dup2_works+y}
20143 printf %s "(cached) " >&6
20145 if test "$cross_compiling" = yes
20148 mingw*) # on this platform, dup2 always returns 0 for success
20149 gl_cv_func_dup2_works="guessing no" ;;
20150 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
20151 gl_cv_func_dup2_works="guessing no" ;;
20153 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
20155 gl_cv_func_dup2_works="guessing no" ;;
20156 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
20157 gl_cv_func_dup2_works="guessing no" ;;
20158 *-android*) # implemented using dup3(), which fails if oldfd == newfd
20159 gl_cv_func_dup2_works="guessing no" ;;
20160 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
20161 gl_cv_func_dup2_works="guessing no" ;;
20162 *) gl_cv_func_dup2_works="guessing yes" ;;
20165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20166 /* end confdefs.h. */
20170 #include <limits.h>
20171 #include <sys/resource.h>
20172 #include <unistd.h>
20173 #ifndef RLIM_SAVED_CUR
20174 # define RLIM_SAVED_CUR RLIM_INFINITY
20176 #ifndef RLIM_SAVED_MAX
20177 # define RLIM_SAVED_MAX RLIM_INFINITY
20184 int bad_fd = INT_MAX;
20185 struct rlimit rlim;
20186 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20187 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20188 && rlim.rlim_cur != RLIM_INFINITY
20189 && rlim.rlim_cur != RLIM_SAVED_MAX
20190 && rlim.rlim_cur != RLIM_SAVED_CUR)
20191 bad_fd = rlim.rlim_cur;
20193 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
20196 if (dup2 (1, 1) != 1)
20199 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
20203 if (dup2 (0, 0) != -1)
20205 /* Many gnulib modules require POSIX conformance of EBADF. */
20206 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
20208 /* Flush out some cygwin core dumps. */
20209 if (dup2 (2, -1) != -1 || errno != EBADF)
20213 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
20215 int fd = open (".", O_RDONLY);
20218 else if (dup2 (fd, fd + 1) == -1)
20229 if ac_fn_c_try_run "$LINENO"
20231 gl_cv_func_dup2_works=yes
20233 gl_cv_func_dup2_works=no
20235 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20236 conftest.$ac_objext conftest.beam conftest.$ac_ext
20241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
20242 printf "%s\n" "$gl_cv_func_dup2_works" >&6; }
20243 case "$gl_cv_func_dup2_works" in
20247 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
20248 if test "x$ac_cv_func_setdtablesize" = xyes
20250 printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h
20259 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
20268 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
20283 printf "%s\n" "#define GNULIB_TEST_DUP2 1" >>confdefs.h
20299 printf "%s\n" "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
20305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
20306 printf %s "checking for error_at_line... " >&6; }
20307 if test ${ac_cv_lib_error_at_line+y}
20309 printf %s "(cached) " >&6
20311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20312 /* end confdefs.h. */
20317 error_at_line (0, 0, "", 0, "an error occurred");
20322 if ac_fn_c_try_link "$LINENO"
20324 ac_cv_lib_error_at_line=yes
20326 ac_cv_lib_error_at_line=no
20328 rm -f core conftest.err conftest.$ac_objext \
20329 conftest$ac_exeext conftest.$ac_ext
20331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
20332 printf "%s\n" "$ac_cv_lib_error_at_line" >&6; }
20334 if test $ac_cv_lib_error_at_line = no; then
20343 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
20352 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
20356 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
20364 if test $ac_cv_func_fcntl = no; then
20368 if test $ac_cv_func_fcntl = no; then
20375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
20376 printf %s "checking whether fcntl handles F_DUPFD correctly... " >&6; }
20377 if test ${gl_cv_func_fcntl_f_dupfd_works+y}
20379 printf %s "(cached) " >&6
20381 if test "$cross_compiling" = yes
20384 aix* | cygwin* | haiku*)
20385 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;;
20386 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;;
20389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20390 /* end confdefs.h. */
20393 #include <limits.h>
20394 #include <sys/resource.h>
20395 #include <unistd.h>
20396 #ifndef RLIM_SAVED_CUR
20397 # define RLIM_SAVED_CUR RLIM_INFINITY
20399 #ifndef RLIM_SAVED_MAX
20400 # define RLIM_SAVED_MAX RLIM_INFINITY
20407 int bad_fd = INT_MAX;
20408 struct rlimit rlim;
20409 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
20410 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
20411 && rlim.rlim_cur != RLIM_INFINITY
20412 && rlim.rlim_cur != RLIM_SAVED_MAX
20413 && rlim.rlim_cur != RLIM_SAVED_CUR)
20414 bad_fd = rlim.rlim_cur;
20415 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
20416 if (errno != EINVAL) result |= 2;
20417 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
20418 if (errno != EINVAL) result |= 8;
20419 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
20422 fd = open (".", O_RDONLY);
20425 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
20435 if ac_fn_c_try_run "$LINENO"
20437 gl_cv_func_fcntl_f_dupfd_works=yes
20439 gl_cv_func_fcntl_f_dupfd_works=no
20441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20442 conftest.$ac_objext conftest.beam conftest.$ac_ext
20446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
20447 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
20448 case $gl_cv_func_fcntl_f_dupfd_works in
20453 if test $ac_cv_func_fcntl = no; then
20460 printf "%s\n" "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
20464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
20465 printf %s "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
20466 if test ${gl_cv_func_fcntl_f_dupfd_cloexec+y}
20468 printf %s "(cached) " >&6
20470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20471 /* end confdefs.h. */
20474 #ifndef F_DUPFD_CLOEXEC
20486 if ac_fn_c_try_compile "$LINENO"
20488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20489 /* end confdefs.h. */
20492 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
20493 it to support the semantics on older kernels that failed with EINVAL. */
20505 if ac_fn_c_try_compile "$LINENO"
20507 gl_cv_func_fcntl_f_dupfd_cloexec=yes
20509 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
20511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20513 gl_cv_func_fcntl_f_dupfd_cloexec=no
20515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
20518 printf "%s\n" "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
20519 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
20523 if test $ac_cv_func_fcntl = no; then
20533 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
20542 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
20556 printf "%s\n" "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
20571 if test $gl_cv_have_include_next = yes; then
20572 gl_cv_next_fcntl_h='<'fcntl.h'>'
20574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
20575 printf %s "checking absolute name of <fcntl.h>... " >&6; }
20576 if test ${gl_cv_next_fcntl_h+y}
20578 printf %s "(cached) " >&6
20583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20584 /* end confdefs.h. */
20588 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20589 *) gl_absname_cpp="$ac_cpp" ;;
20594 gl_dirsep_regex='[/\\]'
20597 gl_dirsep_regex='\/'
20600 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20601 gl_header_literal_regex=`echo 'fcntl.h' \
20602 | sed -e "$gl_make_literal_regex_sed"`
20603 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20604 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20610 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20611 sed -n "$gl_absolute_header_sed"`
20613 gl_header=$gl_cv_absolute_fcntl_h
20614 gl_cv_next_fcntl_h='"'$gl_header'"'
20618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
20619 printf "%s\n" "$gl_cv_next_fcntl_h" >&6; }
20621 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
20623 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20624 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20625 gl_next_as_first_directive='<'fcntl.h'>'
20627 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20628 gl_next_as_first_directive=$gl_cv_next_fcntl_h
20630 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
20649 printf "%s\n" "#define GNULIB_FILENAMECAT 1" >>confdefs.h
20656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
20657 printf %s "checking for flexible array member... " >&6; }
20658 if test ${ac_cv_c_flexmember+y}
20660 printf %s "(cached) " >&6
20662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20663 /* end confdefs.h. */
20664 #include <stdlib.h>
20666 #include <stddef.h>
20667 struct m { struct m *next, **list; char name[]; };
20668 struct s { struct s *p; struct m *m; int n; double d[]; };
20672 int m = getchar ();
20673 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
20674 nbytes += sizeof (struct s) - 1;
20675 nbytes -= nbytes % sizeof (struct s);
20676 struct s *p = malloc (nbytes);
20680 return p->d != (double *) NULL;
20685 if ac_fn_c_try_compile "$LINENO"
20687 ac_cv_c_flexmember=yes
20689 ac_cv_c_flexmember=no
20691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
20694 printf "%s\n" "$ac_cv_c_flexmember" >&6; }
20695 if test $ac_cv_c_flexmember = yes; then
20697 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
20700 printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
20708 REPLACE_FLOAT_LDBL=0
20710 aix* | beos* | openbsd* | mirbsd* | irix*)
20713 freebsd* | dragonfly*)
20714 case "$host_cpu" in
20719 # On x86_64 systems, the C compiler may still be generating
20721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722 /* end confdefs.h. */
20723 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
20730 if ac_fn_c_try_compile "$LINENO"
20736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20741 case "$host_cpu" in
20749 aix* | freebsd* | dragonfly* | linux*)
20750 if test -n "$FLOAT_H"; then
20751 REPLACE_FLOAT_LDBL=1
20757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20758 printf %s "checking whether conversion from 'int' to 'long double' works... " >&6; }
20759 if test ${gl_cv_func_itold_works+y}
20761 printf %s "(cached) " >&6
20764 if test "$cross_compiling" = yes
20768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769 /* end confdefs.h. */
20770 #if defined __LP64__ || defined __arch64__
20777 if ac_fn_c_try_compile "$LINENO"
20779 gl_cv_func_itold_works="guessing no"
20781 gl_cv_func_itold_works="guessing yes"
20783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20785 # Guess yes on native Windows.
20786 mingw*) gl_cv_func_itold_works="guessing yes" ;;
20787 *) gl_cv_func_itold_works="guessing yes" ;;
20791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20792 /* end confdefs.h. */
20795 volatile long double ld;
20804 if ac_fn_c_try_run "$LINENO"
20806 gl_cv_func_itold_works=yes
20808 gl_cv_func_itold_works=no
20810 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20811 conftest.$ac_objext conftest.beam conftest.$ac_ext
20816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20817 printf "%s\n" "$gl_cv_func_itold_works" >&6; }
20818 case "$gl_cv_func_itold_works" in
20825 if test -n "$FLOAT_H"; then
20834 if test $gl_cv_have_include_next = yes; then
20835 gl_cv_next_float_h='<'float.h'>'
20837 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20838 printf %s "checking absolute name of <float.h>... " >&6; }
20839 if test ${gl_cv_next_float_h+y}
20841 printf %s "(cached) " >&6
20846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847 /* end confdefs.h. */
20851 aix*) gl_absname_cpp="$ac_cpp -C" ;;
20852 *) gl_absname_cpp="$ac_cpp" ;;
20857 gl_dirsep_regex='[/\\]'
20860 gl_dirsep_regex='\/'
20863 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
20864 gl_header_literal_regex=`echo 'float.h' \
20865 | sed -e "$gl_make_literal_regex_sed"`
20866 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20867 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20873 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20874 sed -n "$gl_absolute_header_sed"`
20876 gl_header=$gl_cv_absolute_float_h
20877 gl_cv_next_float_h='"'$gl_header'"'
20881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20882 printf "%s\n" "$gl_cv_next_float_h" >&6; }
20884 NEXT_FLOAT_H=$gl_cv_next_float_h
20886 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
20887 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20888 gl_next_as_first_directive='<'float.h'>'
20890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20891 gl_next_as_first_directive=$gl_cv_next_float_h
20893 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
20900 if test -n "$FLOAT_H"; then
20901 GL_GENERATE_FLOAT_H_TRUE=
20902 GL_GENERATE_FLOAT_H_FALSE='#'
20904 GL_GENERATE_FLOAT_H_TRUE='#'
20905 GL_GENERATE_FLOAT_H_FALSE=
20910 if test $REPLACE_FLOAT_LDBL = 1; then
20919 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
20922 if test $REPLACE_ITOLD = 1; then
20931 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
20938 gl_fnmatch_required_lowercase=`
20939 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20942 if test $ac_cv_func_fnmatch = no; then
20945 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20947 printf %s "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20948 if eval test \${$gl_fnmatch_cache_var+y}
20950 printf %s "(cached) " >&6
20952 if test $gl_fnmatch_required = GNU; then
20953 gl_fnmatch_gnu_start=
20954 gl_fnmatch_gnu_end=
20956 gl_fnmatch_gnu_start='#if 0'
20957 gl_fnmatch_gnu_end='#endif'
20959 if test "$cross_compiling" = yes
20961 eval "$gl_fnmatch_cache_var=\"guessing no\""
20963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20964 /* end confdefs.h. */
20965 #include <fnmatch.h>
20967 y (char const *pattern, char const *string, int flags)
20969 return fnmatch (pattern, string, flags) == 0;
20972 n (char const *pattern, char const *string, int flags)
20974 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20980 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20981 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20982 static char const A_1[] = { 'A' - 1, 0 };
20983 static char const A01[] = { 'A' + 1, 0 };
20984 static char const a_1[] = { 'a' - 1, 0 };
20985 static char const a01[] = { 'a' + 1, 0 };
20986 static char const bs_1[] = { '\\\\' - 1, 0 };
20987 static char const bs01[] = { '\\\\' + 1, 0 };
20989 if (!n ("a*", "", 0))
20991 if (!y ("a*", "abc", 0))
20993 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20995 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20997 if (!y ("a\\\\bc", "abc", 0))
20999 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
21001 if (!y ("*x", ".x", 0))
21003 if (!n ("*x", ".x", FNM_PERIOD))
21005 if (!y (Apat, "\\\\", 0))
21007 if (!y (Apat, "A", 0))
21009 if (!y (apat, "\\\\", 0))
21011 if (!y (apat, "a", 0))
21013 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
21015 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
21017 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
21019 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
21021 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
21023 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
21025 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
21027 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
21029 $gl_fnmatch_gnu_start
21030 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
21032 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
21034 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
21036 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
21038 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
21040 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
21042 $gl_fnmatch_gnu_end
21049 if ac_fn_c_try_run "$LINENO"
21051 eval "$gl_fnmatch_cache_var=yes"
21053 eval "$gl_fnmatch_cache_var=no"
21055 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21056 conftest.$ac_objext conftest.beam conftest.$ac_ext
21061 eval ac_res=\$$gl_fnmatch_cache_var
21062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21063 printf "%s\n" "$ac_res" >&6; }
21064 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
21065 if test "$gl_fnmatch_result" != yes; then
21069 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21072 FNMATCH_H='fnmatch.h'
21073 if test -n "$FNMATCH_H"; then
21074 GL_GENERATE_FNMATCH_H_TRUE=
21075 GL_GENERATE_FNMATCH_H_FALSE='#'
21077 GL_GENERATE_FNMATCH_H_TRUE='#'
21078 GL_GENERATE_FNMATCH_H_FALSE=
21084 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21093 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
21097 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
21099 if test "x$ac_cv_have_decl_isblank" = xyes
21106 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
21123 printf "%s\n" "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
21132 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
21141 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
21145 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
21147 if test "x$ac_cv_have_decl_isblank" = xyes
21154 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
21162 printf "%s\n" "#define GNULIB_FNMATCH_GNU 1" >>confdefs.h
21170 mingw* | pw* | os2*)
21174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether freopen works on closed fds" >&5
21175 printf %s "checking whether freopen works on closed fds... " >&6; }
21176 if test ${gl_cv_func_freopen_works_on_closed+y}
21178 printf %s "(cached) " >&6
21180 if test "$cross_compiling" = yes
21183 *gnu*) gl_cv_func_freopen_works_on_closed="guessing no" ;;
21184 *) gl_cv_func_freopen_works_on_closed="guessing yes";;
21187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21188 /* end confdefs.h. */
21190 #include <unistd.h>
21196 return !(freopen ("/dev/null", "r", stdin)
21197 && getchar () == EOF
21198 && !ferror (stdin) && feof (stdin));
21203 if ac_fn_c_try_run "$LINENO"
21205 gl_cv_func_freopen_works_on_closed=yes
21207 gl_cv_func_freopen_works_on_closed=no
21209 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21210 conftest.$ac_objext conftest.beam conftest.$ac_ext
21214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_freopen_works_on_closed" >&5
21215 printf "%s\n" "$gl_cv_func_freopen_works_on_closed" >&6; }
21216 case $gl_cv_func_freopen_works_on_closed in
21217 *no) REPLACE_FREOPEN=1;;
21221 if test $REPLACE_FREOPEN = 1; then
21230 gl_LIBOBJS="$gl_LIBOBJS freopen.$ac_objext"
21245 printf "%s\n" "#define GNULIB_TEST_FREOPEN 1" >>confdefs.h
21251 printf "%s\n" "#define GNULIB_FREOPEN_SAFER 1" >>confdefs.h
21266 if test $REPLACE_FSTAT = 1; then
21275 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
21287 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
21307 printf "%s\n" "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
21316 if test $ac_cv_func_getdtablesize = yes &&
21317 test $ac_cv_have_decl_getdtablesize = yes; then
21318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21319 printf %s "checking whether getdtablesize works... " >&6; }
21320 if test ${gl_cv_func_getdtablesize_works+y}
21322 printf %s "(cached) " >&6
21325 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;;
21327 if test "$cross_compiling" = yes
21330 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
21331 gl_cv_func_getdtablesize_works="guessing no" ;;
21332 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
21336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21337 /* end confdefs.h. */
21339 #include <unistd.h>
21343 int size = getdtablesize();
21344 if (dup2 (0, getdtablesize()) != -1)
21346 if (size != getdtablesize())
21353 if ac_fn_c_try_run "$LINENO"
21355 gl_cv_func_getdtablesize_works=yes
21357 gl_cv_func_getdtablesize_works=no
21359 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21360 conftest.$ac_objext conftest.beam conftest.$ac_ext
21367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21368 printf "%s\n" "$gl_cv_func_getdtablesize_works" >&6; }
21369 case "$gl_cv_func_getdtablesize_works" in
21370 *yes | "no (limitation)") ;;
21371 *) REPLACE_GETDTABLESIZE=1 ;;
21374 HAVE_GETDTABLESIZE=0
21377 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
21386 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
21395 GNULIB_GETDTABLESIZE=1
21401 printf "%s\n" "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21415 if test -n "$gl_replace_getopt"; then
21419 if test $REPLACE_GETOPT = 1; then
21422 if test $ac_cv_header_sys_cdefs_h = yes; then
21430 printf "%s\n" "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21433 GETOPT_CDEFS_H=getopt-cdefs.h
21439 if test $REPLACE_GETOPT = 1; then
21448 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21458 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21460 GNULIB_GL_UNISTD_H_GETOPT=1
21467 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
21469 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
21476 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
21477 if test $ac_have_decl = 1
21482 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
21484 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
21491 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
21492 if test $ac_have_decl = 1
21497 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
21499 if test "x$ac_cv_have_decl___argv" = xyes
21506 printf "%s\n" "#define HAVE_DECL___ARGV $ac_have_decl" >>confdefs.h
21507 if test $ac_have_decl = 1
21513 # Incur the cost of this test only if none of the above worked.
21514 if test $ac_found = 0; then
21515 # On OpenBSD 5.1, using the global __progname variable appears to be
21516 # the only way to implement getprogname.
21517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
21518 printf %s "checking whether __progname is defined in default libraries... " >&6; }
21519 if test ${gl_cv_var___progname+y}
21521 printf %s "(cached) " >&6
21524 gl_cv_var___progname=
21525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21526 /* end confdefs.h. */
21527 extern char *__progname;
21531 return *__progname;
21537 if ac_fn_c_try_link "$LINENO"
21539 gl_cv_var___progname=yes
21542 rm -f core conftest.err conftest.$ac_objext \
21543 conftest$ac_exeext conftest.$ac_ext
21547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
21548 printf "%s\n" "$gl_cv_var___progname" >&6; }
21549 if test "$gl_cv_var___progname" = yes; then
21551 printf "%s\n" "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
21570 gl_gettimeofday_timezone=void
21571 if test $ac_cv_func_gettimeofday != yes; then
21572 HAVE_GETTIMEOFDAY=0
21578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21579 printf %s "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21580 if test ${gl_cv_func_gettimeofday_clobber+y}
21582 printf %s "(cached) " >&6
21584 if test "$cross_compiling" = yes
21586 # When cross-compiling:
21588 # Guess all is fine on glibc systems.
21589 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21590 # Guess no on native Windows.
21591 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21592 # If we don't know, assume the worst.
21593 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21598 /* end confdefs.h. */
21599 #include <string.h>
21600 #include <sys/time.h>
21602 #include <stdlib.h>
21610 struct tm saved_lt;
21612 lt = localtime (&t);
21614 gettimeofday (&tv, NULL);
21615 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21621 if ac_fn_c_try_run "$LINENO"
21623 gl_cv_func_gettimeofday_clobber=no
21625 gl_cv_func_gettimeofday_clobber=yes
21627 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21628 conftest.$ac_objext conftest.beam conftest.$ac_ext
21632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21633 printf "%s\n" "$gl_cv_func_gettimeofday_clobber" >&6; }
21635 case "$gl_cv_func_gettimeofday_clobber" in
21637 REPLACE_GETTIMEOFDAY=1
21639 printf "%s\n" "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21644 NEED_LOCALTIME_BUFFER=1
21646 REPLACE_LOCALTIME=1
21651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21652 printf %s "checking for gettimeofday with POSIX signature... " >&6; }
21653 if test ${gl_cv_func_gettimeofday_posix_signature+y}
21655 printf %s "(cached) " >&6
21657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21658 /* end confdefs.h. */
21659 #include <sys/time.h>
21661 int gettimeofday (struct timeval *restrict, void *restrict);
21666 /* glibc uses struct timezone * rather than the POSIX void *
21667 if _GNU_SOURCE is defined. However, since the only portable
21668 use of gettimeofday uses NULL as the second parameter, and
21669 since the glibc definition is actually more typesafe, it is
21670 not worth wrapping this to get a compliant signature. */
21671 int (*f) (struct timeval *restrict, void *restrict)
21674 return !(x | c.tv_sec | c.tv_usec);
21680 if ac_fn_c_try_compile "$LINENO"
21682 gl_cv_func_gettimeofday_posix_signature=yes
21684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21685 /* end confdefs.h. */
21686 #include <sys/time.h>
21687 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21697 if ac_fn_c_try_compile "$LINENO"
21699 gl_cv_func_gettimeofday_posix_signature=almost
21701 gl_cv_func_gettimeofday_posix_signature=no
21703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21708 printf "%s\n" "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21709 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21710 gl_gettimeofday_timezone='struct timezone'
21711 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21712 REPLACE_GETTIMEOFDAY=1
21714 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21715 REPLACE_GETTIMEOFDAY=1
21718 mingw*) REPLACE_GETTIMEOFDAY=1 ;;
21722 printf "%s\n" "#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone" >>confdefs.h
21725 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21734 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21743 GNULIB_GETTIMEOFDAY=1
21749 printf "%s\n" "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21754 if LC_ALL=C ${MAKE-make} --version 2>/dev/null | sed -e '2,$d' | grep GNU >/dev/null; then
21763 # Autoconf 2.61a.99 and earlier don't support linking a file only
21764 # in VPATH builds. But since GNUmakefile is for maintainer use
21765 # only, it does not matter if we skip the link with older autoconf.
21766 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
21767 # builds, so use a shell variable to bypass this.
21768 GNUmakefile=GNUmakefile
21769 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
21794 if test $gl_cv_have_include_next = yes; then
21795 gl_cv_next_iconv_h='<'iconv.h'>'
21797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
21798 printf %s "checking absolute name of <iconv.h>... " >&6; }
21799 if test ${gl_cv_next_iconv_h+y}
21801 printf %s "(cached) " >&6
21804 if test $ac_cv_header_iconv_h = yes; then
21809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21810 /* end confdefs.h. */
21814 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21815 *) gl_absname_cpp="$ac_cpp" ;;
21820 gl_dirsep_regex='[/\\]'
21823 gl_dirsep_regex='\/'
21826 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21827 gl_header_literal_regex=`echo 'iconv.h' \
21828 | sed -e "$gl_make_literal_regex_sed"`
21829 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21830 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21836 gl_cv_absolute_iconv_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21837 sed -n "$gl_absolute_header_sed"`
21839 gl_header=$gl_cv_absolute_iconv_h
21840 gl_cv_next_iconv_h='"'$gl_header'"'
21842 gl_cv_next_iconv_h='<'iconv.h'>'
21847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
21848 printf "%s\n" "$gl_cv_next_iconv_h" >&6; }
21850 NEXT_ICONV_H=$gl_cv_next_iconv_h
21852 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21853 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21854 gl_next_as_first_directive='<'iconv.h'>'
21856 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21857 gl_next_as_first_directive=$gl_cv_next_iconv_h
21859 NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
21873 if test "$am_cv_func_iconv" = yes; then
21877 if test -n "$ICONV_H"; then
21878 GL_GENERATE_ICONV_H_TRUE=
21879 GL_GENERATE_ICONV_H_FALSE='#'
21881 GL_GENERATE_ICONV_H_TRUE='#'
21882 GL_GENERATE_ICONV_H_FALSE=
21886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21887 /* end confdefs.h. */
21890 #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
21895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21896 $EGREP "gnu_iconv" >/dev/null 2>&1
21898 gl_func_iconv_gnu=yes
21900 gl_func_iconv_gnu=no
21904 if test $gl_func_iconv_gnu = no; then
21907 aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
21908 irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
21909 hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
21910 osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
21911 solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
21913 if test -n "$iconv_flavor"; then
21915 printf "%s\n" "#define ICONV_FLAVOR $iconv_flavor" >>confdefs.h
21921 if test -n "$ICONV_H"; then
21922 GL_GENERATE_ICONV_H_TRUE=
21923 GL_GENERATE_ICONV_H_FALSE='#'
21925 GL_GENERATE_ICONV_H_TRUE='#'
21926 GL_GENERATE_ICONV_H_FALSE=
21930 REPLACE_ICONV_OPEN=1
21937 if test $REPLACE_ICONV_OPEN = 1; then
21946 gl_LIBOBJS="$gl_LIBOBJS iconv_open.$ac_objext"
21949 if test $REPLACE_ICONV = 1; then
21958 gl_LIBOBJS="$gl_LIBOBJS iconv.$ac_objext"
21968 gl_LIBOBJS="$gl_LIBOBJS iconv_close.$ac_objext"
21973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
21974 printf %s "checking whether the compiler generally respects inline... " >&6; }
21975 if test ${gl_cv_c_inline_effective+y}
21977 printf %s "(cached) " >&6
21979 if test $ac_cv_c_inline = no; then
21980 gl_cv_c_inline_effective=no
21982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21983 /* end confdefs.h. */
21988 #ifdef __NO_INLINE__
21989 #error "inline is not effective"
21995 if ac_fn_c_try_compile "$LINENO"
21997 gl_cv_c_inline_effective=yes
21999 gl_cv_c_inline_effective=no
22001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
22006 printf "%s\n" "$gl_cv_c_inline_effective" >&6; }
22007 if test $gl_cv_c_inline_effective = yes; then
22009 printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
22029 if test -n "$STDINT_H"; then
22030 PRIPTR_PREFIX='"l"'
22032 for glpfx in '' l ll I64; do
22034 '') gltype1='int';;
22035 l) gltype1='long int';;
22036 ll) gltype1='long long int';;
22037 I64) gltype1='__int64';;
22039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22040 /* end confdefs.h. */
22041 #include <stdint.h>
22042 extern intptr_t foo;
22043 extern $gltype1 foo;
22052 if ac_fn_c_try_compile "$LINENO"
22054 PRIPTR_PREFIX='"'$glpfx'"'
22056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22057 test -n "$PRIPTR_PREFIX" && break
22063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22064 printf %s "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22065 if test ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+y}
22067 printf %s "(cached) " >&6
22069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22070 /* end confdefs.h. */
22071 /* Work also in C++ mode. */
22072 #define __STDC_LIMIT_MACROS 1
22074 /* Work if build is not clean. */
22075 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22077 #include <limits.h>
22079 #include <stdint.h>
22082 #if defined INT32_MAX && defined INTMAX_MAX
22083 #define CONDITION (INT32_MAX < INTMAX_MAX)
22084 #elif HAVE_LONG_LONG_INT
22085 #define CONDITION (sizeof (int) < sizeof (long long int))
22087 #define CONDITION 0
22089 int test[CONDITION ? 1 : -1];
22098 if ac_fn_c_try_compile "$LINENO"
22100 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
22102 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
22104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22107 printf "%s\n" "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22108 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22109 INT32_MAX_LT_INTMAX_MAX=1;
22111 INT32_MAX_LT_INTMAX_MAX=0;
22115 if test $APPLE_UNIVERSAL_BUILD = 0; then
22117 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22118 printf %s "checking whether INT64_MAX == LONG_MAX... " >&6; }
22119 if test ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+y}
22121 printf %s "(cached) " >&6
22123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22124 /* end confdefs.h. */
22125 /* Work also in C++ mode. */
22126 #define __STDC_LIMIT_MACROS 1
22128 /* Work if build is not clean. */
22129 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22131 #include <limits.h>
22133 #include <stdint.h>
22136 #if defined INT64_MAX
22137 #define CONDITION (INT64_MAX == LONG_MAX)
22138 #elif HAVE_LONG_LONG_INT
22139 #define CONDITION (sizeof (long long int) == sizeof (long int))
22141 #define CONDITION 0
22143 int test[CONDITION ? 1 : -1];
22152 if ac_fn_c_try_compile "$LINENO"
22154 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
22156 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
22158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22161 printf "%s\n" "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22162 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22163 INT64_MAX_EQ_LONG_MAX=1;
22165 INT64_MAX_EQ_LONG_MAX=0;
22170 INT64_MAX_EQ_LONG_MAX=-1
22173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22174 printf %s "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22175 if test ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+y}
22177 printf %s "(cached) " >&6
22179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22180 /* end confdefs.h. */
22181 /* Work also in C++ mode. */
22182 #define __STDC_LIMIT_MACROS 1
22184 /* Work if build is not clean. */
22185 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22187 #include <limits.h>
22189 #include <stdint.h>
22192 #if defined UINT32_MAX && defined UINTMAX_MAX
22193 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22194 #elif HAVE_LONG_LONG_INT
22195 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22197 #define CONDITION 0
22199 int test[CONDITION ? 1 : -1];
22208 if ac_fn_c_try_compile "$LINENO"
22210 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
22212 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
22214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22217 printf "%s\n" "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22218 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22219 UINT32_MAX_LT_UINTMAX_MAX=1;
22221 UINT32_MAX_LT_UINTMAX_MAX=0;
22225 if test $APPLE_UNIVERSAL_BUILD = 0; then
22227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22228 printf %s "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22229 if test ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+y}
22231 printf %s "(cached) " >&6
22233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22234 /* end confdefs.h. */
22235 /* Work also in C++ mode. */
22236 #define __STDC_LIMIT_MACROS 1
22238 /* Work if build is not clean. */
22239 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22241 #include <limits.h>
22243 #include <stdint.h>
22246 #if defined UINT64_MAX
22247 #define CONDITION (UINT64_MAX == ULONG_MAX)
22248 #elif HAVE_LONG_LONG_INT
22249 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22251 #define CONDITION 0
22253 int test[CONDITION ? 1 : -1];
22262 if ac_fn_c_try_compile "$LINENO"
22264 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
22266 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
22268 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22271 printf "%s\n" "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22272 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22273 UINT64_MAX_EQ_ULONG_MAX=1;
22275 UINT64_MAX_EQ_ULONG_MAX=0;
22280 UINT64_MAX_EQ_ULONG_MAX=-1
22290 if test $ac_cv_func_isblank = no; then
22294 if test $HAVE_ISBLANK = 0; then
22303 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
22321 ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
22322 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22324 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
22325 before <wchar.h>. */
22326 #include <stddef.h>
22330 #include <wctype.h>
22333 if test "x$ac_cv_have_decl_iswblank" = xyes
22340 printf "%s\n" "#define HAVE_DECL_ISWBLANK $ac_have_decl" >>confdefs.h
22342 if test $ac_cv_func_iswblank = no; then
22344 if test $ac_cv_have_decl_iswblank = yes; then
22348 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22351 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22357 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
22360 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
22369 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
22384 printf "%s\n" "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
22402 if test $gl_cv_have_include_next = yes; then
22403 gl_cv_next_langinfo_h='<'langinfo.h'>'
22405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
22406 printf %s "checking absolute name of <langinfo.h>... " >&6; }
22407 if test ${gl_cv_next_langinfo_h+y}
22409 printf %s "(cached) " >&6
22412 if test $ac_cv_header_langinfo_h = yes; then
22417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22418 /* end confdefs.h. */
22419 #include <langinfo.h>
22422 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22423 *) gl_absname_cpp="$ac_cpp" ;;
22428 gl_dirsep_regex='[/\\]'
22431 gl_dirsep_regex='\/'
22434 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22435 gl_header_literal_regex=`echo 'langinfo.h' \
22436 | sed -e "$gl_make_literal_regex_sed"`
22437 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22438 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22444 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22445 sed -n "$gl_absolute_header_sed"`
22447 gl_header=$gl_cv_absolute_langinfo_h
22448 gl_cv_next_langinfo_h='"'$gl_header'"'
22450 gl_cv_next_langinfo_h='<'langinfo.h'>'
22455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
22456 printf "%s\n" "$gl_cv_next_langinfo_h" >&6; }
22458 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
22460 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22461 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22462 gl_next_as_first_directive='<'langinfo.h'>'
22464 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22465 gl_next_as_first_directive=$gl_cv_next_langinfo_h
22467 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
22473 HAVE_LANGINFO_CODESET=0
22474 HAVE_LANGINFO_T_FMT_AMPM=0
22475 HAVE_LANGINFO_ALTMON=0
22476 HAVE_LANGINFO_ERA=0
22477 HAVE_LANGINFO_YESEXPR=0
22479 if test $ac_cv_header_langinfo_h = yes; then
22481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
22482 printf %s "checking whether langinfo.h defines CODESET... " >&6; }
22483 if test ${gl_cv_header_langinfo_codeset+y}
22485 printf %s "(cached) " >&6
22487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22488 /* end confdefs.h. */
22489 #include <langinfo.h>
22500 if ac_fn_c_try_compile "$LINENO"
22502 gl_cv_header_langinfo_codeset=yes
22504 gl_cv_header_langinfo_codeset=no
22506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
22510 printf "%s\n" "$gl_cv_header_langinfo_codeset" >&6; }
22511 if test $gl_cv_header_langinfo_codeset = yes; then
22512 HAVE_LANGINFO_CODESET=1
22514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
22515 printf %s "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
22516 if test ${gl_cv_header_langinfo_t_fmt_ampm+y}
22518 printf %s "(cached) " >&6
22520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22521 /* end confdefs.h. */
22522 #include <langinfo.h>
22523 int a = T_FMT_AMPM;
22533 if ac_fn_c_try_compile "$LINENO"
22535 gl_cv_header_langinfo_t_fmt_ampm=yes
22537 gl_cv_header_langinfo_t_fmt_ampm=no
22539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
22543 printf "%s\n" "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
22544 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
22545 HAVE_LANGINFO_T_FMT_AMPM=1
22547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ALTMON_1" >&5
22548 printf %s "checking whether langinfo.h defines ALTMON_1... " >&6; }
22549 if test ${gl_cv_header_langinfo_altmon+y}
22551 printf %s "(cached) " >&6
22553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22554 /* end confdefs.h. */
22555 #include <langinfo.h>
22566 if ac_fn_c_try_compile "$LINENO"
22568 gl_cv_header_langinfo_altmon=yes
22570 gl_cv_header_langinfo_altmon=no
22572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_altmon" >&5
22576 printf "%s\n" "$gl_cv_header_langinfo_altmon" >&6; }
22577 if test $gl_cv_header_langinfo_altmon = yes; then
22578 HAVE_LANGINFO_ALTMON=1
22580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
22581 printf %s "checking whether langinfo.h defines ERA... " >&6; }
22582 if test ${gl_cv_header_langinfo_era+y}
22584 printf %s "(cached) " >&6
22586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22587 /* end confdefs.h. */
22588 #include <langinfo.h>
22599 if ac_fn_c_try_compile "$LINENO"
22601 gl_cv_header_langinfo_era=yes
22603 gl_cv_header_langinfo_era=no
22605 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
22609 printf "%s\n" "$gl_cv_header_langinfo_era" >&6; }
22610 if test $gl_cv_header_langinfo_era = yes; then
22611 HAVE_LANGINFO_ERA=1
22613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
22614 printf %s "checking whether langinfo.h defines YESEXPR... " >&6; }
22615 if test ${gl_cv_header_langinfo_yesexpr+y}
22617 printf %s "(cached) " >&6
22619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22620 /* end confdefs.h. */
22621 #include <langinfo.h>
22632 if ac_fn_c_try_compile "$LINENO"
22634 gl_cv_header_langinfo_yesexpr=yes
22636 gl_cv_header_langinfo_yesexpr=no
22638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
22642 printf "%s\n" "$gl_cv_header_langinfo_yesexpr" >&6; }
22643 if test $gl_cv_header_langinfo_yesexpr = yes; then
22644 HAVE_LANGINFO_YESEXPR=1
22662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
22663 printf %s "checking whether the compiler supports the __inline keyword... " >&6; }
22664 if test ${gl_cv_c___inline+y}
22666 printf %s "(cached) " >&6
22668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669 /* end confdefs.h. */
22671 static __inline foo_t foo (void) { return 0; }
22680 if ac_fn_c_try_compile "$LINENO"
22682 gl_cv_c___inline=yes
22684 gl_cv_c___inline=no
22686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
22689 printf "%s\n" "$gl_cv_c___inline" >&6; }
22690 if test $gl_cv_c___inline = yes; then
22692 printf "%s\n" "#define HAVE___INLINE 1" >>confdefs.h
22711 acl_save_prefix="$prefix"
22712 prefix="$acl_final_prefix"
22713 acl_save_exec_prefix="$exec_prefix"
22714 exec_prefix="$acl_final_exec_prefix"
22716 eval additional_includedir=\"$includedir\"
22717 eval additional_libdir=\"$libdir\"
22719 exec_prefix="$acl_save_exec_prefix"
22720 prefix="$acl_save_prefix"
22723 # Check whether --with-libsigsegv-prefix was given.
22724 if test ${with_libsigsegv_prefix+y}
22726 withval=$with_libsigsegv_prefix;
22727 if test "X$withval" = "Xno"; then
22730 if test "X$withval" = "X"; then
22732 acl_save_prefix="$prefix"
22733 prefix="$acl_final_prefix"
22734 acl_save_exec_prefix="$exec_prefix"
22735 exec_prefix="$acl_final_exec_prefix"
22737 eval additional_includedir=\"$includedir\"
22738 eval additional_libdir=\"$libdir\"
22740 exec_prefix="$acl_save_exec_prefix"
22741 prefix="$acl_save_prefix"
22744 additional_includedir="$withval/include"
22745 additional_libdir="$withval/$acl_libdirstem"
22746 if test "$acl_libdirstem2" != "$acl_libdirstem" \
22747 && test ! -d "$withval/$acl_libdirstem"; then
22748 additional_libdir="$withval/$acl_libdirstem2"
22762 names_already_handled=
22763 names_next_round='sigsegv '
22764 while test -n "$names_next_round"; do
22765 names_this_round="$names_next_round"
22767 for name in $names_this_round; do
22769 for n in $names_already_handled; do
22770 if test "$n" = "$name"; then
22771 already_handled=yes
22775 if test -z "$already_handled"; then
22776 names_already_handled="$names_already_handled $name"
22777 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
22778 eval value=\"\$HAVE_LIB$uppername\"
22779 if test -n "$value"; then
22780 if test "$value" = yes; then
22781 eval value=\"\$LIB$uppername\"
22782 test -z "$value" || LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$value"
22783 eval value=\"\$LTLIB$uppername\"
22784 test -z "$value" || LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$value"
22793 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
22794 if test -n "$acl_shlibext"; then
22795 shrext=".$acl_shlibext" # typically: shrext=.so
22799 if test $use_additional = yes; then
22800 dir="$additional_libdir"
22801 if test -n "$acl_shlibext"; then
22802 if test -f "$dir/$libname$shrext"; then
22804 found_so="$dir/$libname$shrext"
22806 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
22807 ver=`(cd "$dir" && \
22808 for f in "$libname$shrext".*; do echo "$f"; done \
22809 | sed -e "s,^$libname$shrext\\\\.,," \
22810 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
22811 | sed 1q ) 2>/dev/null`
22812 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
22814 found_so="$dir/$libname$shrext.$ver"
22817 eval library_names=\"$acl_library_names_spec\"
22818 for f in $library_names; do
22819 if test -f "$dir/$f"; then
22828 if test "X$found_dir" = "X"; then
22829 if test -f "$dir/$libname.$acl_libext"; then
22831 found_a="$dir/$libname.$acl_libext"
22834 if test "X$found_dir" != "X"; then
22835 if test -f "$dir/$libname.la"; then
22836 found_la="$dir/$libname.la"
22840 if test "X$found_dir" = "X"; then
22841 for x in $LDFLAGS $LTLIBSIGSEGV; do
22843 acl_save_prefix="$prefix"
22844 prefix="$acl_final_prefix"
22845 acl_save_exec_prefix="$exec_prefix"
22846 exec_prefix="$acl_final_exec_prefix"
22848 exec_prefix="$acl_save_exec_prefix"
22849 prefix="$acl_save_prefix"
22853 dir=`echo "X$x" | sed -e 's/^X-L//'`
22854 if test -n "$acl_shlibext"; then
22855 if test -f "$dir/$libname$shrext"; then
22857 found_so="$dir/$libname$shrext"
22859 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
22860 ver=`(cd "$dir" && \
22861 for f in "$libname$shrext".*; do echo "$f"; done \
22862 | sed -e "s,^$libname$shrext\\\\.,," \
22863 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
22864 | sed 1q ) 2>/dev/null`
22865 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
22867 found_so="$dir/$libname$shrext.$ver"
22870 eval library_names=\"$acl_library_names_spec\"
22871 for f in $library_names; do
22872 if test -f "$dir/$f"; then
22881 if test "X$found_dir" = "X"; then
22882 if test -f "$dir/$libname.$acl_libext"; then
22884 found_a="$dir/$libname.$acl_libext"
22887 if test "X$found_dir" != "X"; then
22888 if test -f "$dir/$libname.la"; then
22889 found_la="$dir/$libname.la"
22894 if test "X$found_dir" != "X"; then
22899 if test "X$found_dir" != "X"; then
22900 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$found_dir -l$name"
22901 if test "X$found_so" != "X"; then
22902 if test "$enable_rpath" = no \
22903 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
22904 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
22905 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22908 for x in $ltrpathdirs; do
22909 if test "X$x" = "X$found_dir"; then
22914 if test -z "$haveit"; then
22915 ltrpathdirs="$ltrpathdirs $found_dir"
22917 if test "$acl_hardcode_direct" = yes; then
22918 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22920 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
22921 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22923 for x in $rpathdirs; do
22924 if test "X$x" = "X$found_dir"; then
22929 if test -z "$haveit"; then
22930 rpathdirs="$rpathdirs $found_dir"
22934 for x in $LDFLAGS $LIBSIGSEGV; do
22936 acl_save_prefix="$prefix"
22937 prefix="$acl_final_prefix"
22938 acl_save_exec_prefix="$exec_prefix"
22939 exec_prefix="$acl_final_exec_prefix"
22941 exec_prefix="$acl_save_exec_prefix"
22942 prefix="$acl_save_prefix"
22944 if test "X$x" = "X-L$found_dir"; then
22949 if test -z "$haveit"; then
22950 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir"
22952 if test "$acl_hardcode_minus_L" != no; then
22953 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_so"
22955 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
22961 if test "X$found_a" != "X"; then
22962 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$found_a"
22964 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$found_dir -l$name"
22967 additional_includedir=
22968 case "$found_dir" in
22969 */$acl_libdirstem | */$acl_libdirstem/)
22970 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
22971 if test "$name" = 'sigsegv'; then
22972 LIBSIGSEGV_PREFIX="$basedir"
22974 additional_includedir="$basedir/include"
22976 */$acl_libdirstem2 | */$acl_libdirstem2/)
22977 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
22978 if test "$name" = 'sigsegv'; then
22979 LIBSIGSEGV_PREFIX="$basedir"
22981 additional_includedir="$basedir/include"
22984 if test "X$additional_includedir" != "X"; then
22985 if test "X$additional_includedir" != "X/usr/include"; then
22987 if test "X$additional_includedir" = "X/usr/local/include"; then
22988 if test -n "$GCC"; then
22990 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
22994 if test -z "$haveit"; then
22995 for x in $CPPFLAGS $INCSIGSEGV; do
22997 acl_save_prefix="$prefix"
22998 prefix="$acl_final_prefix"
22999 acl_save_exec_prefix="$exec_prefix"
23000 exec_prefix="$acl_final_exec_prefix"
23002 exec_prefix="$acl_save_exec_prefix"
23003 prefix="$acl_save_prefix"
23005 if test "X$x" = "X-I$additional_includedir"; then
23010 if test -z "$haveit"; then
23011 if test -d "$additional_includedir"; then
23012 INCSIGSEGV="${INCSIGSEGV}${INCSIGSEGV:+ }-I$additional_includedir"
23018 if test -n "$found_la"; then
23019 save_libdir="$libdir"
23020 case "$found_la" in
23021 */* | *\\*) . "$found_la" ;;
23022 *) . "./$found_la" ;;
23024 libdir="$save_libdir"
23025 for dep in $dependency_libs; do
23028 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
23029 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
23030 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
23032 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
23033 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
23034 if test -n "$GCC"; then
23036 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
23040 if test -z "$haveit"; then
23042 for x in $LDFLAGS $LIBSIGSEGV; do
23044 acl_save_prefix="$prefix"
23045 prefix="$acl_final_prefix"
23046 acl_save_exec_prefix="$exec_prefix"
23047 exec_prefix="$acl_final_exec_prefix"
23049 exec_prefix="$acl_save_exec_prefix"
23050 prefix="$acl_save_prefix"
23052 if test "X$x" = "X-L$additional_libdir"; then
23057 if test -z "$haveit"; then
23058 if test -d "$additional_libdir"; then
23059 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-L$additional_libdir"
23063 for x in $LDFLAGS $LTLIBSIGSEGV; do
23065 acl_save_prefix="$prefix"
23066 prefix="$acl_final_prefix"
23067 acl_save_exec_prefix="$exec_prefix"
23068 exec_prefix="$acl_final_exec_prefix"
23070 exec_prefix="$acl_save_exec_prefix"
23071 prefix="$acl_save_prefix"
23073 if test "X$x" = "X-L$additional_libdir"; then
23078 if test -z "$haveit"; then
23079 if test -d "$additional_libdir"; then
23080 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-L$additional_libdir"
23087 dir=`echo "X$dep" | sed -e 's/^X-R//'`
23088 if test "$enable_rpath" != no; then
23090 for x in $rpathdirs; do
23091 if test "X$x" = "X$dir"; then
23096 if test -z "$haveit"; then
23097 rpathdirs="$rpathdirs $dir"
23100 for x in $ltrpathdirs; do
23101 if test "X$x" = "X$dir"; then
23106 if test -z "$haveit"; then
23107 ltrpathdirs="$ltrpathdirs $dir"
23112 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
23115 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
23118 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$dep"
23119 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }$dep"
23125 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }-l$name"
23126 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-l$name"
23132 if test "X$rpathdirs" != "X"; then
23133 if test -n "$acl_hardcode_libdir_separator"; then
23135 for found_dir in $rpathdirs; do
23136 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
23138 acl_save_libdir="$libdir"
23140 eval flag=\"$acl_hardcode_libdir_flag_spec\"
23141 libdir="$acl_save_libdir"
23142 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
23144 for found_dir in $rpathdirs; do
23145 acl_save_libdir="$libdir"
23146 libdir="$found_dir"
23147 eval flag=\"$acl_hardcode_libdir_flag_spec\"
23148 libdir="$acl_save_libdir"
23149 LIBSIGSEGV="${LIBSIGSEGV}${LIBSIGSEGV:+ }$flag"
23153 if test "X$ltrpathdirs" != "X"; then
23154 for found_dir in $ltrpathdirs; do
23155 LTLIBSIGSEGV="${LTLIBSIGSEGV}${LTLIBSIGSEGV:+ }-R$found_dir"
23164 ac_save_CPPFLAGS="$CPPFLAGS"
23166 for element in $INCSIGSEGV; do
23168 for x in $CPPFLAGS; do
23170 acl_save_prefix="$prefix"
23171 prefix="$acl_final_prefix"
23172 acl_save_exec_prefix="$exec_prefix"
23173 exec_prefix="$acl_final_exec_prefix"
23175 exec_prefix="$acl_save_exec_prefix"
23176 prefix="$acl_save_prefix"
23178 if test "X$x" = "X$element"; then
23183 if test -z "$haveit"; then
23184 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
23189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsigsegv" >&5
23190 printf %s "checking for libsigsegv... " >&6; }
23191 if test ${ac_cv_libsigsegv+y}
23193 printf %s "(cached) " >&6
23196 ac_save_LIBS="$LIBS"
23197 case " $LIBSIGSEGV" in
23198 *" -l"*) LIBS="$LIBS $LIBSIGSEGV" ;;
23199 *) LIBS="$LIBSIGSEGV $LIBS" ;;
23201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23202 /* end confdefs.h. */
23203 #include <sigsegv.h>
23207 sigsegv_deinstall_handler();
23212 if ac_fn_c_try_link "$LINENO"
23214 ac_cv_libsigsegv=yes
23216 ac_cv_libsigsegv='no, consider installing GNU libsigsegv'
23218 rm -f core conftest.err conftest.$ac_objext \
23219 conftest$ac_exeext conftest.$ac_ext
23220 LIBS="$ac_save_LIBS"
23223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libsigsegv" >&5
23224 printf "%s\n" "$ac_cv_libsigsegv" >&6; }
23225 if test "$ac_cv_libsigsegv" = yes; then
23226 HAVE_LIBSIGSEGV=yes
23228 printf "%s\n" "#define HAVE_LIBSIGSEGV 1" >>confdefs.h
23230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libsigsegv" >&5
23231 printf %s "checking how to link with libsigsegv... " >&6; }
23232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBSIGSEGV" >&5
23233 printf "%s\n" "$LIBSIGSEGV" >&6; }
23236 CPPFLAGS="$ac_save_CPPFLAGS"
23248 gl_cv_lib_sigsegv="$ac_cv_libsigsegv"
23254 LOCALCHARSET_TESTS_ENVIRONMENT=
23267 printf "%s\n" "#define _LCONV_C99 1" >>confdefs.h
23272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23273 printf %s "checking whether locale.h conforms to POSIX:2001... " >&6; }
23274 if test ${gl_cv_header_locale_h_posix2001+y}
23276 printf %s "(cached) " >&6
23278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23279 /* end confdefs.h. */
23280 #include <locale.h>
23281 int x = LC_MESSAGES;
23282 int y = sizeof (((struct lconv *) 0)->decimal_point);
23291 if ac_fn_c_try_compile "$LINENO"
23293 gl_cv_header_locale_h_posix2001=yes
23295 gl_cv_header_locale_h_posix2001=no
23297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23300 printf "%s\n" "$gl_cv_header_locale_h_posix2001" >&6; }
23303 if test $ac_cv_header_xlocale_h = yes; then
23305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
23306 printf %s "checking whether locale.h defines locale_t... " >&6; }
23307 if test ${gl_cv_header_locale_has_locale_t+y}
23309 printf %s "(cached) " >&6
23311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23312 /* end confdefs.h. */
23313 #include <locale.h>
23323 if ac_fn_c_try_compile "$LINENO"
23325 gl_cv_header_locale_has_locale_t=yes
23327 gl_cv_header_locale_has_locale_t=no
23329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23332 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
23333 printf "%s\n" "$gl_cv_header_locale_has_locale_t" >&6; }
23334 if test $gl_cv_header_locale_has_locale_t = yes; then
23335 gl_cv_header_locale_h_needs_xlocale_h=no
23337 gl_cv_header_locale_h_needs_xlocale_h=yes
23341 gl_cv_header_locale_h_needs_xlocale_h=no
23345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23346 printf %s "checking whether struct lconv is properly defined... " >&6; }
23347 if test ${gl_cv_sys_struct_lconv_ok+y}
23349 printf %s "(cached) " >&6
23351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23352 /* end confdefs.h. */
23353 #include <locale.h>
23355 int x = sizeof (l.decimal_point);
23356 int y = sizeof (l.int_p_cs_precedes);
23365 if ac_fn_c_try_compile "$LINENO"
23367 gl_cv_sys_struct_lconv_ok=yes
23369 gl_cv_sys_struct_lconv_ok=no
23371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23375 printf "%s\n" "$gl_cv_sys_struct_lconv_ok" >&6; }
23376 if test $gl_cv_sys_struct_lconv_ok = no; then
23377 REPLACE_STRUCT_LCONV=1
23388 if test $gl_cv_have_include_next = yes; then
23389 gl_cv_next_locale_h='<'locale.h'>'
23391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23392 printf %s "checking absolute name of <locale.h>... " >&6; }
23393 if test ${gl_cv_next_locale_h+y}
23395 printf %s "(cached) " >&6
23400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23401 /* end confdefs.h. */
23402 #include <locale.h>
23405 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23406 *) gl_absname_cpp="$ac_cpp" ;;
23411 gl_dirsep_regex='[/\\]'
23414 gl_dirsep_regex='\/'
23417 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23418 gl_header_literal_regex=`echo 'locale.h' \
23419 | sed -e "$gl_make_literal_regex_sed"`
23420 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23421 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23427 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23428 sed -n "$gl_absolute_header_sed"`
23430 gl_header=$gl_cv_absolute_locale_h
23431 gl_cv_next_locale_h='"'$gl_header'"'
23435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23436 printf "%s\n" "$gl_cv_next_locale_h" >&6; }
23438 NEXT_LOCALE_H=$gl_cv_next_locale_h
23440 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23441 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23442 gl_next_as_first_directive='<'locale.h'>'
23444 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23445 gl_next_as_first_directive=$gl_cv_next_locale_h
23447 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
23461 if test $REPLACE_STRUCT_LCONV = 1; then
23462 REPLACE_LOCALECONV=1
23465 if test $REPLACE_LOCALECONV = 1; then
23474 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
23477 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
23479 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
23482 printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
23494 GNULIB_LOCALECONV=1
23500 printf "%s\n" "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
23513 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext"
23519 if test $ac_cv_func_lstat = yes; then
23521 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
23530 if test $REPLACE_LSTAT = 1; then
23539 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23554 printf "%s\n" "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23563 if test $gl_cv_func_malloc_posix = yes; then
23565 printf "%s\n" "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23571 if test $REPLACE_MALLOC = 1; then
23580 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23588 GNULIB_MALLOC_POSIX=1
23594 printf "%s\n" "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23619 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23624 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
23625 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
23627 printf %s "(cached) " >&6
23631 # Guess no on AIX and OSF/1.
23632 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23633 # Guess yes otherwise.
23634 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23636 if test $LOCALE_JA != none; then
23637 if test "$cross_compiling" = yes
23641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23642 /* end confdefs.h. */
23644 #include <locale.h>
23645 #include <string.h>
23646 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23648 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23649 included before <wchar.h>. */
23650 #include <stddef.h>
23656 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23658 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23662 memset (&state, '\0', sizeof (mbstate_t));
23663 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23664 if (mbsinit (&state))
23670 if ac_fn_c_try_run "$LINENO"
23672 gl_cv_func_mbrtowc_incomplete_state=yes
23674 gl_cv_func_mbrtowc_incomplete_state=no
23676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23677 conftest.$ac_objext conftest.beam conftest.$ac_ext
23683 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23684 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23690 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
23691 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
23693 printf %s "(cached) " >&6
23697 # Guess no on Solaris 8.
23698 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23699 # Guess yes otherwise.
23700 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23702 if test $LOCALE_ZH_CN != none; then
23703 if test "$cross_compiling" = yes
23707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23708 /* end confdefs.h. */
23710 #include <locale.h>
23711 #include <stdlib.h>
23712 #include <string.h>
23713 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23715 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23716 included before <wchar.h>. */
23717 #include <stddef.h>
23723 /* This fails on Solaris 8:
23724 mbrtowc returns 2, and sets wc to 0x00F0.
23725 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23726 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23728 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23732 memset (&state, '\0', sizeof (mbstate_t));
23733 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23734 && mbtowc (&wc, input + 3, 6) == 4)
23740 if ac_fn_c_try_run "$LINENO"
23742 gl_cv_func_mbrtowc_sanitycheck=yes
23744 gl_cv_func_mbrtowc_sanitycheck=no
23746 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23747 conftest.$ac_objext conftest.beam conftest.$ac_ext
23753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23754 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23756 REPLACE_MBSTATE_T=0
23757 case "$gl_cv_func_mbrtowc_incomplete_state" in
23759 *) REPLACE_MBSTATE_T=1 ;;
23761 case "$gl_cv_func_mbrtowc_sanitycheck" in
23763 *) REPLACE_MBSTATE_T=1 ;;
23766 REPLACE_MBSTATE_T=1
23771 if test $ac_cv_func_mbrtowc = no; then
23773 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23774 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23776 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23777 included before <wchar.h>. */
23778 #include <stddef.h>
23784 if test "x$ac_cv_have_decl_mbrtowc" = xyes
23791 printf "%s\n" "#define HAVE_DECL_MBRTOWC $ac_have_decl" >>confdefs.h
23793 if test $ac_cv_have_decl_mbrtowc = yes; then
23797 if test $REPLACE_MBSTATE_T = 1; then
23803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23804 printf %s "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23805 if test ${gl_cv_func_mbrtowc_null_arg1+y}
23807 printf %s "(cached) " >&6
23811 # Guess no on Solaris.
23812 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23813 # Guess yes otherwise.
23814 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23816 if test $LOCALE_FR_UTF8 != none; then
23817 if test "$cross_compiling" = yes
23821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23822 /* end confdefs.h. */
23824 #include <locale.h>
23825 #include <stdlib.h>
23826 #include <string.h>
23827 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23829 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23830 included before <wchar.h>. */
23831 #include <stddef.h>
23839 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23841 char input[] = "\303\237er";
23846 memset (&state, '\0', sizeof (mbstate_t));
23847 wc = (wchar_t) 0xBADFACE;
23848 ret = mbrtowc (&wc, input, 5, &state);
23851 if (!mbsinit (&state))
23854 memset (&state, '\0', sizeof (mbstate_t));
23855 ret = mbrtowc (NULL, input, 5, &state);
23856 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
23858 if (!mbsinit (&state))
23864 if ac_fn_c_try_run "$LINENO"
23866 gl_cv_func_mbrtowc_null_arg1=yes
23868 gl_cv_func_mbrtowc_null_arg1=no
23870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23871 conftest.$ac_objext conftest.beam conftest.$ac_ext
23877 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23878 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23884 printf %s "checking whether mbrtowc handles a NULL string argument... " >&6; }
23885 if test ${gl_cv_func_mbrtowc_null_arg2+y}
23887 printf %s "(cached) " >&6
23891 # Guess no on OSF/1.
23892 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23893 # Guess yes otherwise.
23894 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23896 if test $LOCALE_FR_UTF8 != none; then
23897 if test "$cross_compiling" = yes
23901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23902 /* end confdefs.h. */
23904 #include <locale.h>
23905 #include <string.h>
23906 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23908 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23909 included before <wchar.h>. */
23910 #include <stddef.h>
23916 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23922 memset (&state, '\0', sizeof (mbstate_t));
23923 wc = (wchar_t) 0xBADFACE;
23924 mbrtowc (&wc, NULL, 5, &state);
23925 /* Check that wc was not modified. */
23926 if (wc != (wchar_t) 0xBADFACE)
23932 if ac_fn_c_try_run "$LINENO"
23934 gl_cv_func_mbrtowc_null_arg2=yes
23936 gl_cv_func_mbrtowc_null_arg2=no
23938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23939 conftest.$ac_objext conftest.beam conftest.$ac_ext
23945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23946 printf "%s\n" "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23954 printf %s "checking whether mbrtowc has a correct return value... " >&6; }
23955 if test ${gl_cv_func_mbrtowc_retval+y}
23957 printf %s "(cached) " >&6
23961 # Guess no on HP-UX, Solaris, native Windows.
23962 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23963 # Guess yes otherwise.
23964 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
23966 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23967 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23968 if test "$cross_compiling" = yes
23972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23973 /* end confdefs.h. */
23975 #include <locale.h>
23976 #include <string.h>
23977 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23979 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23980 included before <wchar.h>. */
23981 #include <stddef.h>
23988 int found_some_locale = 0;
23989 /* This fails on Solaris. */
23990 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23992 char input[] = "B\303\274\303\237er"; /* "Büßer" */
23996 memset (&state, '\0', sizeof (mbstate_t));
23997 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24000 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24003 found_some_locale = 1;
24005 /* This fails on HP-UX 11.11. */
24006 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24008 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24012 memset (&state, '\0', sizeof (mbstate_t));
24013 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24016 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24019 found_some_locale = 1;
24021 /* This fails on native Windows. */
24022 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24024 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24028 memset (&state, '\0', sizeof (mbstate_t));
24029 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24032 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24035 found_some_locale = 1;
24037 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24039 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24043 memset (&state, '\0', sizeof (mbstate_t));
24044 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24047 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24050 found_some_locale = 1;
24052 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24054 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24058 memset (&state, '\0', sizeof (mbstate_t));
24059 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24062 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24065 found_some_locale = 1;
24067 return (found_some_locale ? result : 77);
24070 if ac_fn_c_try_run "$LINENO"
24072 gl_cv_func_mbrtowc_retval=yes
24074 if test $? != 77; then
24075 gl_cv_func_mbrtowc_retval=no
24079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24080 conftest.$ac_objext conftest.beam conftest.$ac_ext
24086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24087 printf "%s\n" "$gl_cv_func_mbrtowc_retval" >&6; }
24092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24093 printf %s "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24094 if test ${gl_cv_func_mbrtowc_nul_retval+y}
24096 printf %s "(cached) " >&6
24100 # Guess no on Solaris 8 and 9.
24101 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
24102 # Guess yes otherwise.
24103 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
24105 if test $LOCALE_ZH_CN != none; then
24106 if test "$cross_compiling" = yes
24110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24111 /* end confdefs.h. */
24113 #include <locale.h>
24114 #include <string.h>
24115 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24117 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24118 included before <wchar.h>. */
24119 #include <stddef.h>
24125 /* This fails on Solaris 8 and 9. */
24126 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24131 memset (&state, '\0', sizeof (mbstate_t));
24132 if (mbrtowc (&wc, "", 1, &state) != 0)
24138 if ac_fn_c_try_run "$LINENO"
24140 gl_cv_func_mbrtowc_nul_retval=yes
24142 gl_cv_func_mbrtowc_nul_retval=no
24144 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24145 conftest.$ac_objext conftest.beam conftest.$ac_ext
24151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24152 printf "%s\n" "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24157 printf %s "checking whether mbrtowc works on empty input... " >&6; }
24158 if test ${gl_cv_func_mbrtowc_empty_input+y}
24160 printf %s "(cached) " >&6
24164 # Guess no on AIX and glibc systems.
24165 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
24166 # Guess yes on native Windows.
24167 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24168 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
24170 if test "$cross_compiling" = yes
24174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24175 /* end confdefs.h. */
24179 static mbstate_t mbs;
24183 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24186 if ac_fn_c_try_run "$LINENO"
24188 gl_cv_func_mbrtowc_empty_input=yes
24190 gl_cv_func_mbrtowc_empty_input=no
24192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24193 conftest.$ac_objext conftest.beam conftest.$ac_ext
24198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24199 printf "%s\n" "$gl_cv_func_mbrtowc_empty_input" >&6; }
24202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24203 printf %s "checking whether the C locale is free of encoding errors... " >&6; }
24204 if test ${gl_cv_C_locale_sans_EILSEQ+y}
24206 printf %s "(cached) " >&6
24209 gl_cv_C_locale_sans_EILSEQ="guessing no"
24211 if test "$cross_compiling" = yes
24214 # Guess yes on native Windows.
24215 mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
24219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24220 /* end confdefs.h. */
24221 #include <limits.h>
24222 #include <locale.h>
24230 char *locale = setlocale (LC_ALL, "C");
24233 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24237 mbstate_t mbs = { 0, };
24238 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24248 if ac_fn_c_try_run "$LINENO"
24250 gl_cv_C_locale_sans_EILSEQ=yes
24252 gl_cv_C_locale_sans_EILSEQ=no
24254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24255 conftest.$ac_objext conftest.beam conftest.$ac_ext
24260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_C_locale_sans_EILSEQ" >&5
24261 printf "%s\n" "$gl_cv_C_locale_sans_EILSEQ" >&6; }
24263 case "$gl_cv_func_mbrtowc_null_arg1" in
24266 printf "%s\n" "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24271 case "$gl_cv_func_mbrtowc_null_arg2" in
24274 printf "%s\n" "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24279 case "$gl_cv_func_mbrtowc_retval" in
24282 printf "%s\n" "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24287 case "$gl_cv_func_mbrtowc_nul_retval" in
24290 printf "%s\n" "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24295 case "$gl_cv_func_mbrtowc_empty_input" in
24298 printf "%s\n" "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24303 case $gl_cv_C_locale_sans_EILSEQ in
24306 printf "%s\n" "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24314 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
24323 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
24341 printf "%s\n" "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24350 GNULIB_MBSCASECMP=1
24356 printf "%s\n" "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
24371 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24376 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
24377 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
24379 printf %s "(cached) " >&6
24383 # Guess no on AIX and OSF/1.
24384 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24385 # Guess yes otherwise.
24386 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24388 if test $LOCALE_JA != none; then
24389 if test "$cross_compiling" = yes
24393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24394 /* end confdefs.h. */
24396 #include <locale.h>
24397 #include <string.h>
24398 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24400 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24401 included before <wchar.h>. */
24402 #include <stddef.h>
24408 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24410 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24414 memset (&state, '\0', sizeof (mbstate_t));
24415 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24416 if (mbsinit (&state))
24422 if ac_fn_c_try_run "$LINENO"
24424 gl_cv_func_mbrtowc_incomplete_state=yes
24426 gl_cv_func_mbrtowc_incomplete_state=no
24428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24429 conftest.$ac_objext conftest.beam conftest.$ac_ext
24435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24436 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24441 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24442 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
24443 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
24445 printf %s "(cached) " >&6
24449 # Guess no on Solaris 8.
24450 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24451 # Guess yes otherwise.
24452 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24454 if test $LOCALE_ZH_CN != none; then
24455 if test "$cross_compiling" = yes
24459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24460 /* end confdefs.h. */
24462 #include <locale.h>
24463 #include <stdlib.h>
24464 #include <string.h>
24465 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24467 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24468 included before <wchar.h>. */
24469 #include <stddef.h>
24475 /* This fails on Solaris 8:
24476 mbrtowc returns 2, and sets wc to 0x00F0.
24477 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24478 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24480 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24484 memset (&state, '\0', sizeof (mbstate_t));
24485 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24486 && mbtowc (&wc, input + 3, 6) == 4)
24492 if ac_fn_c_try_run "$LINENO"
24494 gl_cv_func_mbrtowc_sanitycheck=yes
24496 gl_cv_func_mbrtowc_sanitycheck=no
24498 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24499 conftest.$ac_objext conftest.beam conftest.$ac_ext
24505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24506 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24508 REPLACE_MBSTATE_T=0
24509 case "$gl_cv_func_mbrtowc_incomplete_state" in
24511 *) REPLACE_MBSTATE_T=1 ;;
24513 case "$gl_cv_func_mbrtowc_sanitycheck" in
24515 *) REPLACE_MBSTATE_T=1 ;;
24518 REPLACE_MBSTATE_T=1
24523 if test $ac_cv_func_mbsinit = no; then
24525 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24526 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24528 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24529 included before <wchar.h>. */
24530 #include <stddef.h>
24536 if test "x$ac_cv_have_decl_mbsinit" = xyes
24543 printf "%s\n" "#define HAVE_DECL_MBSINIT $ac_have_decl" >>confdefs.h
24545 if test $ac_cv_have_decl_mbsinit = yes; then
24549 if test $REPLACE_MBSTATE_T = 1; then
24553 mingw*) REPLACE_MBSINIT=1 ;;
24558 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24567 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24584 printf "%s\n" "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24591 if test $ac_cv_func_mbslen = yes; then
24608 printf "%s\n" "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
24622 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24627 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
24628 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
24630 printf %s "(cached) " >&6
24634 # Guess no on AIX and OSF/1.
24635 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24636 # Guess yes otherwise.
24637 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24639 if test $LOCALE_JA != none; then
24640 if test "$cross_compiling" = yes
24644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24645 /* end confdefs.h. */
24647 #include <locale.h>
24648 #include <string.h>
24649 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24651 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24652 included before <wchar.h>. */
24653 #include <stddef.h>
24659 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24661 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24665 memset (&state, '\0', sizeof (mbstate_t));
24666 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24667 if (mbsinit (&state))
24673 if ac_fn_c_try_run "$LINENO"
24675 gl_cv_func_mbrtowc_incomplete_state=yes
24677 gl_cv_func_mbrtowc_incomplete_state=no
24679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24680 conftest.$ac_objext conftest.beam conftest.$ac_ext
24686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24687 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24693 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
24694 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
24696 printf %s "(cached) " >&6
24700 # Guess no on Solaris 8.
24701 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24702 # Guess yes otherwise.
24703 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24705 if test $LOCALE_ZH_CN != none; then
24706 if test "$cross_compiling" = yes
24710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24711 /* end confdefs.h. */
24713 #include <locale.h>
24714 #include <stdlib.h>
24715 #include <string.h>
24716 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24718 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24719 included before <wchar.h>. */
24720 #include <stddef.h>
24726 /* This fails on Solaris 8:
24727 mbrtowc returns 2, and sets wc to 0x00F0.
24728 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24729 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24731 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24735 memset (&state, '\0', sizeof (mbstate_t));
24736 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24737 && mbtowc (&wc, input + 3, 6) == 4)
24743 if ac_fn_c_try_run "$LINENO"
24745 gl_cv_func_mbrtowc_sanitycheck=yes
24747 gl_cv_func_mbrtowc_sanitycheck=no
24749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24750 conftest.$ac_objext conftest.beam conftest.$ac_ext
24756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24757 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24759 REPLACE_MBSTATE_T=0
24760 case "$gl_cv_func_mbrtowc_incomplete_state" in
24762 *) REPLACE_MBSTATE_T=1 ;;
24764 case "$gl_cv_func_mbrtowc_sanitycheck" in
24766 *) REPLACE_MBSTATE_T=1 ;;
24769 REPLACE_MBSTATE_T=1
24774 if test $ac_cv_func_mbsrtowcs = no; then
24776 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24777 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24779 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24780 included before <wchar.h>. */
24781 #include <stddef.h>
24787 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
24794 printf "%s\n" "#define HAVE_DECL_MBSRTOWCS $ac_have_decl" >>confdefs.h
24796 if test $ac_cv_have_decl_mbsrtowcs = yes; then
24797 REPLACE_MBSRTOWCS=1
24800 if test $REPLACE_MBSTATE_T = 1; then
24801 REPLACE_MBSRTOWCS=1
24809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24810 printf %s "checking whether mbsrtowcs works... " >&6; }
24811 if test ${gl_cv_func_mbsrtowcs_works+y}
24813 printf %s "(cached) " >&6
24817 # Guess no on HP-UX, Solaris, mingw.
24818 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24819 # Guess yes otherwise.
24820 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24822 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24823 if test "$cross_compiling" = yes
24827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24828 /* end confdefs.h. */
24830 #include <locale.h>
24831 #include <string.h>
24832 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24834 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24835 included before <wchar.h>. */
24836 #include <stddef.h>
24843 /* Test whether the function supports a NULL destination argument.
24844 This fails on native Windows. */
24845 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24847 const char input[] = "\337er";
24848 const char *src = input;
24851 memset (&state, '\0', sizeof (mbstate_t));
24852 if (mbsrtowcs (NULL, &src, 1, &state) != 3
24856 /* Test whether the function works when started with a conversion state
24857 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
24858 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24860 const char input[] = "B\303\274\303\237er";
24863 memset (&state, '\0', sizeof (mbstate_t));
24864 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24865 if (!mbsinit (&state))
24867 const char *src = input + 2;
24868 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24872 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24874 const char input[] = "<\306\374\313\334\270\354>";
24877 memset (&state, '\0', sizeof (mbstate_t));
24878 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24879 if (!mbsinit (&state))
24881 const char *src = input + 4;
24882 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24886 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24888 const char input[] = "B\250\271\201\060\211\070er";
24891 memset (&state, '\0', sizeof (mbstate_t));
24892 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24893 if (!mbsinit (&state))
24895 const char *src = input + 2;
24896 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24903 if ac_fn_c_try_run "$LINENO"
24905 gl_cv_func_mbsrtowcs_works=yes
24907 gl_cv_func_mbsrtowcs_works=no
24909 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24910 conftest.$ac_objext conftest.beam conftest.$ac_ext
24916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24917 printf "%s\n" "$gl_cv_func_mbsrtowcs_works" >&6; }
24919 case "$gl_cv_func_mbsrtowcs_works" in
24921 *) REPLACE_MBSRTOWCS=1 ;;
24926 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24935 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24945 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24962 printf "%s\n" "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24977 printf "%s\n" "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
24988 if test $REPLACE_MBTOWC = 1; then
24997 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
25014 printf "%s\n" "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25023 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
25032 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
25035 ac_fn_c_check_header_compile "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25036 if test "x$ac_cv_header_bp_sym_h" = xyes
25038 printf "%s\n" "#define HAVE_BP_SYM_H 1" >>confdefs.h
25055 printf "%s\n" "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25065 printf %s "checking whether mkdir handles trailing slash... " >&6; }
25066 if test ${gl_cv_func_mkdir_trailing_slash_works+y}
25068 printf %s "(cached) " >&6
25070 rm -rf conftest.dir
25071 if test "$cross_compiling" = yes
25074 # Guess yes on Linux systems.
25075 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25076 # Guess yes on glibc systems.
25077 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
25078 # Guess yes on MSVC, no on mingw.
25079 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25080 /* end confdefs.h. */
25087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25088 $EGREP "Known" >/dev/null 2>&1
25090 gl_cv_func_mkdir_trailing_slash_works="guessing yes"
25092 gl_cv_func_mkdir_trailing_slash_works="guessing no"
25097 # If we don't know, assume the worst.
25098 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
25102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25103 /* end confdefs.h. */
25105 # include <sys/types.h>
25106 # include <sys/stat.h>
25111 return mkdir ("conftest.dir/", 0700);
25116 if ac_fn_c_try_run "$LINENO"
25118 gl_cv_func_mkdir_trailing_slash_works=yes
25120 gl_cv_func_mkdir_trailing_slash_works=no
25122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25123 conftest.$ac_objext conftest.beam conftest.$ac_ext
25126 rm -rf conftest.dir
25130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
25131 printf "%s\n" "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
25132 case "$gl_cv_func_mkdir_trailing_slash_works" in
25139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
25140 printf %s "checking whether mkdir handles trailing dot... " >&6; }
25141 if test ${gl_cv_func_mkdir_trailing_dot_works+y}
25143 printf %s "(cached) " >&6
25145 rm -rf conftest.dir
25146 if test "$cross_compiling" = yes
25149 # Guess yes on glibc systems.
25150 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
25151 # Guess no on native Windows.
25152 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25153 # If we don't know, assume the worst.
25154 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
25158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25159 /* end confdefs.h. */
25161 # include <sys/types.h>
25162 # include <sys/stat.h>
25167 return !mkdir ("conftest.dir/./", 0700);
25172 if ac_fn_c_try_run "$LINENO"
25174 gl_cv_func_mkdir_trailing_dot_works=yes
25176 gl_cv_func_mkdir_trailing_dot_works=no
25178 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25179 conftest.$ac_objext conftest.beam conftest.$ac_ext
25182 rm -rf conftest.dir
25186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
25187 printf "%s\n" "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
25188 case "$gl_cv_func_mkdir_trailing_dot_works" in
25193 printf "%s\n" "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
25198 if test $REPLACE_MKDIR = 1; then
25207 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
25214 if test $ac_cv_func_mkstemp = yes; then
25215 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
25216 printf %s "checking for working mkstemp... " >&6; }
25217 if test ${gl_cv_func_working_mkstemp+y}
25219 printf %s "(cached) " >&6
25222 mkdir conftest.mkstemp
25223 if test "$cross_compiling" = yes
25226 # Guess yes on glibc systems.
25227 *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
25228 # Guess no on native Windows.
25229 mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
25230 # If we don't know, assume the worst.
25231 *) gl_cv_func_working_mkstemp="guessing no" ;;
25235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25236 /* end confdefs.h. */
25237 $ac_includes_default
25243 off_t large = (off_t) 4294967295u;
25245 large = 2147483647;
25247 for (i = 0; i < 70; i++)
25249 char templ[] = "conftest.mkstemp/coXXXXXX";
25250 int (*mkstemp_function) (char *) = mkstemp;
25251 int fd = mkstemp_function (templ);
25257 if (lseek (fd, large, SEEK_SET) != large)
25259 if (fstat (fd, &st) < 0)
25261 else if (st.st_mode & 0077)
25272 if ac_fn_c_try_run "$LINENO"
25274 gl_cv_func_working_mkstemp=yes
25276 gl_cv_func_working_mkstemp=no
25278 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25279 conftest.$ac_objext conftest.beam conftest.$ac_ext
25282 rm -rf conftest.mkstemp
25285 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
25286 printf "%s\n" "$gl_cv_func_working_mkstemp" >&6; }
25287 case "$gl_cv_func_working_mkstemp" in
25297 if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then
25306 gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
25322 printf "%s\n" "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h
25332 if test "$gl_cv_func_working_mktime" != yes; then
25335 printf "%s\n" "#define NEED_MKTIME_WORKING 1" >>confdefs.h
25342 printf "%s\n" "#define NEED_MKTIME_WINDOWS 1" >>confdefs.h
25347 if test $REPLACE_MKTIME = 1; then
25356 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25371 printf "%s\n" "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
25378 WANT_MKTIME_INTERNAL=0
25379 ac_fn_c_check_func "$LINENO" "__mktime_internal" "ac_cv_func___mktime_internal"
25380 if test "x$ac_cv_func___mktime_internal" = xyes
25383 printf "%s\n" "#define mktime_internal __mktime_internal" >>confdefs.h
25387 WANT_MKTIME_INTERNAL=1
25389 printf "%s\n" "#define NEED_MKTIME_INTERNAL 1" >>confdefs.h
25395 if test $WANT_MKTIME_INTERNAL = 1; then
25404 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25409 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25418 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25422 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25431 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25436 printf "%s\n" "#define GNULIB_MSVC_NOTHROW 1" >>confdefs.h
25444 if test $ac_cv_func_nl_langinfo = yes; then
25445 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
25446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
25447 printf %s "checking whether YESEXPR works... " >&6; }
25448 if test ${gl_cv_func_nl_langinfo_yesexpr_works+y}
25450 printf %s "(cached) " >&6
25452 if test "$cross_compiling" = yes
25456 # Guess no on irix systems.
25457 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
25458 # Guess yes elsewhere.
25459 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
25463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25464 /* end confdefs.h. */
25465 #include <langinfo.h>
25470 return !*nl_langinfo(YESEXPR);
25476 if ac_fn_c_try_run "$LINENO"
25478 gl_cv_func_nl_langinfo_yesexpr_works=yes
25480 gl_cv_func_nl_langinfo_yesexpr_works=no
25482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25483 conftest.$ac_objext conftest.beam conftest.$ac_ext
25488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
25489 printf "%s\n" "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
25490 case $gl_cv_func_nl_langinfo_yesexpr_works in
25491 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
25492 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
25495 printf "%s\n" "#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS" >>confdefs.h
25497 if test $HAVE_LANGINFO_CODESET = 1 \
25498 && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
25499 && test $HAVE_LANGINFO_ALTMON = 1 \
25500 && test $HAVE_LANGINFO_ERA = 1 \
25501 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
25504 REPLACE_NL_LANGINFO=1
25506 printf "%s\n" "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
25513 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
25522 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
25530 GNULIB_NL_LANGINFO=1
25536 printf "%s\n" "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
25541 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
25549 printf "%s\n" "#define my_strftime nstrftime" >>confdefs.h
25561 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
25564 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25565 printf %s "checking whether open recognizes a trailing slash... " >&6; }
25566 if test ${gl_cv_func_open_slash+y}
25568 printf %s "(cached) " >&6
25570 # Assume that if we have lstat, we can also check symlinks.
25571 if test $ac_cv_func_lstat = yes; then
25573 ln -s conftest.tmp conftest.lnk
25575 if test "$cross_compiling" = yes
25579 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25580 gl_cv_func_open_slash="guessing no" ;;
25582 gl_cv_func_open_slash="guessing yes" ;;
25586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25587 /* end confdefs.h. */
25591 # include <unistd.h>
25597 if (open ("conftest.lnk/", O_RDONLY) != -1)
25600 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25605 if ac_fn_c_try_run "$LINENO"
25607 gl_cv_func_open_slash=yes
25609 gl_cv_func_open_slash=no
25611 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25612 conftest.$ac_objext conftest.beam conftest.$ac_ext
25615 rm -f conftest.sl conftest.tmp conftest.lnk
25618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25619 printf "%s\n" "$gl_cv_func_open_slash" >&6; }
25620 case "$gl_cv_func_open_slash" in
25623 printf "%s\n" "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25633 if test $REPLACE_OPEN = 1; then
25642 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25660 printf "%s\n" "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25667 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25669 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
25676 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl" >>confdefs.h
25678 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25680 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
25687 printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h
25691 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
25695 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
25706 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25707 if test "x$ac_cv_func_raise" = xyes
25709 printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h
25713 if test $ac_cv_func_raise = no; then
25718 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25726 if test $gl_cv_type_sigset_t = yes; then
25727 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
25728 if test "x$ac_cv_func_sigprocmask" = xyes
25730 gl_cv_func_sigprocmask=1
25734 if test -z "$gl_cv_func_sigprocmask"; then
25735 HAVE_POSIX_SIGNALBLOCKING=0
25738 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
25744 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25753 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25768 printf "%s\n" "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25776 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25777 if test "x$ac_cv_func_rawmemchr" = xyes
25779 printf "%s\n" "#define HAVE_RAWMEMCHR 1" >>confdefs.h
25783 if test $ac_cv_func_rawmemchr = no; then
25787 if test $HAVE_RAWMEMCHR = 0; then
25796 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25811 printf "%s\n" "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25818 if test $ac_cv_func_readlink = no; then
25821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25822 printf %s "checking whether readlink signature is correct... " >&6; }
25823 if test ${gl_cv_decl_readlink_works+y}
25825 printf %s "(cached) " >&6
25827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25828 /* end confdefs.h. */
25829 #include <unistd.h>
25830 /* Cause compilation failure if original declaration has wrong type. */
25831 ssize_t readlink (const char *, char *, size_t);
25840 if ac_fn_c_try_compile "$LINENO"
25842 gl_cv_decl_readlink_works=yes
25844 gl_cv_decl_readlink_works=no
25846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25849 printf "%s\n" "$gl_cv_decl_readlink_works" >&6; }
25850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25851 printf %s "checking whether readlink handles trailing slash correctly... " >&6; }
25852 if test ${gl_cv_func_readlink_works+y}
25854 printf %s "(cached) " >&6
25856 # We have readlink, so assume ln -s works.
25857 ln -s conftest.no-such conftest.link
25858 ln -s conftest.link conftest.lnk2
25859 if test "$cross_compiling" = yes
25862 # Guess yes on Linux systems.
25863 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;;
25864 # Guess yes on glibc systems.
25865 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25866 # If we don't know, assume the worst.
25867 *) gl_cv_func_readlink_works="guessing no" ;;
25871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25872 /* end confdefs.h. */
25873 #include <unistd.h>
25879 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25884 if ac_fn_c_try_run "$LINENO"
25886 gl_cv_func_readlink_works=yes
25888 gl_cv_func_readlink_works=no
25890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25891 conftest.$ac_objext conftest.beam conftest.$ac_ext
25894 rm -f conftest.link conftest.lnk2
25896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
25897 printf "%s\n" "$gl_cv_func_readlink_works" >&6; }
25898 case "$gl_cv_func_readlink_works" in
25900 if test "$gl_cv_decl_readlink_works" != yes; then
25906 printf "%s\n" "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
25913 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
25922 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
25939 printf "%s\n" "#define GNULIB_TEST_READLINK 1" >>confdefs.h
25945 # Check whether --with-included-regex was given.
25946 if test ${with_included_regex+y}
25948 withval=$with_included_regex;
25952 case $with_included_regex in #(
25953 yes|no) ac_use_included_regex=$with_included_regex
25956 # If the system regex support is good enough that it passes the
25957 # following run test, then default to *not* using the included regex.c.
25958 # If cross compiling, assume the test would fail and use the included
25962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
25963 printf %s "checking for working re_compile_pattern... " >&6; }
25964 if test ${gl_cv_func_re_compile_pattern_working+y}
25966 printf %s "(cached) " >&6
25968 if test "$cross_compiling" = yes
25971 # Guess no on native Windows.
25972 mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
25973 # Otherwise, assume it is not working.
25974 *) gl_cv_func_re_compile_pattern_working="guessing no" ;;
25978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25979 /* end confdefs.h. */
25982 #include <locale.h>
25983 #include <limits.h>
25984 #include <string.h>
25986 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
25987 # include <signal.h>
25988 # include <unistd.h>
25992 # include <malloc.h>
25995 #ifdef M_CHECK_ACTION
25996 /* Exit with distinguishable exit code. */
25997 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
26004 static struct re_pattern_buffer regex;
26005 unsigned char folded_chars[UCHAR_MAX + 1];
26008 struct re_registers regs;
26010 /* Some builds of glibc go into an infinite loop on this
26011 test. Use alarm to force death, and mallopt to avoid
26012 malloc recursion in diagnosing the corrupted heap. */
26013 #if HAVE_DECL_ALARM
26014 signal (SIGALRM, SIG_DFL);
26017 #ifdef M_CHECK_ACTION
26018 signal (SIGABRT, sigabrt_no_core);
26019 mallopt (M_CHECK_ACTION, 2);
26022 if (setlocale (LC_ALL, "en_US.UTF-8"))
26025 /* https://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26026 This test needs valgrind to catch the bug on Debian
26027 GNU/Linux 3.1 x86, but it might catch the bug better
26028 on other platforms and it shouldn't hurt to try the
26030 static char const pat[] = "insert into";
26031 static char const data[] =
26032 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26033 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26035 memset (®ex, 0, sizeof regex);
26036 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
26039 else if (re_search (®ex, data, sizeof data - 1,
26040 0, sizeof data - 1, ®s)
26047 /* This test is from glibc bug 15078.
26048 The test case is from Andreas Schwab in
26049 <https://sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26051 static char const pat[] = "[^x]x";
26052 static char const data[] =
26053 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26064 memset (®ex, 0, sizeof regex);
26065 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
26070 i = re_search (®ex, data, sizeof data - 1,
26071 0, sizeof data - 1, 0);
26072 if (i != 0 && i != 21)
26078 if (! setlocale (LC_ALL, "C"))
26082 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
26083 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26084 memset (®ex, 0, sizeof regex);
26085 s = re_compile_pattern ("a[^x]b", 6, ®ex);
26088 /* This should fail, but succeeds for glibc-2.5. */
26089 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
26092 /* This regular expression is from Spencer ere test number 75
26094 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26095 memset (®ex, 0, sizeof regex);
26096 for (i = 0; i <= UCHAR_MAX; i++)
26097 folded_chars[i] = i;
26098 regex.translate = folded_chars;
26099 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
26100 /* This should fail with _Invalid character class name_ error. */
26104 /* Ensure that [b-a] is diagnosed as invalid, when
26105 using RE_NO_EMPTY_RANGES. */
26106 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26107 memset (®ex, 0, sizeof regex);
26108 s = re_compile_pattern ("a[b-a]", 6, ®ex);
26112 /* This should succeed, but does not for glibc-2.1.3. */
26113 memset (®ex, 0, sizeof regex);
26114 s = re_compile_pattern ("{1", 2, ®ex);
26118 /* The following example is derived from a problem report
26119 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
26120 memset (®ex, 0, sizeof regex);
26121 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
26124 /* This should match, but does not for glibc-2.2.1. */
26125 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
26128 memset (®ex, 0, sizeof regex);
26129 s = re_compile_pattern ("x", 1, ®ex);
26132 /* glibc-2.2.93 does not work with a negative RANGE argument. */
26133 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
26136 /* The version of regex.c in older versions of gnulib
26137 ignored RE_ICASE. Detect that problem too. */
26138 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26139 memset (®ex, 0, sizeof regex);
26140 s = re_compile_pattern ("x", 1, ®ex);
26143 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
26146 /* Catch a bug reported by Vin Shelton in
26147 https://lists.gnu.org/r/bug-coreutils/2007-06/msg00089.html
26149 re_set_syntax (RE_SYNTAX_POSIX_BASIC
26150 & ~RE_CONTEXT_INVALID_DUP
26151 & ~RE_NO_EMPTY_RANGES);
26152 memset (®ex, 0, sizeof regex);
26153 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
26157 /* REG_STARTEND was added to glibc on 2004-01-15.
26158 Reject older versions. */
26159 if (! REG_STARTEND)
26162 /* Matching with the compiled form of this regexp would provoke
26163 an assertion failure prior to glibc-2.28:
26164 regexec.c:1375: pop_fail_stack: Assertion 'num >= 0' failed
26165 With glibc-2.28, compilation fails and reports the invalid
26167 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26168 memset (®ex, 0, sizeof regex);
26169 s = re_compile_pattern ("0|()0|\\1|0", 10, ®ex);
26170 if (!s || strcmp (s, "Invalid back reference"))
26174 /* It would be nice to reject hosts whose regoff_t values are too
26175 narrow (including glibc on hosts with 64-bit ptrdiff_t and
26176 32-bit int), but we should wait until glibc implements this
26177 feature. Otherwise, support for equivalence classes and
26178 multibyte collation symbols would always be broken except
26179 when compiling --without-included-regex. */
26180 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26181 || sizeof (regoff_t) < sizeof (ssize_t))
26191 if ac_fn_c_try_run "$LINENO"
26193 gl_cv_func_re_compile_pattern_working=yes
26195 gl_cv_func_re_compile_pattern_working=no
26197 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26198 conftest.$ac_objext conftest.beam conftest.$ac_ext
26203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26204 printf "%s\n" "$gl_cv_func_re_compile_pattern_working" >&6; }
26205 case "$gl_cv_func_re_compile_pattern_working" in #(
26206 *yes) ac_use_included_regex=no;; #(
26207 *no) ac_use_included_regex=yes;;
26210 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26214 if test $ac_use_included_regex = yes; then
26216 printf "%s\n" "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26219 printf "%s\n" "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26222 printf "%s\n" "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26225 printf "%s\n" "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26228 printf "%s\n" "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26231 printf "%s\n" "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26234 printf "%s\n" "#define re_search rpl_re_search" >>confdefs.h
26237 printf "%s\n" "#define re_search_2 rpl_re_search_2" >>confdefs.h
26240 printf "%s\n" "#define re_match rpl_re_match" >>confdefs.h
26243 printf "%s\n" "#define re_match_2 rpl_re_match_2" >>confdefs.h
26246 printf "%s\n" "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26249 printf "%s\n" "#define re_comp rpl_re_comp" >>confdefs.h
26252 printf "%s\n" "#define re_exec rpl_re_exec" >>confdefs.h
26255 printf "%s\n" "#define regcomp rpl_regcomp" >>confdefs.h
26258 printf "%s\n" "#define regexec rpl_regexec" >>confdefs.h
26261 printf "%s\n" "#define regerror rpl_regerror" >>confdefs.h
26264 printf "%s\n" "#define regfree rpl_regfree" >>confdefs.h
26268 if test $ac_use_included_regex = yes; then
26277 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26286 ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26287 if test "x$ac_cv_header_libintl_h" = xyes
26289 printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
26294 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26296 if test "x$ac_cv_have_decl_isblank" = xyes
26303 printf "%s\n" "#define HAVE_DECL_ISBLANK $ac_have_decl" >>confdefs.h
26309 if test $ac_cv_func_setenv = no; then
26312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
26313 printf %s "checking whether setenv validates arguments... " >&6; }
26314 if test ${gl_cv_func_setenv_works+y}
26316 printf %s "(cached) " >&6
26318 if test "$cross_compiling" = yes
26321 # Guess yes on glibc systems.
26322 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
26323 # If we don't know, assume the worst.
26324 *) gl_cv_func_setenv_works="guessing no" ;;
26328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26329 /* end confdefs.h. */
26331 #include <stdlib.h>
26333 #include <string.h>
26341 if (setenv ("", "", 0) != -1)
26343 else if (errno != EINVAL)
26347 if (setenv ("a", "=", 1) != 0)
26349 else if (strcmp (getenv ("a"), "=") != 0)
26358 if ac_fn_c_try_run "$LINENO"
26360 gl_cv_func_setenv_works=yes
26362 gl_cv_func_setenv_works=no
26364 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26365 conftest.$ac_objext conftest.beam conftest.$ac_ext
26369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
26370 printf "%s\n" "$gl_cv_func_setenv_works" >&6; }
26371 case "$gl_cv_func_setenv_works" in
26379 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
26388 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
26402 printf "%s\n" "#define GNULIB_TEST_SETENV 1" >>confdefs.h
26409 if test $ac_cv_func_sigaction = yes; then
26410 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
26412 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes
26415 printf "%s\n" "#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1" >>confdefs.h
26420 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
26421 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
26427 if test $HAVE_SIGACTION = 0; then
26436 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext"
26444 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
26445 #include <signal.h>
26448 if test "x$ac_cv_type_siginfo_t" = xyes
26451 printf "%s\n" "#define HAVE_SIGINFO_T 1" >>confdefs.h
26456 if test $ac_cv_type_siginfo_t = no; then
26472 printf "%s\n" "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
26487 if test $gl_cv_have_include_next = yes; then
26488 gl_cv_next_signal_h='<'signal.h'>'
26490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
26491 printf %s "checking absolute name of <signal.h>... " >&6; }
26492 if test ${gl_cv_next_signal_h+y}
26494 printf %s "(cached) " >&6
26499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26500 /* end confdefs.h. */
26501 #include <signal.h>
26504 aix*) gl_absname_cpp="$ac_cpp -C" ;;
26505 *) gl_absname_cpp="$ac_cpp" ;;
26510 gl_dirsep_regex='[/\\]'
26513 gl_dirsep_regex='\/'
26516 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
26517 gl_header_literal_regex=`echo 'signal.h' \
26518 | sed -e "$gl_make_literal_regex_sed"`
26519 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26520 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26526 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26527 sed -n "$gl_absolute_header_sed"`
26529 gl_header=$gl_cv_absolute_signal_h
26530 gl_cv_next_signal_h='"'$gl_header'"'
26534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
26535 printf "%s\n" "$gl_cv_next_signal_h" >&6; }
26537 NEXT_SIGNAL_H=$gl_cv_next_signal_h
26539 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
26540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26541 gl_next_as_first_directive='<'signal.h'>'
26543 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26544 gl_next_as_first_directive=$gl_cv_next_signal_h
26546 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
26552 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
26553 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
26554 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
26555 #include <signal.h>
26558 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
26562 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
26571 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
26572 #include <signal.h>
26575 if test "x$ac_cv_type_sighandler_t" = xyes
26579 HAVE_SIGHANDLER_T=0
26590 if test $gl_cv_type_sigset_t = yes; then
26591 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
26592 if test "x$ac_cv_func_sigprocmask" = xyes
26594 gl_cv_func_sigprocmask=1
26598 if test -z "$gl_cv_func_sigprocmask"; then
26599 HAVE_POSIX_SIGNALBLOCKING=0
26602 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
26611 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext"
26620 GNULIB_SIGPROCMASK=1
26626 printf "%s\n" "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
26631 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
26632 if test "x$ac_cv_header_stdint_h" = xyes
26634 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
26638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
26639 printf %s "checking for SIZE_MAX... " >&6; }
26640 if test ${gl_cv_size_max+y}
26642 printf %s "(cached) " >&6
26646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26647 /* end confdefs.h. */
26649 #include <limits.h>
26651 #include <stdint.h>
26658 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26659 $EGREP "Found it" >/dev/null 2>&1
26665 if test -z "$gl_cv_size_max"; then
26666 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
26667 #include <limits.h>"
26671 size_t_bits_minus_1=
26674 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"
26681 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
26682 if test $fits_in_uint = 1; then
26683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26684 /* end confdefs.h. */
26685 #include <stddef.h>
26687 extern unsigned long foo;
26697 if ac_fn_c_try_compile "$LINENO"
26701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26703 if test $fits_in_uint = 1; then
26704 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
26706 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
26709 gl_cv_size_max='((size_t)~(size_t)0)'
26714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
26715 printf "%s\n" "$gl_cv_size_max" >&6; }
26716 if test "$gl_cv_size_max" != yes; then
26718 printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h
26724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
26725 printf %s "checking for ssize_t... " >&6; }
26726 if test ${gt_cv_ssize_t+y}
26728 printf %s "(cached) " >&6
26730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26731 /* end confdefs.h. */
26732 #include <sys/types.h>
26736 int x = sizeof (ssize_t *) + sizeof (ssize_t);
26742 if ac_fn_c_try_compile "$LINENO"
26748 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
26751 printf "%s\n" "$gt_cv_ssize_t" >&6; }
26752 if test $gt_cv_ssize_t = no; then
26754 printf "%s\n" "#define ssize_t int" >>confdefs.h
26767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
26768 printf %s "checking whether stat handles trailing slashes on files... " >&6; }
26769 if test ${gl_cv_func_stat_file_slash+y}
26771 printf %s "(cached) " >&6
26774 # Assume that if we have lstat, we can also check symlinks.
26775 if test $ac_cv_func_lstat = yes; then
26776 ln -s conftest.tmp conftest.lnk
26778 if test "$cross_compiling" = yes
26781 # Guess yes on Linux systems.
26782 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
26783 # Guess yes on glibc systems.
26784 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
26785 # If we don't know, assume the worst.
26786 *) gl_cv_func_stat_file_slash="guessing no" ;;
26790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26791 /* end confdefs.h. */
26792 #include <sys/stat.h>
26799 if (!stat ("conftest.tmp/", &st))
26802 if (!stat ("conftest.lnk/", &st))
26811 if ac_fn_c_try_run "$LINENO"
26813 gl_cv_func_stat_file_slash=yes
26815 gl_cv_func_stat_file_slash=no
26817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26818 conftest.$ac_objext conftest.beam conftest.$ac_ext
26821 rm -f conftest.tmp conftest.lnk
26823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
26824 printf "%s\n" "$gl_cv_func_stat_file_slash" >&6; }
26825 case $gl_cv_func_stat_file_slash in
26829 printf "%s\n" "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
26839 if test $REPLACE_STAT = 1; then
26848 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
26860 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext"
26880 printf "%s\n" "#define GNULIB_TEST_STAT 1" >>confdefs.h
26888 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h>
26889 #include <sys/stat.h>
26891 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
26894 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
26896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
26897 printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
26898 if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y}
26900 printf %s "(cached) " >&6
26902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26903 /* end confdefs.h. */
26905 #include <sys/types.h>
26906 #include <sys/stat.h>
26907 #if HAVE_SYS_TIME_H
26908 # include <sys/time.h>
26911 struct timespec ts;
26924 if ac_fn_c_try_compile "$LINENO"
26926 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
26928 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
26930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
26933 printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
26934 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
26936 printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
26940 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h>
26941 #include <sys/stat.h>
26943 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
26946 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
26950 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
26951 #include <sys/stat.h>
26953 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
26956 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
26960 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 <sys/types.h>
26961 #include <sys/stat.h>
26963 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
26966 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h
26981 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include <sys/types.h>
26982 #include <sys/stat.h>
26984 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
26987 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1" >>confdefs.h
26991 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
26992 #include <sys/stat.h>
26994 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
26997 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1" >>confdefs.h
27001 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include <sys/types.h>
27002 #include <sys/stat.h>
27004 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
27007 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1" >>confdefs.h
27019 NEXT_STDARG_H='<stdarg.h>'
27020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
27021 printf %s "checking for va_copy... " >&6; }
27022 if test ${gl_cv_func_va_copy+y}
27024 printf %s "(cached) " >&6
27026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27027 /* end confdefs.h. */
27028 #include <stdarg.h>
27034 void (*func) (va_list, va_list) = va_copy;
27041 if ac_fn_c_try_compile "$LINENO"
27043 gl_cv_func_va_copy=yes
27045 gl_cv_func_va_copy=no
27047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
27051 printf "%s\n" "$gl_cv_func_va_copy" >&6; }
27052 if test $gl_cv_func_va_copy = no; then
27053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27054 /* end confdefs.h. */
27055 #if defined _AIX && !defined __GNUC__
27060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27061 $EGREP "vaccine" >/dev/null 2>&1
27069 if test $gl_aixcc = yes; then
27079 if test $gl_cv_have_include_next = yes; then
27080 gl_cv_next_stdarg_h='<'stdarg.h'>'
27082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
27083 printf %s "checking absolute name of <stdarg.h>... " >&6; }
27084 if test ${gl_cv_next_stdarg_h+y}
27086 printf %s "(cached) " >&6
27091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27092 /* end confdefs.h. */
27093 #include <stdarg.h>
27096 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27097 *) gl_absname_cpp="$ac_cpp" ;;
27102 gl_dirsep_regex='[/\\]'
27105 gl_dirsep_regex='\/'
27108 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27109 gl_header_literal_regex=`echo 'stdarg.h' \
27110 | sed -e "$gl_make_literal_regex_sed"`
27111 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27112 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27118 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27119 sed -n "$gl_absolute_header_sed"`
27121 gl_header=$gl_cv_absolute_stdarg_h
27122 gl_cv_next_stdarg_h='"'$gl_header'"'
27126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
27127 printf "%s\n" "$gl_cv_next_stdarg_h" >&6; }
27129 NEXT_STDARG_H=$gl_cv_next_stdarg_h
27131 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27132 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27133 gl_next_as_first_directive='<'stdarg.h'>'
27135 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27136 gl_next_as_first_directive=$gl_cv_next_stdarg_h
27138 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
27143 if test "$gl_cv_next_stdarg_h" = '""'; then
27144 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
27145 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
27149 saved_as_echo_n="$as_echo_n"
27151 if test ${gl_cv_func___va_copy+y}
27153 printf %s "(cached) " >&6
27156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27157 /* end confdefs.h. */
27158 #include <stdarg.h>
27171 if ac_fn_c_try_compile "$LINENO"
27173 gl_cv_func___va_copy=yes
27175 gl_cv_func___va_copy=no
27177 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27180 as_echo_n="$saved_as_echo_n"
27182 if test $gl_cv_func___va_copy = yes; then
27184 printf "%s\n" "#define va_copy __va_copy" >>confdefs.h
27189 printf "%s\n" "#define va_copy gl_va_copy" >>confdefs.h
27195 if test -n "$STDARG_H"; then
27196 GL_GENERATE_STDARG_H_TRUE=
27197 GL_GENERATE_STDARG_H_FALSE='#'
27199 GL_GENERATE_STDARG_H_TRUE='#'
27200 GL_GENERATE_STDARG_H_FALSE=
27208 # Define two additional variables used in the Makefile substitution.
27210 if test "$ac_cv_header_stdbool_h" = yes; then
27213 STDBOOL_H='stdbool.h'
27216 if test -n "$STDBOOL_H"; then
27217 GL_GENERATE_STDBOOL_H_TRUE=
27218 GL_GENERATE_STDBOOL_H_FALSE='#'
27220 GL_GENERATE_STDBOOL_H_TRUE='#'
27221 GL_GENERATE_STDBOOL_H_FALSE=
27225 if test "$ac_cv_type__Bool" = yes; then
27237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
27238 printf %s "checking for good max_align_t... " >&6; }
27239 if test ${gl_cv_type_max_align_t+y}
27241 printf %s "(cached) " >&6
27243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27244 /* end confdefs.h. */
27245 #include <stddef.h>
27246 unsigned int s = sizeof (max_align_t);
27247 #if defined __GNUC__ || defined __IBM__ALIGNOF__
27248 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
27249 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
27260 if ac_fn_c_try_compile "$LINENO"
27262 gl_cv_type_max_align_t=yes
27264 gl_cv_type_max_align_t=no
27266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
27270 printf "%s\n" "$gl_cv_type_max_align_t" >&6; }
27271 if test $gl_cv_type_max_align_t = no; then
27276 if test $gt_cv_c_wchar_t = no; then
27281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
27282 printf %s "checking whether NULL can be used in arbitrary expressions... " >&6; }
27283 if test ${gl_cv_decl_null_works+y}
27285 printf %s "(cached) " >&6
27287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27288 /* end confdefs.h. */
27289 #include <stddef.h>
27290 int test[2 * (sizeof NULL == sizeof (void *)) -1];
27300 if ac_fn_c_try_compile "$LINENO"
27302 gl_cv_decl_null_works=yes
27304 gl_cv_decl_null_works=no
27306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
27309 printf "%s\n" "$gl_cv_decl_null_works" >&6; }
27310 if test $gl_cv_decl_null_works = no; then
27316 if test -n "$STDDEF_H"; then
27317 GL_GENERATE_STDDEF_H_TRUE=
27318 GL_GENERATE_STDDEF_H_FALSE='#'
27320 GL_GENERATE_STDDEF_H_TRUE='#'
27321 GL_GENERATE_STDDEF_H_FALSE=
27324 if test -n "$STDDEF_H"; then
27333 if test $gl_cv_have_include_next = yes; then
27334 gl_cv_next_stddef_h='<'stddef.h'>'
27336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
27337 printf %s "checking absolute name of <stddef.h>... " >&6; }
27338 if test ${gl_cv_next_stddef_h+y}
27340 printf %s "(cached) " >&6
27345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27346 /* end confdefs.h. */
27347 #include <stddef.h>
27350 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27351 *) gl_absname_cpp="$ac_cpp" ;;
27356 gl_dirsep_regex='[/\\]'
27359 gl_dirsep_regex='\/'
27362 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27363 gl_header_literal_regex=`echo 'stddef.h' \
27364 | sed -e "$gl_make_literal_regex_sed"`
27365 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27366 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27372 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27373 sed -n "$gl_absolute_header_sed"`
27375 gl_header=$gl_cv_absolute_stddef_h
27376 gl_cv_next_stddef_h='"'$gl_header'"'
27380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
27381 printf "%s\n" "$gl_cv_next_stddef_h" >&6; }
27383 NEXT_STDDEF_H=$gl_cv_next_stddef_h
27385 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27386 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27387 gl_next_as_first_directive='<'stddef.h'>'
27389 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27390 gl_next_as_first_directive=$gl_cv_next_stddef_h
27392 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
27402 printf "%s\n" "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
27413 if test $gl_cv_have_include_next = yes; then
27414 gl_cv_next_stdio_h='<'stdio.h'>'
27416 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
27417 printf %s "checking absolute name of <stdio.h>... " >&6; }
27418 if test ${gl_cv_next_stdio_h+y}
27420 printf %s "(cached) " >&6
27425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27426 /* end confdefs.h. */
27430 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27431 *) gl_absname_cpp="$ac_cpp" ;;
27436 gl_dirsep_regex='[/\\]'
27439 gl_dirsep_regex='\/'
27442 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27443 gl_header_literal_regex=`echo 'stdio.h' \
27444 | sed -e "$gl_make_literal_regex_sed"`
27445 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27446 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27452 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27453 sed -n "$gl_absolute_header_sed"`
27455 gl_header=$gl_cv_absolute_stdio_h
27456 gl_cv_next_stdio_h='"'$gl_header'"'
27460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
27461 printf "%s\n" "$gl_cv_next_stdio_h" >&6; }
27463 NEXT_STDIO_H=$gl_cv_next_stdio_h
27465 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27466 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27467 gl_next_as_first_directive='<'stdio.h'>'
27469 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27470 gl_next_as_first_directive=$gl_cv_next_stdio_h
27472 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
27478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
27479 printf %s "checking which flavor of printf attribute matches inttypes macros... " >&6; }
27480 if test ${gl_cv_func_printf_attribute_flavor+y}
27482 printf %s "(cached) " >&6
27484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27485 /* end confdefs.h. */
27487 #define __STDC_FORMAT_MACROS 1
27489 #include <inttypes.h>
27490 /* For non-mingw systems, compilation will trivially succeed.
27491 For mingw, compilation will succeed for older mingw (system
27492 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
27493 #if (defined _WIN32 && ! defined __CYGWIN__) && \
27494 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
27495 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
27506 if ac_fn_c_try_compile "$LINENO"
27508 gl_cv_func_printf_attribute_flavor=system
27510 gl_cv_func_printf_attribute_flavor=gnu
27512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
27515 printf "%s\n" "$gl_cv_func_printf_attribute_flavor" >&6; }
27516 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then
27518 printf "%s\n" "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
27525 printf "%s\n" "#define GNULIB_FSCANF 1" >>confdefs.h
27531 printf "%s\n" "#define GNULIB_SCANF 1" >>confdefs.h
27568 if test $gl_cv_have_include_next = yes; then
27569 gl_cv_next_stdlib_h='<'stdlib.h'>'
27571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
27572 printf %s "checking absolute name of <stdlib.h>... " >&6; }
27573 if test ${gl_cv_next_stdlib_h+y}
27575 printf %s "(cached) " >&6
27580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27581 /* end confdefs.h. */
27582 #include <stdlib.h>
27585 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27586 *) gl_absname_cpp="$ac_cpp" ;;
27591 gl_dirsep_regex='[/\\]'
27594 gl_dirsep_regex='\/'
27597 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27598 gl_header_literal_regex=`echo 'stdlib.h' \
27599 | sed -e "$gl_make_literal_regex_sed"`
27600 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27601 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27607 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27608 sed -n "$gl_absolute_header_sed"`
27610 gl_header=$gl_cv_absolute_stdlib_h
27611 gl_cv_next_stdlib_h='"'$gl_header'"'
27615 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
27616 printf "%s\n" "$gl_cv_next_stdlib_h" >&6; }
27618 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
27620 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27621 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27622 gl_next_as_first_directive='<'stdlib.h'>'
27624 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27625 gl_next_as_first_directive=$gl_cv_next_stdlib_h
27627 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
27640 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
27641 if test "x$ac_cv_func_strcasecmp" = xyes
27643 printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h
27647 if test $ac_cv_func_strcasecmp = no; then
27653 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
27654 if test "x$ac_cv_func_strncasecmp" = xyes
27656 printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
27660 if test $ac_cv_func_strncasecmp = yes; then
27665 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
27666 if test "x$ac_cv_have_decl_strncasecmp" = xyes
27673 printf "%s\n" "#define HAVE_DECL_STRNCASECMP $ac_have_decl" >>confdefs.h
27675 if test $ac_cv_have_decl_strncasecmp = no; then
27676 HAVE_DECL_STRNCASECMP=0
27680 if test $HAVE_STRCASECMP = 0; then
27689 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
27695 if test $HAVE_STRNCASECMP = 0; then
27704 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
27717 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
27718 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
27719 printf %s "checking for working strerror function... " >&6; }
27720 if test ${gl_cv_func_working_strerror+y}
27722 printf %s "(cached) " >&6
27724 if test "$cross_compiling" = yes
27727 # Guess yes on glibc systems.
27728 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
27729 # If we don't know, assume the worst.
27730 *) gl_cv_func_working_strerror="guessing no" ;;
27734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27735 /* end confdefs.h. */
27736 #include <string.h>
27741 if (!*strerror (-2)) return 1;
27746 if ac_fn_c_try_run "$LINENO"
27748 gl_cv_func_working_strerror=yes
27750 gl_cv_func_working_strerror=no
27752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27753 conftest.$ac_objext conftest.beam conftest.$ac_ext
27758 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
27759 printf "%s\n" "$gl_cv_func_working_strerror" >&6; }
27760 case "$gl_cv_func_working_strerror" in
27767 case "$gl_cv_func_strerror_r_works" in
27768 *no) REPLACE_STRERROR=1 ;;
27775 if test $REPLACE_STRERROR = 1; then
27784 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
27789 printf "%s\n" "#define GNULIB_STRERROR 1" >>confdefs.h
27803 printf "%s\n" "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
27809 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
27818 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
27824 if test $ac_cv_header_sys_socket_h != yes; then
27825 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
27826 if test "x$ac_cv_header_winsock2_h" = xyes
27828 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
27833 if test "$ac_cv_header_winsock2_h" = yes; then
27835 UNISTD_H_HAVE_WINSOCK2_H=1
27836 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
27843 if test $gl_cond_libtool = false; then
27844 gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
27845 gl_libdeps="$gl_libdeps $LIBICONV"
27859 if test $ac_cv_have_decl_strndup = no; then
27860 HAVE_DECL_STRNDUP=0
27863 if test $ac_cv_func_strndup = yes; then
27865 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
27866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
27867 printf %s "checking for working strndup... " >&6; }
27868 if test ${gl_cv_func_strndup_works+y}
27870 printf %s "(cached) " >&6
27872 if test "$cross_compiling" = yes
27876 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
27877 *) gl_cv_func_strndup_works="guessing yes";;
27881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27882 /* end confdefs.h. */
27884 #include <string.h>
27885 #include <stdlib.h>
27890 #if !HAVE_DECL_STRNDUP
27895 char *strndup (const char *, size_t);
27899 s = strndup ("some longer string", 15);
27901 s = strndup ("shorter string", 13);
27902 result = s[13] != '\0';
27909 if ac_fn_c_try_run "$LINENO"
27911 gl_cv_func_strndup_works=yes
27913 gl_cv_func_strndup_works=no
27915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27916 conftest.$ac_objext conftest.beam conftest.$ac_ext
27920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
27921 printf "%s\n" "$gl_cv_func_strndup_works" >&6; }
27922 case $gl_cv_func_strndup_works in
27923 *no) REPLACE_STRNDUP=1 ;;
27929 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
27938 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
27952 printf "%s\n" "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
27962 if test $ac_cv_have_decl_strnlen = no; then
27963 HAVE_DECL_STRNLEN=0
27966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
27967 printf %s "checking for working strnlen... " >&6; }
27968 if test ${ac_cv_func_strnlen_working+y}
27970 printf %s "(cached) " >&6
27972 if test "$cross_compiling" = yes
27974 # Guess no on AIX systems, yes otherwise.
27976 aix*) ac_cv_func_strnlen_working=no;;
27977 *) ac_cv_func_strnlen_working=yes;;
27980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27981 /* end confdefs.h. */
27982 $ac_includes_default
27988 #define S_LEN (sizeof S - 1)
27990 /* At least one implementation is buggy: that of AIX 4.3 would
27991 give strnlen (S, 1) == 3. */
27994 for (i = 0; i < S_LEN + 1; ++i)
27996 int expected = i <= S_LEN ? i : S_LEN;
27997 if (strnlen (S, i) != expected)
28006 if ac_fn_c_try_run "$LINENO"
28008 ac_cv_func_strnlen_working=yes
28010 ac_cv_func_strnlen_working=no
28012 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28013 conftest.$ac_objext conftest.beam conftest.$ac_ext
28017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
28018 printf "%s\n" "$ac_cv_func_strnlen_working" >&6; }
28019 test $ac_cv_func_strnlen_working = no && :
28022 if test $ac_cv_func_strnlen_working = no; then
28027 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
28036 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
28051 printf "%s\n" "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
28059 if test $ac_cv_func_strptime != yes; then
28063 if test $HAVE_STRPTIME = 0; then
28072 gl_LIBOBJS="$gl_LIBOBJS strptime.$ac_objext"
28090 printf "%s\n" "#define GNULIB_TEST_STRPTIME 1" >>confdefs.h
28097 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
28098 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
28099 if test "x$ac_cv_func_strtoull" = xyes
28101 printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h
28105 if test $ac_cv_func_strtoull = no; then
28110 if test $HAVE_STRTOULL = 0; then
28119 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
28136 printf "%s\n" "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
28145 if test "$ac_cv_have_decl_strtoumax" = yes; then
28146 if test "$ac_cv_func_strtoumax" != yes; then
28147 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
28148 REPLACE_STRTOUMAX=1
28151 HAVE_DECL_STRTOUMAX=0
28154 if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
28163 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
28166 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
28167 if test "x$ac_cv_have_decl_strtoull" = xyes
28174 printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h
28203 if test $gl_cv_have_include_next = yes; then
28204 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28206 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
28207 printf %s "checking absolute name of <sys/stat.h>... " >&6; }
28208 if test ${gl_cv_next_sys_stat_h+y}
28210 printf %s "(cached) " >&6
28213 if test $ac_cv_header_sys_stat_h = yes; then
28218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28219 /* end confdefs.h. */
28220 #include <sys/stat.h>
28223 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28224 *) gl_absname_cpp="$ac_cpp" ;;
28229 gl_dirsep_regex='[/\\]'
28232 gl_dirsep_regex='\/'
28235 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28236 gl_header_literal_regex=`echo 'sys/stat.h' \
28237 | sed -e "$gl_make_literal_regex_sed"`
28238 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28239 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28245 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28246 sed -n "$gl_absolute_header_sed"`
28248 gl_header=$gl_cv_absolute_sys_stat_h
28249 gl_cv_next_sys_stat_h='"'$gl_header'"'
28251 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
28256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
28257 printf "%s\n" "$gl_cv_next_sys_stat_h" >&6; }
28259 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
28261 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28262 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28263 gl_next_as_first_directive='<'sys/stat.h'>'
28265 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28266 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
28268 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
28277 WINDOWS_STAT_TIMESPEC=0
28286 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
28287 #include <sys/stat.h>
28289 if test "x$ac_cv_type_nlink_t" = xyes
28294 printf "%s\n" "#define nlink_t int" >>confdefs.h
28322 if test $gl_cv_have_include_next = yes; then
28323 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
28325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
28326 printf %s "checking absolute name of <sys/wait.h>... " >&6; }
28327 if test ${gl_cv_next_sys_wait_h+y}
28329 printf %s "(cached) " >&6
28332 if test $ac_cv_header_sys_wait_h = yes; then
28337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28338 /* end confdefs.h. */
28339 #include <sys/wait.h>
28342 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28343 *) gl_absname_cpp="$ac_cpp" ;;
28348 gl_dirsep_regex='[/\\]'
28351 gl_dirsep_regex='\/'
28354 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28355 gl_header_literal_regex=`echo 'sys/wait.h' \
28356 | sed -e "$gl_make_literal_regex_sed"`
28357 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28358 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28364 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28365 sed -n "$gl_absolute_header_sed"`
28367 gl_header=$gl_cv_absolute_sys_wait_h
28368 gl_cv_next_sys_wait_h='"'$gl_header'"'
28370 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
28375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
28376 printf "%s\n" "$gl_cv_next_sys_wait_h" >&6; }
28378 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
28380 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28381 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28382 gl_next_as_first_directive='<'sys/wait.h'>'
28384 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28385 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
28387 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
28414 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
28416 if test "x$ac_cv_have_decl_localtime_r" = xyes
28423 printf "%s\n" "#define HAVE_DECL_LOCALTIME_R $ac_have_decl" >>confdefs.h
28425 if test $ac_cv_have_decl_localtime_r = no; then
28426 HAVE_DECL_LOCALTIME_R=0
28430 if test $ac_cv_func_localtime_r = yes; then
28432 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
28433 printf %s "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
28434 if test ${gl_cv_time_r_posix+y}
28436 printf %s "(cached) " >&6
28438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28439 /* end confdefs.h. */
28444 /* We don't need to append 'restrict's to the argument types,
28445 even though the POSIX signature has the 'restrict's,
28446 since C99 says they can't affect type compatibility. */
28447 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
28449 /* Check the return type is a pointer.
28450 On HP-UX 10 it is 'int'. */
28451 *localtime_r (0, 0);
28457 if ac_fn_c_try_compile "$LINENO"
28459 gl_cv_time_r_posix=yes
28461 gl_cv_time_r_posix=no
28463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28466 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
28467 printf "%s\n" "$gl_cv_time_r_posix" >&6; }
28468 if test $gl_cv_time_r_posix = yes; then
28469 REPLACE_LOCALTIME_R=0
28471 REPLACE_LOCALTIME_R=1
28477 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
28486 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
28503 printf "%s\n" "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
28512 # Mac OS X 10.6 loops forever with some time_t values.
28513 # See Bug#27706, Bug#27736, and
28514 # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
28515 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether localtime loops forever near extrema" >&5
28516 printf %s "checking whether localtime loops forever near extrema... " >&6; }
28517 if test ${gl_cv_func_localtime_infloop_bug+y}
28519 printf %s "(cached) " >&6
28521 gl_cv_func_localtime_infloop_bug=no
28522 if test "$cross_compiling" = yes
28524 gl_cv_func_localtime_infloop_bug="guessing no"
28526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28527 /* end confdefs.h. */
28528 #include <stdlib.h>
28529 #include <string.h>
28530 #include <unistd.h>
28537 time_t t = -67768038400666600;
28539 char *tz = getenv ("TZ");
28540 if (! (tz && strcmp (tz, "QQQ0") == 0))
28543 tm = localtime (&t);
28544 /* Use TM and *TM to suppress over-optimization. */
28545 return tm && tm->tm_isdst;
28551 if ac_fn_c_try_run "$LINENO"
28553 (TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
28554 gl_cv_func_localtime_infloop_bug=yes
28556 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28557 conftest.$ac_objext conftest.beam conftest.$ac_ext
28561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_infloop_bug" >&5
28562 printf "%s\n" "$gl_cv_func_localtime_infloop_bug" >&6; }
28563 if test "$gl_cv_func_localtime_infloop_bug" = yes; then
28565 printf "%s\n" "#define HAVE_LOCALTIME_INFLOOP_BUG 1" >>confdefs.h
28569 ac_fn_c_check_type "$LINENO" "timezone_t" "ac_cv_type_timezone_t" "#include <time.h>
28571 if test "x$ac_cv_type_timezone_t" = xyes
28574 printf "%s\n" "#define HAVE_TIMEZONE_T 1" >>confdefs.h
28579 if test "$ac_cv_type_timezone_t" = yes; then
28583 if test $HAVE_TIMEZONE_T = 0; then
28592 gl_LIBOBJS="$gl_LIBOBJS time_rz.$ac_objext"
28606 printf "%s\n" "#define GNULIB_TEST_TIME_RZ 1" >>confdefs.h
28615 if test $ac_cv_func_timegm = yes; then
28616 if test "$gl_cv_func_working_mktime" != yes; then
28617 # Assume that timegm is buggy if mktime is.
28624 if test $HAVE_TIMEGM = 0 || test $REPLACE_TIMEGM = 1; then
28633 gl_LIBOBJS="$gl_LIBOBJS timegm.$ac_objext"
28650 printf "%s\n" "#define GNULIB_TEST_TIMEGM 1" >>confdefs.h
28660 if test $ac_cv_func_tzset = no; then
28664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether tzset clobbers localtime buffer" >&5
28665 printf %s "checking whether tzset clobbers localtime buffer... " >&6; }
28666 if test ${gl_cv_func_tzset_clobber+y}
28668 printf %s "(cached) " >&6
28670 if test "$cross_compiling" = yes
28673 # Guess all is fine on glibc systems.
28674 *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
28675 # Guess no on native Windows.
28676 mingw*) gl_cv_func_tzset_clobber="guessing no" ;;
28677 # If we don't know, assume the worst.
28678 *) gl_cv_func_tzset_clobber="guessing yes" ;;
28682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28683 /* end confdefs.h. */
28686 #include <stdlib.h>
28691 time_t t1 = 853958121;
28693 putenv ("TZ=GMT0");
28694 p = localtime (&t1);
28696 putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00");
28698 return (p->tm_year != s.tm_year
28699 || p->tm_mon != s.tm_mon
28700 || p->tm_mday != s.tm_mday
28701 || p->tm_hour != s.tm_hour
28702 || p->tm_min != s.tm_min
28703 || p->tm_sec != s.tm_sec);
28707 if ac_fn_c_try_run "$LINENO"
28709 gl_cv_func_tzset_clobber=no
28711 gl_cv_func_tzset_clobber=yes
28713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28714 conftest.$ac_objext conftest.beam conftest.$ac_ext
28719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_tzset_clobber" >&5
28720 printf "%s\n" "$gl_cv_func_tzset_clobber" >&6; }
28723 printf "%s\n" "#define HAVE_RUN_TZSET_TEST 1" >>confdefs.h
28727 case "$gl_cv_func_tzset_clobber" in
28731 printf "%s\n" "#define TZSET_CLOBBERS_LOCALTIME 1" >>confdefs.h
28736 NEED_LOCALTIME_BUFFER=1
28738 REPLACE_LOCALTIME=1
28743 mingw*) REPLACE_TZSET=1 ;;
28746 if test $HAVE_TZSET = 0 || test $REPLACE_TZSET = 1; then
28755 gl_LIBOBJS="$gl_LIBOBJS tzset.$ac_objext"
28769 printf "%s\n" "#define GNULIB_TEST_TZSET 1" >>confdefs.h
28785 if test $gl_cv_have_include_next = yes; then
28786 gl_cv_next_unistd_h='<'unistd.h'>'
28788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
28789 printf %s "checking absolute name of <unistd.h>... " >&6; }
28790 if test ${gl_cv_next_unistd_h+y}
28792 printf %s "(cached) " >&6
28795 if test $ac_cv_header_unistd_h = yes; then
28800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28801 /* end confdefs.h. */
28802 #include <unistd.h>
28805 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28806 *) gl_absname_cpp="$ac_cpp" ;;
28811 gl_dirsep_regex='[/\\]'
28814 gl_dirsep_regex='\/'
28817 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28818 gl_header_literal_regex=`echo 'unistd.h' \
28819 | sed -e "$gl_make_literal_regex_sed"`
28820 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28821 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28827 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28828 sed -n "$gl_absolute_header_sed"`
28830 gl_header=$gl_cv_absolute_unistd_h
28831 gl_cv_next_unistd_h='"'$gl_header'"'
28833 gl_cv_next_unistd_h='<'unistd.h'>'
28838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
28839 printf "%s\n" "$gl_cv_next_unistd_h" >&6; }
28841 NEXT_UNISTD_H=$gl_cv_next_unistd_h
28843 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28844 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28845 gl_next_as_first_directive='<'unistd.h'>'
28847 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28848 gl_next_as_first_directive=$gl_cv_next_unistd_h
28850 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
28855 if test $ac_cv_header_unistd_h = yes; then
28872 if { test "$HAVE_LIBUNISTRING" != yes \
28877 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28878 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28879 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28880 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28881 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28891 LIBUNISTRING_UNISTR_H='unistr.h'
28893 LIBUNISTRING_UNISTR_H=
28899 printf "%s\n" "#define GNULIB_UNISTR_U8_MBTOUCR 1" >>confdefs.h
28904 if { test "$HAVE_LIBUNISTRING" != yes \
28909 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28910 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28911 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28912 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28913 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
28923 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE=
28924 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE='#'
28926 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE='#'
28927 LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE=
28933 printf "%s\n" "#define GNULIB_UNISTR_U8_UCTOMB 1" >>confdefs.h
28938 if { test "$HAVE_LIBUNISTRING" != yes \
28943 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28944 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28945 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28946 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28947 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
28957 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE=
28958 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE='#'
28960 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE='#'
28961 LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE=
28967 if { test "$HAVE_LIBUNISTRING" != yes \
28972 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
28973 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
28974 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
28975 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
28976 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
28986 LIBUNISTRING_UNITYPES_H='unitypes.h'
28988 LIBUNISTRING_UNITYPES_H=
28994 if { test "$HAVE_LIBUNISTRING" != yes \
28999 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
29000 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
29001 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
29002 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
29003 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
29013 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
29015 LIBUNISTRING_UNIWIDTH_H=
29021 if { test "$HAVE_LIBUNISTRING" != yes \
29026 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
29027 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
29028 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
29029 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
29030 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 8
29040 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
29041 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
29043 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
29044 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
29050 printf "%s\n" "#define USE_UNLOCKED_IO 1" >>confdefs.h
29072 if test $ac_cv_have_decl_unsetenv = no; then
29073 HAVE_DECL_UNSETENV=0
29075 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
29076 if test "x$ac_cv_func_unsetenv" = xyes
29078 printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h
29082 if test $ac_cv_func_unsetenv = no; then
29086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
29087 printf %s "checking for unsetenv() return type... " >&6; }
29088 if test ${gt_cv_func_unsetenv_ret+y}
29090 printf %s "(cached) " >&6
29092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29093 /* end confdefs.h. */
29096 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
29097 #include <stdlib.h>
29102 int unsetenv (const char *name);
29112 if ac_fn_c_try_compile "$LINENO"
29114 gt_cv_func_unsetenv_ret='int'
29116 gt_cv_func_unsetenv_ret='void'
29118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
29121 printf "%s\n" "$gt_cv_func_unsetenv_ret" >&6; }
29122 if test $gt_cv_func_unsetenv_ret = 'void'; then
29124 printf "%s\n" "#define VOID_UNSETENV 1" >>confdefs.h
29129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
29130 printf %s "checking whether unsetenv obeys POSIX... " >&6; }
29131 if test ${gl_cv_func_unsetenv_works+y}
29133 printf %s "(cached) " >&6
29135 if test "$cross_compiling" = yes
29138 # Guess yes on glibc systems.
29139 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
29140 # If we don't know, assume the worst.
29141 *) gl_cv_func_unsetenv_works="guessing no" ;;
29145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29146 /* end confdefs.h. */
29148 #include <stdlib.h>
29150 extern char **environ;
29156 char entry1[] = "a=1";
29157 char entry2[] = "b=2";
29158 char *env[] = { entry1, entry2, NULL };
29159 if (putenv ((char *) "a=1")) return 1;
29160 if (putenv (entry2)) return 2;
29163 if (getenv ("a")) return 3;
29164 if (!unsetenv ("") || errno != EINVAL) return 4;
29167 if (!getenv ("a")) return 5;
29170 if (getenv ("a")) return 6;
29176 if ac_fn_c_try_run "$LINENO"
29178 gl_cv_func_unsetenv_works=yes
29180 gl_cv_func_unsetenv_works=no
29182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29183 conftest.$ac_objext conftest.beam conftest.$ac_ext
29187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
29188 printf "%s\n" "$gl_cv_func_unsetenv_works" >&6; }
29189 case "$gl_cv_func_unsetenv_works" in
29197 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
29206 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
29224 printf "%s\n" "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
29229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
29230 printf %s "checking for variable-length arrays... " >&6; }
29231 if test ${ac_cv_c_vararrays+y}
29233 printf %s "(cached) " >&6
29235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29236 /* end confdefs.h. */
29237 #ifdef __STDC_NO_VLA__
29242 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29243 $EGREP "defined" >/dev/null 2>&1
29245 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
29247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29248 /* end confdefs.h. */
29249 /* Test for VLA support. This test is partly inspired
29250 from examples in the C standard. Use at least two VLA
29251 functions to detect the GCC 3.4.3 bug described in:
29252 https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
29254 #ifdef __STDC_NO_VLA__
29259 int fvla (int m, int C[m][m]);
29262 simple (int count, int all[static count])
29264 return all[count - 1];
29268 fvla (int m, int C[m][m])
29270 typedef int VLA[m][m];
29273 static int (*q)[m] = &B;
29275 return C && &x[0][0] == &D[0] && &D[0] == s[0];
29287 if ac_fn_c_try_compile "$LINENO"
29289 ac_cv_c_vararrays=yes
29291 ac_cv_c_vararrays=no
29293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
29299 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
29300 if test "$ac_cv_c_vararrays" = yes; then
29302 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
29304 elif test "$ac_cv_c_vararrays" = no; then
29306 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
29312 if test $ac_cv_func_vasnprintf = no; then
29323 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
29333 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
29343 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
29353 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
29355 if test $ac_cv_func_vasnprintf = yes; then
29357 printf "%s\n" "#define REPLACE_VASNPRINTF 1" >>confdefs.h
29371 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
29372 if test "x$ac_cv_type_ptrdiff_t" = xyes
29377 printf "%s\n" "#define ptrdiff_t long" >>confdefs.h
29391 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
29392 if test "x$ac_cv_func_vasprintf" = xyes
29394 printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h
29398 if test $ac_cv_func_vasprintf = no; then
29408 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
29418 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
29421 if test $ac_cv_func_vasprintf = yes; then
29422 REPLACE_VASPRINTF=1
29447 printf "%s\n" "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
29453 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
29457 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
29460 # Check whether --with-packager was given.
29461 if test ${with_packager+y}
29463 withval=$with_packager; case $withval in
29466 printf "%s\n" "#define PACKAGE_PACKAGER \"$withval\"" >>confdefs.h
29474 # Check whether --with-packager-version was given.
29475 if test ${with_packager_version+y}
29477 withval=$with_packager_version; case $withval in
29480 printf "%s\n" "#define PACKAGE_PACKAGER_VERSION \"$withval\"" >>confdefs.h
29488 # Check whether --with-packager-bug-reports was given.
29489 if test ${with_packager_bug_reports+y}
29491 withval=$with_packager_bug_reports; case $withval in
29494 printf "%s\n" "#define PACKAGE_PACKAGER_BUG_REPORTS \"$withval\"" >>confdefs.h
29501 if test "X$with_packager" = "X" && \
29502 test "X$with_packager_version$with_packager_bug_reports" != "X"
29504 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
29519 if test $gl_cv_have_include_next = yes; then
29520 gl_cv_next_wchar_h='<'wchar.h'>'
29522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
29523 printf %s "checking absolute name of <wchar.h>... " >&6; }
29524 if test ${gl_cv_next_wchar_h+y}
29526 printf %s "(cached) " >&6
29529 if test $ac_cv_header_wchar_h = yes; then
29534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535 /* end confdefs.h. */
29539 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29540 *) gl_absname_cpp="$ac_cpp" ;;
29545 gl_dirsep_regex='[/\\]'
29548 gl_dirsep_regex='\/'
29551 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29552 gl_header_literal_regex=`echo 'wchar.h' \
29553 | sed -e "$gl_make_literal_regex_sed"`
29554 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29555 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29561 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29562 sed -n "$gl_absolute_header_sed"`
29564 gl_header=$gl_cv_absolute_wchar_h
29565 gl_cv_next_wchar_h='"'$gl_header'"'
29567 gl_cv_next_wchar_h='<'wchar.h'>'
29572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
29573 printf "%s\n" "$gl_cv_next_wchar_h" >&6; }
29575 NEXT_WCHAR_H=$gl_cv_next_wchar_h
29577 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29579 gl_next_as_first_directive='<'wchar.h'>'
29581 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29582 gl_next_as_first_directive=$gl_cv_next_wchar_h
29584 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
29589 if test $ac_cv_header_wchar_h = yes; then
29599 if test $gt_cv_c_wint_t = yes; then
29622 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29627 printf %s "checking whether mbrtowc handles incomplete characters... " >&6; }
29628 if test ${gl_cv_func_mbrtowc_incomplete_state+y}
29630 printf %s "(cached) " >&6
29634 # Guess no on AIX and OSF/1.
29635 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29636 # Guess yes otherwise.
29637 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29639 if test $LOCALE_JA != none; then
29640 if test "$cross_compiling" = yes
29644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29645 /* end confdefs.h. */
29647 #include <locale.h>
29648 #include <string.h>
29649 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29651 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29652 included before <wchar.h>. */
29653 #include <stddef.h>
29659 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29661 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29665 memset (&state, '\0', sizeof (mbstate_t));
29666 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29667 if (mbsinit (&state))
29673 if ac_fn_c_try_run "$LINENO"
29675 gl_cv_func_mbrtowc_incomplete_state=yes
29677 gl_cv_func_mbrtowc_incomplete_state=no
29679 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29680 conftest.$ac_objext conftest.beam conftest.$ac_ext
29686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29687 printf "%s\n" "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29693 printf %s "checking whether mbrtowc works as well as mbtowc... " >&6; }
29694 if test ${gl_cv_func_mbrtowc_sanitycheck+y}
29696 printf %s "(cached) " >&6
29700 # Guess no on Solaris 8.
29701 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29702 # Guess yes otherwise.
29703 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29705 if test $LOCALE_ZH_CN != none; then
29706 if test "$cross_compiling" = yes
29710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29711 /* end confdefs.h. */
29713 #include <locale.h>
29714 #include <stdlib.h>
29715 #include <string.h>
29716 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29718 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29719 included before <wchar.h>. */
29720 #include <stddef.h>
29726 /* This fails on Solaris 8:
29727 mbrtowc returns 2, and sets wc to 0x00F0.
29728 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29729 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29731 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29735 memset (&state, '\0', sizeof (mbstate_t));
29736 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29737 && mbtowc (&wc, input + 3, 6) == 4)
29743 if ac_fn_c_try_run "$LINENO"
29745 gl_cv_func_mbrtowc_sanitycheck=yes
29747 gl_cv_func_mbrtowc_sanitycheck=no
29749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29750 conftest.$ac_objext conftest.beam conftest.$ac_ext
29756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29757 printf "%s\n" "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29759 REPLACE_MBSTATE_T=0
29760 case "$gl_cv_func_mbrtowc_incomplete_state" in
29762 *) REPLACE_MBSTATE_T=1 ;;
29764 case "$gl_cv_func_mbrtowc_sanitycheck" in
29766 *) REPLACE_MBSTATE_T=1 ;;
29769 REPLACE_MBSTATE_T=1
29774 if test $ac_cv_func_wcrtomb = no; then
29776 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
29777 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29779 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29780 included before <wchar.h>. */
29781 #include <stddef.h>
29787 if test "x$ac_cv_have_decl_wcrtomb" = xyes
29794 printf "%s\n" "#define HAVE_DECL_WCRTOMB $ac_have_decl" >>confdefs.h
29796 if test $ac_cv_have_decl_wcrtomb = yes; then
29800 if test $REPLACE_MBSTATE_T = 1; then
29808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
29809 printf %s "checking whether wcrtomb return value is correct... " >&6; }
29810 if test ${gl_cv_func_wcrtomb_retval+y}
29812 printf %s "(cached) " >&6
29816 # Guess no on AIX 4, OSF/1 and Solaris.
29817 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
29818 # Guess yes on native Windows.
29819 mingw*) gl_cv_func_wcrtomb_retval="guessing yes" ;;
29820 # Guess yes otherwise.
29821 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
29823 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
29824 if test "$cross_compiling" = yes
29828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29829 /* end confdefs.h. */
29831 #include <locale.h>
29832 #include <string.h>
29833 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29835 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29836 included before <wchar.h>. */
29837 #include <stddef.h>
29844 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
29846 if (wcrtomb (NULL, 0, NULL) != 1)
29849 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29851 if (wcrtomb (NULL, 0, NULL) != 1)
29854 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29856 if (wcrtomb (NULL, 0, NULL) != 1)
29859 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29861 if (wcrtomb (NULL, 0, NULL) != 1)
29867 if ac_fn_c_try_run "$LINENO"
29869 gl_cv_func_wcrtomb_retval=yes
29871 gl_cv_func_wcrtomb_retval=no
29873 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29874 conftest.$ac_objext conftest.beam conftest.$ac_ext
29880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
29881 printf "%s\n" "$gl_cv_func_wcrtomb_retval" >&6; }
29882 case "$gl_cv_func_wcrtomb_retval" in
29884 *) REPLACE_WCRTOMB=1 ;;
29889 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
29898 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
29915 printf "%s\n" "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
29924 if test $ac_cv_func_iswcntrl = yes; then
29932 if test $gt_cv_c_wint_t = yes; then
29950 if test $gl_cv_have_include_next = yes; then
29951 gl_cv_next_wctype_h='<'wctype.h'>'
29953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
29954 printf %s "checking absolute name of <wctype.h>... " >&6; }
29955 if test ${gl_cv_next_wctype_h+y}
29957 printf %s "(cached) " >&6
29960 if test $ac_cv_header_wctype_h = yes; then
29965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966 /* end confdefs.h. */
29967 #include <wctype.h>
29970 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29971 *) gl_absname_cpp="$ac_cpp" ;;
29976 gl_dirsep_regex='[/\\]'
29979 gl_dirsep_regex='\/'
29982 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29983 gl_header_literal_regex=`echo 'wctype.h' \
29984 | sed -e "$gl_make_literal_regex_sed"`
29985 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29986 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29992 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29993 sed -n "$gl_absolute_header_sed"`
29995 gl_header=$gl_cv_absolute_wctype_h
29996 gl_cv_next_wctype_h='"'$gl_header'"'
29998 gl_cv_next_wctype_h='<'wctype.h'>'
30003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
30004 printf "%s\n" "$gl_cv_next_wctype_h" >&6; }
30006 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
30008 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30009 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30010 gl_next_as_first_directive='<'wctype.h'>'
30012 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30013 gl_next_as_first_directive=$gl_cv_next_wctype_h
30015 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
30020 if test $ac_cv_header_wctype_h = yes; then
30021 if test $ac_cv_func_iswcntrl = yes; then
30022 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
30023 printf %s "checking whether iswcntrl works... " >&6; }
30024 if test ${gl_cv_func_iswcntrl_works+y}
30026 printf %s "(cached) " >&6
30029 if test "$cross_compiling" = yes
30031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30032 /* end confdefs.h. */
30033 #include <stdlib.h>
30034 #if __GNU_LIBRARY__ == 1
30035 Linux libc5 i18n is broken.
30045 if ac_fn_c_try_compile "$LINENO"
30047 gl_cv_func_iswcntrl_works="guessing yes"
30049 gl_cv_func_iswcntrl_works="guessing no"
30051 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30055 /* end confdefs.h. */
30057 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30058 included before <wchar.h>.
30059 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30060 must be included before <wchar.h>. */
30061 #include <stddef.h>
30065 #include <wctype.h>
30066 int main () { return iswprint ('x') == 0; }
30069 if ac_fn_c_try_run "$LINENO"
30071 gl_cv_func_iswcntrl_works=yes
30073 gl_cv_func_iswcntrl_works=no
30075 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30076 conftest.$ac_objext conftest.beam conftest.$ac_ext
30081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
30082 printf "%s\n" "$gl_cv_func_iswcntrl_works" >&6; }
30090 case "$gl_cv_func_iswcntrl_works" in
30091 *yes) REPLACE_ISWCNTRL=0 ;;
30092 *) REPLACE_ISWCNTRL=1 ;;
30096 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
30100 if test $REPLACE_ISWCNTRL = 1; then
30103 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
30104 if test "x$ac_cv_func_towlower" = xyes
30106 printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h
30110 if test $ac_cv_func_towlower = yes; then
30113 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30114 included before <wchar.h>.
30115 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30116 must be included before <wchar.h>. */
30117 #include <stddef.h>
30122 # include <wctype.h>
30126 if test "x$ac_cv_have_decl_towlower" = xyes
30133 printf "%s\n" "#define HAVE_DECL_TOWLOWER $ac_have_decl" >>confdefs.h
30135 if test $ac_cv_have_decl_towlower = yes; then
30144 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
30148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
30149 printf %s "checking for wctype_t... " >&6; }
30150 if test ${gl_cv_type_wctype_t+y}
30152 printf %s "(cached) " >&6
30154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30155 /* end confdefs.h. */
30156 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30157 included before <wchar.h>.
30158 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30159 must be included before <wchar.h>. */
30160 #include <stddef.h>
30165 # include <wctype.h>
30177 if ac_fn_c_try_compile "$LINENO"
30179 gl_cv_type_wctype_t=yes
30181 gl_cv_type_wctype_t=no
30183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30186 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
30187 printf "%s\n" "$gl_cv_type_wctype_t" >&6; }
30188 if test $gl_cv_type_wctype_t = no; then
30192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
30193 printf %s "checking for wctrans_t... " >&6; }
30194 if test ${gl_cv_type_wctrans_t+y}
30196 printf %s "(cached) " >&6
30198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30199 /* end confdefs.h. */
30200 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
30201 included before <wchar.h>.
30202 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
30203 must be included before <wchar.h>. */
30204 #include <stddef.h>
30208 #include <wctype.h>
30219 if ac_fn_c_try_compile "$LINENO"
30221 gl_cv_type_wctrans_t=yes
30223 gl_cv_type_wctrans_t=no
30225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30229 printf "%s\n" "$gl_cv_type_wctrans_t" >&6; }
30230 if test $gl_cv_type_wctrans_t = no; then
30249 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
30250 /* AIX 3.2.5 declares wcwidth in <string.h>. */
30251 #include <string.h>
30252 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30254 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
30255 before <wchar.h>. */
30256 #include <stddef.h>
30262 if test "x$ac_cv_have_decl_wcwidth" = xyes
30269 printf "%s\n" "#define HAVE_DECL_WCWIDTH $ac_have_decl" >>confdefs.h
30271 if test $ac_cv_have_decl_wcwidth != yes; then
30272 HAVE_DECL_WCWIDTH=0
30275 if test $ac_cv_func_wcwidth != yes; then
30276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth is a macro" >&5
30277 printf %s "checking whether wcwidth is a macro... " >&6; }
30278 if test ${gl_cv_func_wcwidth_macro+y}
30280 printf %s "(cached) " >&6
30282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30283 /* end confdefs.h. */
30287 wchar_header_defines_wcwidth
30290 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30291 $EGREP "wchar_header_defines_wcwidth" >/dev/null 2>&1
30293 gl_cv_func_wcwidth_macro=yes
30295 gl_cv_func_wcwidth_macro=no
30301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_macro" >&5
30302 printf "%s\n" "$gl_cv_func_wcwidth_macro" >&6; }
30305 if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
30307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
30308 printf %s "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
30309 if test ${gl_cv_func_wcwidth_works+y}
30311 printf %s "(cached) " >&6
30314 if test "$cross_compiling" = yes
30318 # Guess yes on glibc and AIX 7 systems.
30319 *-gnu* | gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
30320 *) gl_cv_func_wcwidth_works="guessing no";;
30324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30325 /* end confdefs.h. */
30327 #include <locale.h>
30328 /* AIX 3.2.5 declares wcwidth in <string.h>. */
30329 #include <string.h>
30330 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30332 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
30333 before <wchar.h>. */
30334 #include <stddef.h>
30338 #if !HAVE_DECL_WCWIDTH
30340 # ifdef __cplusplus
30348 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
30350 if (wcwidth (0x0301) > 0)
30352 if (wcwidth (0x05B0) > 0)
30354 if (wcwidth (0x200B) > 0)
30356 if (wcwidth (0xFF1A) == 0)
30362 if ac_fn_c_try_run "$LINENO"
30364 gl_cv_func_wcwidth_works=yes
30366 gl_cv_func_wcwidth_works=no
30368 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30369 conftest.$ac_objext conftest.beam conftest.$ac_ext
30374 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
30375 printf "%s\n" "$gl_cv_func_wcwidth_works" >&6; }
30376 case "$gl_cv_func_wcwidth_works" in
30378 *no) REPLACE_WCWIDTH=1 ;;
30384 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
30393 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
30411 printf "%s\n" "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
30418 ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
30419 if test "x$ac_cv_header_stdint_h" = xyes
30421 printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
30437 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
30439 # End of code from modules
30460 gl_source_base='gnulib-tests'
30461 gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
30463 gl_module_indicator_condition=$gltests_WITNESS
30466 if test "$ac_cv_header_winsock2_h" = yes; then
30475 gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
30483 if test "$GNULIB_ACCEPT" != 1; then
30484 if test "$GNULIB_ACCEPT" = 0; then
30485 GNULIB_ACCEPT=$gl_module_indicator_condition
30487 GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
30495 printf "%s\n" "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
30503 if test $ac_cv_header_arpa_inet_h = yes; then
30518 if test $gl_cv_have_include_next = yes; then
30519 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
30521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
30522 printf %s "checking absolute name of <arpa/inet.h>... " >&6; }
30523 if test ${gl_cv_next_arpa_inet_h+y}
30525 printf %s "(cached) " >&6
30528 if test $ac_cv_header_arpa_inet_h = yes; then
30533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30534 /* end confdefs.h. */
30535 #include <arpa/inet.h>
30538 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30539 *) gl_absname_cpp="$ac_cpp" ;;
30544 gl_dirsep_regex='[/\\]'
30547 gl_dirsep_regex='\/'
30550 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30551 gl_header_literal_regex=`echo 'arpa/inet.h' \
30552 | sed -e "$gl_make_literal_regex_sed"`
30553 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30554 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30560 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30561 sed -n "$gl_absolute_header_sed"`
30563 gl_header=$gl_cv_absolute_arpa_inet_h
30564 gl_cv_next_arpa_inet_h='"'$gl_header'"'
30566 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
30571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
30572 printf "%s\n" "$gl_cv_next_arpa_inet_h" >&6; }
30574 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
30576 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30578 gl_next_as_first_directive='<'arpa/inet.h'>'
30580 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30581 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
30583 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
30597 if test "$ac_cv_header_winsock2_h" = yes; then
30606 gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
30614 if test "$GNULIB_BIND" != 1; then
30615 if test "$GNULIB_BIND" = 0; then
30616 GNULIB_BIND=$gl_module_indicator_condition
30618 GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
30626 printf "%s\n" "#define GNULIB_TEST_BIND 1" >>confdefs.h
30633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
30634 printf %s "checking for a traditional french locale... " >&6; }
30635 if test ${gt_cv_locale_fr+y}
30637 printf %s "(cached) " >&6
30640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30641 /* end confdefs.h. */
30643 #include <locale.h>
30645 #if HAVE_LANGINFO_CODESET
30646 # include <langinfo.h>
30648 #include <stdlib.h>
30649 #include <string.h>
30653 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
30654 imitates locale dependent behaviour by looking at the environment
30655 variables, and all locales use the UTF-8 encoding. */
30656 #if defined __BEOS__ || defined __HAIKU__
30659 /* Check whether the given locale name is recognized by the system. */
30660 # if defined _WIN32 && !defined __CYGWIN__
30661 /* On native Windows, setlocale(category, "") looks at the system settings,
30662 not at the environment variables. Also, when an encoding suffix such
30663 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30664 category of the locale to "C". */
30665 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30666 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30669 if (setlocale (LC_ALL, "") == NULL) return 1;
30671 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30672 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30673 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30674 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30675 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30676 some unit tests fail.
30677 On MirBSD 10, when an unsupported locale is specified, setlocale()
30678 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
30679 # if HAVE_LANGINFO_CODESET
30681 const char *cs = nl_langinfo (CODESET);
30682 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
30683 || strcmp (cs, "UTF-8") == 0)
30688 /* On Cygwin, avoid locale names without encoding suffix, because the
30689 locale_charset() function relies on the encoding suffix. Note that
30690 LC_ALL is set on the command line. */
30691 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30693 /* Check whether in the abbreviation of the second month, the second
30694 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
30695 one byte long. This excludes the UTF-8 encoding. */
30696 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30697 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
30698 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
30699 /* Check whether the decimal separator is a comma.
30700 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30701 are nl_langinfo(RADIXCHAR) are both ".". */
30702 if (localeconv () ->decimal_point[0] != ',') return 1;
30709 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30710 (eval $ac_link) 2>&5
30712 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30713 test $ac_status = 0; } && test -s conftest$ac_exeext; then
30715 # Handle native Windows specially, because there setlocale() interprets
30716 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30717 # "fr" or "fra" as "French" or "French_France.1252",
30718 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30719 # "ja" as "Japanese" or "Japanese_Japan.932",
30722 # Test for the native Windows locale name.
30723 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30724 gt_cv_locale_fr=French_France.1252
30727 gt_cv_locale_fr=none
30731 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30732 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30733 # configure script would override the LC_ALL setting. Likewise for
30734 # LC_CTYPE, which is also set at the beginning of the configure script.
30735 # Test for the usual locale name.
30736 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30737 gt_cv_locale_fr=fr_FR
30739 # Test for the locale name with explicit encoding suffix.
30740 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30741 gt_cv_locale_fr=fr_FR.ISO-8859-1
30743 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
30744 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30745 gt_cv_locale_fr=fr_FR.ISO8859-1
30747 # Test for the HP-UX locale name.
30748 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30749 gt_cv_locale_fr=fr_FR.iso88591
30751 # Test for the Solaris 7 locale name.
30752 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30756 gt_cv_locale_fr=none
30768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
30769 printf "%s\n" "$gt_cv_locale_fr" >&6; }
30770 LOCALE_FR=$gt_cv_locale_fr
30775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
30776 printf %s "checking for a french Unicode locale... " >&6; }
30777 if test ${gt_cv_locale_fr_utf8+y}
30779 printf %s "(cached) " >&6
30782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30783 /* end confdefs.h. */
30785 #include <locale.h>
30787 #if HAVE_LANGINFO_CODESET
30788 # include <langinfo.h>
30790 #include <stdlib.h>
30791 #include <string.h>
30795 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
30796 imitates locale dependent behaviour by looking at the environment
30797 variables, and all locales use the UTF-8 encoding. */
30798 #if !(defined __BEOS__ || defined __HAIKU__)
30799 /* Check whether the given locale name is recognized by the system. */
30800 # if defined _WIN32 && !defined __CYGWIN__
30801 /* On native Windows, setlocale(category, "") looks at the system settings,
30802 not at the environment variables. Also, when an encoding suffix such
30803 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30804 category of the locale to "C". */
30805 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30806 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30809 if (setlocale (LC_ALL, "") == NULL) return 1;
30811 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30812 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30813 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30814 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30815 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30816 some unit tests fail. */
30817 # if HAVE_LANGINFO_CODESET
30819 const char *cs = nl_langinfo (CODESET);
30820 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
30825 /* On Cygwin, avoid locale names without encoding suffix, because the
30826 locale_charset() function relies on the encoding suffix. Note that
30827 LC_ALL is set on the command line. */
30828 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30830 /* Check whether in the abbreviation of the second month, the second
30831 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
30832 two bytes long, with UTF-8 encoding. */
30833 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30834 if (strftime (buf, sizeof (buf), "%b", &t) < 4
30835 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
30838 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
30839 /* Check whether the decimal separator is a comma.
30840 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30841 are nl_langinfo(RADIXCHAR) are both ".". */
30842 if (localeconv () ->decimal_point[0] != ',') return 1;
30848 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30849 (eval $ac_link) 2>&5
30851 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30852 test $ac_status = 0; } && test -s conftest$ac_exeext; then
30854 # Handle native Windows specially, because there setlocale() interprets
30855 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30856 # "fr" or "fra" as "French" or "French_France.1252",
30857 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30858 # "ja" as "Japanese" or "Japanese_Japan.932",
30861 # Test for the hypothetical native Windows locale name.
30862 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30863 gt_cv_locale_fr_utf8=French_France.65001
30866 gt_cv_locale_fr_utf8=none
30870 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
30871 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
30872 # configure script would override the LC_ALL setting. Likewise for
30873 # LC_CTYPE, which is also set at the beginning of the configure script.
30874 # Test for the usual locale name.
30875 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30876 gt_cv_locale_fr_utf8=fr_FR
30878 # Test for the locale name with explicit encoding suffix.
30879 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30880 gt_cv_locale_fr_utf8=fr_FR.UTF-8
30882 # Test for the Solaris 7 locale name.
30883 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30884 gt_cv_locale_fr_utf8=fr.UTF-8
30887 gt_cv_locale_fr_utf8=none
30897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
30898 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
30899 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
30905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
30906 printf %s "checking for a traditional french locale... " >&6; }
30907 if test ${gt_cv_locale_fr+y}
30909 printf %s "(cached) " >&6
30912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30913 /* end confdefs.h. */
30915 #include <locale.h>
30917 #if HAVE_LANGINFO_CODESET
30918 # include <langinfo.h>
30920 #include <stdlib.h>
30921 #include <string.h>
30925 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
30926 imitates locale dependent behaviour by looking at the environment
30927 variables, and all locales use the UTF-8 encoding. */
30928 #if defined __BEOS__ || defined __HAIKU__
30931 /* Check whether the given locale name is recognized by the system. */
30932 # if defined _WIN32 && !defined __CYGWIN__
30933 /* On native Windows, setlocale(category, "") looks at the system settings,
30934 not at the environment variables. Also, when an encoding suffix such
30935 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
30936 category of the locale to "C". */
30937 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
30938 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
30941 if (setlocale (LC_ALL, "") == NULL) return 1;
30943 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
30944 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
30945 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
30946 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
30947 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
30948 some unit tests fail.
30949 On MirBSD 10, when an unsupported locale is specified, setlocale()
30950 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
30951 # if HAVE_LANGINFO_CODESET
30953 const char *cs = nl_langinfo (CODESET);
30954 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
30955 || strcmp (cs, "UTF-8") == 0)
30960 /* On Cygwin, avoid locale names without encoding suffix, because the
30961 locale_charset() function relies on the encoding suffix. Note that
30962 LC_ALL is set on the command line. */
30963 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
30965 /* Check whether in the abbreviation of the second month, the second
30966 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
30967 one byte long. This excludes the UTF-8 encoding. */
30968 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
30969 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
30970 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
30971 /* Check whether the decimal separator is a comma.
30972 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
30973 are nl_langinfo(RADIXCHAR) are both ".". */
30974 if (localeconv () ->decimal_point[0] != ',') return 1;
30981 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
30982 (eval $ac_link) 2>&5
30984 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30985 test $ac_status = 0; } && test -s conftest$ac_exeext; then
30987 # Handle native Windows specially, because there setlocale() interprets
30988 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
30989 # "fr" or "fra" as "French" or "French_France.1252",
30990 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
30991 # "ja" as "Japanese" or "Japanese_Japan.932",
30994 # Test for the native Windows locale name.
30995 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
30996 gt_cv_locale_fr=French_France.1252
30999 gt_cv_locale_fr=none
31003 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31004 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31005 # configure script would override the LC_ALL setting. Likewise for
31006 # LC_CTYPE, which is also set at the beginning of the configure script.
31007 # Test for the usual locale name.
31008 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31009 gt_cv_locale_fr=fr_FR
31011 # Test for the locale name with explicit encoding suffix.
31012 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31013 gt_cv_locale_fr=fr_FR.ISO-8859-1
31015 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
31016 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31017 gt_cv_locale_fr=fr_FR.ISO8859-1
31019 # Test for the HP-UX locale name.
31020 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31021 gt_cv_locale_fr=fr_FR.iso88591
31023 # Test for the Solaris 7 locale name.
31024 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31028 gt_cv_locale_fr=none
31040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
31041 printf "%s\n" "$gt_cv_locale_fr" >&6; }
31042 LOCALE_FR=$gt_cv_locale_fr
31048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
31049 printf %s "checking for a turkish Unicode locale... " >&6; }
31050 if test ${gt_cv_locale_tr_utf8+y}
31052 printf %s "(cached) " >&6
31055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31056 /* end confdefs.h. */
31058 #include <locale.h>
31060 #if HAVE_LANGINFO_CODESET
31061 # include <langinfo.h>
31063 #include <stdlib.h>
31064 #include <string.h>
31068 /* On BeOS, locales are not implemented in libc. Rather, libintl
31069 imitates locale dependent behaviour by looking at the environment
31070 variables, and all locales use the UTF-8 encoding. But BeOS does not
31071 implement the Turkish upper-/lowercase mappings. Therefore, let this
31072 program return 1 on BeOS. */
31073 /* Check whether the given locale name is recognized by the system. */
31074 #if defined _WIN32 && !defined __CYGWIN__
31075 /* On native Windows, setlocale(category, "") looks at the system settings,
31076 not at the environment variables. Also, when an encoding suffix such
31077 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
31078 category of the locale to "C". */
31079 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
31080 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
31083 if (setlocale (LC_ALL, "") == NULL) return 1;
31085 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
31086 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
31087 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
31088 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
31089 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
31090 some unit tests fail. */
31091 #if HAVE_LANGINFO_CODESET
31093 const char *cs = nl_langinfo (CODESET);
31094 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
31099 /* On Cygwin, avoid locale names without encoding suffix, because the
31100 locale_charset() function relies on the encoding suffix. Note that
31101 LC_ALL is set on the command line. */
31102 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
31104 /* Check whether in the abbreviation of the eighth month, the second
31105 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
31106 two bytes long, with UTF-8 encoding. */
31107 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
31108 if (strftime (buf, sizeof (buf), "%b", &t) < 4
31109 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
31111 /* Check whether the upper-/lowercase mappings are as expected for
31113 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
31114 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
31120 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
31121 (eval $ac_link) 2>&5
31123 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31124 test $ac_status = 0; } && test -s conftest$ac_exeext; then
31126 # Handle native Windows specially, because there setlocale() interprets
31127 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
31128 # "fr" or "fra" as "French" or "French_France.1252",
31129 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
31130 # "ja" as "Japanese" or "Japanese_Japan.932",
31133 # Test for the hypothetical native Windows locale name.
31134 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31135 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
31138 gt_cv_locale_tr_utf8=none
31142 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
31143 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
31144 # configure script would override the LC_ALL setting. Likewise for
31145 # LC_CTYPE, which is also set at the beginning of the configure script.
31146 # Test for the usual locale name.
31147 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31148 gt_cv_locale_tr_utf8=tr_TR
31150 # Test for the locale name with explicit encoding suffix.
31151 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31152 gt_cv_locale_tr_utf8=tr_TR.UTF-8
31154 # Test for the Solaris 7 locale name.
31155 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
31156 gt_cv_locale_tr_utf8=tr.UTF-8
31159 gt_cv_locale_tr_utf8=none
31166 gt_cv_locale_tr_utf8=none
31171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
31172 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
31173 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
31177 if test "$ac_cv_header_winsock2_h" = yes; then
31186 gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
31194 if test "$GNULIB_CONNECT" != 1; then
31195 if test "$GNULIB_CONNECT" = 0; then
31196 GNULIB_CONNECT=$gl_module_indicator_condition
31198 GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
31206 printf "%s\n" "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
31214 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31218 if test $REPLACE_FDOPEN = 0; then
31219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
31220 printf %s "checking whether fdopen sets errno... " >&6; }
31221 if test ${gl_cv_func_fdopen_works+y}
31223 printf %s "(cached) " >&6
31226 if test "$cross_compiling" = yes
31229 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
31230 *) gl_cv_func_fdopen_works="guessing yes" ;;
31234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31235 /* end confdefs.h. */
31244 fp = fdopen (-1, "r");
31245 if (fp == NULL && errno == 0)
31250 if ac_fn_c_try_run "$LINENO"
31252 gl_cv_func_fdopen_works=yes
31254 gl_cv_func_fdopen_works=no
31256 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31257 conftest.$ac_objext conftest.beam conftest.$ac_ext
31262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
31263 printf "%s\n" "$gl_cv_func_fdopen_works" >&6; }
31264 case "$gl_cv_func_fdopen_works" in
31265 *no) REPLACE_FDOPEN=1 ;;
31269 if test $REPLACE_FDOPEN = 1; then
31278 gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
31287 if test "$GNULIB_FDOPEN" != 1; then
31288 if test "$GNULIB_FDOPEN" = 0; then
31289 GNULIB_FDOPEN=$gl_module_indicator_condition
31291 GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
31299 printf "%s\n" "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
31306 if test $ac_cv_func_ftruncate = yes; then
31311 REPLACE_FTRUNCATE=1
31319 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
31328 gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
31331 ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
31332 if test "x$ac_cv_func_chsize" = xyes
31334 printf "%s\n" "#define HAVE_CHSIZE 1" >>confdefs.h
31345 if test "$GNULIB_FTRUNCATE" != 1; then
31346 if test "$GNULIB_FTRUNCATE" = 0; then
31347 GNULIB_FTRUNCATE=$gl_module_indicator_condition
31349 GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
31357 printf "%s\n" "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
31366 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
31373 if test $REPLACE_GETCWD = 1; then
31382 gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext"
31390 if test "$GNULIB_GETCWD" != 1; then
31391 if test "$GNULIB_GETCWD" = 0; then
31392 GNULIB_GETCWD=$gl_module_indicator_condition
31394 GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)"
31402 printf "%s\n" "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
31410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
31411 printf %s "checking for getpagesize... " >&6; }
31412 if test ${gl_cv_func_getpagesize+y}
31414 printf %s "(cached) " >&6
31416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31417 /* end confdefs.h. */
31418 #include <unistd.h>
31422 return getpagesize();
31428 if ac_fn_c_try_link "$LINENO"
31430 gl_cv_func_getpagesize=yes
31432 gl_cv_func_getpagesize=no
31434 rm -f core conftest.err conftest.$ac_objext \
31435 conftest$ac_exeext conftest.$ac_ext
31438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
31439 printf "%s\n" "$gl_cv_func_getpagesize" >&6; }
31441 if test $gl_cv_func_getpagesize = no; then
31443 ac_fn_c_check_header_compile "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
31444 if test "x$ac_cv_header_OS_h" = xyes
31446 printf "%s\n" "#define HAVE_OS_H 1" >>confdefs.h
31450 if test $ac_cv_header_OS_h = yes; then
31453 ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
31454 if test "x$ac_cv_header_sys_param_h" = xyes
31456 printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
31460 if test $ac_cv_header_sys_param_h = yes; then
31466 REPLACE_GETPAGESIZE=1
31469 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
31470 if test "x$ac_cv_have_decl_getpagesize" = xyes
31474 HAVE_DECL_GETPAGESIZE=0
31478 if test $REPLACE_GETPAGESIZE = 1; then
31487 gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
31495 if test "$GNULIB_GETPAGESIZE" != 1; then
31496 if test "$GNULIB_GETPAGESIZE" = 0; then
31497 GNULIB_GETPAGESIZE=$gl_module_indicator_condition
31499 GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
31507 printf "%s\n" "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
31524 if test $ac_cv_header_sys_socket_h != yes; then
31525 ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
31526 if test "x$ac_cv_header_winsock2_h" = xyes
31528 printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h
31533 if test "$ac_cv_header_winsock2_h" = yes; then
31535 UNISTD_H_HAVE_WINSOCK2_H=1
31536 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
31542 if test $HAVE_WINSOCK2_H = 1; then
31543 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
31545 if test "x$ac_cv_have_decl_inet_pton" = xyes
31552 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31554 if test $ac_cv_have_decl_inet_pton = yes; then
31555 REPLACE_INET_PTON=1
31556 INET_PTON_LIB="-lws2_32"
31558 HAVE_DECL_INET_PTON=0
31563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
31564 printf %s "checking for library containing inet_pton... " >&6; }
31565 if test ${ac_cv_search_inet_pton+y}
31567 printf %s "(cached) " >&6
31569 ac_func_search_save_LIBS=$LIBS
31570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31571 /* end confdefs.h. */
31573 /* Override any GCC internal prototype to avoid an error.
31574 Use char because int might match the return type of a GCC
31575 builtin and then its argument prototype would still apply. */
31583 return inet_pton ();
31588 for ac_lib in '' nsl resolv network
31590 if test -z "$ac_lib"; then
31591 ac_res="none required"
31594 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
31596 if ac_fn_c_try_link "$LINENO"
31598 ac_cv_search_inet_pton=$ac_res
31600 rm -f core conftest.err conftest.$ac_objext \
31602 if test ${ac_cv_search_inet_pton+y}
31607 if test ${ac_cv_search_inet_pton+y}
31611 ac_cv_search_inet_pton=no
31613 rm conftest.$ac_ext
31614 LIBS=$ac_func_search_save_LIBS
31616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
31617 printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
31618 ac_res=$ac_cv_search_inet_pton
31619 if test "$ac_res" != no
31621 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31624 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
31625 if test "x$ac_cv_func_inet_pton" = xyes
31627 printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h
31631 if test $ac_cv_func_inet_pton = no; then
31639 if test "$ac_cv_search_inet_pton" != "no" \
31640 && test "$ac_cv_search_inet_pton" != "none required"; then
31641 INET_PTON_LIB="$ac_cv_search_inet_pton"
31645 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
31647 # include <netdb.h>
31651 if test "x$ac_cv_have_decl_inet_pton" = xyes
31658 printf "%s\n" "#define HAVE_DECL_INET_PTON $ac_have_decl" >>confdefs.h
31660 if test $ac_cv_have_decl_inet_pton = no; then
31661 HAVE_DECL_INET_PTON=0
31666 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
31675 gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
31686 if test "$GNULIB_INET_PTON" != 1; then
31687 if test "$GNULIB_INET_PTON" = 0; then
31688 GNULIB_INET_PTON=$gl_module_indicator_condition
31690 GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
31697 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
31698 printf %s "checking whether byte ordering is bigendian... " >&6; }
31699 if test ${ac_cv_c_bigendian+y}
31701 printf %s "(cached) " >&6
31703 ac_cv_c_bigendian=unknown
31704 # See if we're dealing with a universal compiler.
31705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31706 /* end confdefs.h. */
31707 #ifndef __APPLE_CC__
31708 not a universal capable compiler
31713 if ac_fn_c_try_compile "$LINENO"
31716 # Check for potential -arch flags. It is not universal unless
31717 # there are at least two -arch flags with different values.
31720 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
31721 if test -n "$ac_prev"; then
31723 i?86 | x86_64 | ppc | ppc64)
31724 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
31727 ac_cv_c_bigendian=universal
31733 elif test "x$ac_word" = "x-arch"; then
31738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31739 if test $ac_cv_c_bigendian = unknown; then
31740 # See if sys/param.h defines the BYTE_ORDER macro.
31741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31742 /* end confdefs.h. */
31743 #include <sys/types.h>
31744 #include <sys/param.h>
31749 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
31750 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
31752 bogus endian macros
31759 if ac_fn_c_try_compile "$LINENO"
31761 # It does; now see whether it defined to BIG_ENDIAN or not.
31762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31763 /* end confdefs.h. */
31764 #include <sys/types.h>
31765 #include <sys/param.h>
31770 #if BYTE_ORDER != BIG_ENDIAN
31778 if ac_fn_c_try_compile "$LINENO"
31780 ac_cv_c_bigendian=yes
31782 ac_cv_c_bigendian=no
31784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31786 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31788 if test $ac_cv_c_bigendian = unknown; then
31789 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
31790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31791 /* end confdefs.h. */
31792 #include <limits.h>
31797 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
31798 bogus endian macros
31805 if ac_fn_c_try_compile "$LINENO"
31807 # It does; now see whether it defined to _BIG_ENDIAN or not.
31808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31809 /* end confdefs.h. */
31810 #include <limits.h>
31815 #ifndef _BIG_ENDIAN
31823 if ac_fn_c_try_compile "$LINENO"
31825 ac_cv_c_bigendian=yes
31827 ac_cv_c_bigendian=no
31829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31833 if test $ac_cv_c_bigendian = unknown; then
31834 # Compile a test program.
31835 if test "$cross_compiling" = yes
31837 # Try to guess by grepping values from an object file.
31838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31839 /* end confdefs.h. */
31840 short int ascii_mm[] =
31841 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
31842 short int ascii_ii[] =
31843 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
31844 int use_ascii (int i) {
31845 return ascii_mm[i] + ascii_ii[i];
31847 short int ebcdic_ii[] =
31848 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
31849 short int ebcdic_mm[] =
31850 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
31851 int use_ebcdic (int i) {
31852 return ebcdic_mm[i] + ebcdic_ii[i];
31859 return use_ascii (foo) == use_ebcdic (foo);
31864 if ac_fn_c_try_compile "$LINENO"
31866 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
31867 ac_cv_c_bigendian=yes
31869 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
31870 if test "$ac_cv_c_bigendian" = unknown; then
31871 ac_cv_c_bigendian=no
31873 # finding both strings is unlikely to happen, but who knows?
31874 ac_cv_c_bigendian=unknown
31878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31881 /* end confdefs.h. */
31882 $ac_includes_default
31887 /* Are we little or big endian? From Harbison&Steele. */
31891 char c[sizeof (long int)];
31894 return u.c[sizeof (long int) - 1] == 1;
31900 if ac_fn_c_try_run "$LINENO"
31902 ac_cv_c_bigendian=no
31904 ac_cv_c_bigendian=yes
31906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31907 conftest.$ac_objext conftest.beam conftest.$ac_ext
31912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
31913 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
31914 case $ac_cv_c_bigendian in #(
31916 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
31922 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
31926 as_fn_error $? "unknown endianness
31927 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
31934 if test "$ac_cv_header_winsock2_h" = yes; then
31937 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
31938 if test "x$ac_cv_func_ioctl" = xyes
31940 printf "%s\n" "#define HAVE_IOCTL 1" >>confdefs.h
31944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
31945 printf %s "checking for ioctl with POSIX signature... " >&6; }
31946 if test ${gl_cv_func_ioctl_posix_signature+y}
31948 printf %s "(cached) " >&6
31950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31951 /* end confdefs.h. */
31952 #include <sys/ioctl.h>
31953 /* On some platforms, ioctl() is declared in <unistd.h>. */
31954 #include <unistd.h>
31963 int ioctl (int, int, ...);
31970 if ac_fn_c_try_compile "$LINENO"
31972 gl_cv_func_ioctl_posix_signature=yes
31974 gl_cv_func_ioctl_posix_signature=no
31976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
31980 printf "%s\n" "$gl_cv_func_ioctl_posix_signature" >&6; }
31981 if test $gl_cv_func_ioctl_posix_signature != yes; then
31986 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
31995 gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
32003 if test "$GNULIB_IOCTL" != 1; then
32004 if test "$GNULIB_IOCTL" = 0; then
32005 GNULIB_IOCTL=$gl_module_indicator_condition
32007 GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
32015 printf "%s\n" "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
32020 if test "$ac_cv_header_winsock2_h" = yes; then
32029 gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
32037 if test "$GNULIB_LISTEN" != 1; then
32038 if test "$GNULIB_LISTEN" = 0; then
32039 GNULIB_LISTEN=$gl_module_indicator_condition
32041 GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
32049 printf "%s\n" "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
32057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32058 printf %s "checking for a traditional french locale... " >&6; }
32059 if test ${gt_cv_locale_fr+y}
32061 printf %s "(cached) " >&6
32064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32065 /* end confdefs.h. */
32067 #include <locale.h>
32069 #if HAVE_LANGINFO_CODESET
32070 # include <langinfo.h>
32072 #include <stdlib.h>
32073 #include <string.h>
32077 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32078 imitates locale dependent behaviour by looking at the environment
32079 variables, and all locales use the UTF-8 encoding. */
32080 #if defined __BEOS__ || defined __HAIKU__
32083 /* Check whether the given locale name is recognized by the system. */
32084 # if defined _WIN32 && !defined __CYGWIN__
32085 /* On native Windows, setlocale(category, "") looks at the system settings,
32086 not at the environment variables. Also, when an encoding suffix such
32087 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32088 category of the locale to "C". */
32089 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32090 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32093 if (setlocale (LC_ALL, "") == NULL) return 1;
32095 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32096 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32097 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32098 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32099 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32100 some unit tests fail.
32101 On MirBSD 10, when an unsupported locale is specified, setlocale()
32102 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32103 # if HAVE_LANGINFO_CODESET
32105 const char *cs = nl_langinfo (CODESET);
32106 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32107 || strcmp (cs, "UTF-8") == 0)
32112 /* On Cygwin, avoid locale names without encoding suffix, because the
32113 locale_charset() function relies on the encoding suffix. Note that
32114 LC_ALL is set on the command line. */
32115 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32117 /* Check whether in the abbreviation of the second month, the second
32118 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32119 one byte long. This excludes the UTF-8 encoding. */
32120 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32121 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32122 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
32123 /* Check whether the decimal separator is a comma.
32124 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32125 are nl_langinfo(RADIXCHAR) are both ".". */
32126 if (localeconv () ->decimal_point[0] != ',') return 1;
32133 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32134 (eval $ac_link) 2>&5
32136 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32137 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32139 # Handle native Windows specially, because there setlocale() interprets
32140 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32141 # "fr" or "fra" as "French" or "French_France.1252",
32142 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32143 # "ja" as "Japanese" or "Japanese_Japan.932",
32146 # Test for the native Windows locale name.
32147 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32148 gt_cv_locale_fr=French_France.1252
32151 gt_cv_locale_fr=none
32155 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32156 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32157 # configure script would override the LC_ALL setting. Likewise for
32158 # LC_CTYPE, which is also set at the beginning of the configure script.
32159 # Test for the usual locale name.
32160 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32161 gt_cv_locale_fr=fr_FR
32163 # Test for the locale name with explicit encoding suffix.
32164 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32165 gt_cv_locale_fr=fr_FR.ISO-8859-1
32167 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32168 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32169 gt_cv_locale_fr=fr_FR.ISO8859-1
32171 # Test for the HP-UX locale name.
32172 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32173 gt_cv_locale_fr=fr_FR.iso88591
32175 # Test for the Solaris 7 locale name.
32176 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32180 gt_cv_locale_fr=none
32192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
32193 printf "%s\n" "$gt_cv_locale_fr" >&6; }
32194 LOCALE_FR=$gt_cv_locale_fr
32199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32200 printf %s "checking for a french Unicode locale... " >&6; }
32201 if test ${gt_cv_locale_fr_utf8+y}
32203 printf %s "(cached) " >&6
32206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32207 /* end confdefs.h. */
32209 #include <locale.h>
32211 #if HAVE_LANGINFO_CODESET
32212 # include <langinfo.h>
32214 #include <stdlib.h>
32215 #include <string.h>
32219 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32220 imitates locale dependent behaviour by looking at the environment
32221 variables, and all locales use the UTF-8 encoding. */
32222 #if !(defined __BEOS__ || defined __HAIKU__)
32223 /* Check whether the given locale name is recognized by the system. */
32224 # if defined _WIN32 && !defined __CYGWIN__
32225 /* On native Windows, setlocale(category, "") looks at the system settings,
32226 not at the environment variables. Also, when an encoding suffix such
32227 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32228 category of the locale to "C". */
32229 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32230 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32233 if (setlocale (LC_ALL, "") == NULL) return 1;
32235 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32236 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32237 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32238 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32239 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32240 some unit tests fail. */
32241 # if HAVE_LANGINFO_CODESET
32243 const char *cs = nl_langinfo (CODESET);
32244 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32249 /* On Cygwin, avoid locale names without encoding suffix, because the
32250 locale_charset() function relies on the encoding suffix. Note that
32251 LC_ALL is set on the command line. */
32252 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32254 /* Check whether in the abbreviation of the second month, the second
32255 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32256 two bytes long, with UTF-8 encoding. */
32257 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32258 if (strftime (buf, sizeof (buf), "%b", &t) < 4
32259 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32262 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
32263 /* Check whether the decimal separator is a comma.
32264 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32265 are nl_langinfo(RADIXCHAR) are both ".". */
32266 if (localeconv () ->decimal_point[0] != ',') return 1;
32272 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32273 (eval $ac_link) 2>&5
32275 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32276 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32278 # Handle native Windows specially, because there setlocale() interprets
32279 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32280 # "fr" or "fra" as "French" or "French_France.1252",
32281 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32282 # "ja" as "Japanese" or "Japanese_Japan.932",
32285 # Test for the hypothetical native Windows locale name.
32286 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32287 gt_cv_locale_fr_utf8=French_France.65001
32290 gt_cv_locale_fr_utf8=none
32294 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32295 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32296 # configure script would override the LC_ALL setting. Likewise for
32297 # LC_CTYPE, which is also set at the beginning of the configure script.
32298 # Test for the usual locale name.
32299 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32300 gt_cv_locale_fr_utf8=fr_FR
32302 # Test for the locale name with explicit encoding suffix.
32303 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32304 gt_cv_locale_fr_utf8=fr_FR.UTF-8
32306 # Test for the Solaris 7 locale name.
32307 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32308 gt_cv_locale_fr_utf8=fr.UTF-8
32311 gt_cv_locale_fr_utf8=none
32321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32322 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
32323 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
32330 printf %s "checking for a traditional japanese locale... " >&6; }
32331 if test ${gt_cv_locale_ja+y}
32333 printf %s "(cached) " >&6
32336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32337 /* end confdefs.h. */
32339 #include <locale.h>
32341 #if HAVE_LANGINFO_CODESET
32342 # include <langinfo.h>
32344 #include <stdlib.h>
32345 #include <string.h>
32350 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32351 imitates locale dependent behaviour by looking at the environment
32352 variables, and all locales use the UTF-8 encoding. */
32353 #if defined __BEOS__ || defined __HAIKU__
32356 /* Check whether the given locale name is recognized by the system. */
32357 # if defined _WIN32 && !defined __CYGWIN__
32358 /* On native Windows, setlocale(category, "") looks at the system settings,
32359 not at the environment variables. Also, when an encoding suffix such
32360 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32361 category of the locale to "C". */
32362 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32363 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32366 if (setlocale (LC_ALL, "") == NULL) return 1;
32368 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32369 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32370 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32371 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32372 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32373 some unit tests fail.
32374 On MirBSD 10, when an unsupported locale is specified, setlocale()
32375 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32376 # if HAVE_LANGINFO_CODESET
32378 const char *cs = nl_langinfo (CODESET);
32379 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32380 || strcmp (cs, "UTF-8") == 0)
32385 /* On Cygwin, avoid locale names without encoding suffix, because the
32386 locale_charset() function relies on the encoding suffix. Note that
32387 LC_ALL is set on the command line. */
32388 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32390 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
32391 on Cygwin 1.5.x. */
32392 if (MB_CUR_MAX == 1)
32394 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32395 This excludes the UTF-8 encoding (except on MirBSD). */
32398 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32399 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32400 for (p = buf; *p != '\0'; p++)
32401 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32409 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32410 (eval $ac_link) 2>&5
32412 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32413 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32415 # Handle native Windows specially, because there setlocale() interprets
32416 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32417 # "fr" or "fra" as "French" or "French_France.1252",
32418 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32419 # "ja" as "Japanese" or "Japanese_Japan.932",
32422 # Note that on native Windows, the Japanese locale is
32423 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
32424 # cannot use it here.
32425 gt_cv_locale_ja=none
32428 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32429 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32430 # configure script would override the LC_ALL setting. Likewise for
32431 # LC_CTYPE, which is also set at the beginning of the configure script.
32432 # Test for the AIX locale name.
32433 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32434 gt_cv_locale_ja=ja_JP
32436 # Test for the locale name with explicit encoding suffix.
32437 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32438 gt_cv_locale_ja=ja_JP.EUC-JP
32440 # Test for the HP-UX, OSF/1, NetBSD locale name.
32441 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32442 gt_cv_locale_ja=ja_JP.eucJP
32444 # Test for the IRIX, FreeBSD locale name.
32445 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32446 gt_cv_locale_ja=ja_JP.EUC
32448 # Test for the Solaris 7 locale name.
32449 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32452 # Special test for NetBSD 1.6.
32453 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
32454 gt_cv_locale_ja=ja_JP.eucJP
32457 gt_cv_locale_ja=none
32470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
32471 printf "%s\n" "$gt_cv_locale_ja" >&6; }
32472 LOCALE_JA=$gt_cv_locale_ja
32478 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
32479 printf %s "checking for a transitional chinese locale... " >&6; }
32480 if test ${gt_cv_locale_zh_CN+y}
32482 printf %s "(cached) " >&6
32485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32486 /* end confdefs.h. */
32488 #include <locale.h>
32489 #include <stdlib.h>
32491 #if HAVE_LANGINFO_CODESET
32492 # include <langinfo.h>
32494 #include <stdlib.h>
32495 #include <string.h>
32500 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32501 imitates locale dependent behaviour by looking at the environment
32502 variables, and all locales use the UTF-8 encoding. */
32503 #if defined __BEOS__ || defined __HAIKU__
32506 /* Check whether the given locale name is recognized by the system. */
32507 # if defined _WIN32 && !defined __CYGWIN__
32508 /* On native Windows, setlocale(category, "") looks at the system settings,
32509 not at the environment variables. Also, when an encoding suffix such
32510 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32511 category of the locale to "C". */
32512 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32513 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32516 if (setlocale (LC_ALL, "") == NULL) return 1;
32518 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32519 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32520 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32521 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32522 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32523 some unit tests fail.
32524 On MirBSD 10, when an unsupported locale is specified, setlocale()
32525 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32526 # if HAVE_LANGINFO_CODESET
32528 const char *cs = nl_langinfo (CODESET);
32529 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32530 || strcmp (cs, "UTF-8") == 0)
32535 /* On Cygwin, avoid locale names without encoding suffix, because the
32536 locale_charset() function relies on the encoding suffix. Note that
32537 LC_ALL is set on the command line. */
32538 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32540 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
32541 This excludes the UTF-8 encoding (except on MirBSD). */
32544 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32545 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
32546 for (p = buf; *p != '\0'; p++)
32547 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
32550 /* Check whether a typical GB18030 multibyte sequence is recognized as a
32551 single wide character. This excludes the GB2312 and GBK encodings. */
32552 if (mblen ("\203\062\332\066", 5) != 4)
32559 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32560 (eval $ac_link) 2>&5
32562 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32563 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32565 # Handle native Windows specially, because there setlocale() interprets
32566 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32567 # "fr" or "fra" as "French" or "French_France.1252",
32568 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32569 # "ja" as "Japanese" or "Japanese_Japan.932",
32572 # Test for the hypothetical native Windows locale name.
32573 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32574 gt_cv_locale_zh_CN=Chinese_China.54936
32577 gt_cv_locale_zh_CN=none
32581 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
32582 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
32583 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
32584 gt_cv_locale_zh_CN=none
32587 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32588 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32589 # configure script would override the LC_ALL setting. Likewise for
32590 # LC_CTYPE, which is also set at the beginning of the configure script.
32591 # Test for the locale name without encoding suffix.
32592 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32593 gt_cv_locale_zh_CN=zh_CN
32595 # Test for the locale name with explicit encoding suffix.
32596 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32597 gt_cv_locale_zh_CN=zh_CN.GB18030
32600 gt_cv_locale_zh_CN=none
32606 # If there was a link error, due to mblen(), the system is so old that
32607 # it certainly doesn't have a chinese locale.
32608 gt_cv_locale_zh_CN=none
32613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
32614 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
32615 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
32621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
32622 printf %s "checking for a turkish Unicode locale... " >&6; }
32623 if test ${gt_cv_locale_tr_utf8+y}
32625 printf %s "(cached) " >&6
32628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32629 /* end confdefs.h. */
32631 #include <locale.h>
32633 #if HAVE_LANGINFO_CODESET
32634 # include <langinfo.h>
32636 #include <stdlib.h>
32637 #include <string.h>
32641 /* On BeOS, locales are not implemented in libc. Rather, libintl
32642 imitates locale dependent behaviour by looking at the environment
32643 variables, and all locales use the UTF-8 encoding. But BeOS does not
32644 implement the Turkish upper-/lowercase mappings. Therefore, let this
32645 program return 1 on BeOS. */
32646 /* Check whether the given locale name is recognized by the system. */
32647 #if defined _WIN32 && !defined __CYGWIN__
32648 /* On native Windows, setlocale(category, "") looks at the system settings,
32649 not at the environment variables. Also, when an encoding suffix such
32650 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32651 category of the locale to "C". */
32652 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32653 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32656 if (setlocale (LC_ALL, "") == NULL) return 1;
32658 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32659 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
32660 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32661 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32662 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32663 some unit tests fail. */
32664 #if HAVE_LANGINFO_CODESET
32666 const char *cs = nl_langinfo (CODESET);
32667 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32672 /* On Cygwin, avoid locale names without encoding suffix, because the
32673 locale_charset() function relies on the encoding suffix. Note that
32674 LC_ALL is set on the command line. */
32675 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32677 /* Check whether in the abbreviation of the eighth month, the second
32678 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
32679 two bytes long, with UTF-8 encoding. */
32680 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
32681 if (strftime (buf, sizeof (buf), "%b", &t) < 4
32682 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
32684 /* Check whether the upper-/lowercase mappings are as expected for
32686 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
32687 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
32693 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32694 (eval $ac_link) 2>&5
32696 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32697 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32699 # Handle native Windows specially, because there setlocale() interprets
32700 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32701 # "fr" or "fra" as "French" or "French_France.1252",
32702 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32703 # "ja" as "Japanese" or "Japanese_Japan.932",
32706 # Test for the hypothetical native Windows locale name.
32707 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32708 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
32711 gt_cv_locale_tr_utf8=none
32715 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32716 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32717 # configure script would override the LC_ALL setting. Likewise for
32718 # LC_CTYPE, which is also set at the beginning of the configure script.
32719 # Test for the usual locale name.
32720 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32721 gt_cv_locale_tr_utf8=tr_TR
32723 # Test for the locale name with explicit encoding suffix.
32724 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32725 gt_cv_locale_tr_utf8=tr_TR.UTF-8
32727 # Test for the Solaris 7 locale name.
32728 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32729 gt_cv_locale_tr_utf8=tr.UTF-8
32732 gt_cv_locale_tr_utf8=none
32739 gt_cv_locale_tr_utf8=none
32744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
32745 printf "%s\n" "$gt_cv_locale_tr_utf8" >&6; }
32746 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
32751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
32752 printf %s "checking for a french Unicode locale... " >&6; }
32753 if test ${gt_cv_locale_fr_utf8+y}
32755 printf %s "(cached) " >&6
32758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32759 /* end confdefs.h. */
32761 #include <locale.h>
32763 #if HAVE_LANGINFO_CODESET
32764 # include <langinfo.h>
32766 #include <stdlib.h>
32767 #include <string.h>
32771 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32772 imitates locale dependent behaviour by looking at the environment
32773 variables, and all locales use the UTF-8 encoding. */
32774 #if !(defined __BEOS__ || defined __HAIKU__)
32775 /* Check whether the given locale name is recognized by the system. */
32776 # if defined _WIN32 && !defined __CYGWIN__
32777 /* On native Windows, setlocale(category, "") looks at the system settings,
32778 not at the environment variables. Also, when an encoding suffix such
32779 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32780 category of the locale to "C". */
32781 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32782 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32785 if (setlocale (LC_ALL, "") == NULL) return 1;
32787 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32788 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32789 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32790 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32791 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32792 some unit tests fail. */
32793 # if HAVE_LANGINFO_CODESET
32795 const char *cs = nl_langinfo (CODESET);
32796 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
32801 /* On Cygwin, avoid locale names without encoding suffix, because the
32802 locale_charset() function relies on the encoding suffix. Note that
32803 LC_ALL is set on the command line. */
32804 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32806 /* Check whether in the abbreviation of the second month, the second
32807 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
32808 two bytes long, with UTF-8 encoding. */
32809 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32810 if (strftime (buf, sizeof (buf), "%b", &t) < 4
32811 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
32814 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
32815 /* Check whether the decimal separator is a comma.
32816 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32817 are nl_langinfo(RADIXCHAR) are both ".". */
32818 if (localeconv () ->decimal_point[0] != ',') return 1;
32824 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32825 (eval $ac_link) 2>&5
32827 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32828 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32830 # Handle native Windows specially, because there setlocale() interprets
32831 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32832 # "fr" or "fra" as "French" or "French_France.1252",
32833 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32834 # "ja" as "Japanese" or "Japanese_Japan.932",
32837 # Test for the hypothetical native Windows locale name.
32838 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32839 gt_cv_locale_fr_utf8=French_France.65001
32842 gt_cv_locale_fr_utf8=none
32846 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32847 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32848 # configure script would override the LC_ALL setting. Likewise for
32849 # LC_CTYPE, which is also set at the beginning of the configure script.
32850 # Test for the usual locale name.
32851 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32852 gt_cv_locale_fr_utf8=fr_FR
32854 # Test for the locale name with explicit encoding suffix.
32855 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32856 gt_cv_locale_fr_utf8=fr_FR.UTF-8
32858 # Test for the Solaris 7 locale name.
32859 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32860 gt_cv_locale_fr_utf8=fr.UTF-8
32863 gt_cv_locale_fr_utf8=none
32873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
32874 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
32875 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
32881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
32882 printf %s "checking for a traditional french locale... " >&6; }
32883 if test ${gt_cv_locale_fr+y}
32885 printf %s "(cached) " >&6
32888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32889 /* end confdefs.h. */
32891 #include <locale.h>
32893 #if HAVE_LANGINFO_CODESET
32894 # include <langinfo.h>
32896 #include <stdlib.h>
32897 #include <string.h>
32901 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
32902 imitates locale dependent behaviour by looking at the environment
32903 variables, and all locales use the UTF-8 encoding. */
32904 #if defined __BEOS__ || defined __HAIKU__
32907 /* Check whether the given locale name is recognized by the system. */
32908 # if defined _WIN32 && !defined __CYGWIN__
32909 /* On native Windows, setlocale(category, "") looks at the system settings,
32910 not at the environment variables. Also, when an encoding suffix such
32911 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
32912 category of the locale to "C". */
32913 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
32914 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
32917 if (setlocale (LC_ALL, "") == NULL) return 1;
32919 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
32920 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
32921 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
32922 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
32923 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
32924 some unit tests fail.
32925 On MirBSD 10, when an unsupported locale is specified, setlocale()
32926 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
32927 # if HAVE_LANGINFO_CODESET
32929 const char *cs = nl_langinfo (CODESET);
32930 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
32931 || strcmp (cs, "UTF-8") == 0)
32936 /* On Cygwin, avoid locale names without encoding suffix, because the
32937 locale_charset() function relies on the encoding suffix. Note that
32938 LC_ALL is set on the command line. */
32939 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
32941 /* Check whether in the abbreviation of the second month, the second
32942 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
32943 one byte long. This excludes the UTF-8 encoding. */
32944 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
32945 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
32946 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
32947 /* Check whether the decimal separator is a comma.
32948 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
32949 are nl_langinfo(RADIXCHAR) are both ".". */
32950 if (localeconv () ->decimal_point[0] != ',') return 1;
32957 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
32958 (eval $ac_link) 2>&5
32960 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32961 test $ac_status = 0; } && test -s conftest$ac_exeext; then
32963 # Handle native Windows specially, because there setlocale() interprets
32964 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
32965 # "fr" or "fra" as "French" or "French_France.1252",
32966 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
32967 # "ja" as "Japanese" or "Japanese_Japan.932",
32970 # Test for the native Windows locale name.
32971 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32972 gt_cv_locale_fr=French_France.1252
32975 gt_cv_locale_fr=none
32979 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
32980 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
32981 # configure script would override the LC_ALL setting. Likewise for
32982 # LC_CTYPE, which is also set at the beginning of the configure script.
32983 # Test for the usual locale name.
32984 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32985 gt_cv_locale_fr=fr_FR
32987 # Test for the locale name with explicit encoding suffix.
32988 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32989 gt_cv_locale_fr=fr_FR.ISO-8859-1
32991 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
32992 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32993 gt_cv_locale_fr=fr_FR.ISO8859-1
32995 # Test for the HP-UX locale name.
32996 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
32997 gt_cv_locale_fr=fr_FR.iso88591
32999 # Test for the Solaris 7 locale name.
33000 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33004 gt_cv_locale_fr=none
33016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
33017 printf "%s\n" "$gt_cv_locale_fr" >&6; }
33018 LOCALE_FR=$gt_cv_locale_fr
33023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33024 printf %s "checking for a french Unicode locale... " >&6; }
33025 if test ${gt_cv_locale_fr_utf8+y}
33027 printf %s "(cached) " >&6
33030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33031 /* end confdefs.h. */
33033 #include <locale.h>
33035 #if HAVE_LANGINFO_CODESET
33036 # include <langinfo.h>
33038 #include <stdlib.h>
33039 #include <string.h>
33043 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33044 imitates locale dependent behaviour by looking at the environment
33045 variables, and all locales use the UTF-8 encoding. */
33046 #if !(defined __BEOS__ || defined __HAIKU__)
33047 /* Check whether the given locale name is recognized by the system. */
33048 # if defined _WIN32 && !defined __CYGWIN__
33049 /* On native Windows, setlocale(category, "") looks at the system settings,
33050 not at the environment variables. Also, when an encoding suffix such
33051 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33052 category of the locale to "C". */
33053 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33054 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33057 if (setlocale (LC_ALL, "") == NULL) return 1;
33059 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33060 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33061 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33062 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33063 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33064 some unit tests fail. */
33065 # if HAVE_LANGINFO_CODESET
33067 const char *cs = nl_langinfo (CODESET);
33068 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33073 /* On Cygwin, avoid locale names without encoding suffix, because the
33074 locale_charset() function relies on the encoding suffix. Note that
33075 LC_ALL is set on the command line. */
33076 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33078 /* Check whether in the abbreviation of the second month, the second
33079 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33080 two bytes long, with UTF-8 encoding. */
33081 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33082 if (strftime (buf, sizeof (buf), "%b", &t) < 4
33083 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33086 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
33087 /* Check whether the decimal separator is a comma.
33088 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33089 are nl_langinfo(RADIXCHAR) are both ".". */
33090 if (localeconv () ->decimal_point[0] != ',') return 1;
33096 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33097 (eval $ac_link) 2>&5
33099 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33100 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33102 # Handle native Windows specially, because there setlocale() interprets
33103 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33104 # "fr" or "fra" as "French" or "French_France.1252",
33105 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33106 # "ja" as "Japanese" or "Japanese_Japan.932",
33109 # Test for the hypothetical native Windows locale name.
33110 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33111 gt_cv_locale_fr_utf8=French_France.65001
33114 gt_cv_locale_fr_utf8=none
33118 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33119 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33120 # configure script would override the LC_ALL setting. Likewise for
33121 # LC_CTYPE, which is also set at the beginning of the configure script.
33122 # Test for the usual locale name.
33123 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33124 gt_cv_locale_fr_utf8=fr_FR
33126 # Test for the locale name with explicit encoding suffix.
33127 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33128 gt_cv_locale_fr_utf8=fr_FR.UTF-8
33130 # Test for the Solaris 7 locale name.
33131 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33132 gt_cv_locale_fr_utf8=fr.UTF-8
33135 gt_cv_locale_fr_utf8=none
33145 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33146 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
33147 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
33154 printf %s "checking for a traditional japanese locale... " >&6; }
33155 if test ${gt_cv_locale_ja+y}
33157 printf %s "(cached) " >&6
33160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33161 /* end confdefs.h. */
33163 #include <locale.h>
33165 #if HAVE_LANGINFO_CODESET
33166 # include <langinfo.h>
33168 #include <stdlib.h>
33169 #include <string.h>
33174 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33175 imitates locale dependent behaviour by looking at the environment
33176 variables, and all locales use the UTF-8 encoding. */
33177 #if defined __BEOS__ || defined __HAIKU__
33180 /* Check whether the given locale name is recognized by the system. */
33181 # if defined _WIN32 && !defined __CYGWIN__
33182 /* On native Windows, setlocale(category, "") looks at the system settings,
33183 not at the environment variables. Also, when an encoding suffix such
33184 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33185 category of the locale to "C". */
33186 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33187 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33190 if (setlocale (LC_ALL, "") == NULL) return 1;
33192 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33193 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33194 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33195 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33196 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33197 some unit tests fail.
33198 On MirBSD 10, when an unsupported locale is specified, setlocale()
33199 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33200 # if HAVE_LANGINFO_CODESET
33202 const char *cs = nl_langinfo (CODESET);
33203 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33204 || strcmp (cs, "UTF-8") == 0)
33209 /* On Cygwin, avoid locale names without encoding suffix, because the
33210 locale_charset() function relies on the encoding suffix. Note that
33211 LC_ALL is set on the command line. */
33212 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33214 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
33215 on Cygwin 1.5.x. */
33216 if (MB_CUR_MAX == 1)
33218 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33219 This excludes the UTF-8 encoding (except on MirBSD). */
33222 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33223 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33224 for (p = buf; *p != '\0'; p++)
33225 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33233 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33234 (eval $ac_link) 2>&5
33236 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33237 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33239 # Handle native Windows specially, because there setlocale() interprets
33240 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33241 # "fr" or "fra" as "French" or "French_France.1252",
33242 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33243 # "ja" as "Japanese" or "Japanese_Japan.932",
33246 # Note that on native Windows, the Japanese locale is
33247 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
33248 # cannot use it here.
33249 gt_cv_locale_ja=none
33252 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33253 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33254 # configure script would override the LC_ALL setting. Likewise for
33255 # LC_CTYPE, which is also set at the beginning of the configure script.
33256 # Test for the AIX locale name.
33257 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33258 gt_cv_locale_ja=ja_JP
33260 # Test for the locale name with explicit encoding suffix.
33261 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33262 gt_cv_locale_ja=ja_JP.EUC-JP
33264 # Test for the HP-UX, OSF/1, NetBSD locale name.
33265 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33266 gt_cv_locale_ja=ja_JP.eucJP
33268 # Test for the IRIX, FreeBSD locale name.
33269 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33270 gt_cv_locale_ja=ja_JP.EUC
33272 # Test for the Solaris 7 locale name.
33273 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33276 # Special test for NetBSD 1.6.
33277 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
33278 gt_cv_locale_ja=ja_JP.eucJP
33281 gt_cv_locale_ja=none
33294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
33295 printf "%s\n" "$gt_cv_locale_ja" >&6; }
33296 LOCALE_JA=$gt_cv_locale_ja
33302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33303 printf %s "checking for a transitional chinese locale... " >&6; }
33304 if test ${gt_cv_locale_zh_CN+y}
33306 printf %s "(cached) " >&6
33309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33310 /* end confdefs.h. */
33312 #include <locale.h>
33313 #include <stdlib.h>
33315 #if HAVE_LANGINFO_CODESET
33316 # include <langinfo.h>
33318 #include <stdlib.h>
33319 #include <string.h>
33324 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33325 imitates locale dependent behaviour by looking at the environment
33326 variables, and all locales use the UTF-8 encoding. */
33327 #if defined __BEOS__ || defined __HAIKU__
33330 /* Check whether the given locale name is recognized by the system. */
33331 # if defined _WIN32 && !defined __CYGWIN__
33332 /* On native Windows, setlocale(category, "") looks at the system settings,
33333 not at the environment variables. Also, when an encoding suffix such
33334 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33335 category of the locale to "C". */
33336 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33337 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33340 if (setlocale (LC_ALL, "") == NULL) return 1;
33342 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33343 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33344 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33345 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33346 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33347 some unit tests fail.
33348 On MirBSD 10, when an unsupported locale is specified, setlocale()
33349 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33350 # if HAVE_LANGINFO_CODESET
33352 const char *cs = nl_langinfo (CODESET);
33353 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33354 || strcmp (cs, "UTF-8") == 0)
33359 /* On Cygwin, avoid locale names without encoding suffix, because the
33360 locale_charset() function relies on the encoding suffix. Note that
33361 LC_ALL is set on the command line. */
33362 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33364 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33365 This excludes the UTF-8 encoding (except on MirBSD). */
33368 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33369 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33370 for (p = buf; *p != '\0'; p++)
33371 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33374 /* Check whether a typical GB18030 multibyte sequence is recognized as a
33375 single wide character. This excludes the GB2312 and GBK encodings. */
33376 if (mblen ("\203\062\332\066", 5) != 4)
33383 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33384 (eval $ac_link) 2>&5
33386 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33387 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33389 # Handle native Windows specially, because there setlocale() interprets
33390 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33391 # "fr" or "fra" as "French" or "French_France.1252",
33392 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33393 # "ja" as "Japanese" or "Japanese_Japan.932",
33396 # Test for the hypothetical native Windows locale name.
33397 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33398 gt_cv_locale_zh_CN=Chinese_China.54936
33401 gt_cv_locale_zh_CN=none
33405 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
33406 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
33407 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
33408 gt_cv_locale_zh_CN=none
33411 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33412 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33413 # configure script would override the LC_ALL setting. Likewise for
33414 # LC_CTYPE, which is also set at the beginning of the configure script.
33415 # Test for the locale name without encoding suffix.
33416 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33417 gt_cv_locale_zh_CN=zh_CN
33419 # Test for the locale name with explicit encoding suffix.
33420 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33421 gt_cv_locale_zh_CN=zh_CN.GB18030
33424 gt_cv_locale_zh_CN=none
33430 # If there was a link error, due to mblen(), the system is so old that
33431 # it certainly doesn't have a chinese locale.
33432 gt_cv_locale_zh_CN=none
33437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33438 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
33439 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
33445 printf %s "checking for a french Unicode locale... " >&6; }
33446 if test ${gt_cv_locale_fr_utf8+y}
33448 printf %s "(cached) " >&6
33451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33452 /* end confdefs.h. */
33454 #include <locale.h>
33456 #if HAVE_LANGINFO_CODESET
33457 # include <langinfo.h>
33459 #include <stdlib.h>
33460 #include <string.h>
33464 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33465 imitates locale dependent behaviour by looking at the environment
33466 variables, and all locales use the UTF-8 encoding. */
33467 #if !(defined __BEOS__ || defined __HAIKU__)
33468 /* Check whether the given locale name is recognized by the system. */
33469 # if defined _WIN32 && !defined __CYGWIN__
33470 /* On native Windows, setlocale(category, "") looks at the system settings,
33471 not at the environment variables. Also, when an encoding suffix such
33472 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33473 category of the locale to "C". */
33474 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33475 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33478 if (setlocale (LC_ALL, "") == NULL) return 1;
33480 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33481 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33482 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33483 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33484 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33485 some unit tests fail. */
33486 # if HAVE_LANGINFO_CODESET
33488 const char *cs = nl_langinfo (CODESET);
33489 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
33494 /* On Cygwin, avoid locale names without encoding suffix, because the
33495 locale_charset() function relies on the encoding suffix. Note that
33496 LC_ALL is set on the command line. */
33497 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33499 /* Check whether in the abbreviation of the second month, the second
33500 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
33501 two bytes long, with UTF-8 encoding. */
33502 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33503 if (strftime (buf, sizeof (buf), "%b", &t) < 4
33504 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
33507 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
33508 /* Check whether the decimal separator is a comma.
33509 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
33510 are nl_langinfo(RADIXCHAR) are both ".". */
33511 if (localeconv () ->decimal_point[0] != ',') return 1;
33517 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33518 (eval $ac_link) 2>&5
33520 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33521 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33523 # Handle native Windows specially, because there setlocale() interprets
33524 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33525 # "fr" or "fra" as "French" or "French_France.1252",
33526 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33527 # "ja" as "Japanese" or "Japanese_Japan.932",
33530 # Test for the hypothetical native Windows locale name.
33531 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33532 gt_cv_locale_fr_utf8=French_France.65001
33535 gt_cv_locale_fr_utf8=none
33539 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33540 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33541 # configure script would override the LC_ALL setting. Likewise for
33542 # LC_CTYPE, which is also set at the beginning of the configure script.
33543 # Test for the usual locale name.
33544 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33545 gt_cv_locale_fr_utf8=fr_FR
33547 # Test for the locale name with explicit encoding suffix.
33548 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33549 gt_cv_locale_fr_utf8=fr_FR.UTF-8
33551 # Test for the Solaris 7 locale name.
33552 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33553 gt_cv_locale_fr_utf8=fr.UTF-8
33556 gt_cv_locale_fr_utf8=none
33566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
33567 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
33568 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
33574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
33575 printf %s "checking for a transitional chinese locale... " >&6; }
33576 if test ${gt_cv_locale_zh_CN+y}
33578 printf %s "(cached) " >&6
33581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33582 /* end confdefs.h. */
33584 #include <locale.h>
33585 #include <stdlib.h>
33587 #if HAVE_LANGINFO_CODESET
33588 # include <langinfo.h>
33590 #include <stdlib.h>
33591 #include <string.h>
33596 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
33597 imitates locale dependent behaviour by looking at the environment
33598 variables, and all locales use the UTF-8 encoding. */
33599 #if defined __BEOS__ || defined __HAIKU__
33602 /* Check whether the given locale name is recognized by the system. */
33603 # if defined _WIN32 && !defined __CYGWIN__
33604 /* On native Windows, setlocale(category, "") looks at the system settings,
33605 not at the environment variables. Also, when an encoding suffix such
33606 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
33607 category of the locale to "C". */
33608 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
33609 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
33612 if (setlocale (LC_ALL, "") == NULL) return 1;
33614 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
33615 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
33616 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
33617 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
33618 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
33619 some unit tests fail.
33620 On MirBSD 10, when an unsupported locale is specified, setlocale()
33621 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
33622 # if HAVE_LANGINFO_CODESET
33624 const char *cs = nl_langinfo (CODESET);
33625 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
33626 || strcmp (cs, "UTF-8") == 0)
33631 /* On Cygwin, avoid locale names without encoding suffix, because the
33632 locale_charset() function relies on the encoding suffix. Note that
33633 LC_ALL is set on the command line. */
33634 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
33636 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
33637 This excludes the UTF-8 encoding (except on MirBSD). */
33640 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
33641 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
33642 for (p = buf; *p != '\0'; p++)
33643 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
33646 /* Check whether a typical GB18030 multibyte sequence is recognized as a
33647 single wide character. This excludes the GB2312 and GBK encodings. */
33648 if (mblen ("\203\062\332\066", 5) != 4)
33655 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
33656 (eval $ac_link) 2>&5
33658 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33659 test $ac_status = 0; } && test -s conftest$ac_exeext; then
33661 # Handle native Windows specially, because there setlocale() interprets
33662 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
33663 # "fr" or "fra" as "French" or "French_France.1252",
33664 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
33665 # "ja" as "Japanese" or "Japanese_Japan.932",
33668 # Test for the hypothetical native Windows locale name.
33669 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33670 gt_cv_locale_zh_CN=Chinese_China.54936
33673 gt_cv_locale_zh_CN=none
33677 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
33678 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
33679 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
33680 gt_cv_locale_zh_CN=none
33683 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
33684 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
33685 # configure script would override the LC_ALL setting. Likewise for
33686 # LC_CTYPE, which is also set at the beginning of the configure script.
33687 # Test for the locale name without encoding suffix.
33688 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33689 gt_cv_locale_zh_CN=zh_CN
33691 # Test for the locale name with explicit encoding suffix.
33692 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
33693 gt_cv_locale_zh_CN=zh_CN.GB18030
33696 gt_cv_locale_zh_CN=none
33702 # If there was a link error, due to mblen(), the system is so old that
33703 # it certainly doesn't have a chinese locale.
33704 gt_cv_locale_zh_CN=none
33709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
33710 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
33711 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
33717 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
33718 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
33719 # irrelevant for anonymous mappings.
33720 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
33721 if test "x$ac_cv_func_mmap" = xyes
33729 # Try to allow MAP_ANONYMOUS.
33730 gl_have_mmap_anonymous=no
33731 if test $gl_have_mmap = yes; then
33732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
33733 printf %s "checking for MAP_ANONYMOUS... " >&6; }
33734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33735 /* end confdefs.h. */
33737 #include <sys/mman.h>
33738 #ifdef MAP_ANONYMOUS
33739 I cannot identify this map
33743 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33744 $EGREP "I cannot identify this map" >/dev/null 2>&1
33746 gl_have_mmap_anonymous=yes
33750 if test $gl_have_mmap_anonymous != yes; then
33751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33752 /* end confdefs.h. */
33754 #include <sys/mman.h>
33756 I cannot identify this map
33760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33761 $EGREP "I cannot identify this map" >/dev/null 2>&1
33764 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
33766 gl_have_mmap_anonymous=yes
33771 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
33772 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
33773 if test $gl_have_mmap_anonymous = yes; then
33775 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
33792 nanosleep_save_libs=$LIBS
33794 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
33795 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
33798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
33799 printf %s "checking for library containing nanosleep... " >&6; }
33800 if test ${ac_cv_search_nanosleep+y}
33802 printf %s "(cached) " >&6
33804 ac_func_search_save_LIBS=$LIBS
33805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33806 /* end confdefs.h. */
33808 /* Override any GCC internal prototype to avoid an error.
33809 Use char because int might match the return type of a GCC
33810 builtin and then its argument prototype would still apply. */
33818 return nanosleep ();
33823 for ac_lib in '' rt posix4
33825 if test -z "$ac_lib"; then
33826 ac_res="none required"
33829 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
33831 if ac_fn_c_try_link "$LINENO"
33833 ac_cv_search_nanosleep=$ac_res
33835 rm -f core conftest.err conftest.$ac_objext \
33837 if test ${ac_cv_search_nanosleep+y}
33842 if test ${ac_cv_search_nanosleep+y}
33846 ac_cv_search_nanosleep=no
33848 rm conftest.$ac_ext
33849 LIBS=$ac_func_search_save_LIBS
33851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
33852 printf "%s\n" "$ac_cv_search_nanosleep" >&6; }
33853 ac_res=$ac_cv_search_nanosleep
33854 if test "$ac_res" != no
33856 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33857 test "$ac_cv_search_nanosleep" = "none required" ||
33858 LIB_NANOSLEEP=$ac_cv_search_nanosleep
33861 if test "x$ac_cv_search_nanosleep" != xno; then
33864 if test $APPLE_UNIVERSAL_BUILD = 1; then
33865 # A universal build on Apple Mac OS X platforms.
33866 # The test result would be 'no (mishandles large arguments)' in 64-bit
33867 # mode but 'yes' in 32-bit mode. But we need a configuration result that
33868 # is valid in both modes.
33869 gl_cv_func_nanosleep='no (mishandles large arguments)'
33872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
33873 printf %s "checking for working nanosleep... " >&6; }
33874 if test ${gl_cv_func_nanosleep+y}
33876 printf %s "(cached) " >&6
33879 if test "$cross_compiling" = yes
33881 case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux.
33882 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
33883 mingw*) # Guess no on native Windows.
33884 gl_cv_func_nanosleep='guessing no' ;;
33885 *) # If we don't know, assume the worst.
33886 gl_cv_func_nanosleep='guessing no' ;;
33890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33891 /* end confdefs.h. */
33894 #include <limits.h>
33895 #include <signal.h>
33896 #if HAVE_SYS_TIME_H
33897 #include <sys/time.h>
33900 #include <unistd.h>
33901 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
33902 #define TYPE_MAXIMUM(t) \
33903 ((t) (! TYPE_SIGNED (t) \
33905 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
33907 #if HAVE_DECL_ALARM
33909 check_for_SIGALRM (int sig)
33911 if (sig != SIGALRM)
33919 static struct timespec ts_sleep;
33920 static struct timespec ts_remaining;
33921 /* Test for major problems first. */
33924 ts_sleep.tv_sec = 0;
33925 ts_sleep.tv_nsec = 1;
33926 #if HAVE_DECL_ALARM
33928 static struct sigaction act;
33929 act.sa_handler = check_for_SIGALRM;
33930 sigemptyset (&act.sa_mask);
33931 sigaction (SIGALRM, &act, NULL);
33933 if (nanosleep (&ts_sleep, NULL) != 0)
33935 /* Test for a minor problem: the handling of large arguments. */
33936 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
33937 ts_sleep.tv_nsec = 999999999;
33939 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
33941 if (errno != EINTR)
33943 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
33946 #else /* A simpler test for native Windows. */
33947 if (nanosleep (&ts_sleep, &ts_remaining) < 0)
33953 if ac_fn_c_try_run "$LINENO"
33955 gl_cv_func_nanosleep=yes
33957 case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;;
33960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33961 conftest.$ac_objext conftest.beam conftest.$ac_ext
33966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
33967 printf "%s\n" "$gl_cv_func_nanosleep" >&6; }
33968 case "$gl_cv_func_nanosleep" in
33970 REPLACE_NANOSLEEP=0
33973 REPLACE_NANOSLEEP=1
33974 case "$gl_cv_func_nanosleep" in
33975 *"mishandles large arguments"*)
33977 printf "%s\n" "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
33981 # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
33982 for ac_lib in $LIBSOCKET; do
33983 case " $LIB_NANOSLEEP " in
33985 *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
33995 LIBS=$nanosleep_save_libs
33997 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
34006 gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
34018 if test "$GNULIB_NANOSLEEP" != 1; then
34019 if test "$GNULIB_NANOSLEEP" = 0; then
34020 GNULIB_NANOSLEEP=$gl_module_indicator_condition
34022 GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
34030 printf "%s\n" "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
34036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
34037 printf %s "checking whether <netinet/in.h> is self-contained... " >&6; }
34038 if test ${gl_cv_header_netinet_in_h_selfcontained+y}
34040 printf %s "(cached) " >&6
34043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34044 /* end confdefs.h. */
34045 #include <netinet/in.h>
34054 if ac_fn_c_try_compile "$LINENO"
34056 gl_cv_header_netinet_in_h_selfcontained=yes
34058 gl_cv_header_netinet_in_h_selfcontained=no
34060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
34064 printf "%s\n" "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
34065 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
34068 NETINET_IN_H='netinet/in.h'
34069 ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
34070 if test "x$ac_cv_header_netinet_in_h" = xyes
34072 printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
34085 if test $gl_cv_have_include_next = yes; then
34086 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
34088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
34089 printf %s "checking absolute name of <netinet/in.h>... " >&6; }
34090 if test ${gl_cv_next_netinet_in_h+y}
34092 printf %s "(cached) " >&6
34095 if test $ac_cv_header_netinet_in_h = yes; then
34100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34101 /* end confdefs.h. */
34102 #include <netinet/in.h>
34105 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34106 *) gl_absname_cpp="$ac_cpp" ;;
34111 gl_dirsep_regex='[/\\]'
34114 gl_dirsep_regex='\/'
34117 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34118 gl_header_literal_regex=`echo 'netinet/in.h' \
34119 | sed -e "$gl_make_literal_regex_sed"`
34120 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34121 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34127 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34128 sed -n "$gl_absolute_header_sed"`
34130 gl_header=$gl_cv_absolute_netinet_in_h
34131 gl_cv_next_netinet_in_h='"'$gl_header'"'
34133 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
34138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
34139 printf "%s\n" "$gl_cv_next_netinet_in_h" >&6; }
34141 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
34143 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34144 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34145 gl_next_as_first_directive='<'netinet/in.h'>'
34147 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34148 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
34150 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
34155 if test $ac_cv_header_netinet_in_h = yes; then
34156 HAVE_NETINET_IN_H=1
34158 HAVE_NETINET_IN_H=0
34163 if test -n "$NETINET_IN_H"; then
34164 GL_GENERATE_NETINET_IN_H_TRUE=
34165 GL_GENERATE_NETINET_IN_H_FALSE='#'
34167 GL_GENERATE_NETINET_IN_H_TRUE='#'
34168 GL_GENERATE_NETINET_IN_H_FALSE=
34176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
34177 printf %s "checking for a traditional french locale... " >&6; }
34178 if test ${gt_cv_locale_fr+y}
34180 printf %s "(cached) " >&6
34183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34184 /* end confdefs.h. */
34186 #include <locale.h>
34188 #if HAVE_LANGINFO_CODESET
34189 # include <langinfo.h>
34191 #include <stdlib.h>
34192 #include <string.h>
34196 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34197 imitates locale dependent behaviour by looking at the environment
34198 variables, and all locales use the UTF-8 encoding. */
34199 #if defined __BEOS__ || defined __HAIKU__
34202 /* Check whether the given locale name is recognized by the system. */
34203 # if defined _WIN32 && !defined __CYGWIN__
34204 /* On native Windows, setlocale(category, "") looks at the system settings,
34205 not at the environment variables. Also, when an encoding suffix such
34206 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34207 category of the locale to "C". */
34208 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34209 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34212 if (setlocale (LC_ALL, "") == NULL) return 1;
34214 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34215 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34216 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34217 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34218 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34219 some unit tests fail.
34220 On MirBSD 10, when an unsupported locale is specified, setlocale()
34221 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
34222 # if HAVE_LANGINFO_CODESET
34224 const char *cs = nl_langinfo (CODESET);
34225 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
34226 || strcmp (cs, "UTF-8") == 0)
34231 /* On Cygwin, avoid locale names without encoding suffix, because the
34232 locale_charset() function relies on the encoding suffix. Note that
34233 LC_ALL is set on the command line. */
34234 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34236 /* Check whether in the abbreviation of the second month, the second
34237 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
34238 one byte long. This excludes the UTF-8 encoding. */
34239 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34240 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
34241 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34242 /* Check whether the decimal separator is a comma.
34243 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34244 are nl_langinfo(RADIXCHAR) are both ".". */
34245 if (localeconv () ->decimal_point[0] != ',') return 1;
34252 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34253 (eval $ac_link) 2>&5
34255 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34256 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34258 # Handle native Windows specially, because there setlocale() interprets
34259 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34260 # "fr" or "fra" as "French" or "French_France.1252",
34261 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34262 # "ja" as "Japanese" or "Japanese_Japan.932",
34265 # Test for the native Windows locale name.
34266 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34267 gt_cv_locale_fr=French_France.1252
34270 gt_cv_locale_fr=none
34274 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34275 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34276 # configure script would override the LC_ALL setting. Likewise for
34277 # LC_CTYPE, which is also set at the beginning of the configure script.
34278 # Test for the usual locale name.
34279 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34280 gt_cv_locale_fr=fr_FR
34282 # Test for the locale name with explicit encoding suffix.
34283 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34284 gt_cv_locale_fr=fr_FR.ISO-8859-1
34286 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
34287 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34288 gt_cv_locale_fr=fr_FR.ISO8859-1
34290 # Test for the HP-UX locale name.
34291 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34292 gt_cv_locale_fr=fr_FR.iso88591
34294 # Test for the Solaris 7 locale name.
34295 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34299 gt_cv_locale_fr=none
34311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
34312 printf "%s\n" "$gt_cv_locale_fr" >&6; }
34313 LOCALE_FR=$gt_cv_locale_fr
34318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
34319 printf %s "checking for a french Unicode locale... " >&6; }
34320 if test ${gt_cv_locale_fr_utf8+y}
34322 printf %s "(cached) " >&6
34325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34326 /* end confdefs.h. */
34328 #include <locale.h>
34330 #if HAVE_LANGINFO_CODESET
34331 # include <langinfo.h>
34333 #include <stdlib.h>
34334 #include <string.h>
34338 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
34339 imitates locale dependent behaviour by looking at the environment
34340 variables, and all locales use the UTF-8 encoding. */
34341 #if !(defined __BEOS__ || defined __HAIKU__)
34342 /* Check whether the given locale name is recognized by the system. */
34343 # if defined _WIN32 && !defined __CYGWIN__
34344 /* On native Windows, setlocale(category, "") looks at the system settings,
34345 not at the environment variables. Also, when an encoding suffix such
34346 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
34347 category of the locale to "C". */
34348 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
34349 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
34352 if (setlocale (LC_ALL, "") == NULL) return 1;
34354 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
34355 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
34356 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
34357 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
34358 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
34359 some unit tests fail. */
34360 # if HAVE_LANGINFO_CODESET
34362 const char *cs = nl_langinfo (CODESET);
34363 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
34368 /* On Cygwin, avoid locale names without encoding suffix, because the
34369 locale_charset() function relies on the encoding suffix. Note that
34370 LC_ALL is set on the command line. */
34371 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
34373 /* Check whether in the abbreviation of the second month, the second
34374 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
34375 two bytes long, with UTF-8 encoding. */
34376 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
34377 if (strftime (buf, sizeof (buf), "%b", &t) < 4
34378 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
34381 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
34382 /* Check whether the decimal separator is a comma.
34383 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
34384 are nl_langinfo(RADIXCHAR) are both ".". */
34385 if (localeconv () ->decimal_point[0] != ',') return 1;
34391 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
34392 (eval $ac_link) 2>&5
34394 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34395 test $ac_status = 0; } && test -s conftest$ac_exeext; then
34397 # Handle native Windows specially, because there setlocale() interprets
34398 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
34399 # "fr" or "fra" as "French" or "French_France.1252",
34400 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
34401 # "ja" as "Japanese" or "Japanese_Japan.932",
34404 # Test for the hypothetical native Windows locale name.
34405 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34406 gt_cv_locale_fr_utf8=French_France.65001
34409 gt_cv_locale_fr_utf8=none
34413 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
34414 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
34415 # configure script would override the LC_ALL setting. Likewise for
34416 # LC_CTYPE, which is also set at the beginning of the configure script.
34417 # Test for the usual locale name.
34418 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34419 gt_cv_locale_fr_utf8=fr_FR
34421 # Test for the locale name with explicit encoding suffix.
34422 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34423 gt_cv_locale_fr_utf8=fr_FR.UTF-8
34425 # Test for the Solaris 7 locale name.
34426 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
34427 gt_cv_locale_fr_utf8=fr.UTF-8
34430 gt_cv_locale_fr_utf8=none
34440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
34441 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
34442 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
34450 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
34453 case ${gl_cv_func_strerror_r_works-unset} in
34455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
34456 printf %s "checking whether perror matches strerror... " >&6; }
34457 if test ${gl_cv_func_perror_works+y}
34459 printf %s "(cached) " >&6
34461 if test "$cross_compiling" = yes
34464 # Guess yes on native Windows.
34465 mingw*) gl_cv_func_perror_works="guessing yes" ;;
34466 # Otherwise guess no.
34467 *) gl_cv_func_perror_works="guessing no" ;;
34471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34472 /* end confdefs.h. */
34475 #include <stdlib.h>
34476 #include <string.h>
34481 char *str = strerror (-1);
34482 if (!getenv("CONFTEST_OUTPUT")) return 0;
34483 if (!str) str = "";
34493 if ac_fn_c_try_run "$LINENO"
34495 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
34496 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
34497 gl_cv_func_perror_works=yes
34499 gl_cv_func_perror_works=no
34501 rm -rf conftest.txt1 conftest.txt2
34503 gl_cv_func_perror_works=no
34505 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34506 conftest.$ac_objext conftest.beam conftest.$ac_ext
34511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
34512 printf "%s\n" "$gl_cv_func_perror_works" >&6; }
34513 case "$gl_cv_func_perror_works" in
34515 *) REPLACE_PERROR=1 ;;
34523 if test $REPLACE_PERROR = 1; then
34532 gltests_LIBOBJS="$gltests_LIBOBJS perror.$ac_objext"
34540 if test "$GNULIB_PERROR" != 1; then
34541 if test "$GNULIB_PERROR" = 0; then
34542 GNULIB_PERROR=$gl_module_indicator_condition
34544 GNULIB_PERROR="($GNULIB_PERROR || $gl_module_indicator_condition)"
34552 printf "%s\n" "#define GNULIB_TEST_PERROR 1" >>confdefs.h
34560 if test $ac_cv_func_pipe != yes; then
34564 if test $HAVE_PIPE = 0; then
34573 gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
34581 if test "$GNULIB_PIPE" != 1; then
34582 if test "$GNULIB_PIPE" = 0; then
34583 GNULIB_PIPE=$gl_module_indicator_condition
34585 GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
34593 printf "%s\n" "#define GNULIB_TEST_PIPE 1" >>confdefs.h
34599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
34600 printf %s "checking for putenv compatible with GNU and SVID... " >&6; }
34601 if test ${gl_cv_func_svid_putenv+y}
34603 printf %s "(cached) " >&6
34605 if test "$cross_compiling" = yes
34608 # Guess yes on glibc systems.
34609 *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
34610 # Guess no on native Windows.
34611 mingw*) gl_cv_func_svid_putenv="guessing no" ;;
34612 # If we don't know, assume the worst.
34613 *) gl_cv_func_svid_putenv="guessing no" ;;
34617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34618 /* end confdefs.h. */
34619 $ac_includes_default
34624 /* Put it in env. */
34625 if (putenv ("CONFTEST_putenv=val"))
34628 /* Try to remove it. */
34629 if (putenv ("CONFTEST_putenv"))
34632 /* Make sure it was deleted. */
34633 if (getenv ("CONFTEST_putenv") != 0)
34642 if ac_fn_c_try_run "$LINENO"
34644 gl_cv_func_svid_putenv=yes
34646 gl_cv_func_svid_putenv=no
34648 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34649 conftest.$ac_objext conftest.beam conftest.$ac_ext
34654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
34655 printf "%s\n" "$gl_cv_func_svid_putenv" >&6; }
34656 case "$gl_cv_func_svid_putenv" in
34663 if test $REPLACE_PUTENV = 1; then
34672 gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
34675 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
34676 if test "x$ac_cv_have_decl__putenv" = xyes
34683 printf "%s\n" "#define HAVE_DECL__PUTENV $ac_have_decl" >>confdefs.h
34692 if test "$GNULIB_PUTENV" != 1; then
34693 if test "$GNULIB_PUTENV" = 0; then
34694 GNULIB_PUTENV=$gl_module_indicator_condition
34696 GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
34704 printf "%s\n" "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
34711 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
34712 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
34713 # irrelevant for anonymous mappings.
34714 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
34715 if test "x$ac_cv_func_mmap" = xyes
34723 # Try to allow MAP_ANONYMOUS.
34724 gl_have_mmap_anonymous=no
34725 if test $gl_have_mmap = yes; then
34726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
34727 printf %s "checking for MAP_ANONYMOUS... " >&6; }
34728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34729 /* end confdefs.h. */
34731 #include <sys/mman.h>
34732 #ifdef MAP_ANONYMOUS
34733 I cannot identify this map
34737 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34738 $EGREP "I cannot identify this map" >/dev/null 2>&1
34740 gl_have_mmap_anonymous=yes
34744 if test $gl_have_mmap_anonymous != yes; then
34745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34746 /* end confdefs.h. */
34748 #include <sys/mman.h>
34750 I cannot identify this map
34754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34755 $EGREP "I cannot identify this map" >/dev/null 2>&1
34758 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
34760 gl_have_mmap_anonymous=yes
34765 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
34766 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
34767 if test $gl_have_mmap_anonymous = yes; then
34769 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
34779 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
34780 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
34781 # irrelevant for anonymous mappings.
34782 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
34783 if test "x$ac_cv_func_mmap" = xyes
34791 # Try to allow MAP_ANONYMOUS.
34792 gl_have_mmap_anonymous=no
34793 if test $gl_have_mmap = yes; then
34794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
34795 printf %s "checking for MAP_ANONYMOUS... " >&6; }
34796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34797 /* end confdefs.h. */
34799 #include <sys/mman.h>
34800 #ifdef MAP_ANONYMOUS
34801 I cannot identify this map
34805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34806 $EGREP "I cannot identify this map" >/dev/null 2>&1
34808 gl_have_mmap_anonymous=yes
34812 if test $gl_have_mmap_anonymous != yes; then
34813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34814 /* end confdefs.h. */
34816 #include <sys/mman.h>
34818 I cannot identify this map
34822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34823 $EGREP "I cannot identify this map" >/dev/null 2>&1
34826 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
34828 gl_have_mmap_anonymous=yes
34833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
34834 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
34835 if test $gl_have_mmap_anonymous = yes; then
34837 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
34848 if test "$ac_cv_header_winsock2_h" = yes; then
34852 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
34853 printf %s "checking whether select supports a 0 argument... " >&6; }
34854 if test ${gl_cv_func_select_supports0+y}
34856 printf %s "(cached) " >&6
34859 if test "$cross_compiling" = yes
34863 # Guess no on Interix.
34864 interix*) gl_cv_func_select_supports0="guessing no";;
34865 # Guess yes otherwise.
34866 *) gl_cv_func_select_supports0="guessing yes";;
34870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34871 /* end confdefs.h. */
34873 #include <sys/types.h>
34874 #include <sys/time.h>
34875 #if HAVE_SYS_SELECT_H
34876 #include <sys/select.h>
34880 struct timeval timeout;
34881 timeout.tv_sec = 0;
34882 timeout.tv_usec = 5;
34883 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
34886 if ac_fn_c_try_run "$LINENO"
34888 gl_cv_func_select_supports0=yes
34890 gl_cv_func_select_supports0=no
34892 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34893 conftest.$ac_objext conftest.beam conftest.$ac_ext
34898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
34899 printf "%s\n" "$gl_cv_func_select_supports0" >&6; }
34900 case "$gl_cv_func_select_supports0" in
34902 *) REPLACE_SELECT=1 ;;
34905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
34906 printf %s "checking whether select detects invalid fds... " >&6; }
34907 if test ${gl_cv_func_select_detects_ebadf+y}
34909 printf %s "(cached) " >&6
34912 if test "$cross_compiling" = yes
34916 # Guess yes on Linux systems.
34917 linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
34918 # Guess yes on glibc systems.
34919 *-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
34920 # If we don't know, assume the worst.
34921 *) gl_cv_func_select_detects_ebadf="guessing no" ;;
34925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34926 /* end confdefs.h. */
34928 #include <sys/types.h>
34929 #include <sys/time.h>
34930 #if HAVE_SYS_SELECT_H
34931 # include <sys/select.h>
34933 #include <unistd.h>
34945 struct timeval timeout;
34946 timeout.tv_sec = 0;
34947 timeout.tv_usec = 5;
34948 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
34954 if ac_fn_c_try_run "$LINENO"
34956 gl_cv_func_select_detects_ebadf=yes
34958 gl_cv_func_select_detects_ebadf=no
34960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34961 conftest.$ac_objext conftest.beam conftest.$ac_ext
34966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
34967 printf "%s\n" "$gl_cv_func_select_detects_ebadf" >&6; }
34968 case $gl_cv_func_select_detects_ebadf in
34970 *) REPLACE_SELECT=1 ;;
34974 LIB_SELECT="$LIBSOCKET"
34975 if test $REPLACE_SELECT = 1; then
34978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34979 /* end confdefs.h. */
34981 #define WIN32_LEAN_AND_MEAN
34982 #include <windows.h>
34986 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
34990 if ac_fn_c_try_link "$LINENO"
34994 LIB_SELECT="$LIB_SELECT -luser32"
34996 rm -f core conftest.err conftest.$ac_objext \
34997 conftest$ac_exeext conftest.$ac_ext
35003 if test $REPLACE_SELECT = 1; then
35012 gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
35020 if test "$GNULIB_SELECT" != 1; then
35021 if test "$GNULIB_SELECT" = 0; then
35022 GNULIB_SELECT=$gl_module_indicator_condition
35024 GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
35032 printf "%s\n" "#define GNULIB_TEST_SELECT 1" >>confdefs.h
35041 mingw*) REPLACE_SETLOCALE=1 ;;
35044 1.5.*) REPLACE_SETLOCALE=1 ;;
35049 if test $REPLACE_SETLOCALE = 1; then
35058 gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
35069 if test "$GNULIB_SETLOCALE" != 1; then
35070 if test "$GNULIB_SETLOCALE" = 0; then
35071 GNULIB_SETLOCALE=$gl_module_indicator_condition
35073 GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
35081 printf "%s\n" "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
35088 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
35089 printf %s "checking for a traditional french locale... " >&6; }
35090 if test ${gt_cv_locale_fr+y}
35092 printf %s "(cached) " >&6
35095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35096 /* end confdefs.h. */
35098 #include <locale.h>
35100 #if HAVE_LANGINFO_CODESET
35101 # include <langinfo.h>
35103 #include <stdlib.h>
35104 #include <string.h>
35108 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
35109 imitates locale dependent behaviour by looking at the environment
35110 variables, and all locales use the UTF-8 encoding. */
35111 #if defined __BEOS__ || defined __HAIKU__
35114 /* Check whether the given locale name is recognized by the system. */
35115 # if defined _WIN32 && !defined __CYGWIN__
35116 /* On native Windows, setlocale(category, "") looks at the system settings,
35117 not at the environment variables. Also, when an encoding suffix such
35118 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35119 category of the locale to "C". */
35120 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35121 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35124 if (setlocale (LC_ALL, "") == NULL) return 1;
35126 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35127 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35128 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35129 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35130 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35131 some unit tests fail.
35132 On MirBSD 10, when an unsupported locale is specified, setlocale()
35133 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
35134 # if HAVE_LANGINFO_CODESET
35136 const char *cs = nl_langinfo (CODESET);
35137 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35138 || strcmp (cs, "UTF-8") == 0)
35143 /* On Cygwin, avoid locale names without encoding suffix, because the
35144 locale_charset() function relies on the encoding suffix. Note that
35145 LC_ALL is set on the command line. */
35146 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35148 /* Check whether in the abbreviation of the second month, the second
35149 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
35150 one byte long. This excludes the UTF-8 encoding. */
35151 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35152 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
35153 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
35154 /* Check whether the decimal separator is a comma.
35155 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35156 are nl_langinfo(RADIXCHAR) are both ".". */
35157 if (localeconv () ->decimal_point[0] != ',') return 1;
35164 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35165 (eval $ac_link) 2>&5
35167 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35168 test $ac_status = 0; } && test -s conftest$ac_exeext; then
35170 # Handle native Windows specially, because there setlocale() interprets
35171 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35172 # "fr" or "fra" as "French" or "French_France.1252",
35173 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35174 # "ja" as "Japanese" or "Japanese_Japan.932",
35177 # Test for the native Windows locale name.
35178 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35179 gt_cv_locale_fr=French_France.1252
35182 gt_cv_locale_fr=none
35186 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35187 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35188 # configure script would override the LC_ALL setting. Likewise for
35189 # LC_CTYPE, which is also set at the beginning of the configure script.
35190 # Test for the usual locale name.
35191 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35192 gt_cv_locale_fr=fr_FR
35194 # Test for the locale name with explicit encoding suffix.
35195 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35196 gt_cv_locale_fr=fr_FR.ISO-8859-1
35198 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
35199 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35200 gt_cv_locale_fr=fr_FR.ISO8859-1
35202 # Test for the HP-UX locale name.
35203 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35204 gt_cv_locale_fr=fr_FR.iso88591
35206 # Test for the Solaris 7 locale name.
35207 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35211 gt_cv_locale_fr=none
35223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
35224 printf "%s\n" "$gt_cv_locale_fr" >&6; }
35225 LOCALE_FR=$gt_cv_locale_fr
35230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
35231 printf %s "checking for a french Unicode locale... " >&6; }
35232 if test ${gt_cv_locale_fr_utf8+y}
35234 printf %s "(cached) " >&6
35237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35238 /* end confdefs.h. */
35240 #include <locale.h>
35242 #if HAVE_LANGINFO_CODESET
35243 # include <langinfo.h>
35245 #include <stdlib.h>
35246 #include <string.h>
35250 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
35251 imitates locale dependent behaviour by looking at the environment
35252 variables, and all locales use the UTF-8 encoding. */
35253 #if !(defined __BEOS__ || defined __HAIKU__)
35254 /* Check whether the given locale name is recognized by the system. */
35255 # if defined _WIN32 && !defined __CYGWIN__
35256 /* On native Windows, setlocale(category, "") looks at the system settings,
35257 not at the environment variables. Also, when an encoding suffix such
35258 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35259 category of the locale to "C". */
35260 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35261 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35264 if (setlocale (LC_ALL, "") == NULL) return 1;
35266 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35267 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35268 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35269 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35270 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35271 some unit tests fail. */
35272 # if HAVE_LANGINFO_CODESET
35274 const char *cs = nl_langinfo (CODESET);
35275 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
35280 /* On Cygwin, avoid locale names without encoding suffix, because the
35281 locale_charset() function relies on the encoding suffix. Note that
35282 LC_ALL is set on the command line. */
35283 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35285 /* Check whether in the abbreviation of the second month, the second
35286 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
35287 two bytes long, with UTF-8 encoding. */
35288 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35289 if (strftime (buf, sizeof (buf), "%b", &t) < 4
35290 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
35293 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
35294 /* Check whether the decimal separator is a comma.
35295 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
35296 are nl_langinfo(RADIXCHAR) are both ".". */
35297 if (localeconv () ->decimal_point[0] != ',') return 1;
35303 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35304 (eval $ac_link) 2>&5
35306 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35307 test $ac_status = 0; } && test -s conftest$ac_exeext; then
35309 # Handle native Windows specially, because there setlocale() interprets
35310 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35311 # "fr" or "fra" as "French" or "French_France.1252",
35312 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35313 # "ja" as "Japanese" or "Japanese_Japan.932",
35316 # Test for the hypothetical native Windows locale name.
35317 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35318 gt_cv_locale_fr_utf8=French_France.65001
35321 gt_cv_locale_fr_utf8=none
35325 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35326 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35327 # configure script would override the LC_ALL setting. Likewise for
35328 # LC_CTYPE, which is also set at the beginning of the configure script.
35329 # Test for the usual locale name.
35330 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35331 gt_cv_locale_fr_utf8=fr_FR
35333 # Test for the locale name with explicit encoding suffix.
35334 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35335 gt_cv_locale_fr_utf8=fr_FR.UTF-8
35337 # Test for the Solaris 7 locale name.
35338 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35339 gt_cv_locale_fr_utf8=fr.UTF-8
35342 gt_cv_locale_fr_utf8=none
35352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
35353 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
35354 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
35360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
35361 printf %s "checking for a traditional japanese locale... " >&6; }
35362 if test ${gt_cv_locale_ja+y}
35364 printf %s "(cached) " >&6
35367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35368 /* end confdefs.h. */
35370 #include <locale.h>
35372 #if HAVE_LANGINFO_CODESET
35373 # include <langinfo.h>
35375 #include <stdlib.h>
35376 #include <string.h>
35381 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
35382 imitates locale dependent behaviour by looking at the environment
35383 variables, and all locales use the UTF-8 encoding. */
35384 #if defined __BEOS__ || defined __HAIKU__
35387 /* Check whether the given locale name is recognized by the system. */
35388 # if defined _WIN32 && !defined __CYGWIN__
35389 /* On native Windows, setlocale(category, "") looks at the system settings,
35390 not at the environment variables. Also, when an encoding suffix such
35391 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35392 category of the locale to "C". */
35393 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35394 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35397 if (setlocale (LC_ALL, "") == NULL) return 1;
35399 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35400 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35401 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35402 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35403 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35404 some unit tests fail.
35405 On MirBSD 10, when an unsupported locale is specified, setlocale()
35406 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
35407 # if HAVE_LANGINFO_CODESET
35409 const char *cs = nl_langinfo (CODESET);
35410 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35411 || strcmp (cs, "UTF-8") == 0)
35416 /* On Cygwin, avoid locale names without encoding suffix, because the
35417 locale_charset() function relies on the encoding suffix. Note that
35418 LC_ALL is set on the command line. */
35419 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35421 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
35422 on Cygwin 1.5.x. */
35423 if (MB_CUR_MAX == 1)
35425 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
35426 This excludes the UTF-8 encoding (except on MirBSD). */
35429 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35430 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
35431 for (p = buf; *p != '\0'; p++)
35432 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
35440 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35441 (eval $ac_link) 2>&5
35443 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35444 test $ac_status = 0; } && test -s conftest$ac_exeext; then
35446 # Handle native Windows specially, because there setlocale() interprets
35447 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35448 # "fr" or "fra" as "French" or "French_France.1252",
35449 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35450 # "ja" as "Japanese" or "Japanese_Japan.932",
35453 # Note that on native Windows, the Japanese locale is
35454 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
35455 # cannot use it here.
35456 gt_cv_locale_ja=none
35459 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35460 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35461 # configure script would override the LC_ALL setting. Likewise for
35462 # LC_CTYPE, which is also set at the beginning of the configure script.
35463 # Test for the AIX locale name.
35464 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35465 gt_cv_locale_ja=ja_JP
35467 # Test for the locale name with explicit encoding suffix.
35468 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35469 gt_cv_locale_ja=ja_JP.EUC-JP
35471 # Test for the HP-UX, OSF/1, NetBSD locale name.
35472 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35473 gt_cv_locale_ja=ja_JP.eucJP
35475 # Test for the IRIX, FreeBSD locale name.
35476 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35477 gt_cv_locale_ja=ja_JP.EUC
35479 # Test for the Solaris 7 locale name.
35480 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35483 # Special test for NetBSD 1.6.
35484 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
35485 gt_cv_locale_ja=ja_JP.eucJP
35488 gt_cv_locale_ja=none
35501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
35502 printf "%s\n" "$gt_cv_locale_ja" >&6; }
35503 LOCALE_JA=$gt_cv_locale_ja
35509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
35510 printf %s "checking for a transitional chinese locale... " >&6; }
35511 if test ${gt_cv_locale_zh_CN+y}
35513 printf %s "(cached) " >&6
35516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35517 /* end confdefs.h. */
35519 #include <locale.h>
35520 #include <stdlib.h>
35522 #if HAVE_LANGINFO_CODESET
35523 # include <langinfo.h>
35525 #include <stdlib.h>
35526 #include <string.h>
35531 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
35532 imitates locale dependent behaviour by looking at the environment
35533 variables, and all locales use the UTF-8 encoding. */
35534 #if defined __BEOS__ || defined __HAIKU__
35537 /* Check whether the given locale name is recognized by the system. */
35538 # if defined _WIN32 && !defined __CYGWIN__
35539 /* On native Windows, setlocale(category, "") looks at the system settings,
35540 not at the environment variables. Also, when an encoding suffix such
35541 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
35542 category of the locale to "C". */
35543 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
35544 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
35547 if (setlocale (LC_ALL, "") == NULL) return 1;
35549 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
35550 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
35551 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
35552 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
35553 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
35554 some unit tests fail.
35555 On MirBSD 10, when an unsupported locale is specified, setlocale()
35556 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
35557 # if HAVE_LANGINFO_CODESET
35559 const char *cs = nl_langinfo (CODESET);
35560 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
35561 || strcmp (cs, "UTF-8") == 0)
35566 /* On Cygwin, avoid locale names without encoding suffix, because the
35567 locale_charset() function relies on the encoding suffix. Note that
35568 LC_ALL is set on the command line. */
35569 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
35571 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
35572 This excludes the UTF-8 encoding (except on MirBSD). */
35575 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
35576 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
35577 for (p = buf; *p != '\0'; p++)
35578 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
35581 /* Check whether a typical GB18030 multibyte sequence is recognized as a
35582 single wide character. This excludes the GB2312 and GBK encodings. */
35583 if (mblen ("\203\062\332\066", 5) != 4)
35590 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
35591 (eval $ac_link) 2>&5
35593 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35594 test $ac_status = 0; } && test -s conftest$ac_exeext; then
35596 # Handle native Windows specially, because there setlocale() interprets
35597 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
35598 # "fr" or "fra" as "French" or "French_France.1252",
35599 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
35600 # "ja" as "Japanese" or "Japanese_Japan.932",
35603 # Test for the hypothetical native Windows locale name.
35604 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35605 gt_cv_locale_zh_CN=Chinese_China.54936
35608 gt_cv_locale_zh_CN=none
35612 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
35613 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
35614 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
35615 gt_cv_locale_zh_CN=none
35618 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
35619 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
35620 # configure script would override the LC_ALL setting. Likewise for
35621 # LC_CTYPE, which is also set at the beginning of the configure script.
35622 # Test for the locale name without encoding suffix.
35623 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35624 gt_cv_locale_zh_CN=zh_CN
35626 # Test for the locale name with explicit encoding suffix.
35627 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
35628 gt_cv_locale_zh_CN=zh_CN.GB18030
35631 gt_cv_locale_zh_CN=none
35637 # If there was a link error, due to mblen(), the system is so old that
35638 # it certainly doesn't have a chinese locale.
35639 gt_cv_locale_zh_CN=none
35644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
35645 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
35646 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
35650 if test "$ac_cv_header_winsock2_h" = yes; then
35659 gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
35667 if test "$GNULIB_SETSOCKOPT" != 1; then
35668 if test "$GNULIB_SETSOCKOPT" = 0; then
35669 GNULIB_SETSOCKOPT=$gl_module_indicator_condition
35671 GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
35679 printf "%s\n" "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
35685 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
35687 if test "x$ac_cv_have_decl_sleep" = xyes
35694 printf "%s\n" "#define HAVE_DECL_SLEEP $ac_have_decl" >>confdefs.h
35697 if test $ac_cv_have_decl_sleep != yes; then
35700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
35701 printf %s "checking for working sleep... " >&6; }
35702 if test ${gl_cv_func_sleep_works+y}
35704 printf %s "(cached) " >&6
35706 if test "$cross_compiling" = yes
35709 # Guess yes on glibc systems.
35710 *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
35711 # Guess no on native Windows.
35712 mingw*) gl_cv_func_sleep_works="guessing no" ;;
35713 # If we don't know, assume the worst.
35714 *) gl_cv_func_sleep_works="guessing no" ;;
35718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35719 /* end confdefs.h. */
35722 #include <unistd.h>
35723 #include <signal.h>
35725 handle_alarm (int sig)
35727 if (sig != SIGALRM)
35735 /* Failure to compile this test due to missing alarm is okay,
35736 since all such platforms (mingw) also lack sleep. */
35737 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
35738 unsigned int remaining;
35739 signal (SIGALRM, handle_alarm);
35741 remaining = sleep (pentecost);
35742 if (remaining > pentecost)
35744 if (remaining <= pentecost - 10)
35752 if ac_fn_c_try_run "$LINENO"
35754 gl_cv_func_sleep_works=yes
35756 gl_cv_func_sleep_works=no
35758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35759 conftest.$ac_objext conftest.beam conftest.$ac_ext
35763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
35764 printf "%s\n" "$gl_cv_func_sleep_works" >&6; }
35765 case "$gl_cv_func_sleep_works" in
35773 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
35782 gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
35790 if test "$GNULIB_SLEEP" != 1; then
35791 if test "$GNULIB_SLEEP" = 0; then
35792 GNULIB_SLEEP=$gl_module_indicator_condition
35794 GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
35802 printf "%s\n" "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
35809 gl_cv_func_snprintf_usable=no
35810 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
35811 if test "x$ac_cv_func_snprintf" = xyes
35813 printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
35817 if test $ac_cv_func_snprintf = yes; then
35821 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
35822 printf %s "checking whether snprintf respects a size of 1... " >&6; }
35823 if test ${gl_cv_func_snprintf_size1+y}
35825 printf %s "(cached) " >&6
35828 if test "$cross_compiling" = yes
35831 # Guess yes on native Windows.
35832 mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
35833 *) gl_cv_func_snprintf_size1="guessing yes" ;;
35837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35838 /* end confdefs.h. */
35842 # define my_snprintf snprintf
35844 # include <stdarg.h>
35845 static int my_snprintf (char *buf, int size, const char *format, ...)
35849 va_start (args, format);
35850 ret = vsnprintf (buf, size, format, args);
35857 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
35858 my_snprintf (buf, 1, "%d", 12345);
35859 return buf[1] != 'E';
35862 if ac_fn_c_try_run "$LINENO"
35864 gl_cv_func_snprintf_size1=yes
35866 gl_cv_func_snprintf_size1=no
35868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35869 conftest.$ac_objext conftest.beam conftest.$ac_ext
35874 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
35875 printf "%s\n" "$gl_cv_func_snprintf_size1" >&6; }
35877 case "$gl_cv_func_snprintf_size1" in
35880 case "$gl_cv_func_snprintf_retval_c99" in
35884 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
35885 printf %s "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
35886 if test ${gl_cv_func_printf_positions+y}
35888 printf %s "(cached) " >&6
35891 if test "$cross_compiling" = yes
35895 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
35896 gl_cv_func_printf_positions="guessing no";;
35897 beos*) gl_cv_func_printf_positions="guessing no";;
35898 # Guess no on native Windows.
35899 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
35900 *) gl_cv_func_printf_positions="guessing yes";;
35904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35905 /* end confdefs.h. */
35908 #include <string.h>
35909 /* The string "%2$d %1$d", with dollar characters protected from the shell's
35910 dollar expansion (possibly an autoconf bug). */
35911 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
35912 static char buf[100];
35915 sprintf (buf, format, 33, 55);
35916 return (strcmp (buf, "55 33") != 0);
35919 if ac_fn_c_try_run "$LINENO"
35921 gl_cv_func_printf_positions=yes
35923 gl_cv_func_printf_positions=no
35925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35926 conftest.$ac_objext conftest.beam conftest.$ac_ext
35931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
35932 printf "%s\n" "$gl_cv_func_printf_positions" >&6; }
35934 case "$gl_cv_func_printf_positions" in
35936 gl_cv_func_snprintf_usable=yes
35944 if test $gl_cv_func_snprintf_usable = no; then
35955 gltests_LIBOBJS="$gltests_LIBOBJS snprintf.$ac_objext"
35957 if test $ac_cv_func_snprintf = yes; then
35961 if test $ac_cv_have_decl_snprintf = yes; then
35969 if test $ac_cv_have_decl_snprintf = no; then
35970 HAVE_DECL_SNPRINTF=0
35978 if test "$GNULIB_SNPRINTF" != 1; then
35979 if test "$GNULIB_SNPRINTF" = 0; then
35980 GNULIB_SNPRINTF=$gl_module_indicator_condition
35982 GNULIB_SNPRINTF="($GNULIB_SNPRINTF || $gl_module_indicator_condition)"
35990 printf "%s\n" "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
35996 printf "%s\n" "#define GNULIB_SNPRINTF $gl_module_indicator_condition" >>confdefs.h
36000 if test "$ac_cv_header_winsock2_h" = yes; then
36009 gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
36012 # When this module is used, sockets may actually occur as file descriptors,
36013 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
36017 if test "$ac_cv_header_winsock2_h" = yes; then
36018 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
36019 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
36026 if test "$GNULIB_SOCKET" != 1; then
36027 if test "$GNULIB_SOCKET" = 0; then
36028 GNULIB_SOCKET=$gl_module_indicator_condition
36030 GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
36038 printf "%s\n" "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
36044 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
36045 /* <sys/types.h> is not needed according to POSIX, but the
36046 <sys/socket.h> in i386-unknown-freebsd4.10 and
36047 powerpc-apple-darwin5.5 required it. */
36048 #include <sys/types.h>
36049 #if HAVE_SYS_SOCKET_H
36050 # include <sys/socket.h>
36051 #elif HAVE_WS2TCPIP_H
36052 # include <ws2tcpip.h>
36056 if test "x$ac_cv_type_socklen_t" = xyes
36060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
36061 printf %s "checking for socklen_t equivalent... " >&6; }
36062 if test ${gl_cv_socklen_t_equiv+y}
36064 printf %s "(cached) " >&6
36066 # Systems have either "struct sockaddr *" or
36067 # "void *" as the second argument to getpeername
36068 gl_cv_socklen_t_equiv=
36069 for arg2 in "struct sockaddr" void; do
36070 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
36071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36072 /* end confdefs.h. */
36073 #include <sys/types.h>
36074 #include <sys/socket.h>
36076 int getpeername (int, $arg2 *, $t *);
36081 getpeername (0, 0, &len);
36086 if ac_fn_c_try_compile "$LINENO"
36088 gl_cv_socklen_t_equiv="$t"
36090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36091 test "$gl_cv_socklen_t_equiv" != "" && break
36093 test "$gl_cv_socklen_t_equiv" != "" && break
36095 if test "$gl_cv_socklen_t_equiv" = ""; then
36096 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
36100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
36101 printf "%s\n" "$gl_cv_socklen_t_equiv" >&6; }
36103 printf "%s\n" "#define socklen_t $gl_cv_socklen_t_equiv" >>confdefs.h
36108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
36109 printf %s "checking for working stdalign.h... " >&6; }
36110 if test ${gl_cv_header_working_stdalign_h+y}
36112 printf %s "(cached) " >&6
36114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36115 /* end confdefs.h. */
36116 #include <stdalign.h>
36117 #include <stddef.h>
36119 /* Test that alignof yields a result consistent with offsetof.
36120 This catches GCC bug 52023
36121 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
36123 template <class t> struct alignof_helper { char a; t b; };
36124 # define ao(type) offsetof (alignof_helper<type>, b)
36126 # define ao(type) offsetof (struct { char a; type b; }, b)
36128 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
36129 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
36130 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
36132 /* Test _Alignas only on platforms where gnulib can help. */
36134 ((defined __cplusplus && 201103 <= __cplusplus) \
36135 || (defined __APPLE__ && defined __MACH__ \
36136 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
36138 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
36139 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
36140 || 1300 <= _MSC_VER)
36141 struct alignas_test { char c; char alignas (8) alignas_8; };
36142 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
36154 if ac_fn_c_try_compile "$LINENO"
36156 gl_cv_header_working_stdalign_h=yes
36158 gl_cv_header_working_stdalign_h=no
36160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
36163 printf "%s\n" "$gl_cv_header_working_stdalign_h" >&6; }
36165 if test $gl_cv_header_working_stdalign_h = yes; then
36168 STDALIGN_H='stdalign.h'
36172 if test -n "$STDALIGN_H"; then
36173 GL_GENERATE_STDALIGN_H_TRUE=
36174 GL_GENERATE_STDALIGN_H_FALSE='#'
36176 GL_GENERATE_STDALIGN_H_TRUE='#'
36177 GL_GENERATE_STDALIGN_H_FALSE=
36190 if test $ac_cv_have_decl_strerror_r = no; then
36191 HAVE_DECL_STRERROR_R=0
36194 if test $ac_cv_func_strerror_r = yes; then
36195 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
36196 if test $gl_cv_func_strerror_r_posix_signature = yes; then
36197 case "$gl_cv_func_strerror_r_works" in
36198 *no) REPLACE_STRERROR_R=1 ;;
36201 REPLACE_STRERROR_R=1
36204 REPLACE_STRERROR_R=1
36208 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
36217 gltests_LIBOBJS="$gltests_LIBOBJS strerror_r.$ac_objext"
36230 if test "$GNULIB_STRERROR_R" != 1; then
36231 if test "$GNULIB_STRERROR_R" = 0; then
36232 GNULIB_STRERROR_R=$gl_module_indicator_condition
36234 GNULIB_STRERROR_R="($GNULIB_STRERROR_R || $gl_module_indicator_condition)"
36242 printf "%s\n" "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
36248 printf "%s\n" "#define GNULIB_STRERROR_R_POSIX $gl_module_indicator_condition" >>confdefs.h
36254 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
36255 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
36256 # irrelevant for anonymous mappings.
36257 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
36258 if test "x$ac_cv_func_mmap" = xyes
36266 # Try to allow MAP_ANONYMOUS.
36267 gl_have_mmap_anonymous=no
36268 if test $gl_have_mmap = yes; then
36269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
36270 printf %s "checking for MAP_ANONYMOUS... " >&6; }
36271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36272 /* end confdefs.h. */
36274 #include <sys/mman.h>
36275 #ifdef MAP_ANONYMOUS
36276 I cannot identify this map
36280 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36281 $EGREP "I cannot identify this map" >/dev/null 2>&1
36283 gl_have_mmap_anonymous=yes
36287 if test $gl_have_mmap_anonymous != yes; then
36288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36289 /* end confdefs.h. */
36291 #include <sys/mman.h>
36293 I cannot identify this map
36297 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36298 $EGREP "I cannot identify this map" >/dev/null 2>&1
36301 printf "%s\n" "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
36303 gl_have_mmap_anonymous=yes
36308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
36309 printf "%s\n" "$gl_have_mmap_anonymous" >&6; }
36310 if test $gl_have_mmap_anonymous = yes; then
36312 printf "%s\n" "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
36322 if test $ac_cv_func_symlink = no; then
36325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
36326 printf %s "checking whether symlink handles trailing slash correctly... " >&6; }
36327 if test ${gl_cv_func_symlink_works+y}
36329 printf %s "(cached) " >&6
36331 if test "$cross_compiling" = yes
36334 # Guess yes on Linux systems.
36335 linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
36336 # Guess yes on glibc systems.
36337 *-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
36338 # If we don't know, assume the worst.
36339 *) gl_cv_func_symlink_works="guessing no" ;;
36343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36344 /* end confdefs.h. */
36345 #include <unistd.h>
36351 if (!symlink ("a", "conftest.link/"))
36353 if (symlink ("conftest.f", "conftest.lnk2"))
36355 else if (!symlink ("a", "conftest.lnk2/"))
36363 if ac_fn_c_try_run "$LINENO"
36365 gl_cv_func_symlink_works=yes
36367 gl_cv_func_symlink_works=no
36369 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36370 conftest.$ac_objext conftest.beam conftest.$ac_ext
36373 rm -f conftest.f conftest.link conftest.lnk2
36375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
36376 printf "%s\n" "$gl_cv_func_symlink_works" >&6; }
36377 case "$gl_cv_func_symlink_works" in
36385 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
36394 gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
36402 if test "$GNULIB_SYMLINK" != 1; then
36403 if test "$GNULIB_SYMLINK" = 0; then
36404 GNULIB_SYMLINK=$gl_module_indicator_condition
36406 GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
36414 printf "%s\n" "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
36422 if test $ac_cv_header_sys_ioctl_h = yes; then
36424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
36425 printf %s "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
36426 if test ${gl_cv_decl_ioctl_in_sys_ioctl_h+y}
36428 printf %s "(cached) " >&6
36430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36431 /* end confdefs.h. */
36432 #include <sys/ioctl.h>
36442 if ac_fn_c_try_compile "$LINENO"
36444 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
36446 gl_cv_decl_ioctl_in_sys_ioctl_h=no
36448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
36452 printf "%s\n" "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
36466 if test $gl_cv_have_include_next = yes; then
36467 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
36469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
36470 printf %s "checking absolute name of <sys/ioctl.h>... " >&6; }
36471 if test ${gl_cv_next_sys_ioctl_h+y}
36473 printf %s "(cached) " >&6
36476 if test $ac_cv_header_sys_ioctl_h = yes; then
36481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36482 /* end confdefs.h. */
36483 #include <sys/ioctl.h>
36486 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36487 *) gl_absname_cpp="$ac_cpp" ;;
36492 gl_dirsep_regex='[/\\]'
36495 gl_dirsep_regex='\/'
36498 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36499 gl_header_literal_regex=`echo 'sys/ioctl.h' \
36500 | sed -e "$gl_make_literal_regex_sed"`
36501 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36502 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36508 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36509 sed -n "$gl_absolute_header_sed"`
36511 gl_header=$gl_cv_absolute_sys_ioctl_h
36512 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
36514 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
36519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
36520 printf "%s\n" "$gl_cv_next_sys_ioctl_h" >&6; }
36522 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
36524 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36525 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36526 gl_next_as_first_directive='<'sys/ioctl.h'>'
36528 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36529 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
36531 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
36558 if test $gl_cv_have_include_next = yes; then
36559 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
36561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
36562 printf %s "checking absolute name of <sys/uio.h>... " >&6; }
36563 if test ${gl_cv_next_sys_uio_h+y}
36565 printf %s "(cached) " >&6
36568 if test $ac_cv_header_sys_uio_h = yes; then
36573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36574 /* end confdefs.h. */
36575 #include <sys/uio.h>
36578 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36579 *) gl_absname_cpp="$ac_cpp" ;;
36584 gl_dirsep_regex='[/\\]'
36587 gl_dirsep_regex='\/'
36590 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36591 gl_header_literal_regex=`echo 'sys/uio.h' \
36592 | sed -e "$gl_make_literal_regex_sed"`
36593 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36594 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36600 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36601 sed -n "$gl_absolute_header_sed"`
36603 gl_header=$gl_cv_absolute_sys_uio_h
36604 gl_cv_next_sys_uio_h='"'$gl_header'"'
36606 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
36611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
36612 printf "%s\n" "$gl_cv_next_sys_uio_h" >&6; }
36614 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
36616 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36617 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36618 gl_next_as_first_directive='<'sys/uio.h'>'
36620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36621 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
36623 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
36628 if test $ac_cv_header_sys_uio_h = yes; then
36636 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
36638 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
36643 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
36644 printf %s "checking for a traditional french locale... " >&6; }
36645 if test ${gt_cv_locale_fr+y}
36647 printf %s "(cached) " >&6
36650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36651 /* end confdefs.h. */
36653 #include <locale.h>
36655 #if HAVE_LANGINFO_CODESET
36656 # include <langinfo.h>
36658 #include <stdlib.h>
36659 #include <string.h>
36663 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
36664 imitates locale dependent behaviour by looking at the environment
36665 variables, and all locales use the UTF-8 encoding. */
36666 #if defined __BEOS__ || defined __HAIKU__
36669 /* Check whether the given locale name is recognized by the system. */
36670 # if defined _WIN32 && !defined __CYGWIN__
36671 /* On native Windows, setlocale(category, "") looks at the system settings,
36672 not at the environment variables. Also, when an encoding suffix such
36673 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36674 category of the locale to "C". */
36675 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36676 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36679 if (setlocale (LC_ALL, "") == NULL) return 1;
36681 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36682 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36683 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36684 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36685 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36686 some unit tests fail.
36687 On MirBSD 10, when an unsupported locale is specified, setlocale()
36688 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
36689 # if HAVE_LANGINFO_CODESET
36691 const char *cs = nl_langinfo (CODESET);
36692 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36693 || strcmp (cs, "UTF-8") == 0)
36698 /* On Cygwin, avoid locale names without encoding suffix, because the
36699 locale_charset() function relies on the encoding suffix. Note that
36700 LC_ALL is set on the command line. */
36701 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36703 /* Check whether in the abbreviation of the second month, the second
36704 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
36705 one byte long. This excludes the UTF-8 encoding. */
36706 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36707 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
36708 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36709 /* Check whether the decimal separator is a comma.
36710 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36711 are nl_langinfo(RADIXCHAR) are both ".". */
36712 if (localeconv () ->decimal_point[0] != ',') return 1;
36719 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36720 (eval $ac_link) 2>&5
36722 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36723 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36725 # Handle native Windows specially, because there setlocale() interprets
36726 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36727 # "fr" or "fra" as "French" or "French_France.1252",
36728 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36729 # "ja" as "Japanese" or "Japanese_Japan.932",
36732 # Test for the native Windows locale name.
36733 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36734 gt_cv_locale_fr=French_France.1252
36737 gt_cv_locale_fr=none
36741 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36742 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36743 # configure script would override the LC_ALL setting. Likewise for
36744 # LC_CTYPE, which is also set at the beginning of the configure script.
36745 # Test for the usual locale name.
36746 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36747 gt_cv_locale_fr=fr_FR
36749 # Test for the locale name with explicit encoding suffix.
36750 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36751 gt_cv_locale_fr=fr_FR.ISO-8859-1
36753 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
36754 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36755 gt_cv_locale_fr=fr_FR.ISO8859-1
36757 # Test for the HP-UX locale name.
36758 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36759 gt_cv_locale_fr=fr_FR.iso88591
36761 # Test for the Solaris 7 locale name.
36762 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36766 gt_cv_locale_fr=none
36778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
36779 printf "%s\n" "$gt_cv_locale_fr" >&6; }
36780 LOCALE_FR=$gt_cv_locale_fr
36785 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
36786 printf %s "checking for a french Unicode locale... " >&6; }
36787 if test ${gt_cv_locale_fr_utf8+y}
36789 printf %s "(cached) " >&6
36792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36793 /* end confdefs.h. */
36795 #include <locale.h>
36797 #if HAVE_LANGINFO_CODESET
36798 # include <langinfo.h>
36800 #include <stdlib.h>
36801 #include <string.h>
36805 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
36806 imitates locale dependent behaviour by looking at the environment
36807 variables, and all locales use the UTF-8 encoding. */
36808 #if !(defined __BEOS__ || defined __HAIKU__)
36809 /* Check whether the given locale name is recognized by the system. */
36810 # if defined _WIN32 && !defined __CYGWIN__
36811 /* On native Windows, setlocale(category, "") looks at the system settings,
36812 not at the environment variables. Also, when an encoding suffix such
36813 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36814 category of the locale to "C". */
36815 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36816 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36819 if (setlocale (LC_ALL, "") == NULL) return 1;
36821 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36822 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36823 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36824 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36825 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36826 some unit tests fail. */
36827 # if HAVE_LANGINFO_CODESET
36829 const char *cs = nl_langinfo (CODESET);
36830 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
36835 /* On Cygwin, avoid locale names without encoding suffix, because the
36836 locale_charset() function relies on the encoding suffix. Note that
36837 LC_ALL is set on the command line. */
36838 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36840 /* Check whether in the abbreviation of the second month, the second
36841 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
36842 two bytes long, with UTF-8 encoding. */
36843 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36844 if (strftime (buf, sizeof (buf), "%b", &t) < 4
36845 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
36848 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
36849 /* Check whether the decimal separator is a comma.
36850 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
36851 are nl_langinfo(RADIXCHAR) are both ".". */
36852 if (localeconv () ->decimal_point[0] != ',') return 1;
36858 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36859 (eval $ac_link) 2>&5
36861 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36862 test $ac_status = 0; } && test -s conftest$ac_exeext; then
36864 # Handle native Windows specially, because there setlocale() interprets
36865 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
36866 # "fr" or "fra" as "French" or "French_France.1252",
36867 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
36868 # "ja" as "Japanese" or "Japanese_Japan.932",
36871 # Test for the hypothetical native Windows locale name.
36872 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36873 gt_cv_locale_fr_utf8=French_France.65001
36876 gt_cv_locale_fr_utf8=none
36880 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
36881 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
36882 # configure script would override the LC_ALL setting. Likewise for
36883 # LC_CTYPE, which is also set at the beginning of the configure script.
36884 # Test for the usual locale name.
36885 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36886 gt_cv_locale_fr_utf8=fr_FR
36888 # Test for the locale name with explicit encoding suffix.
36889 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36890 gt_cv_locale_fr_utf8=fr_FR.UTF-8
36892 # Test for the Solaris 7 locale name.
36893 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
36894 gt_cv_locale_fr_utf8=fr.UTF-8
36897 gt_cv_locale_fr_utf8=none
36907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
36908 printf "%s\n" "$gt_cv_locale_fr_utf8" >&6; }
36909 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
36915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
36916 printf %s "checking for a traditional japanese locale... " >&6; }
36917 if test ${gt_cv_locale_ja+y}
36919 printf %s "(cached) " >&6
36922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36923 /* end confdefs.h. */
36925 #include <locale.h>
36927 #if HAVE_LANGINFO_CODESET
36928 # include <langinfo.h>
36930 #include <stdlib.h>
36931 #include <string.h>
36936 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
36937 imitates locale dependent behaviour by looking at the environment
36938 variables, and all locales use the UTF-8 encoding. */
36939 #if defined __BEOS__ || defined __HAIKU__
36942 /* Check whether the given locale name is recognized by the system. */
36943 # if defined _WIN32 && !defined __CYGWIN__
36944 /* On native Windows, setlocale(category, "") looks at the system settings,
36945 not at the environment variables. Also, when an encoding suffix such
36946 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
36947 category of the locale to "C". */
36948 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
36949 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
36952 if (setlocale (LC_ALL, "") == NULL) return 1;
36954 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
36955 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
36956 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
36957 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
36958 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
36959 some unit tests fail.
36960 On MirBSD 10, when an unsupported locale is specified, setlocale()
36961 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
36962 # if HAVE_LANGINFO_CODESET
36964 const char *cs = nl_langinfo (CODESET);
36965 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
36966 || strcmp (cs, "UTF-8") == 0)
36971 /* On Cygwin, avoid locale names without encoding suffix, because the
36972 locale_charset() function relies on the encoding suffix. Note that
36973 LC_ALL is set on the command line. */
36974 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
36976 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
36977 on Cygwin 1.5.x. */
36978 if (MB_CUR_MAX == 1)
36980 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
36981 This excludes the UTF-8 encoding (except on MirBSD). */
36984 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
36985 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
36986 for (p = buf; *p != '\0'; p++)
36987 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
36995 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
36996 (eval $ac_link) 2>&5
36998 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36999 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37001 # Handle native Windows specially, because there setlocale() interprets
37002 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37003 # "fr" or "fra" as "French" or "French_France.1252",
37004 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37005 # "ja" as "Japanese" or "Japanese_Japan.932",
37008 # Note that on native Windows, the Japanese locale is
37009 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
37010 # cannot use it here.
37011 gt_cv_locale_ja=none
37014 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37015 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37016 # configure script would override the LC_ALL setting. Likewise for
37017 # LC_CTYPE, which is also set at the beginning of the configure script.
37018 # Test for the AIX locale name.
37019 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37020 gt_cv_locale_ja=ja_JP
37022 # Test for the locale name with explicit encoding suffix.
37023 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37024 gt_cv_locale_ja=ja_JP.EUC-JP
37026 # Test for the HP-UX, OSF/1, NetBSD locale name.
37027 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37028 gt_cv_locale_ja=ja_JP.eucJP
37030 # Test for the IRIX, FreeBSD locale name.
37031 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37032 gt_cv_locale_ja=ja_JP.EUC
37034 # Test for the Solaris 7 locale name.
37035 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37038 # Special test for NetBSD 1.6.
37039 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
37040 gt_cv_locale_ja=ja_JP.eucJP
37043 gt_cv_locale_ja=none
37056 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
37057 printf "%s\n" "$gt_cv_locale_ja" >&6; }
37058 LOCALE_JA=$gt_cv_locale_ja
37064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
37065 printf %s "checking for a transitional chinese locale... " >&6; }
37066 if test ${gt_cv_locale_zh_CN+y}
37068 printf %s "(cached) " >&6
37071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37072 /* end confdefs.h. */
37074 #include <locale.h>
37075 #include <stdlib.h>
37077 #if HAVE_LANGINFO_CODESET
37078 # include <langinfo.h>
37080 #include <stdlib.h>
37081 #include <string.h>
37086 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
37087 imitates locale dependent behaviour by looking at the environment
37088 variables, and all locales use the UTF-8 encoding. */
37089 #if defined __BEOS__ || defined __HAIKU__
37092 /* Check whether the given locale name is recognized by the system. */
37093 # if defined _WIN32 && !defined __CYGWIN__
37094 /* On native Windows, setlocale(category, "") looks at the system settings,
37095 not at the environment variables. Also, when an encoding suffix such
37096 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
37097 category of the locale to "C". */
37098 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
37099 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
37102 if (setlocale (LC_ALL, "") == NULL) return 1;
37104 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
37105 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
37106 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
37107 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
37108 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
37109 some unit tests fail.
37110 On MirBSD 10, when an unsupported locale is specified, setlocale()
37111 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
37112 # if HAVE_LANGINFO_CODESET
37114 const char *cs = nl_langinfo (CODESET);
37115 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
37116 || strcmp (cs, "UTF-8") == 0)
37121 /* On Cygwin, avoid locale names without encoding suffix, because the
37122 locale_charset() function relies on the encoding suffix. Note that
37123 LC_ALL is set on the command line. */
37124 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
37126 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
37127 This excludes the UTF-8 encoding (except on MirBSD). */
37130 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
37131 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
37132 for (p = buf; *p != '\0'; p++)
37133 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
37136 /* Check whether a typical GB18030 multibyte sequence is recognized as a
37137 single wide character. This excludes the GB2312 and GBK encodings. */
37138 if (mblen ("\203\062\332\066", 5) != 4)
37145 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
37146 (eval $ac_link) 2>&5
37148 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
37149 test $ac_status = 0; } && test -s conftest$ac_exeext; then
37151 # Handle native Windows specially, because there setlocale() interprets
37152 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
37153 # "fr" or "fra" as "French" or "French_France.1252",
37154 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
37155 # "ja" as "Japanese" or "Japanese_Japan.932",
37158 # Test for the hypothetical native Windows locale name.
37159 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37160 gt_cv_locale_zh_CN=Chinese_China.54936
37163 gt_cv_locale_zh_CN=none
37167 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
37168 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
37169 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
37170 gt_cv_locale_zh_CN=none
37173 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
37174 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
37175 # configure script would override the LC_ALL setting. Likewise for
37176 # LC_CTYPE, which is also set at the beginning of the configure script.
37177 # Test for the locale name without encoding suffix.
37178 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37179 gt_cv_locale_zh_CN=zh_CN
37181 # Test for the locale name with explicit encoding suffix.
37182 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
37183 gt_cv_locale_zh_CN=zh_CN.GB18030
37186 gt_cv_locale_zh_CN=none
37192 # If there was a link error, due to mblen(), the system is so old that
37193 # it certainly doesn't have a chinese locale.
37194 gt_cv_locale_zh_CN=none
37199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
37200 printf "%s\n" "$gt_cv_locale_zh_CN" >&6; }
37201 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
37208 if test $ac_cv_func_wctob = no; then
37216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
37217 printf %s "checking whether wctob works... " >&6; }
37218 if test ${gl_cv_func_wctob_works+y}
37220 printf %s "(cached) " >&6
37224 # Guess no on Solaris <= 9 and Cygwin.
37225 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
37226 gl_cv_func_wctob_works="guessing no" ;;
37227 # Guess no on native Windows.
37229 gl_cv_func_wctob_works="guessing no" ;;
37230 # Guess yes otherwise.
37231 *) gl_cv_func_wctob_works="guessing yes" ;;
37235 if test "$cross_compiling" = yes
37239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37240 /* end confdefs.h. */
37242 #include <locale.h>
37243 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37245 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37246 included before <wchar.h>. */
37247 #include <stddef.h>
37252 register long global __asm__ ("%ebx");
37256 setlocale (LC_ALL, "en_US.UTF-8");
37258 global = 0x12345678;
37259 if (wctob (0x00FC) != -1)
37261 if (global != 0x12345678)
37266 if ac_fn_c_try_run "$LINENO"
37270 gl_cv_func_wctob_works=no
37272 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37273 conftest.$ac_objext conftest.beam conftest.$ac_ext
37278 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
37279 if test "$cross_compiling" = yes
37283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37284 /* end confdefs.h. */
37286 #include <locale.h>
37287 #include <string.h>
37288 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37290 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
37291 included before <wchar.h>. */
37292 #include <stddef.h>
37298 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
37302 if (mbtowc (&wc, "\374", 1) == 1)
37303 if (wctob (wc) != (unsigned char) '\374')
37309 if ac_fn_c_try_run "$LINENO"
37311 gl_cv_func_wctob_works=yes
37313 gl_cv_func_wctob_works=no
37315 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37316 conftest.$ac_objext conftest.beam conftest.$ac_ext
37322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
37323 printf "%s\n" "$gl_cv_func_wctob_works" >&6; }
37324 case "$gl_cv_func_wctob_works" in
37326 *) REPLACE_WCTOB=1 ;;
37328 if test $REPLACE_WCTOB = 0; then
37330 ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
37331 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
37333 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
37334 before <wchar.h>. */
37335 #include <stddef.h>
37341 if test "x$ac_cv_have_decl_wctob" = xyes
37348 printf "%s\n" "#define HAVE_DECL_WCTOB $ac_have_decl" >>confdefs.h
37350 if test $ac_cv_have_decl_wctob != yes; then
37356 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
37365 gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
37376 if test "$GNULIB_WCTOB" != 1; then
37377 if test "$GNULIB_WCTOB" = 0; then
37378 GNULIB_WCTOB=$gl_module_indicator_condition
37380 GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
37388 printf "%s\n" "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
37399 if test $REPLACE_WCTOMB = 1; then
37408 gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
37419 if test "$GNULIB_WCTOMB" != 1; then
37420 if test "$GNULIB_WCTOMB" = 0; then
37421 GNULIB_WCTOMB=$gl_module_indicator_condition
37423 GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
37431 printf "%s\n" "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
37445 LIBDIFFUTILS_LIBDEPS="$gl_libdeps"
37447 LIBDIFFUTILS_LTLIBDEPS="$gl_ltlibdeps"
37449 LIBTESTS_LIBDEPS="$gltests_libdeps"
37453 # Check whether --enable-gcc-warnings was given.
37454 if test ${enable_gcc_warnings+y}
37456 enableval=$enable_gcc_warnings; case $enableval in
37458 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
37460 gl_gcc_warnings=$enableval
37462 if test -d "$srcdir"/.git; then
37463 gl_gcc_warnings=yes
37471 if test "$gl_gcc_warnings" = yes; then
37474 ac_cpp='$CPP $CPPFLAGS'
37475 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37476 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37477 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
37481 printf %s "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
37482 if test ${gl_cv_warn_c__Werror__Wunknown_warning_option+y}
37484 printf %s "(cached) " >&6
37487 gl_save_compiler_FLAGS="$CFLAGS"
37488 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
37489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37490 /* end confdefs.h. */
37500 if ac_fn_c_try_link "$LINENO"
37502 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
37504 gl_cv_warn_c__Werror__Wunknown_warning_option=no
37506 rm -f core conftest.err conftest.$ac_objext \
37507 conftest$ac_exeext conftest.$ac_ext
37508 CFLAGS="$gl_save_compiler_FLAGS"
37511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
37512 printf "%s\n" "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
37513 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes
37515 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
37517 gl_unknown_warnings_are_errors=
37521 ac_cpp='$CPP $CPPFLAGS'
37522 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37523 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37524 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
37530 printf %s "checking whether C compiler handles -Werror... " >&6; }
37531 if test ${gl_cv_warn_c__Werror+y}
37533 printf %s "(cached) " >&6
37536 gl_save_compiler_FLAGS="$CFLAGS"
37537 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
37538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37539 /* end confdefs.h. */
37549 if ac_fn_c_try_link "$LINENO"
37551 gl_cv_warn_c__Werror=yes
37553 gl_cv_warn_c__Werror=no
37555 rm -f core conftest.err conftest.$ac_objext \
37556 conftest$ac_exeext conftest.$ac_ext
37557 CFLAGS="$gl_save_compiler_FLAGS"
37560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
37561 printf "%s\n" "$gl_cv_warn_c__Werror" >&6; }
37562 if test "x$gl_cv_warn_c__Werror" = xyes
37564 as_fn_append WERROR_CFLAGS " -Werror"
37571 # This, $nw, is the list of warnings we disable.
37572 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
37573 nw="$nw -Waggregate-return" # anachronistic
37574 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
37575 nw="$nw -Wc++-compat" # We don't care about C++ compilers
37576 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
37577 nw="$nw -Wtraditional" # Warns on #elif which we use often
37578 nw="$nw -Wcast-qual" # Too many warnings for now
37579 nw="$nw -Wconversion" # Too many warnings for now
37580 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
37581 nw="$nw -Wsign-conversion" # Too many warnings for now
37582 nw="$nw -Wtraditional-conversion" # Too many warnings for now
37583 nw="$nw -Wunreachable-code" # Too many warnings for now
37584 nw="$nw -Wpadded" # Our structs are not padded
37585 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
37586 nw="$nw -Wlogical-op" # any use of fwrite provokes this
37587 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
37588 nw="$nw -Wvla" # warnings in gettext.h
37589 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
37590 nw="$nw -Wswitch-enum" # Too many warnings for now
37591 nw="$nw -Wswitch-default" # Too many warnings for now
37592 nw="$nw -Wstack-protector" # not worth working around
37593 # things I might fix soon:
37594 nw="$nw -Wfloat-equal" # sort.c, seq.c
37595 nw="$nw -Wmissing-format-attribute" # copy.c
37596 nw="$nw -Wunsafe-loop-optimizations" # a few src/*.c
37597 nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
37598 nw="$nw -Wstrict-overflow" # expr.c, pr.c, tr.c, factor.c
37599 nw="$nw -Wformat-extra-args" # sdiff.c
37600 # ?? -Wstrict-overflow
37604 ac_cpp='$CPP $CPPFLAGS'
37605 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37606 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37607 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37611 if test -n "$GCC"; then
37613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
37614 printf %s "checking whether -Wno-missing-field-initializers is supported... " >&6; }
37615 if test ${gl_cv_cc_nomfi_supported+y}
37617 printf %s "(cached) " >&6
37619 gl_save_CFLAGS="$CFLAGS"
37620 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
37621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37622 /* end confdefs.h. */
37632 if ac_fn_c_try_compile "$LINENO"
37634 gl_cv_cc_nomfi_supported=yes
37636 gl_cv_cc_nomfi_supported=no
37638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37639 CFLAGS="$gl_save_CFLAGS"
37642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
37643 printf "%s\n" "$gl_cv_cc_nomfi_supported" >&6; }
37645 if test "$gl_cv_cc_nomfi_supported" = yes; then
37646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
37647 printf %s "checking whether -Wno-missing-field-initializers is needed... " >&6; }
37648 if test ${gl_cv_cc_nomfi_needed+y}
37650 printf %s "(cached) " >&6
37652 gl_save_CFLAGS="$CFLAGS"
37653 CFLAGS="$CFLAGS -W -Werror"
37654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37655 /* end confdefs.h. */
37658 typedef struct { int a; int b; } s_t;
37671 if ac_fn_c_try_compile "$LINENO"
37673 gl_cv_cc_nomfi_needed=no
37675 gl_cv_cc_nomfi_needed=yes
37677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37678 CFLAGS="$gl_save_CFLAGS"
37681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
37682 printf "%s\n" "$gl_cv_cc_nomfi_needed" >&6; }
37685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
37686 printf %s "checking whether -Wuninitialized is supported... " >&6; }
37687 if test ${gl_cv_cc_uninitialized_supported+y}
37689 printf %s "(cached) " >&6
37691 gl_save_CFLAGS="$CFLAGS"
37692 CFLAGS="$CFLAGS -Werror -Wuninitialized"
37693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37694 /* end confdefs.h. */
37704 if ac_fn_c_try_compile "$LINENO"
37706 gl_cv_cc_uninitialized_supported=yes
37708 gl_cv_cc_uninitialized_supported=no
37710 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37711 CFLAGS="$gl_save_CFLAGS"
37714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
37715 printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; }
37719 # List all gcc warning categories.
37720 # To compare this list to your installed GCC's, run this Bash command:
37723 # <((sed -n 's/^ *\(-[^ 0-9][^ ]*\) .*/\1/p' manywarnings.m4; \
37724 # awk '/^[^#]/ {print ws}' ../build-aux/gcc-warning.spec) | sort) \
37725 # <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
37728 for gl_manywarn_item in -fno-common \
37731 -Waggressive-loop-optimizations \
37733 -Wattribute-alias \
37735 -Wbad-function-cast \
37738 -Wbuiltin-declaration-mismatch \
37739 -Wbuiltin-macro-redefined \
37741 -Wcast-align=strict \
37742 -Wcast-function-type \
37743 -Wchar-subscripts \
37747 -Wcoverage-mismatch \
37752 -Wdeprecated-declarations \
37753 -Wdesignated-init \
37754 -Wdisabled-optimization \
37755 -Wdiscarded-array-qualifiers \
37756 -Wdiscarded-qualifiers \
37758 -Wdouble-promotion \
37759 -Wduplicated-branches \
37760 -Wduplicated-cond \
37761 -Wduplicate-decl-specifier \
37765 -Wexpansion-to-defined \
37767 -Wformat-contains-nul \
37768 -Wformat-extra-args \
37769 -Wformat-nonliteral \
37770 -Wformat-security \
37771 -Wformat-signedness \
37773 -Wformat-zero-length \
37775 -Wfree-nonheap-object \
37778 -Wignored-attributes \
37779 -Wignored-qualifiers \
37781 -Wimplicit-function-declaration \
37783 -Wincompatible-pointer-types \
37787 -Wint-in-bool-context \
37788 -Wint-to-pointer-cast \
37789 -Winvalid-memory-model \
37791 -Wlogical-not-parentheses \
37794 -Wmaybe-uninitialized \
37795 -Wmemset-elt-size \
37796 -Wmemset-transposed-args \
37797 -Wmisleading-indentation \
37798 -Wmissing-attributes \
37800 -Wmissing-declarations \
37801 -Wmissing-field-initializers \
37802 -Wmissing-include-dirs \
37803 -Wmissing-parameter-type \
37804 -Wmissing-prototypes \
37806 -Wmultistatement-macros \
37810 -Wnonnull-compare \
37811 -Wnull-dereference \
37813 -Wold-style-declaration \
37814 -Wold-style-definition \
37817 -Woverlength-strings \
37820 -Wpacked-bitfield-compat \
37821 -Wpacked-not-aligned \
37824 -Wpointer-compare \
37826 -Wpointer-to-int-cast \
37830 -Wreturn-local-addr \
37832 -Wscalar-storage-order \
37835 -Wshift-count-negative \
37836 -Wshift-count-overflow \
37837 -Wshift-negative-value \
37838 -Wsizeof-array-argument \
37839 -Wsizeof-pointer-div \
37840 -Wsizeof-pointer-memaccess \
37841 -Wstack-protector \
37842 -Wstrict-aliasing \
37843 -Wstrict-overflow \
37844 -Wstrict-prototypes \
37845 -Wstringop-truncation \
37846 -Wsuggest-attribute=cold \
37847 -Wsuggest-attribute=const \
37848 -Wsuggest-attribute=format \
37849 -Wsuggest-attribute=malloc \
37850 -Wsuggest-attribute=noreturn \
37851 -Wsuggest-attribute=pure \
37852 -Wsuggest-final-methods \
37853 -Wsuggest-final-types \
37856 -Wswitch-unreachable \
37859 -Wtautological-compare \
37864 -Wunknown-pragmas \
37865 -Wunsafe-loop-optimizations \
37867 -Wunused-but-set-parameter \
37868 -Wunused-but-set-variable \
37869 -Wunused-function \
37871 -Wunused-local-typedefs \
37873 -Wunused-parameter \
37876 -Wunused-variable \
37878 -Wvariadic-macros \
37879 -Wvector-operation-performance \
37881 -Wvolatile-register-var \
37885 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
37888 # gcc --help=warnings outputs an unusual form for these options; list
37889 # them here so that the above 'comm' command doesn't report a false match.
37890 # Would prefer "min (PTRDIFF_MAX, SIZE_MAX)", but it must be a literal.
37891 # Also, AC_COMPUTE_INT requires it to fit in a long; it is 2**63 on
37892 # the only platforms where it does not fit in a long, so make that
37894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking max safe object size" >&5
37895 printf %s "checking max safe object size... " >&6; }
37896 if ac_fn_c_compute_int "$LINENO" "LONG_MAX < (PTRDIFF_MAX < (size_t) -1 ? PTRDIFF_MAX : (size_t) -1)
37898 : PTRDIFF_MAX < (size_t) -1 ? (long) PTRDIFF_MAX : (long) (size_t) -1" "gl_alloc_max" "#include <limits.h>
37899 #include <stddef.h>
37900 #include <stdint.h>
37905 gl_alloc_max=2147483647
37908 case $gl_alloc_max in
37909 -1) gl_alloc_max=9223372036854775807;;
37911 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_alloc_max" >&5
37912 printf "%s\n" "$gl_alloc_max" >&6; }
37913 gl_manywarn_set="$gl_manywarn_set -Walloc-size-larger-than=$gl_alloc_max"
37914 gl_manywarn_set="$gl_manywarn_set -Warray-bounds=2"
37915 gl_manywarn_set="$gl_manywarn_set -Wformat-overflow=2"
37916 gl_manywarn_set="$gl_manywarn_set -Wformat-truncation=2"
37917 gl_manywarn_set="$gl_manywarn_set -Wimplicit-fallthrough=5"
37918 gl_manywarn_set="$gl_manywarn_set -Wnormalized=nfc"
37919 gl_manywarn_set="$gl_manywarn_set -Wshift-overflow=2"
37920 gl_manywarn_set="$gl_manywarn_set -Wstringop-overflow=2"
37921 gl_manywarn_set="$gl_manywarn_set -Wunused-const-variable=2"
37922 gl_manywarn_set="$gl_manywarn_set -Wvla-larger-than=4031"
37924 # These are needed for older GCC versions.
37925 if test -n "$GCC"; then
37926 case `($CC --version) 2>/dev/null` in
37927 'gcc (GCC) '[0-3].* | \
37928 'gcc (GCC) '4.[0-7].*)
37929 gl_manywarn_set="$gl_manywarn_set -fdiagnostics-show-option"
37930 gl_manywarn_set="$gl_manywarn_set -funit-at-a-time"
37935 # Disable specific options as needed.
37936 if test "$gl_cv_cc_nomfi_needed" = yes; then
37937 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
37940 if test "$gl_cv_cc_uninitialized_supported" = no; then
37941 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
37944 ws=$gl_manywarn_set
37947 ac_cpp='$CPP $CPPFLAGS'
37948 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
37949 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37950 ac_compiler_gnu=$ac_cv_c_compiler_gnu
37959 *" $gl_warn_item "*)
37962 gl_warn_set="$gl_warn_set $gl_warn_item"
37971 as_gl_Warn=`printf "%s\n" "gl_cv_warn_c_$w" | $as_tr_sh`
37973 case $gl_positive in
37974 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
37976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
37977 printf %s "checking whether C compiler handles $w... " >&6; }
37978 if eval test \${$as_gl_Warn+y}
37980 printf %s "(cached) " >&6
37983 gl_save_compiler_FLAGS="$CFLAGS"
37984 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
37985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37986 /* end confdefs.h. */
37996 if ac_fn_c_try_link "$LINENO"
37998 eval "$as_gl_Warn=yes"
38000 eval "$as_gl_Warn=no"
38002 rm -f core conftest.err conftest.$ac_objext \
38003 conftest$ac_exeext conftest.$ac_ext
38004 CFLAGS="$gl_save_compiler_FLAGS"
38007 eval ac_res=\$$as_gl_Warn
38008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38009 printf "%s\n" "$ac_res" >&6; }
38010 if eval test \"x\$"$as_gl_Warn"\" = x"yes"
38012 as_fn_append WARN_CFLAGS " $w"
38019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
38020 printf %s "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
38021 if test ${gl_cv_warn_c__Wno_missing_field_initializers+y}
38023 printf %s "(cached) " >&6
38026 gl_save_compiler_FLAGS="$CFLAGS"
38027 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
38028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38029 /* end confdefs.h. */
38039 if ac_fn_c_try_link "$LINENO"
38041 gl_cv_warn_c__Wno_missing_field_initializers=yes
38043 gl_cv_warn_c__Wno_missing_field_initializers=no
38045 rm -f core conftest.err conftest.$ac_objext \
38046 conftest$ac_exeext conftest.$ac_ext
38047 CFLAGS="$gl_save_compiler_FLAGS"
38050 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
38051 printf "%s\n" "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
38052 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes
38054 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
38060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
38061 printf %s "checking whether C compiler handles -Wno-sign-compare... " >&6; }
38062 if test ${gl_cv_warn_c__Wno_sign_compare+y}
38064 printf %s "(cached) " >&6
38067 gl_save_compiler_FLAGS="$CFLAGS"
38068 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
38069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38070 /* end confdefs.h. */
38080 if ac_fn_c_try_link "$LINENO"
38082 gl_cv_warn_c__Wno_sign_compare=yes
38084 gl_cv_warn_c__Wno_sign_compare=no
38086 rm -f core conftest.err conftest.$ac_objext \
38087 conftest$ac_exeext conftest.$ac_ext
38088 CFLAGS="$gl_save_compiler_FLAGS"
38091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
38092 printf "%s\n" "$gl_cv_warn_c__Wno_sign_compare" >&6; }
38093 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes
38095 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
38098 # Too many warnings for now
38101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-pointer-sign" >&5
38102 printf %s "checking whether C compiler handles -Wno-pointer-sign... " >&6; }
38103 if test ${gl_cv_warn_c__Wno_pointer_sign+y}
38105 printf %s "(cached) " >&6
38108 gl_save_compiler_FLAGS="$CFLAGS"
38109 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wpointer-sign"
38110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38111 /* end confdefs.h. */
38121 if ac_fn_c_try_link "$LINENO"
38123 gl_cv_warn_c__Wno_pointer_sign=yes
38125 gl_cv_warn_c__Wno_pointer_sign=no
38127 rm -f core conftest.err conftest.$ac_objext \
38128 conftest$ac_exeext conftest.$ac_ext
38129 CFLAGS="$gl_save_compiler_FLAGS"
38132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_pointer_sign" >&5
38133 printf "%s\n" "$gl_cv_warn_c__Wno_pointer_sign" >&6; }
38134 if test "x$gl_cv_warn_c__Wno_pointer_sign" = xyes
38136 as_fn_append WARN_CFLAGS " -Wno-pointer-sign"
38139 # Too many warnings for now
38142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
38143 printf %s "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
38144 if test ${gl_cv_warn_c__Wno_unused_parameter+y}
38146 printf %s "(cached) " >&6
38149 gl_save_compiler_FLAGS="$CFLAGS"
38150 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
38151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38152 /* end confdefs.h. */
38162 if ac_fn_c_try_link "$LINENO"
38164 gl_cv_warn_c__Wno_unused_parameter=yes
38166 gl_cv_warn_c__Wno_unused_parameter=no
38168 rm -f core conftest.err conftest.$ac_objext \
38169 conftest$ac_exeext conftest.$ac_ext
38170 CFLAGS="$gl_save_compiler_FLAGS"
38173 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
38174 printf "%s\n" "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
38175 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes
38177 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
38180 # Too many warnings for now
38183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
38184 printf %s "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
38185 if test ${gl_cv_warn_c__Wno_format_nonliteral+y}
38187 printf %s "(cached) " >&6
38190 gl_save_compiler_FLAGS="$CFLAGS"
38191 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
38192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38193 /* end confdefs.h. */
38203 if ac_fn_c_try_link "$LINENO"
38205 gl_cv_warn_c__Wno_format_nonliteral=yes
38207 gl_cv_warn_c__Wno_format_nonliteral=no
38209 rm -f core conftest.err conftest.$ac_objext \
38210 conftest$ac_exeext conftest.$ac_ext
38211 CFLAGS="$gl_save_compiler_FLAGS"
38214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
38215 printf "%s\n" "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
38216 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes
38218 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
38224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-cast-function-type" >&5
38225 printf %s "checking whether C compiler handles -Wno-cast-function-type... " >&6; }
38226 if test ${gl_cv_warn_c__Wno_cast_function_type+y}
38228 printf %s "(cached) " >&6
38231 gl_save_compiler_FLAGS="$CFLAGS"
38232 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wcast-function-type"
38233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38234 /* end confdefs.h. */
38244 if ac_fn_c_try_link "$LINENO"
38246 gl_cv_warn_c__Wno_cast_function_type=yes
38248 gl_cv_warn_c__Wno_cast_function_type=no
38250 rm -f core conftest.err conftest.$ac_objext \
38251 conftest$ac_exeext conftest.$ac_ext
38252 CFLAGS="$gl_save_compiler_FLAGS"
38255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_cast_function_type" >&5
38256 printf "%s\n" "$gl_cv_warn_c__Wno_cast_function_type" >&6; }
38257 if test "x$gl_cv_warn_c__Wno_cast_function_type" = xyes
38259 as_fn_append WARN_CFLAGS " -Wno-cast-function-type"
38262 # For sig-handler.h:47
38264 # In spite of excluding -Wlogical-op above, it is enabled, as of
38265 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
38268 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
38269 printf %s "checking whether C compiler handles -Wno-logical-op... " >&6; }
38270 if test ${gl_cv_warn_c__Wno_logical_op+y}
38272 printf %s "(cached) " >&6
38275 gl_save_compiler_FLAGS="$CFLAGS"
38276 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wlogical-op"
38277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38278 /* end confdefs.h. */
38288 if ac_fn_c_try_link "$LINENO"
38290 gl_cv_warn_c__Wno_logical_op=yes
38292 gl_cv_warn_c__Wno_logical_op=no
38294 rm -f core conftest.err conftest.$ac_objext \
38295 conftest$ac_exeext conftest.$ac_ext
38296 CFLAGS="$gl_save_compiler_FLAGS"
38299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
38300 printf "%s\n" "$gl_cv_warn_c__Wno_logical_op" >&6; }
38301 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes
38303 as_fn_append WARN_CFLAGS " -Wno-logical-op"
38310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
38311 printf %s "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
38312 if test ${gl_cv_warn_c__fdiagnostics_show_option+y}
38314 printf %s "(cached) " >&6
38317 gl_save_compiler_FLAGS="$CFLAGS"
38318 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
38319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38320 /* end confdefs.h. */
38330 if ac_fn_c_try_link "$LINENO"
38332 gl_cv_warn_c__fdiagnostics_show_option=yes
38334 gl_cv_warn_c__fdiagnostics_show_option=no
38336 rm -f core conftest.err conftest.$ac_objext \
38337 conftest$ac_exeext conftest.$ac_ext
38338 CFLAGS="$gl_save_compiler_FLAGS"
38341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
38342 printf "%s\n" "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
38343 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes
38345 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
38351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
38352 printf %s "checking whether C compiler handles -funit-at-a-time... " >&6; }
38353 if test ${gl_cv_warn_c__funit_at_a_time+y}
38355 printf %s "(cached) " >&6
38358 gl_save_compiler_FLAGS="$CFLAGS"
38359 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
38360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38361 /* end confdefs.h. */
38371 if ac_fn_c_try_link "$LINENO"
38373 gl_cv_warn_c__funit_at_a_time=yes
38375 gl_cv_warn_c__funit_at_a_time=no
38377 rm -f core conftest.err conftest.$ac_objext \
38378 conftest$ac_exeext conftest.$ac_ext
38379 CFLAGS="$gl_save_compiler_FLAGS"
38382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
38383 printf "%s\n" "$gl_cv_warn_c__funit_at_a_time" >&6; }
38384 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes
38386 as_fn_append WARN_CFLAGS " -funit-at-a-time"
38392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fno-common" >&5
38393 printf %s "checking whether C compiler handles -fno-common... " >&6; }
38394 if test ${gl_cv_warn_c__fno_common+y}
38396 printf %s "(cached) " >&6
38399 gl_save_compiler_FLAGS="$CFLAGS"
38400 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fno-common"
38401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38402 /* end confdefs.h. */
38412 if ac_fn_c_try_link "$LINENO"
38414 gl_cv_warn_c__fno_common=yes
38416 gl_cv_warn_c__fno_common=no
38418 rm -f core conftest.err conftest.$ac_objext \
38419 conftest$ac_exeext conftest.$ac_ext
38420 CFLAGS="$gl_save_compiler_FLAGS"
38423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fno_common" >&5
38424 printf "%s\n" "$gl_cv_warn_c__fno_common" >&6; }
38425 if test "x$gl_cv_warn_c__fno_common" = xyes
38427 as_fn_append WARN_CFLAGS " -fno-common"
38435 printf "%s\n" "#define lint 1" >>confdefs.h
38438 printf "%s\n" "#define _FORTIFY_SOURCE 2" >>confdefs.h
38441 printf "%s\n" "#define GNULIB_PORTCHECK 1" >>confdefs.h
38444 # We use a slightly smaller set of warning options for lib/.
38445 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
38447 nw="$nw -Wunused-macros"
38448 nw="$nw -Wmissing-prototypes"
38449 nw="$nw -Wold-style-definition"
38450 nw="$nw -Wsuggest-attribute=pure"
38453 set x $WARN_CFLAGS; shift
38457 *" $gl_warn_item "*)
38460 gl_warn_set="$gl_warn_set $gl_warn_item"
38464 GNULIB_WARN_CFLAGS=$gl_warn_set
38469 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
38470 printf %s "checking for inline... " >&6; }
38471 if test ${ac_cv_c_inline+y}
38473 printf %s "(cached) " >&6
38476 for ac_kw in inline __inline__ __inline; do
38477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38478 /* end confdefs.h. */
38479 #ifndef __cplusplus
38481 static $ac_kw foo_t static_foo () {return 0; }
38482 $ac_kw foo_t foo () {return 0; }
38486 if ac_fn_c_try_compile "$LINENO"
38488 ac_cv_c_inline=$ac_kw
38490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38491 test "$ac_cv_c_inline" != no && break
38495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
38496 printf "%s\n" "$ac_cv_c_inline" >&6; }
38498 case $ac_cv_c_inline in
38501 case $ac_cv_c_inline in
38503 *) ac_val=$ac_cv_c_inline;;
38505 cat >>confdefs.h <<_ACEOF
38506 #ifndef __cplusplus
38507 #define inline $ac_val
38514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for variable-length arrays" >&5
38515 printf %s "checking for variable-length arrays... " >&6; }
38516 if test ${ac_cv_c_vararrays+y}
38518 printf %s "(cached) " >&6
38520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38521 /* end confdefs.h. */
38522 #ifdef __STDC_NO_VLA__
38527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
38528 $EGREP "defined" >/dev/null 2>&1
38530 ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'
38532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38533 /* end confdefs.h. */
38534 /* Test for VLA support. This test is partly inspired
38535 from examples in the C standard. Use at least two VLA
38536 functions to detect the GCC 3.4.3 bug described in:
38537 https://lists.gnu.org/r/bug-gnulib/2014-08/msg00014.html
38539 #ifdef __STDC_NO_VLA__
38544 int fvla (int m, int C[m][m]);
38547 simple (int count, int all[static count])
38549 return all[count - 1];
38553 fvla (int m, int C[m][m])
38555 typedef int VLA[m][m];
38558 static int (*q)[m] = &B;
38560 return C && &x[0][0] == &D[0] && &D[0] == s[0];
38572 if ac_fn_c_try_compile "$LINENO"
38574 ac_cv_c_vararrays=yes
38576 ac_cv_c_vararrays=no
38578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_vararrays" >&5
38584 printf "%s\n" "$ac_cv_c_vararrays" >&6; }
38585 if test "$ac_cv_c_vararrays" = yes; then
38587 printf "%s\n" "#define HAVE_C_VARARRAYS 1" >>confdefs.h
38589 elif test "$ac_cv_c_vararrays" = no; then
38591 printf "%s\n" "#define __STDC_NO_VLA__ 1" >>confdefs.h
38597 printf "%s\n" "#define DEFAULT_EDITOR_PROGRAM \"ed\"" >>confdefs.h
38600 # Extract the first word of "pr", so it can be a program name with args.
38601 set dummy pr; ac_word=$2
38602 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38603 printf %s "checking for $ac_word... " >&6; }
38604 if test ${ac_cv_path_PR_PROGRAM+y}
38606 printf %s "(cached) " >&6
38608 case $PR_PROGRAM in
38610 ac_cv_path_PR_PROGRAM="$PR_PROGRAM" # Let the user override the test with a path.
38613 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38614 for as_dir in $PATH
38617 case $as_dir in #(((
38620 *) as_dir=$as_dir/ ;;
38622 for ac_exec_ext in '' $ac_executable_extensions; do
38623 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
38624 ac_cv_path_PR_PROGRAM="$as_dir$ac_word$ac_exec_ext"
38625 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
38632 test -z "$ac_cv_path_PR_PROGRAM" && ac_cv_path_PR_PROGRAM=""""
38636 PR_PROGRAM=$ac_cv_path_PR_PROGRAM
38637 if test -n "$PR_PROGRAM"; then
38638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PR_PROGRAM" >&5
38639 printf "%s\n" "$PR_PROGRAM" >&6; }
38641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
38642 printf "%s\n" "no" >&6; }
38647 printf "%s\n" "#define PR_PROGRAM \"$PR_PROGRAM\"" >>confdefs.h
38650 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
38651 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes
38654 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLKSIZE 1" >>confdefs.h
38659 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
38660 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes
38663 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_RDEV 1" >>confdefs.h
38668 ac_header_dirent=no
38669 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
38670 as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
38671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
38672 printf %s "checking for $ac_hdr that defines DIR... " >&6; }
38673 if eval test \${$as_ac_Header+y}
38675 printf %s "(cached) " >&6
38677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38678 /* end confdefs.h. */
38679 #include <sys/types.h>
38691 if ac_fn_c_try_compile "$LINENO"
38693 eval "$as_ac_Header=yes"
38695 eval "$as_ac_Header=no"
38697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38699 eval ac_res=\$$as_ac_Header
38700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38701 printf "%s\n" "$ac_res" >&6; }
38702 if eval test \"x\$"$as_ac_Header"\" = x"yes"
38704 cat >>confdefs.h <<_ACEOF
38705 #define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
38708 ac_header_dirent=$ac_hdr; break
38712 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
38713 if test $ac_header_dirent = dirent.h; then
38714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
38715 printf %s "checking for library containing opendir... " >&6; }
38716 if test ${ac_cv_search_opendir+y}
38718 printf %s "(cached) " >&6
38720 ac_func_search_save_LIBS=$LIBS
38721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38722 /* end confdefs.h. */
38724 /* Override any GCC internal prototype to avoid an error.
38725 Use char because int might match the return type of a GCC
38726 builtin and then its argument prototype would still apply. */
38739 for ac_lib in '' dir
38741 if test -z "$ac_lib"; then
38742 ac_res="none required"
38745 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
38747 if ac_fn_c_try_link "$LINENO"
38749 ac_cv_search_opendir=$ac_res
38751 rm -f core conftest.err conftest.$ac_objext \
38753 if test ${ac_cv_search_opendir+y}
38758 if test ${ac_cv_search_opendir+y}
38762 ac_cv_search_opendir=no
38764 rm conftest.$ac_ext
38765 LIBS=$ac_func_search_save_LIBS
38767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
38768 printf "%s\n" "$ac_cv_search_opendir" >&6; }
38769 ac_res=$ac_cv_search_opendir
38770 if test "$ac_res" != no
38772 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
38778 printf %s "checking for library containing opendir... " >&6; }
38779 if test ${ac_cv_search_opendir+y}
38781 printf %s "(cached) " >&6
38783 ac_func_search_save_LIBS=$LIBS
38784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38785 /* end confdefs.h. */
38787 /* Override any GCC internal prototype to avoid an error.
38788 Use char because int might match the return type of a GCC
38789 builtin and then its argument prototype would still apply. */
38804 if test -z "$ac_lib"; then
38805 ac_res="none required"
38808 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
38810 if ac_fn_c_try_link "$LINENO"
38812 ac_cv_search_opendir=$ac_res
38814 rm -f core conftest.err conftest.$ac_objext \
38816 if test ${ac_cv_search_opendir+y}
38821 if test ${ac_cv_search_opendir+y}
38825 ac_cv_search_opendir=no
38827 rm conftest.$ac_ext
38828 LIBS=$ac_func_search_save_LIBS
38830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
38831 printf "%s\n" "$ac_cv_search_opendir" >&6; }
38832 ac_res=$ac_cv_search_opendir
38833 if test "$ac_res" != no
38835 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
38841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
38842 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
38843 if test ${ac_cv_header_sys_wait_h+y}
38845 printf %s "(cached) " >&6
38847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38848 /* end confdefs.h. */
38849 #include <sys/types.h>
38850 #include <sys/wait.h>
38851 #ifndef WEXITSTATUS
38852 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
38855 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
38863 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
38868 if ac_fn_c_try_compile "$LINENO"
38870 ac_cv_header_sys_wait_h=yes
38872 ac_cv_header_sys_wait_h=no
38874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38876 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
38877 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
38878 if test $ac_cv_header_sys_wait_h = yes; then
38880 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
38884 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
38885 if test "x$ac_cv_type_pid_t" = xyes
38890 printf "%s\n" "#define pid_t int" >>confdefs.h
38899 if test $ac_cv_func_sigprocmask = no; then
38900 ac_fn_c_check_func "$LINENO" "sigblock" "ac_cv_func_sigblock"
38901 if test "x$ac_cv_func_sigblock" = xyes
38903 printf "%s\n" "#define HAVE_SIGBLOCK 1" >>confdefs.h
38908 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
38909 printf %s "checking whether closedir returns void... " >&6; }
38910 if test ${ac_cv_func_closedir_void+y}
38912 printf %s "(cached) " >&6
38914 if test "$cross_compiling" = yes
38916 ac_cv_func_closedir_void=yes
38918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38919 /* end confdefs.h. */
38920 $ac_includes_default
38921 #include <$ac_header_dirent>
38922 #ifndef __cplusplus
38929 return closedir (opendir (".")) != 0;
38934 if ac_fn_c_try_run "$LINENO"
38936 ac_cv_func_closedir_void=no
38938 ac_cv_func_closedir_void=yes
38940 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38941 conftest.$ac_objext conftest.beam conftest.$ac_ext
38945 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
38946 printf "%s\n" "$ac_cv_func_closedir_void" >&6; }
38947 if test $ac_cv_func_closedir_void = yes; then
38949 printf "%s\n" "#define CLOSEDIR_VOID 1" >>confdefs.h
38958 if test "x$ac_cv_func_fork" = xyes; then
38959 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
38960 printf %s "checking for working fork... " >&6; }
38961 if test ${ac_cv_func_fork_works+y}
38963 printf %s "(cached) " >&6
38965 if test "$cross_compiling" = yes
38967 ac_cv_func_fork_works=cross
38969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38970 /* end confdefs.h. */
38971 $ac_includes_default
38976 /* By Ruediger Kuhlmann. */
38977 return fork () < 0;
38983 if ac_fn_c_try_run "$LINENO"
38985 ac_cv_func_fork_works=yes
38987 ac_cv_func_fork_works=no
38989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38990 conftest.$ac_objext conftest.beam conftest.$ac_ext
38994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
38995 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
38998 ac_cv_func_fork_works=$ac_cv_func_fork
39000 if test "x$ac_cv_func_fork_works" = xcross; then
39002 *-*-amigaos* | *-*-msdosdjgpp*)
39003 # Override, as these systems have only a dummy fork() stub
39004 ac_cv_func_fork_works=no
39007 ac_cv_func_fork_works=yes
39010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
39011 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
39013 ac_cv_func_vfork_works=$ac_cv_func_vfork
39014 if test "x$ac_cv_func_vfork" = xyes; then
39015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
39016 printf %s "checking for working vfork... " >&6; }
39017 if test ${ac_cv_func_vfork_works+y}
39019 printf %s "(cached) " >&6
39021 if test "$cross_compiling" = yes
39023 ac_cv_func_vfork_works=cross
39025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39026 /* end confdefs.h. */
39027 /* Thanks to Paul Eggert for this test. */
39028 $ac_includes_default
39029 #include <signal.h>
39030 #include <sys/wait.h>
39031 #ifdef HAVE_VFORK_H
39032 # include <vfork.h>
39036 do_nothing (int sig)
39041 /* On some sparc systems, changes by the child to local and incoming
39042 argument registers are propagated back to the parent. The compiler
39043 is told about this with #include <vfork.h>, but some compilers
39044 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
39045 static variable whose address is put into a register that is
39046 clobbered by the vfork. */
39048 sparc_address_test (int arg)
39050 static pid_t child;
39068 pid_t parent = getpid ();
39071 sparc_address_test (0);
39073 /* On Solaris 2.4, changes by the child to the signal handler
39074 also munge signal handlers in the parent. To detect this,
39075 start by putting the parent's handler in a known state. */
39076 signal (SIGTERM, SIG_DFL);
39081 /* Here is another test for sparc vfork register problems. This
39082 test uses lots of local variables, at least as many local
39083 variables as main has allocated so far including compiler
39084 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
39085 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
39086 reuse the register of parent for one of the local variables,
39087 since it will think that parent can't possibly be used any more
39088 in this routine. Assigning to the local variable will thus
39089 munge parent in the parent process. */
39091 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
39092 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
39093 /* Convince the compiler that p..p7 are live; otherwise, it might
39094 use the same hardware register for all 8 local variables. */
39095 if (p != p1 || p != p2 || p != p3 || p != p4
39096 || p != p5 || p != p6 || p != p7)
39099 /* Alter the child's signal handler. */
39100 if (signal (SIGTERM, do_nothing) != SIG_DFL)
39103 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
39104 from child file descriptors. If the child closes a descriptor
39105 before it execs or exits, this munges the parent's descriptor
39106 as well. Test for this by closing stdout in the child. */
39107 _exit(close(fileno(stdout)) != 0);
39112 while (wait(&status) != child)
39115 /* Was there some problem with vforking? */
39118 /* Did the child munge the parent's signal handler? */
39119 || signal (SIGTERM, SIG_DFL) != SIG_DFL
39121 /* Did the child fail? (This shouldn't happen.) */
39124 /* Did the vfork/compiler bug occur? */
39125 || parent != getpid()
39127 /* Did the file descriptor bug occur? */
39128 || fstat(fileno(stdout), &st) != 0
39133 if ac_fn_c_try_run "$LINENO"
39135 ac_cv_func_vfork_works=yes
39137 ac_cv_func_vfork_works=no
39139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39140 conftest.$ac_objext conftest.beam conftest.$ac_ext
39144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
39145 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
39148 if test "x$ac_cv_func_fork_works" = xcross; then
39149 ac_cv_func_vfork_works=$ac_cv_func_vfork
39150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
39151 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
39154 if test "x$ac_cv_func_vfork_works" = xyes; then
39156 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
39160 printf "%s\n" "#define vfork fork" >>confdefs.h
39163 if test "x$ac_cv_func_fork_works" = xyes; then
39165 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
39170 # When .tarball-version exists, we're building from a tarball
39171 # and must not make man/*.1 files depend on the generated src/version.c,
39172 # because that would induce a requirement to run the help2man perl script.
39173 # We are not yet prepared to make perl a build-from-tarball requirement.
39174 # Hence, here we detect .tarball-version existence. When not present,
39175 # we define a variable to be used in man/Makefile.am to induce the
39176 # proper dependency (so that man/*.1 will be rebuilt upon any version change),
39177 # but not when built from a tarball.
39179 test -f $srcdir/.tarball-version \
39180 && SRC_VERSION_C= \
39181 || SRC_VERSION_C=../src/version.c
39184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
39185 printf %s "checking whether NLS is requested... " >&6; }
39186 # Check whether --enable-nls was given.
39187 if test ${enable_nls+y}
39189 enableval=$enable_nls; USE_NLS=$enableval
39194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
39195 printf "%s\n" "$USE_NLS" >&6; }
39200 GETTEXT_MACRO_VERSION=0.19
39205 # Prepare PATH_SEPARATOR.
39206 # The user is always right.
39207 if test "${PATH_SEPARATOR+set}" != set; then
39208 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39209 # contains only /bin. Note that ksh looks also at the FPATH variable,
39210 # so we have to set that as well for the test.
39212 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39213 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39214 || PATH_SEPARATOR=';'
39218 # Find out how to test for executable files. Don't use a zero-byte file,
39219 # as systems may use methods other than mode bits to determine executability.
39220 cat >conf$$.file <<_ASEOF
39224 chmod +x conf$$.file
39225 if test -x conf$$.file >/dev/null 2>&1; then
39226 ac_executable_p="test -x"
39228 ac_executable_p="test -f"
39232 # Extract the first word of "msgfmt", so it can be a program name with args.
39233 set dummy msgfmt; ac_word=$2
39234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39235 printf %s "checking for $ac_word... " >&6; }
39236 if test ${ac_cv_path_MSGFMT+y}
39238 printf %s "(cached) " >&6
39242 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
39245 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39246 for ac_dir in $PATH; do
39248 test -z "$ac_dir" && ac_dir=.
39249 for ac_exec_ext in '' $ac_executable_extensions; do
39250 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39251 echo "$as_me: trying $ac_dir/$ac_word..." >&5
39252 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
39253 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
39254 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
39261 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
39265 MSGFMT="$ac_cv_path_MSGFMT"
39266 if test "$MSGFMT" != ":"; then
39267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
39268 printf "%s\n" "$MSGFMT" >&6; }
39270 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39271 printf "%s\n" "no" >&6; }
39274 # Extract the first word of "gmsgfmt", so it can be a program name with args.
39275 set dummy gmsgfmt; ac_word=$2
39276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39277 printf %s "checking for $ac_word... " >&6; }
39278 if test ${ac_cv_path_GMSGFMT+y}
39280 printf %s "(cached) " >&6
39284 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
39287 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39288 for as_dir in $PATH
39291 case $as_dir in #(((
39294 *) as_dir=$as_dir/ ;;
39296 for ac_exec_ext in '' $ac_executable_extensions; do
39297 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
39298 ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext"
39299 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
39306 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
39310 GMSGFMT=$ac_cv_path_GMSGFMT
39311 if test -n "$GMSGFMT"; then
39312 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
39313 printf "%s\n" "$GMSGFMT" >&6; }
39315 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39316 printf "%s\n" "no" >&6; }
39321 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39322 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
39323 *) MSGFMT_015=$MSGFMT ;;
39326 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39327 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
39328 *) GMSGFMT_015=$GMSGFMT ;;
39333 # Prepare PATH_SEPARATOR.
39334 # The user is always right.
39335 if test "${PATH_SEPARATOR+set}" != set; then
39336 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39337 # contains only /bin. Note that ksh looks also at the FPATH variable,
39338 # so we have to set that as well for the test.
39340 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39341 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39342 || PATH_SEPARATOR=';'
39346 # Find out how to test for executable files. Don't use a zero-byte file,
39347 # as systems may use methods other than mode bits to determine executability.
39348 cat >conf$$.file <<_ASEOF
39352 chmod +x conf$$.file
39353 if test -x conf$$.file >/dev/null 2>&1; then
39354 ac_executable_p="test -x"
39356 ac_executable_p="test -f"
39360 # Extract the first word of "xgettext", so it can be a program name with args.
39361 set dummy xgettext; ac_word=$2
39362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39363 printf %s "checking for $ac_word... " >&6; }
39364 if test ${ac_cv_path_XGETTEXT+y}
39366 printf %s "(cached) " >&6
39368 case "$XGETTEXT" in
39370 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
39373 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39374 for ac_dir in $PATH; do
39376 test -z "$ac_dir" && ac_dir=.
39377 for ac_exec_ext in '' $ac_executable_extensions; do
39378 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39379 echo "$as_me: trying $ac_dir/$ac_word..." >&5
39380 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
39381 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
39382 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
39389 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
39393 XGETTEXT="$ac_cv_path_XGETTEXT"
39394 if test "$XGETTEXT" != ":"; then
39395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
39396 printf "%s\n" "$XGETTEXT" >&6; }
39398 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39399 printf "%s\n" "no" >&6; }
39404 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
39405 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
39406 *) XGETTEXT_015=$XGETTEXT ;;
39411 # Prepare PATH_SEPARATOR.
39412 # The user is always right.
39413 if test "${PATH_SEPARATOR+set}" != set; then
39414 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
39415 # contains only /bin. Note that ksh looks also at the FPATH variable,
39416 # so we have to set that as well for the test.
39418 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39419 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
39420 || PATH_SEPARATOR=';'
39424 # Find out how to test for executable files. Don't use a zero-byte file,
39425 # as systems may use methods other than mode bits to determine executability.
39426 cat >conf$$.file <<_ASEOF
39430 chmod +x conf$$.file
39431 if test -x conf$$.file >/dev/null 2>&1; then
39432 ac_executable_p="test -x"
39434 ac_executable_p="test -f"
39438 # Extract the first word of "msgmerge", so it can be a program name with args.
39439 set dummy msgmerge; ac_word=$2
39440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39441 printf %s "checking for $ac_word... " >&6; }
39442 if test ${ac_cv_path_MSGMERGE+y}
39444 printf %s "(cached) " >&6
39446 case "$MSGMERGE" in
39448 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
39451 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
39452 for ac_dir in $PATH; do
39454 test -z "$ac_dir" && ac_dir=.
39455 for ac_exec_ext in '' $ac_executable_extensions; do
39456 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
39457 echo "$as_me: trying $ac_dir/$ac_word..." >&5
39458 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
39459 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
39466 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
39470 MSGMERGE="$ac_cv_path_MSGMERGE"
39471 if test "$MSGMERGE" != ":"; then
39472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
39473 printf "%s\n" "$MSGMERGE" >&6; }
39475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
39476 printf "%s\n" "no" >&6; }
39480 test -n "$localedir" || localedir='${datadir}/locale'
39483 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
39486 ac_config_commands="$ac_config_commands po-directories"
39513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
39514 printf %s "checking for CFPreferencesCopyAppValue... " >&6; }
39515 if test ${gt_cv_func_CFPreferencesCopyAppValue+y}
39517 printf %s "(cached) " >&6
39519 gt_save_LIBS="$LIBS"
39520 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39522 /* end confdefs.h. */
39523 #include <CoreFoundation/CFPreferences.h>
39527 CFPreferencesCopyAppValue(NULL, NULL)
39532 if ac_fn_c_try_link "$LINENO"
39534 gt_cv_func_CFPreferencesCopyAppValue=yes
39536 gt_cv_func_CFPreferencesCopyAppValue=no
39538 rm -f core conftest.err conftest.$ac_objext \
39539 conftest$ac_exeext conftest.$ac_ext
39540 LIBS="$gt_save_LIBS"
39542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
39543 printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
39544 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
39546 printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
39549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
39550 printf %s "checking for CFLocaleCopyCurrent... " >&6; }
39551 if test ${gt_cv_func_CFLocaleCopyCurrent+y}
39553 printf %s "(cached) " >&6
39555 gt_save_LIBS="$LIBS"
39556 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
39557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39558 /* end confdefs.h. */
39559 #include <CoreFoundation/CFLocale.h>
39563 CFLocaleCopyCurrent();
39568 if ac_fn_c_try_link "$LINENO"
39570 gt_cv_func_CFLocaleCopyCurrent=yes
39572 gt_cv_func_CFLocaleCopyCurrent=no
39574 rm -f core conftest.err conftest.$ac_objext \
39575 conftest$ac_exeext conftest.$ac_ext
39576 LIBS="$gt_save_LIBS"
39578 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
39579 printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
39580 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
39582 printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
39586 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
39587 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
39599 case " $gt_needs " in
39600 *" need-formatstring-macros "*) gt_api_version=3 ;;
39601 *" need-ngettext "*) gt_api_version=2 ;;
39602 *) gt_api_version=1 ;;
39604 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
39605 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
39607 if test "$USE_NLS" = "yes"; then
39608 gt_use_preinstalled_gnugettext=no
39611 if test $gt_api_version -ge 3; then
39612 gt_revision_test_code='
39613 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
39614 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
39616 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
39619 gt_revision_test_code=
39621 if test $gt_api_version -ge 2; then
39622 gt_expression_test_code=' + * ngettext ("", "", 0)'
39624 gt_expression_test_code=
39627 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
39628 printf %s "checking for GNU gettext in libc... " >&6; }
39629 if eval test \${$gt_func_gnugettext_libc+y}
39631 printf %s "(cached) " >&6
39633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39634 /* end confdefs.h. */
39636 #include <libintl.h>
39637 $gt_revision_test_code
39638 extern int _nl_msg_cat_cntr;
39639 extern int *_nl_domain_bindings;
39645 bindtextdomain ("", "");
39646 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
39652 if ac_fn_c_try_link "$LINENO"
39654 eval "$gt_func_gnugettext_libc=yes"
39656 eval "$gt_func_gnugettext_libc=no"
39658 rm -f core conftest.err conftest.$ac_objext \
39659 conftest$ac_exeext conftest.$ac_ext
39661 eval ac_res=\$$gt_func_gnugettext_libc
39662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39663 printf "%s\n" "$ac_res" >&6; }
39665 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
39671 am_save_CPPFLAGS="$CPPFLAGS"
39673 for element in $INCICONV; do
39675 for x in $CPPFLAGS; do
39677 acl_save_prefix="$prefix"
39678 prefix="$acl_final_prefix"
39679 acl_save_exec_prefix="$exec_prefix"
39680 exec_prefix="$acl_final_exec_prefix"
39682 exec_prefix="$acl_save_exec_prefix"
39683 prefix="$acl_save_prefix"
39685 if test "X$x" = "X$element"; then
39690 if test -z "$haveit"; then
39691 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
39696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
39697 printf %s "checking for iconv... " >&6; }
39698 if test ${am_cv_func_iconv+y}
39700 printf %s "(cached) " >&6
39703 am_cv_func_iconv="no, consider installing GNU libiconv"
39705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39706 /* end confdefs.h. */
39708 #include <stdlib.h>
39714 iconv_t cd = iconv_open("","");
39715 iconv(cd,NULL,NULL,NULL,NULL);
39721 if ac_fn_c_try_link "$LINENO"
39723 am_cv_func_iconv=yes
39725 rm -f core conftest.err conftest.$ac_objext \
39726 conftest$ac_exeext conftest.$ac_ext
39727 if test "$am_cv_func_iconv" != yes; then
39728 am_save_LIBS="$LIBS"
39729 LIBS="$LIBS $LIBICONV"
39730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39731 /* end confdefs.h. */
39733 #include <stdlib.h>
39739 iconv_t cd = iconv_open("","");
39740 iconv(cd,NULL,NULL,NULL,NULL);
39746 if ac_fn_c_try_link "$LINENO"
39748 am_cv_lib_iconv=yes
39749 am_cv_func_iconv=yes
39751 rm -f core conftest.err conftest.$ac_objext \
39752 conftest$ac_exeext conftest.$ac_ext
39753 LIBS="$am_save_LIBS"
39757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
39758 printf "%s\n" "$am_cv_func_iconv" >&6; }
39759 if test "$am_cv_func_iconv" = yes; then
39760 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
39761 printf %s "checking for working iconv... " >&6; }
39762 if test ${am_cv_func_iconv_works+y}
39764 printf %s "(cached) " >&6
39767 am_save_LIBS="$LIBS"
39768 if test $am_cv_lib_iconv = yes; then
39769 LIBS="$LIBS $LIBICONV"
39771 am_cv_func_iconv_works=no
39772 for ac_iconv_const in '' 'const'; do
39773 if test "$cross_compiling" = yes
39776 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
39777 *) am_cv_func_iconv_works="guessing yes" ;;
39780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39781 /* end confdefs.h. */
39784 #include <string.h>
39786 #ifndef ICONV_CONST
39787 # define ICONV_CONST $ac_iconv_const
39794 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
39797 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
39798 if (cd_utf8_to_88591 != (iconv_t)(-1))
39800 static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
39802 ICONV_CONST char *inptr = input;
39803 size_t inbytesleft = strlen (input);
39804 char *outptr = buf;
39805 size_t outbytesleft = sizeof (buf);
39806 size_t res = iconv (cd_utf8_to_88591,
39807 &inptr, &inbytesleft,
39808 &outptr, &outbytesleft);
39811 iconv_close (cd_utf8_to_88591);
39814 /* Test against Solaris 10 bug: Failures are not distinguishable from
39815 successful returns. */
39817 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
39818 if (cd_ascii_to_88591 != (iconv_t)(-1))
39820 static ICONV_CONST char input[] = "\263";
39822 ICONV_CONST char *inptr = input;
39823 size_t inbytesleft = strlen (input);
39824 char *outptr = buf;
39825 size_t outbytesleft = sizeof (buf);
39826 size_t res = iconv (cd_ascii_to_88591,
39827 &inptr, &inbytesleft,
39828 &outptr, &outbytesleft);
39831 iconv_close (cd_ascii_to_88591);
39834 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
39836 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
39837 if (cd_88591_to_utf8 != (iconv_t)(-1))
39839 static ICONV_CONST char input[] = "\304";
39840 static char buf[2] = { (char)0xDE, (char)0xAD };
39841 ICONV_CONST char *inptr = input;
39842 size_t inbytesleft = 1;
39843 char *outptr = buf;
39844 size_t outbytesleft = 1;
39845 size_t res = iconv (cd_88591_to_utf8,
39846 &inptr, &inbytesleft,
39847 &outptr, &outbytesleft);
39848 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
39850 iconv_close (cd_88591_to_utf8);
39853 #if 0 /* This bug could be worked around by the caller. */
39854 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
39856 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
39857 if (cd_88591_to_utf8 != (iconv_t)(-1))
39859 static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
39861 ICONV_CONST char *inptr = input;
39862 size_t inbytesleft = strlen (input);
39863 char *outptr = buf;
39864 size_t outbytesleft = sizeof (buf);
39865 size_t res = iconv (cd_88591_to_utf8,
39866 &inptr, &inbytesleft,
39867 &outptr, &outbytesleft);
39870 iconv_close (cd_88591_to_utf8);
39874 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
39877 /* Try standardized names. */
39878 iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
39879 /* Try IRIX, OSF/1 names. */
39880 iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
39881 /* Try AIX names. */
39882 iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
39883 /* Try HP-UX names. */
39884 iconv_t cd4 = iconv_open ("utf8", "eucJP");
39885 if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
39886 && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
39888 if (cd1 != (iconv_t)(-1))
39890 if (cd2 != (iconv_t)(-1))
39892 if (cd3 != (iconv_t)(-1))
39894 if (cd4 != (iconv_t)(-1))
39903 if ac_fn_c_try_run "$LINENO"
39905 am_cv_func_iconv_works=yes
39907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39908 conftest.$ac_objext conftest.beam conftest.$ac_ext
39911 test "$am_cv_func_iconv_works" = no || break
39913 LIBS="$am_save_LIBS"
39916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
39917 printf "%s\n" "$am_cv_func_iconv_works" >&6; }
39918 case "$am_cv_func_iconv_works" in
39919 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
39920 *) am_func_iconv=yes ;;
39923 am_func_iconv=no am_cv_lib_iconv=no
39925 if test "$am_func_iconv" = yes; then
39927 printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h
39930 if test "$am_cv_lib_iconv" = yes; then
39931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
39932 printf %s "checking how to link with libiconv... " >&6; }
39933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
39934 printf "%s\n" "$LIBICONV" >&6; }
39936 CPPFLAGS="$am_save_CPPFLAGS"
39952 acl_save_prefix="$prefix"
39953 prefix="$acl_final_prefix"
39954 acl_save_exec_prefix="$exec_prefix"
39955 exec_prefix="$acl_final_exec_prefix"
39957 eval additional_includedir=\"$includedir\"
39958 eval additional_libdir=\"$libdir\"
39960 exec_prefix="$acl_save_exec_prefix"
39961 prefix="$acl_save_prefix"
39964 # Check whether --with-libintl-prefix was given.
39965 if test ${with_libintl_prefix+y}
39967 withval=$with_libintl_prefix;
39968 if test "X$withval" = "Xno"; then
39971 if test "X$withval" = "X"; then
39973 acl_save_prefix="$prefix"
39974 prefix="$acl_final_prefix"
39975 acl_save_exec_prefix="$exec_prefix"
39976 exec_prefix="$acl_final_exec_prefix"
39978 eval additional_includedir=\"$includedir\"
39979 eval additional_libdir=\"$libdir\"
39981 exec_prefix="$acl_save_exec_prefix"
39982 prefix="$acl_save_prefix"
39985 additional_includedir="$withval/include"
39986 additional_libdir="$withval/$acl_libdirstem"
39987 if test "$acl_libdirstem2" != "$acl_libdirstem" \
39988 && test ! -d "$withval/$acl_libdirstem"; then
39989 additional_libdir="$withval/$acl_libdirstem2"
40003 names_already_handled=
40004 names_next_round='intl '
40005 while test -n "$names_next_round"; do
40006 names_this_round="$names_next_round"
40008 for name in $names_this_round; do
40010 for n in $names_already_handled; do
40011 if test "$n" = "$name"; then
40012 already_handled=yes
40016 if test -z "$already_handled"; then
40017 names_already_handled="$names_already_handled $name"
40018 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
40019 eval value=\"\$HAVE_LIB$uppername\"
40020 if test -n "$value"; then
40021 if test "$value" = yes; then
40022 eval value=\"\$LIB$uppername\"
40023 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
40024 eval value=\"\$LTLIB$uppername\"
40025 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
40034 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
40035 if test -n "$acl_shlibext"; then
40036 shrext=".$acl_shlibext" # typically: shrext=.so
40040 if test $use_additional = yes; then
40041 dir="$additional_libdir"
40042 if test -n "$acl_shlibext"; then
40043 if test -f "$dir/$libname$shrext"; then
40045 found_so="$dir/$libname$shrext"
40047 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
40048 ver=`(cd "$dir" && \
40049 for f in "$libname$shrext".*; do echo "$f"; done \
40050 | sed -e "s,^$libname$shrext\\\\.,," \
40051 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
40052 | sed 1q ) 2>/dev/null`
40053 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
40055 found_so="$dir/$libname$shrext.$ver"
40058 eval library_names=\"$acl_library_names_spec\"
40059 for f in $library_names; do
40060 if test -f "$dir/$f"; then
40069 if test "X$found_dir" = "X"; then
40070 if test -f "$dir/$libname.$acl_libext"; then
40072 found_a="$dir/$libname.$acl_libext"
40075 if test "X$found_dir" != "X"; then
40076 if test -f "$dir/$libname.la"; then
40077 found_la="$dir/$libname.la"
40081 if test "X$found_dir" = "X"; then
40082 for x in $LDFLAGS $LTLIBINTL; do
40084 acl_save_prefix="$prefix"
40085 prefix="$acl_final_prefix"
40086 acl_save_exec_prefix="$exec_prefix"
40087 exec_prefix="$acl_final_exec_prefix"
40089 exec_prefix="$acl_save_exec_prefix"
40090 prefix="$acl_save_prefix"
40094 dir=`echo "X$x" | sed -e 's/^X-L//'`
40095 if test -n "$acl_shlibext"; then
40096 if test -f "$dir/$libname$shrext"; then
40098 found_so="$dir/$libname$shrext"
40100 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
40101 ver=`(cd "$dir" && \
40102 for f in "$libname$shrext".*; do echo "$f"; done \
40103 | sed -e "s,^$libname$shrext\\\\.,," \
40104 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
40105 | sed 1q ) 2>/dev/null`
40106 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
40108 found_so="$dir/$libname$shrext.$ver"
40111 eval library_names=\"$acl_library_names_spec\"
40112 for f in $library_names; do
40113 if test -f "$dir/$f"; then
40122 if test "X$found_dir" = "X"; then
40123 if test -f "$dir/$libname.$acl_libext"; then
40125 found_a="$dir/$libname.$acl_libext"
40128 if test "X$found_dir" != "X"; then
40129 if test -f "$dir/$libname.la"; then
40130 found_la="$dir/$libname.la"
40135 if test "X$found_dir" != "X"; then
40140 if test "X$found_dir" != "X"; then
40141 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
40142 if test "X$found_so" != "X"; then
40143 if test "$enable_rpath" = no \
40144 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
40145 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
40146 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40149 for x in $ltrpathdirs; do
40150 if test "X$x" = "X$found_dir"; then
40155 if test -z "$haveit"; then
40156 ltrpathdirs="$ltrpathdirs $found_dir"
40158 if test "$acl_hardcode_direct" = yes; then
40159 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40161 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
40162 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40164 for x in $rpathdirs; do
40165 if test "X$x" = "X$found_dir"; then
40170 if test -z "$haveit"; then
40171 rpathdirs="$rpathdirs $found_dir"
40175 for x in $LDFLAGS $LIBINTL; do
40177 acl_save_prefix="$prefix"
40178 prefix="$acl_final_prefix"
40179 acl_save_exec_prefix="$exec_prefix"
40180 exec_prefix="$acl_final_exec_prefix"
40182 exec_prefix="$acl_save_exec_prefix"
40183 prefix="$acl_save_prefix"
40185 if test "X$x" = "X-L$found_dir"; then
40190 if test -z "$haveit"; then
40191 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
40193 if test "$acl_hardcode_minus_L" != no; then
40194 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
40196 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
40202 if test "X$found_a" != "X"; then
40203 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
40205 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
40208 additional_includedir=
40209 case "$found_dir" in
40210 */$acl_libdirstem | */$acl_libdirstem/)
40211 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
40212 if test "$name" = 'intl'; then
40213 LIBINTL_PREFIX="$basedir"
40215 additional_includedir="$basedir/include"
40217 */$acl_libdirstem2 | */$acl_libdirstem2/)
40218 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
40219 if test "$name" = 'intl'; then
40220 LIBINTL_PREFIX="$basedir"
40222 additional_includedir="$basedir/include"
40225 if test "X$additional_includedir" != "X"; then
40226 if test "X$additional_includedir" != "X/usr/include"; then
40228 if test "X$additional_includedir" = "X/usr/local/include"; then
40229 if test -n "$GCC"; then
40231 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
40235 if test -z "$haveit"; then
40236 for x in $CPPFLAGS $INCINTL; do
40238 acl_save_prefix="$prefix"
40239 prefix="$acl_final_prefix"
40240 acl_save_exec_prefix="$exec_prefix"
40241 exec_prefix="$acl_final_exec_prefix"
40243 exec_prefix="$acl_save_exec_prefix"
40244 prefix="$acl_save_prefix"
40246 if test "X$x" = "X-I$additional_includedir"; then
40251 if test -z "$haveit"; then
40252 if test -d "$additional_includedir"; then
40253 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
40259 if test -n "$found_la"; then
40260 save_libdir="$libdir"
40261 case "$found_la" in
40262 */* | *\\*) . "$found_la" ;;
40263 *) . "./$found_la" ;;
40265 libdir="$save_libdir"
40266 for dep in $dependency_libs; do
40269 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
40270 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
40271 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
40273 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
40274 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
40275 if test -n "$GCC"; then
40277 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
40281 if test -z "$haveit"; then
40283 for x in $LDFLAGS $LIBINTL; do
40285 acl_save_prefix="$prefix"
40286 prefix="$acl_final_prefix"
40287 acl_save_exec_prefix="$exec_prefix"
40288 exec_prefix="$acl_final_exec_prefix"
40290 exec_prefix="$acl_save_exec_prefix"
40291 prefix="$acl_save_prefix"
40293 if test "X$x" = "X-L$additional_libdir"; then
40298 if test -z "$haveit"; then
40299 if test -d "$additional_libdir"; then
40300 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
40304 for x in $LDFLAGS $LTLIBINTL; do
40306 acl_save_prefix="$prefix"
40307 prefix="$acl_final_prefix"
40308 acl_save_exec_prefix="$exec_prefix"
40309 exec_prefix="$acl_final_exec_prefix"
40311 exec_prefix="$acl_save_exec_prefix"
40312 prefix="$acl_save_prefix"
40314 if test "X$x" = "X-L$additional_libdir"; then
40319 if test -z "$haveit"; then
40320 if test -d "$additional_libdir"; then
40321 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
40328 dir=`echo "X$dep" | sed -e 's/^X-R//'`
40329 if test "$enable_rpath" != no; then
40331 for x in $rpathdirs; do
40332 if test "X$x" = "X$dir"; then
40337 if test -z "$haveit"; then
40338 rpathdirs="$rpathdirs $dir"
40341 for x in $ltrpathdirs; do
40342 if test "X$x" = "X$dir"; then
40347 if test -z "$haveit"; then
40348 ltrpathdirs="$ltrpathdirs $dir"
40353 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
40356 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
40359 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
40360 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
40366 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
40367 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
40373 if test "X$rpathdirs" != "X"; then
40374 if test -n "$acl_hardcode_libdir_separator"; then
40376 for found_dir in $rpathdirs; do
40377 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
40379 acl_save_libdir="$libdir"
40381 eval flag=\"$acl_hardcode_libdir_flag_spec\"
40382 libdir="$acl_save_libdir"
40383 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
40385 for found_dir in $rpathdirs; do
40386 acl_save_libdir="$libdir"
40387 libdir="$found_dir"
40388 eval flag=\"$acl_hardcode_libdir_flag_spec\"
40389 libdir="$acl_save_libdir"
40390 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
40394 if test "X$ltrpathdirs" != "X"; then
40395 for found_dir in $ltrpathdirs; do
40396 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
40404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
40405 printf %s "checking for GNU gettext in libintl... " >&6; }
40406 if eval test \${$gt_func_gnugettext_libintl+y}
40408 printf %s "(cached) " >&6
40410 gt_save_CPPFLAGS="$CPPFLAGS"
40411 CPPFLAGS="$CPPFLAGS $INCINTL"
40412 gt_save_LIBS="$LIBS"
40413 LIBS="$LIBS $LIBINTL"
40414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40415 /* end confdefs.h. */
40417 #include <libintl.h>
40418 $gt_revision_test_code
40419 extern int _nl_msg_cat_cntr;
40424 const char *_nl_expand_alias (const char *);
40430 bindtextdomain ("", "");
40431 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
40437 if ac_fn_c_try_link "$LINENO"
40439 eval "$gt_func_gnugettext_libintl=yes"
40441 eval "$gt_func_gnugettext_libintl=no"
40443 rm -f core conftest.err conftest.$ac_objext \
40444 conftest$ac_exeext conftest.$ac_ext
40445 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
40446 LIBS="$LIBS $LIBICONV"
40447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40448 /* end confdefs.h. */
40450 #include <libintl.h>
40451 $gt_revision_test_code
40452 extern int _nl_msg_cat_cntr;
40457 const char *_nl_expand_alias (const char *);
40463 bindtextdomain ("", "");
40464 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
40470 if ac_fn_c_try_link "$LINENO"
40472 LIBINTL="$LIBINTL $LIBICONV"
40473 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
40474 eval "$gt_func_gnugettext_libintl=yes"
40477 rm -f core conftest.err conftest.$ac_objext \
40478 conftest$ac_exeext conftest.$ac_ext
40480 CPPFLAGS="$gt_save_CPPFLAGS"
40481 LIBS="$gt_save_LIBS"
40483 eval ac_res=\$$gt_func_gnugettext_libintl
40484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
40485 printf "%s\n" "$ac_res" >&6; }
40488 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
40489 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
40490 && test "$PACKAGE" != gettext-runtime \
40491 && test "$PACKAGE" != gettext-tools; }; then
40492 gt_use_preinstalled_gnugettext=yes
40501 if test -n "$INTL_MACOSX_LIBS"; then
40502 if test "$gt_use_preinstalled_gnugettext" = "yes" \
40503 || test "$nls_cv_use_gnu_gettext" = "yes"; then
40504 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
40505 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
40509 if test "$gt_use_preinstalled_gnugettext" = "yes" \
40510 || test "$nls_cv_use_gnu_gettext" = "yes"; then
40512 printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
40519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
40520 printf %s "checking whether to use NLS... " >&6; }
40521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
40522 printf "%s\n" "$USE_NLS" >&6; }
40523 if test "$USE_NLS" = "yes"; then
40524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
40525 printf %s "checking where the gettext function comes from... " >&6; }
40526 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
40527 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
40528 gt_source="external libintl"
40533 gt_source="included intl directory"
40535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
40536 printf "%s\n" "$gt_source" >&6; }
40539 if test "$USE_NLS" = "yes"; then
40541 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
40542 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
40543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
40544 printf %s "checking how to link with libintl... " >&6; }
40545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
40546 printf "%s\n" "$LIBINTL" >&6; }
40548 for element in $INCINTL; do
40550 for x in $CPPFLAGS; do
40552 acl_save_prefix="$prefix"
40553 prefix="$acl_final_prefix"
40554 acl_save_exec_prefix="$exec_prefix"
40555 exec_prefix="$acl_final_exec_prefix"
40557 exec_prefix="$acl_save_exec_prefix"
40558 prefix="$acl_save_prefix"
40560 if test "X$x" = "X$element"; then
40565 if test -z "$haveit"; then
40566 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
40573 printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h
40576 printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h
40585 INTLLIBS="$LIBINTL"
40593 XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
40595 ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile src/Makefile tests/Makefile gnulib-tests/Makefile man/Makefile po/Makefile.in"
40597 cat >confcache <<\_ACEOF
40598 # This file is a shell script that caches the results of configure
40599 # tests run on this system so they can be shared between configure
40600 # scripts and configure runs, see configure's option --config-cache.
40601 # It is not useful on other systems. If it contains results you don't
40602 # want to keep, you may remove or edit it.
40604 # config.status only pays attention to the cache file if you give it
40605 # the --recheck option to rerun configure.
40607 # `ac_cv_env_foo' variables (set or unset) will be overridden when
40608 # loading this file, other *unset* `ac_cv_foo' will be assigned the
40609 # following values.
40613 # The following way of writing the cache mishandles newlines in values,
40614 # but we know of no workaround that is simple, portable, and efficient.
40615 # So, we kill variables containing newlines.
40616 # Ultrix sh set writes to stderr and can't be redirected directly,
40617 # and sets the high bit in the cache file unless we assign to the vars.
40619 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
40620 eval ac_val=\$$ac_var
40624 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
40625 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
40628 _ | IFS | as_nl) ;; #(
40629 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
40630 *) { eval $ac_var=; unset $ac_var;} ;;
40636 case $as_nl`(ac_space=' '; set) 2>&1` in #(
40637 *${as_nl}ac_space=\ *)
40638 # `set' does not quote correctly, so add quotes: double-quote
40639 # substitution turns \\\\ into \\, and sed turns \\ into \.
40642 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
40645 # `set' quotes correctly as required by POSIX, so do not add quotes.
40646 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
40655 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
40657 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
40659 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
40660 if test -w "$cache_file"; then
40661 if test "x$cache_file" != "x/dev/null"; then
40662 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
40663 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
40664 if test ! -f "$cache_file" || test -h "$cache_file"; then
40665 cat confcache >"$cache_file"
40667 case $cache_file in #(
40669 mv -f confcache "$cache_file"$$ &&
40670 mv -f "$cache_file"$$ "$cache_file" ;; #(
40672 mv -f confcache "$cache_file" ;;
40677 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
40678 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
40683 test "x$prefix" = xNONE && prefix=$ac_default_prefix
40684 # Let make expand exec_prefix.
40685 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
40687 DEFS=-DHAVE_CONFIG_H
40692 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
40693 # 1. Remove the extension, and $U if already installed.
40694 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
40695 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
40696 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
40697 # will be set to the directory where LIBOBJS objects are built.
40698 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
40699 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
40701 LIBOBJS=$ac_libobjs
40703 LTLIBOBJS=$ac_ltlibobjs
40706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
40707 printf %s "checking that generated files are newer than configure... " >&6; }
40708 if test -n "$am_sleep_pid"; then
40709 # Hide warnings about reused PIDs.
40710 wait $am_sleep_pid 2>/dev/null
40712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
40713 printf "%s\n" "done" >&6; }
40714 if test -n "$EXEEXT"; then
40716 am__EXEEXT_FALSE='#'
40718 am__EXEEXT_TRUE='#'
40722 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
40723 as_fn_error $? "conditional \"AMDEP\" was never defined.
40724 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40726 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
40727 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
40728 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40730 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
40731 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
40732 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40734 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
40735 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
40736 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40738 test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
40739 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
40740 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
40741 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40743 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
40744 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
40745 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40747 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
40748 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
40749 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40751 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
40752 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
40753 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40755 if test -z "${GNU_MAKE_TRUE}" && test -z "${GNU_MAKE_FALSE}"; then
40756 as_fn_error $? "conditional \"GNU_MAKE\" was never defined.
40757 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40759 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40760 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40761 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40763 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40764 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40765 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40767 if test -z "${GL_GENERATE_ICONV_H_TRUE}" && test -z "${GL_GENERATE_ICONV_H_FALSE}"; then
40768 as_fn_error $? "conditional \"GL_GENERATE_ICONV_H\" was never defined.
40769 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40771 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
40772 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
40773 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40775 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
40776 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined.
40777 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40779 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
40780 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
40781 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40783 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
40784 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
40785 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40787 CONFIG_INCLUDE=lib/config.h
40789 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
40790 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
40791 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40793 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
40794 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
40795 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40797 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
40798 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
40799 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40801 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR_FALSE}"; then
40802 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_MBTOUCR\" was never defined.
40803 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40805 if test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB_FALSE}"; then
40806 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNISTR_U8_UCTOMB\" was never defined.
40807 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40809 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
40810 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
40811 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40817 if test -n "$gl_LIBOBJS"; then
40818 # Remove the extension.
40819 sed_drop_objext='s/\.o$//;s/\.obj$//'
40820 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
40821 gl_libobjs="$gl_libobjs $i.$ac_objext"
40822 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
40825 gl_LIBOBJS=$gl_libobjs
40827 gl_LTLIBOBJS=$gl_ltlibobjs
40831 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
40832 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
40833 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40835 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
40836 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
40837 Usually this means the macro was only invoked conditionally." "$LINENO" 5
40842 if test -n "$gltests_LIBOBJS"; then
40843 # Remove the extension.
40844 sed_drop_objext='s/\.o$//;s/\.obj$//'
40845 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
40846 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
40847 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
40850 gltests_LIBOBJS=$gltests_libobjs
40852 gltests_LTLIBOBJS=$gltests_ltlibobjs
40856 : "${CONFIG_STATUS=./config.status}"
40858 ac_clean_files_save=$ac_clean_files
40859 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
40860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
40861 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
40863 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
40865 # Generated by $as_me.
40866 # Run this file to recreate the current configuration.
40867 # Compiler output produced by configure, useful for debugging
40868 # configure, is in config.log if it exists.
40871 ac_cs_recheck=false
40874 SHELL=\${CONFIG_SHELL-$SHELL}
40877 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
40878 ## -------------------- ##
40879 ## M4sh Initialization. ##
40880 ## -------------------- ##
40882 # Be more Bourne compatible
40883 DUALCASE=1; export DUALCASE # for MKS sh
40884 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
40888 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
40889 # is contrary to our usage. Disable this feature.
40890 alias -g '${1+"$@"}'='"$@"'
40891 setopt NO_GLOB_SUBST
40893 case `(set -o) 2>/dev/null` in #(
40902 # The user is always right.
40903 if ${PATH_SEPARATOR+false} :; then
40905 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
40906 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
40913 # We need space, tab and new line, in precisely that order. Quoting is
40914 # there to prevent editors from complaining about space-tab.
40915 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
40916 # splitting by setting IFS to empty value.)
40922 # Find who we are. Look in the path if we contain no directory separator.
40925 *[\\/]* ) as_myself=$0 ;;
40926 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40927 for as_dir in $PATH
40930 case $as_dir in #(((
40933 *) as_dir=$as_dir/ ;;
40935 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
40941 # We did not find ourselves, most probably we were run as `sh COMMAND'
40942 # in which case we are not to be found in the path.
40943 if test "x$as_myself" = x; then
40946 if test ! -f "$as_myself"; then
40947 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
40951 # Unset variables that we do not need and which cause bugs (e.g. in
40952 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
40953 # suppresses any "Segmentation fault" message there. '((' could
40954 # trigger a bug in pdksh 5.2.14.
40955 for as_var in BASH_ENV ENV MAIL MAILPATH
40956 do eval test \${$as_var+y} \
40957 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
40970 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
40973 # as_fn_error STATUS ERROR [LINENO LOG_FD]
40974 # ----------------------------------------
40975 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
40976 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
40977 # script with STATUS, using 1 if that was 0.
40980 as_status=$1; test $as_status -eq 0 && as_status=1
40982 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
40983 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
40985 printf "%s\n" "$as_me: error: $2" >&2
40986 as_fn_exit $as_status
40990 # as_fn_set_status STATUS
40991 # -----------------------
40992 # Set $? to STATUS, without forking.
40993 as_fn_set_status ()
40996 } # as_fn_set_status
40998 # as_fn_exit STATUS
40999 # -----------------
41000 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
41004 as_fn_set_status $1
41010 # Portably unset VAR.
41013 { eval $1=; unset $1;}
41015 as_unset=as_fn_unset
41016 # as_fn_append VAR VALUE
41017 # ----------------------
41018 # Append the text in VALUE to the end of the definition contained in VAR. Take
41019 # advantage of any shell optimizations that allow amortized linear growth over
41020 # repeated appends, instead of the typical quadratic growth present in naive
41022 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
41024 eval 'as_fn_append ()
41035 # as_fn_arith ARG...
41036 # ------------------
41037 # Perform arithmetic evaluation on the ARGs, and store the result in the
41038 # global $as_val. Take advantage of shells that can avoid forks. The arguments
41039 # must be portable across $(()) and expr.
41040 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
41042 eval 'as_fn_arith ()
41049 as_val=`expr "$@" || test $? -eq 1`
41054 if expr a : '\(a\)' >/dev/null 2>&1 &&
41055 test "X`expr 00001 : '.*\(...\)'`" = X001; then
41061 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
41062 as_basename=basename
41067 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
41073 as_me=`$as_basename -- "$0" ||
41074 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
41075 X"$0" : 'X\(//\)$' \| \
41076 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
41077 printf "%s\n" X/"$0" |
41078 sed '/^.*\/\([^/][^/]*\)\/*$/{
41092 # Avoid depending upon Character Ranges.
41093 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
41094 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
41095 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
41096 as_cr_digits='0123456789'
41097 as_cr_alnum=$as_cr_Letters$as_cr_digits
41099 ECHO_C= ECHO_N= ECHO_T=
41100 case `echo -n x` in #(((((
41102 case `echo 'xy\c'` in
41103 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
41105 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
41112 rm -f conf$$ conf$$.exe conf$$.file
41113 if test -d conf$$.dir; then
41114 rm -f conf$$.dir/conf$$.file
41117 mkdir conf$$.dir 2>/dev/null
41119 if (echo >conf$$.file) 2>/dev/null; then
41120 if ln -s conf$$.file conf$$ 2>/dev/null; then
41122 # ... but there are two gotchas:
41123 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
41124 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
41125 # In both cases, we have to default to `cp -pR'.
41126 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
41128 elif ln conf$$.file conf$$ 2>/dev/null; then
41136 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
41137 rmdir conf$$.dir 2>/dev/null
41142 # Create "$as_dir" as a directory, including parents if necessary.
41147 -*) as_dir=./$as_dir;;
41149 test -d "$as_dir" || eval $as_mkdir_p || {
41153 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
41154 *) as_qdir=$as_dir;;
41156 as_dirs="'$as_qdir' $as_dirs"
41157 as_dir=`$as_dirname -- "$as_dir" ||
41158 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41159 X"$as_dir" : 'X\(//\)[^/]' \| \
41160 X"$as_dir" : 'X\(//\)$' \| \
41161 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
41162 printf "%s\n" X"$as_dir" |
41163 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41167 /^X\(\/\/\)[^/].*/{
41180 test -d "$as_dir" && break
41182 test -z "$as_dirs" || eval "mkdir $as_dirs"
41183 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
41187 if mkdir -p . 2>/dev/null; then
41188 as_mkdir_p='mkdir -p "$as_dir"'
41190 test -d ./-p && rmdir ./-p
41195 # as_fn_executable_p FILE
41196 # -----------------------
41197 # Test if FILE is an executable regular file.
41198 as_fn_executable_p ()
41200 test -f "$1" && test -x "$1"
41201 } # as_fn_executable_p
41202 as_test_x='test -x'
41203 as_executable_p=as_fn_executable_p
41205 # Sed expression to map a string onto a valid CPP name.
41206 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
41208 # Sed expression to map a string onto a valid variable name.
41209 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
41213 ## ----------------------------------- ##
41214 ## Main body of $CONFIG_STATUS script. ##
41215 ## ----------------------------------- ##
41217 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
41219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41220 # Save the log message, to keep $0 and so on meaningful, and to
41221 # report actual input values of CONFIG_FILES etc. instead of their
41222 # values after options handling.
41224 This file was extended by GNU diffutils $as_me 3.7, which was
41225 generated by GNU Autoconf 2.69.197-b8fd7. Invocation command line was
41227 CONFIG_FILES = $CONFIG_FILES
41228 CONFIG_HEADERS = $CONFIG_HEADERS
41229 CONFIG_LINKS = $CONFIG_LINKS
41230 CONFIG_COMMANDS = $CONFIG_COMMANDS
41233 on `(hostname || uname -n) 2>/dev/null | sed 1q`
41238 case $ac_config_files in *"
41239 "*) set x $ac_config_files; shift; ac_config_files=$*;;
41242 case $ac_config_headers in *"
41243 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
41247 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41248 # Files that config.status was made for.
41249 config_files="$ac_config_files"
41250 config_headers="$ac_config_headers"
41251 config_links="$ac_config_links"
41252 config_commands="$ac_config_commands"
41256 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41258 \`$as_me' instantiates files and other configuration actions
41259 from templates according to the current configuration. Unless the files
41260 and actions are specified as TAGs, all are instantiated by default.
41262 Usage: $0 [OPTION]... [TAG]...
41264 -h, --help print this help, then exit
41265 -V, --version print version number and configuration settings, then exit
41266 --config print configuration, then exit
41267 -q, --quiet, --silent
41268 do not print progress messages
41269 -d, --debug don't remove temporary files
41270 --recheck update $as_me by reconfiguring in the same conditions
41271 --file=FILE[:TEMPLATE]
41272 instantiate the configuration file FILE
41273 --header=FILE[:TEMPLATE]
41274 instantiate the configuration header FILE
41276 Configuration files:
41279 Configuration headers:
41282 Configuration links:
41285 Configuration commands:
41288 Report bugs to <bug-diffutils@gnu.org>.
41289 GNU diffutils home page: <https://www.gnu.org/software/diffutils/>.
41290 General help using GNU software: <https://www.gnu.org/gethelp/>."
41293 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
41294 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
41295 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41296 ac_cs_config='$ac_cs_config_escaped'
41298 GNU diffutils config.status 3.7
41299 configured by $0, generated by GNU Autoconf 2.69.197-b8fd7,
41300 with options \\"\$ac_cs_config\\"
41302 Copyright (C) 2017 Free Software Foundation, Inc.
41303 This config.status script is free software; the Free Software Foundation
41304 gives unlimited permission to copy, distribute and modify it."
41311 test -n "\$AWK" || AWK=awk
41314 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41315 # The default lists apply if the user does not specify any file.
41321 ac_option=`expr "X$1" : 'X\([^=]*\)='`
41322 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
41326 ac_option=`expr "X$1" : 'X\([^=]*\)='`
41338 # Handling of the options.
41339 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
41341 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
41342 printf "%s\n" "$ac_cs_version"; exit ;;
41343 --config | --confi | --conf | --con | --co | --c )
41344 printf "%s\n" "$ac_cs_config"; exit ;;
41345 --debug | --debu | --deb | --de | --d | -d )
41347 --file | --fil | --fi | --f )
41350 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
41351 '') as_fn_error $? "missing file argument" ;;
41353 as_fn_append CONFIG_FILES " '$ac_optarg'"
41354 ac_need_defaults=false;;
41355 --header | --heade | --head | --hea )
41358 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
41360 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
41361 ac_need_defaults=false;;
41363 # Conflict between --help and --header
41364 as_fn_error $? "ambiguous option: \`$1'
41365 Try \`$0 --help' for more information.";;
41366 --help | --hel | -h )
41367 printf "%s\n" "$ac_cs_usage"; exit ;;
41368 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
41369 | -silent | --silent | --silen | --sile | --sil | --si | --s)
41372 # This is an error.
41373 -*) as_fn_error $? "unrecognized option: \`$1'
41374 Try \`$0 --help' for more information." ;;
41376 *) as_fn_append ac_config_targets " $1"
41377 ac_need_defaults=false ;;
41383 ac_configure_extra_args=
41385 if $ac_cs_silent; then
41387 ac_configure_extra_args="$ac_configure_extra_args --silent"
41391 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41392 if \$ac_cs_recheck; then
41393 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
41395 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
41396 CONFIG_SHELL='$SHELL'
41397 export CONFIG_SHELL
41402 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41406 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
41407 ## Running $as_me. ##
41409 printf "%s\n" "$ac_log"
41413 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41417 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
41418 GNUmakefile=$GNUmakefile
41419 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
41420 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
41421 # from automake < 1.5.
41422 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
41423 # Capture the value of LINGUAS because we need it to compute CATALOGS.
41424 LINGUAS="${LINGUAS-%UNSET%}"
41429 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41431 # Handling of arguments.
41432 for ac_config_target in $ac_config_targets
41434 case $ac_config_target in
41435 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.hin" ;;
41436 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
41437 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
41438 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
41439 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
41440 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
41441 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
41442 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
41443 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
41444 "gnulib-tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib-tests/Makefile" ;;
41445 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
41446 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
41448 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
41453 # If the user did not use the arguments to specify the items to instantiate,
41454 # then the envvar interface is used. Set only those that are not.
41455 # We use the long form for the default assignment because of an extremely
41456 # bizarre bug on SunOS 4.1.3.
41457 if $ac_need_defaults; then
41458 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
41459 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
41460 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
41461 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
41464 # Have a temporary directory for convenience. Make it in the build tree
41465 # simply because there is no reason against having it here, and in addition,
41466 # creating and moving files from /tmp can sometimes cause problems.
41467 # Hook for its removal unless debugging.
41468 # Note that there is a small window in which the directory will not be cleaned:
41469 # after its creation but before its name has been assigned to `$tmp'.
41473 trap 'exit_status=$?
41474 : "${ac_tmp:=$tmp}"
41475 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
41477 trap 'as_fn_exit 1' 1 2 13 15
41479 # Create a (secure) tmp directory for tmp files.
41482 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
41486 tmp=./conf$$-$RANDOM
41487 (umask 077 && mkdir "$tmp")
41488 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
41491 # Set up the scripts for CONFIG_FILES section.
41492 # No need to generate them if there are no CONFIG_FILES.
41493 # This happens for instance with `./config.status config.h'.
41494 if test -n "$CONFIG_FILES"; then
41497 ac_cr=`echo X | tr X '\015'`
41498 # On cygwin, bash can eat \r inside `` if the user requested igncr.
41499 # But we know of no other shell where ac_cr would be empty at this
41500 # point, so we can use a bashism as a fallback.
41501 if test "x$ac_cr" = x; then
41502 eval ac_cr=\$\'\\r\'
41504 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
41505 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
41508 ac_cs_awk_cr=$ac_cr
41511 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
41516 echo "cat >conf$$subs.awk <<_ACEOF" &&
41517 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
41519 } >conf$$subs.sh ||
41520 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41521 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
41523 for ac_last_try in false false false false false :; do
41524 . ./conf$$subs.sh ||
41525 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41527 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
41528 if test $ac_delim_n = $ac_delim_num; then
41530 elif $ac_last_try; then
41531 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
41533 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
41536 rm -f conf$$subs.sh
41538 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41539 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
41543 s/^/S["/; s/!.*/"]=/
41553 s/\(.\{148\}\)..*/\1/
41555 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
41560 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
41567 s/\(.\{148\}\)..*/\1/
41569 s/["\\]/\\&/g; s/^/"/; s/$/"/
41573 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
41578 ' <conf$$subs.awk | sed '
41583 ' >>$CONFIG_STATUS || ac_write_fail=1
41584 rm -f conf$$subs.awk
41585 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41587 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
41588 for (key in S) S_is_set[key] = 1
41594 nfields = split(line, field, "@")
41596 len = length(field[1])
41597 for (i = 2; i < nfields; i++) {
41599 keylen = length(key)
41600 if (S_is_set[key]) {
41602 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
41603 len += length(value) + length(field[++i])
41614 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41615 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
41616 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
41619 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
41620 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
41623 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
41624 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
41625 # trailing colons and then remove the whole line if VPATH becomes empty
41626 # (actually we leave an empty line to preserve line numbers).
41627 if test "x$srcdir" = x.; then
41628 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
41646 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41647 fi # test -n "$CONFIG_FILES"
41649 # Set up the scripts for CONFIG_HEADERS section.
41650 # No need to generate them if there are no CONFIG_HEADERS.
41651 # This happens for instance with `./config.status Makefile'.
41652 if test -n "$CONFIG_HEADERS"; then
41653 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
41657 # Transform confdefs.h into an awk script `defines.awk', embedded as
41658 # here-document in config.status, that substitutes the proper values into
41659 # config.h.in to produce config.h.
41661 # Create a delimiter string that does not exist in confdefs.h, to ease
41662 # handling of long lines.
41664 for ac_last_try in false false :; do
41665 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
41666 if test -z "$ac_tt"; then
41668 elif $ac_last_try; then
41669 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
41671 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
41675 # For the awk script, D is an array of macro values keyed by name,
41676 # likewise P contains macro parameters if any. Preserve backslash
41677 # newline sequences.
41679 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
41681 s/.\{148\}/&'"$ac_delim"'/g
41684 s/^[ ]*#[ ]*define[ ][ ]*/ /
41691 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
41693 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
41697 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
41698 D["\1"]=" \3\\\\\\n"\\/p
41700 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
41705 s/.\{148\}/&'"$ac_delim"'/g
41710 s/["\\]/\\&/g; s/^/"/; s/$/"/p
41713 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
41715 ' <confdefs.h | sed '
41716 s/'"$ac_delim"'/"\\\
41717 "/g' >>$CONFIG_STATUS || ac_write_fail=1
41719 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41720 for (key in D) D_is_set[key] = 1
41723 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
41725 split(line, arg, " ")
41726 if (arg[1] == "#") {
41730 defundef = substr(arg[1], 2)
41733 split(mac1, mac2, "(") #)
41735 prefix = substr(line, 1, index(line, defundef) - 1)
41736 if (D_is_set[macro]) {
41737 # Preserve the white space surrounding the "#".
41738 print prefix "define", macro P[macro] D[macro]
41741 # Replace #undef with comments. This is necessary, for example,
41742 # in the case of _POSIX_SOURCE, which is predefined and required
41743 # on some systems where configure will not decide to define it.
41744 if (defundef == "undef") {
41745 print "/*", prefix defundef, macro, "*/"
41753 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41754 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
41755 fi # test -n "$CONFIG_HEADERS"
41758 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
41763 :[FHLC]) ac_mode=$ac_tag; continue;;
41765 case $ac_mode$ac_tag in
41767 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
41768 :[FH]-) ac_tag=-:-;;
41769 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
41786 -) ac_f="$ac_tmp/stdin";;
41787 *) # Look for the file first in the build tree, then in the source tree
41788 # (if the path is not absolute). The absolute path cannot be DOS-style,
41789 # because $ac_f cannot contain `:'.
41793 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
41795 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
41797 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
41798 as_fn_append ac_file_inputs " '$ac_f'"
41801 # Let's still pretend it is `configure' which instantiates (i.e., don't
41802 # use $as_me), people would be surprised to read:
41803 # /* config.h. Generated by config.status. */
41804 configure_input='Generated from '`
41805 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
41807 if test x"$ac_file" != x-; then
41808 configure_input="$ac_file. $configure_input"
41809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
41810 printf "%s\n" "$as_me: creating $ac_file" >&6;}
41812 # Neutralize special characters interpreted by sed in replacement strings.
41813 case $configure_input in #(
41814 *\&* | *\|* | *\\* )
41815 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
41816 sed 's/[\\\\&|]/\\\\&/g'`;; #(
41817 *) ac_sed_conf_input=$configure_input;;
41821 *:-:* | *:-) cat >"$ac_tmp/stdin" \
41822 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
41827 ac_dir=`$as_dirname -- "$ac_file" ||
41828 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
41829 X"$ac_file" : 'X\(//\)[^/]' \| \
41830 X"$ac_file" : 'X\(//\)$' \| \
41831 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
41832 printf "%s\n" X"$ac_file" |
41833 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
41837 /^X\(\/\/\)[^/].*/{
41850 as_dir="$ac_dir"; as_fn_mkdir_p
41854 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
41856 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
41857 # A ".." for each directory in $ac_dir_suffix.
41858 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
41859 case $ac_top_builddir_sub in
41860 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
41861 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
41864 ac_abs_top_builddir=$ac_pwd
41865 ac_abs_builddir=$ac_pwd$ac_dir_suffix
41866 # for backward compatibility:
41867 ac_top_builddir=$ac_top_build_prefix
41870 .) # We are building in place.
41872 ac_top_srcdir=$ac_top_builddir_sub
41873 ac_abs_top_srcdir=$ac_pwd ;;
41874 [\\/]* | ?:[\\/]* ) # Absolute name.
41875 ac_srcdir=$srcdir$ac_dir_suffix;
41876 ac_top_srcdir=$srcdir
41877 ac_abs_top_srcdir=$srcdir ;;
41878 *) # Relative name.
41879 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
41880 ac_top_srcdir=$ac_top_build_prefix$srcdir
41881 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
41883 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
41893 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
41894 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
41896 ac_MKDIR_P=$MKDIR_P
41898 [\\/$]* | ?:[\\/]* ) ;;
41899 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
41903 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41904 # If the template does not know about datarootdir, expand it.
41905 # FIXME: This hack should be removed a few years after 2.60.
41906 ac_datarootdir_hack=; ac_datarootdir_seen=
41917 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
41918 *datarootdir*) ac_datarootdir_seen=yes;;
41919 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
41920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
41921 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
41923 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41924 ac_datarootdir_hack='
41925 s&@datadir@&$datadir&g
41926 s&@docdir@&$docdir&g
41927 s&@infodir@&$infodir&g
41928 s&@localedir@&$localedir&g
41929 s&@mandir@&$mandir&g
41930 s&\\\${datarootdir}&$datarootdir&g' ;;
41934 # Neutralize VPATH when `$srcdir' = `.'.
41935 # Shell code in configure.ac might set extrasub.
41936 # FIXME: do we really want to maintain this feature?
41937 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41938 ac_sed_extra="$ac_vpsub
41941 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
41943 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
41944 s|@configure_input@|$ac_sed_conf_input|;t t
41945 s&@top_builddir@&$ac_top_builddir_sub&;t t
41946 s&@top_build_prefix@&$ac_top_build_prefix&;t t
41947 s&@srcdir@&$ac_srcdir&;t t
41948 s&@abs_srcdir@&$ac_abs_srcdir&;t t
41949 s&@top_srcdir@&$ac_top_srcdir&;t t
41950 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
41951 s&@builddir@&$ac_builddir&;t t
41952 s&@abs_builddir@&$ac_abs_builddir&;t t
41953 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
41954 s&@INSTALL@&$ac_INSTALL&;t t
41955 s&@MKDIR_P@&$ac_MKDIR_P&;t t
41956 $ac_datarootdir_hack
41958 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
41959 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41961 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
41962 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
41963 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
41964 "$ac_tmp/out"`; test -z "$ac_out"; } &&
41965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41966 which seems to be undefined. Please make sure it is defined" >&5
41967 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
41968 which seems to be undefined. Please make sure it is defined" >&2;}
41970 rm -f "$ac_tmp/stdin"
41972 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
41973 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
41975 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41981 if test x"$ac_file" != x-; then
41983 printf "%s\n" "/* $configure_input */" \
41984 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
41985 } >"$ac_tmp/config.h" \
41986 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41987 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
41988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
41989 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
41992 mv "$ac_tmp/config.h" "$ac_file" \
41993 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
41996 printf "%s\n" "/* $configure_input */" \
41997 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
41998 || as_fn_error $? "could not create -" "$LINENO" 5
42000 # Compute "$ac_file"'s index in $config_headers.
42003 for _am_header in $config_headers :; do
42004 case $_am_header in
42005 $_am_arg | $_am_arg:* )
42008 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
42011 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
42012 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42013 X"$_am_arg" : 'X\(//\)[^/]' \| \
42014 X"$_am_arg" : 'X\(//\)$' \| \
42015 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
42016 printf "%s\n" X"$_am_arg" |
42017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42021 /^X\(\/\/\)[^/].*/{
42033 s/.*/./; q'`/stamp-h$_am_stamp_count
42040 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
42043 # Prefer the file from the source tree if names are identical.
42044 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
42045 ac_source=$srcdir/$ac_source
42048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
42049 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
42051 if test ! -r "$ac_source"; then
42052 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
42056 # Try a relative symlink, then a hard link, then a copy.
42058 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
42059 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
42061 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
42062 ln "$ac_source" "$ac_file" 2>/dev/null ||
42063 cp -p "$ac_source" "$ac_file" ||
42064 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
42067 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
42068 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
42073 case $ac_file$ac_mode in
42074 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
42075 # Older Autoconf quotes --file arguments for eval, but not when files
42076 # are listed without --file. Let's play safe and only enable the eval
42077 # if we detect the quoting.
42078 # TODO: see whether this extra hack can be removed once we start
42079 # requiring Autoconf 2.70 or later.
42080 case $CONFIG_FILES in #(
42082 eval set x "$CONFIG_FILES" ;; #(
42084 set x $CONFIG_FILES ;; #(
42089 # Used to flag and report bootstrapping failures.
42093 # Strip MF so we end up with the name of the file.
42094 am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
42095 # Check whether this is an Automake generated Makefile which includes
42096 # dependency-tracking related rules and includes.
42097 # Grep'ing the whole file directly is not great: AIX grep has a line
42098 # limit of 2048, but all sed's we know have understand at least 4000.
42099 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
42101 am_dirpart=`$as_dirname -- "$am_mf" ||
42102 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
42103 X"$am_mf" : 'X\(//\)[^/]' \| \
42104 X"$am_mf" : 'X\(//\)$' \| \
42105 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
42106 printf "%s\n" X"$am_mf" |
42107 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
42111 /^X\(\/\/\)[^/].*/{
42124 am_filepart=`$as_basename -- "$am_mf" ||
42125 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
42126 X"$am_mf" : 'X\(//\)$' \| \
42127 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
42128 printf "%s\n" X/"$am_mf" |
42129 sed '/^.*\/\([^/][^/]*\)\/*$/{
42142 { echo "$as_me:$LINENO: cd "$am_dirpart" \
42143 && sed -e '/# am--include-marker/d' "$am_filepart" \
42144 | $MAKE -f - am--depfiles" >&5
42145 (cd "$am_dirpart" \
42146 && sed -e '/# am--include-marker/d' "$am_filepart" \
42147 | $MAKE -f - am--depfiles) >&5 2>&5
42149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
42150 (exit $ac_status); } || am_rc=$?
42152 if test $am_rc -ne 0; then
42153 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
42154 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
42155 as_fn_error $? "Something went wrong bootstrapping makefile fragments
42156 for automatic dependency tracking. Try re-running configure with the
42157 '--disable-dependency-tracking' option to at least be able to build
42158 the package (albeit without support for automatic dependency tracking).
42159 See \`config.log' for more details" "$LINENO" 5; }
42161 { am_dirpart=; unset am_dirpart;}
42162 { am_filepart=; unset am_filepart;}
42163 { am_mf=; unset am_mf;}
42164 { am_rc=; unset am_rc;}
42165 rm -f conftest-deps.mk
42168 "po-directories":C)
42169 for ac_file in $CONFIG_FILES; do
42170 # Support "outfile[:infile[:infile...]]"
42172 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
42174 # PO directories have a Makefile.in generated from Makefile.in.in.
42175 case "$ac_file" in */Makefile.in)
42176 # Adjust a relative srcdir.
42177 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
42178 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
42179 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
42180 # In autoconf-2.13 it is called $ac_given_srcdir.
42181 # In autoconf-2.50 it is called $srcdir.
42182 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
42183 case "$ac_given_srcdir" in
42184 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
42185 /*) top_srcdir="$ac_given_srcdir" ;;
42186 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
42188 # Treat a directory as a PO directory if and only if it has a
42189 # POTFILES.in file. This allows packages to have multiple PO
42190 # directories under different names or in different locations.
42191 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
42192 rm -f "$ac_dir/POTFILES"
42193 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
42194 gt_tab=`printf '\t'`
42195 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
42196 POMAKEFILEDEPS="POTFILES.in"
42197 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
42198 # on $ac_dir but don't depend on user-specified configuration
42200 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
42201 # The LINGUAS file contains the set of available languages.
42202 if test -n "$OBSOLETE_ALL_LINGUAS"; then
42203 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
42205 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
42206 # Hide the ALL_LINGUAS assignment from automake < 1.5.
42207 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
42208 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
42210 # The set of available languages was given in configure.in.
42211 # Hide the ALL_LINGUAS assignment from automake < 1.5.
42212 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
42215 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
42216 # Compute UPDATEPOFILES
42217 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
42218 # Compute DUMMYPOFILES
42219 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
42221 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
42222 case "$ac_given_srcdir" in
42224 *) srcdirpre='$(srcdir)/' ;;
42230 for lang in $ALL_LINGUAS; do
42231 POFILES="$POFILES $srcdirpre$lang.po"
42232 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
42233 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
42234 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
42236 # CATALOGS depends on both $ac_dir and the user's LINGUAS
42237 # environment variable.
42239 if test -n "$ALL_LINGUAS"; then
42240 for presentlang in $ALL_LINGUAS; do
42242 if test "%UNSET%" != "$LINGUAS"; then
42243 desiredlanguages="$LINGUAS"
42245 desiredlanguages="$ALL_LINGUAS"
42247 for desiredlang in $desiredlanguages; do
42248 # Use the presentlang catalog if desiredlang is
42249 # a. equal to presentlang, or
42250 # b. a variant of presentlang (because in this case,
42251 # presentlang can be used as a fallback for messages
42252 # which are not translated in the desiredlang catalog).
42253 case "$desiredlang" in
42254 "$presentlang"*) useit=yes;;
42257 if test $useit = yes; then
42258 INST_LINGUAS="$INST_LINGUAS $presentlang"
42263 if test -n "$INST_LINGUAS"; then
42264 for lang in $INST_LINGUAS; do
42265 CATALOGS="$CATALOGS $lang.gmo"
42268 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
42269 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
42270 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
42271 if test -f "$f"; then
42273 *.orig | *.bak | *~) ;;
42274 *) cat "$f" >> "$ac_dir/Makefile" ;;
42289 ac_clean_files=$ac_clean_files_save
42291 test $ac_write_fail = 0 ||
42292 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
42295 # configure is writing to config.log, and then calls config.status.
42296 # config.status does its own redirection, appending to config.log.
42297 # Unfortunately, on DOS this fails, as config.log is still kept open
42298 # by configure, so config.status won't be able to write to it; its
42299 # output is simply discarded. So we exec the FD to /dev/null,
42300 # effectively closing config.log, so it can be properly (re)opened and
42301 # appended to by config.status. When coming back to configure, we
42302 # need to make the FD available again.
42303 if test "$no_create" != yes; then
42305 ac_config_status_args=
42306 test "$silent" = yes &&
42307 ac_config_status_args="$ac_config_status_args --quiet"
42309 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
42311 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
42312 # would make configure fail if this is the last instruction.
42313 $ac_cs_success || as_fn_exit 1
42315 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
42316 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
42317 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}