2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU findutils 4.5.14.
5 # Report bugs to <bug-findutils@gnu.org>.
8 # Copyright (C) 1992-1996, 1998-2012 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 -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
27 case `(set -o) 2>/dev/null` in #(
39 # Printing a long string crashes Solaris 7 /usr/bin/printf.
40 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43 # Prefer a ksh shell builtin over an external printf program on Solaris,
44 # but without wasting forks for bash or zsh.
45 if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo_n='print -rn --'
49 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 as_echo_n='sh -c $as_echo_n_body as_echo'
71 as_echo='sh -c $as_echo_body as_echo'
74 # The user is always right.
75 if test "${PATH_SEPARATOR+set}" != set; then
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 # We need space, tab and new line, in precisely that order. Quoting is
86 # there to prevent editors from complaining about space-tab.
87 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
88 # splitting by setting IFS to empty value.)
91 # Find who we are. Look in the path if we contain no directory separator.
94 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 test -z "$as_dir" && as_dir=.
100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
106 # We did not find ourselves, most probably we were run as `sh COMMAND'
107 # in which case we are not to be found in the path.
108 if test "x$as_myself" = x; then
111 if test ! -f "$as_myself"; then
112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116 # Unset variables that we do not need and which cause bugs (e.g. in
117 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118 # suppresses any "Segmentation fault" message there. '((' could
119 # trigger a bug in pdksh 5.2.14.
120 for as_var in BASH_ENV ENV MAIL MAILPATH
121 do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137 # Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142 # neutralization value for shells without unset; and this also
143 # works around shells that cannot unset nonexistent variables.
144 # Preserve -v and -x to the replacement shell.
147 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149 *v*x* | *x*v* ) as_opts=-vx ;;
154 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155 # Admittedly, this is quite paranoid, since all the known shells bail
156 # out after a failed `exec'.
157 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
162 if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 case \`(set -o) 2>/dev/null\` in #(
179 as_required="as_fn_return () { (exit \$1); }
180 as_fn_success () { as_fn_return 0; }
181 as_fn_failure () { as_fn_return 1; }
182 as_fn_ret_success () { return 0; }
183 as_fn_ret_failure () { return 1; }
186 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193 exitcode=1; echo positional parameters were not saved.
195 test x\$exitcode = x0 || exit 1
197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201 test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 test -z "$as_dir" && as_dir=.
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
233 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
240 if test "x$CONFIG_SHELL" != x; then :
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250 *v*x* | *x*v* ) as_opts=-vx ;;
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270 $0: bug-findutils@gnu.org about your system, including any
271 $0: error possibly output before this message. Then install
272 $0: a modern shell, or manually run the script under such a
273 $0: shell if you do have one."
279 SHELL=${CONFIG_SHELL-/bin/sh}
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
290 # Portably unset VAR.
293 { eval $1=; unset $1;}
297 # as_fn_set_status STATUS
298 # -----------------------
299 # Set $? to STATUS, without forking.
307 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
317 # Create "$as_dir" as a directory, including parents if necessary.
322 -*) as_dir=./$as_dir;;
324 test -d "$as_dir" || eval $as_mkdir_p || {
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337 $as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
355 test -d "$as_dir" && break
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
363 # as_fn_executable_p FILE
364 # -----------------------
365 # Test if FILE is an executable regular file.
366 as_fn_executable_p ()
368 test -f "$1" && test -x "$1"
369 } # as_fn_executable_p
370 # as_fn_append VAR VALUE
371 # ----------------------
372 # Append the text in VALUE to the end of the definition contained in VAR. Take
373 # advantage of any shell optimizations that allow amortized linear growth over
374 # repeated appends, instead of the typical quadratic growth present in naive
376 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
390 # Perform arithmetic evaluation on the ARGs, and store the result in the
391 # global $as_val. Take advantage of shells that can avoid forks. The arguments
392 # must be portable across $(()) and expr.
393 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
401 as_val=`expr "$@" || test $? -eq 1`
406 # as_fn_error STATUS ERROR [LINENO LOG_FD]
407 # ----------------------------------------
408 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
410 # script with STATUS, using 1 if that was 0.
413 as_status=$1; test $as_status -eq 0 && as_status=1
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 $as_echo "$as_me: error: $2" >&2
419 as_fn_exit $as_status
422 if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
429 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
435 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
441 as_me=`$as_basename -- "$0" ||
442 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446 sed '/^.*\/\([^/][^/]*\)\/*$/{
460 # Avoid depending upon Character Ranges.
461 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464 as_cr_digits='0123456789'
465 as_cr_alnum=$as_cr_Letters$as_cr_digits
468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
488 chmod +x "$as_me.lineno" ||
489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
497 # original and so on. Autoconf is especially sensitive to this).
499 # Exit status is that of the last command.
503 ECHO_C= ECHO_N= ECHO_T=
504 case `echo -n x` in #(((((
506 case `echo 'xy\c'` in
507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 rm -f conf$$ conf$$.exe conf$$.file
517 if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
521 mkdir conf$$.dir 2>/dev/null
523 if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
529 # In both cases, we have to default to `cp -pR'.
530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 elif ln conf$$.file conf$$ 2>/dev/null; then
540 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541 rmdir conf$$.dir 2>/dev/null
543 if mkdir -p . 2>/dev/null; then
544 as_mkdir_p='mkdir -p "$as_dir"'
546 test -d ./-p && rmdir ./-p
551 as_executable_p=as_fn_executable_p
553 # Sed expression to map a string onto a valid CPP name.
554 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
556 # Sed expression to map a string onto a valid variable name.
557 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560 test -n "$DJDIR" || exec 7<&0 </dev/null
564 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
565 # so uname gets run too.
566 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
571 ac_default_prefix=/usr/local
573 ac_config_libobj_dir=.
580 # Identity of this package.
581 PACKAGE_NAME='GNU findutils'
582 PACKAGE_TARNAME='findutils'
583 PACKAGE_VERSION='4.5.14'
584 PACKAGE_STRING='GNU findutils 4.5.14'
585 PACKAGE_BUGREPORT='bug-findutils@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/findutils/'
588 ac_unique_file="find/pred.c"
589 # Factoring default headers for most tests.
590 ac_includes_default="\
592 #ifdef HAVE_SYS_TYPES_H
593 # include <sys/types.h>
595 #ifdef HAVE_SYS_STAT_H
596 # include <sys/stat.h>
602 # ifdef HAVE_STDLIB_H
607 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
612 #ifdef HAVE_STRINGS_H
613 # include <strings.h>
615 #ifdef HAVE_INTTYPES_H
616 # include <inttypes.h>
625 gl_use_threads_default=
628 gl_fnmatch_required=POSIX
629 gl_getopt_required=POSIX
630 gl_getopt_required=POSIX
631 gl_modf_required=plain
632 gl_trunc_required=plain
633 gl_trunc_required=plain
635 ac_subst_vars='gltests_LTLIBOBJS
661 XGETTEXT_EXTRA_OPTIONS
669 GETTEXT_MACRO_VERSION
671 HAVE_ATTRIBUTE_NORETURN
677 CROSS_COMPILING_FALSE
686 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H
689 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
692 REPLACE_PTHREAD_SIGMASK
694 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
695 HAVE_STRUCT_SIGACTION_SA_SIGACTION
701 HAVE_POSIX_SIGNALBLOCKING
704 GNULIB_SIGNAL_H_SIGPIPE
706 GNULIB_PTHREAD_SIGMASK
707 GL_GENERATE_NETINET_IN_H_FALSE
708 GL_GENERATE_NETINET_IN_H_TRUE
711 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
716 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H
726 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
736 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
739 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
740 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
741 LIBUNISTRING_UNIWIDTH_H
742 LIBUNISTRING_UNITYPES_H
744 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
746 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
747 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
748 TIME_H_DEFINES_STRUCT_TIMESPEC
749 NEXT_AS_FIRST_DIRECTIVE_TIME_H
751 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
755 NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H
761 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
765 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
769 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
770 HAVE_STRUCT_SOCKADDR_STORAGE
787 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
789 NEXT_AS_FIRST_DIRECTIVE_STRING_H
791 HAVE_DECL_STRNCASECMP
795 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
797 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
799 GL_GENERATE_STDARG_H_FALSE
800 GL_GENERATE_STDARG_H_TRUE
802 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
804 GL_GENERATE_STDALIGN_H_FALSE
805 GL_GENERATE_STDALIGN_H_TRUE
808 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
809 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
811 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
812 NEXT_SELINUX_SELINUX_H
817 GL_GENERATE_STDBOOL_H_FALSE
818 GL_GENERATE_STDBOOL_H_TRUE
831 HAVE_DECL_LOCALTIME_R
913 NEXT_AS_FIRST_DIRECTIVE_MATH_H
923 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
926 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
928 GL_GENERATE_STDDEF_H_FALSE
929 GL_GENERATE_STDDEF_H_TRUE
941 LOCALCHARSET_TESTS_ENVIRONMENT
943 HAVE_LANGINFO_YESEXPR
945 HAVE_LANGINFO_T_FMT_AMPM
946 HAVE_LANGINFO_CODESET
948 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
956 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
971 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
976 REPLACE_SIGNBIT_USING_GCC
1045 HAVE_DECL_REMAINDERL
1226 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
1228 UINT64_MAX_EQ_ULONG_MAX
1229 UINT32_MAX_LT_UINTMAX_MAX
1232 INT64_MAX_EQ_LONG_MAX
1233 INT32_MAX_LT_INTMAX_MAX
1244 GL_GENERATE_STDINT_H_FALSE
1245 GL_GENERATE_STDINT_H_TRUE
1254 HAVE_SIGNED_SIG_ATOMIC_T
1257 BITSIZEOF_SIG_ATOMIC_T
1260 APPLE_UNIVERSAL_BUILD
1264 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
1269 HAVE_UNSIGNED_LONG_LONG_INT
1271 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1273 REPLACE_STRUCT_TIMEVAL
1274 REPLACE_GETTIMEOFDAY
1281 GNULIB_GL_UNISTD_H_GETOPT
1284 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1287 WINDOWS_64_BIT_ST_SIZE
1288 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1323 WINDOWS_64_BIT_OFF_T
1324 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
1326 GL_GENERATE_FNMATCH_H_FALSE
1327 GL_GENERATE_FNMATCH_H_TRUE
1330 GL_GENERATE_FLOAT_H_FALSE
1331 GL_GENERATE_FLOAT_H_TRUE
1333 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1342 REPLACE_STDIO_WRITE_FUNCS
1343 REPLACE_STDIO_READ_FUNCS
1352 REPLACE_OBSTACK_PRINTF
1377 HAVE_DECL_OBSTACK_PRINTF
1383 GNULIB_VSPRINTF_POSIX
1385 GNULIB_VPRINTF_POSIX
1387 GNULIB_VFPRINTF_POSIX
1394 GNULIB_STDIO_H_SIGPIPE
1395 GNULIB_STDIO_H_NONBLOCKING
1396 GNULIB_SPRINTF_POSIX
1410 GNULIB_OBSTACK_PRINTF_POSIX
1411 GNULIB_OBSTACK_PRINTF
1427 GNULIB_FPRINTF_POSIX
1436 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1454 GL_GENERATE_ERRNO_H_FALSE
1455 GL_GENERATE_ERRNO_H_TRUE
1457 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1460 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1462 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1465 PRAGMA_SYSTEM_HEADER
1466 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1496 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1497 SYS_IOCTL_H_HAVE_WINSOCK2_H
1499 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1501 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1502 UNISTD_H_HAVE_WINSOCK2_H
1523 REPLACE_GETDTABLESIZE
1524 REPLACE_GETDOMAINNAME
1535 HAVE_DECL_SETHOSTNAME
1536 HAVE_DECL_GETUSERSHELL
1537 HAVE_DECL_GETPAGESIZE
1538 HAVE_DECL_GETLOGIN_R
1539 HAVE_DECL_GETDOMAINNAME
1578 GNULIB_UNISTD_H_SIGPIPE
1579 GNULIB_UNISTD_H_NONBLOCKING
1605 GNULIB_GETDTABLESIZE
1606 GNULIB_GETDOMAINNAME
1635 REPLACE_CANONICALIZE_FILE_NAME
1640 HAVE_STRUCT_RANDOM_DATA
1662 HAVE_DECL_GETLOADAVG
1663 HAVE_CANONICALIZE_FILE_NAME
1674 GNULIB_SECURE_GETENV
1677 GNULIB_REALLOC_POSIX
1694 GNULIB_CANONICALIZE_FILE_NAME
1698 GL_GENERATE_BYTESWAP_H_FALSE
1699 GL_GENERATE_BYTESWAP_H_TRUE
1793 GL_GENERATE_ALLOCA_H_FALSE
1794 GL_GENERATE_ALLOCA_H_TRUE
1797 GL_COND_LIBTOOL_FALSE
1798 GL_COND_LIBTOOL_TRUE
1844 INSTALL_STRIP_PROGRAM
1886 program_transform_name
1899 enable_option_checking
1903 enable_leaf_optimisation
1904 enable_d_type_optimization
1905 enable_d_type_optimisation
1906 enable_dependency_tracking
1916 with_packager_version
1917 with_packager_bug_reports
1918 enable_compiler_warnings
1920 with_libiconv_prefix
1923 ac_precious_vars='build_alias
1938 # Initialize some variables set by options.
1940 ac_init_version=false
1941 ac_unrecognized_opts=
1942 ac_unrecognized_sep=
1943 # The variables have the same names as the options, with
1944 # dashes changed to underlines.
1945 cache_file=/dev/null
1952 program_transform_name=s,x,x,
1960 # Installation directory options.
1961 # These are left unexpanded so users can "make install exec_prefix=/foo"
1962 # and all the variables that are supposed to be based on exec_prefix
1963 # by default will actually change.
1964 # Use braces instead of parens because sh, perl, etc. also accept them.
1965 # (The list follows the same order as the GNU Coding Standards.)
1966 bindir='${exec_prefix}/bin'
1967 sbindir='${exec_prefix}/sbin'
1968 libexecdir='${exec_prefix}/libexec'
1969 datarootdir='${prefix}/share'
1970 datadir='${datarootdir}'
1971 sysconfdir='${prefix}/etc'
1972 sharedstatedir='${prefix}/com'
1973 localstatedir='${prefix}/var'
1974 includedir='${prefix}/include'
1975 oldincludedir='/usr/include'
1976 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1977 infodir='${datarootdir}/info'
1982 libdir='${exec_prefix}/lib'
1983 localedir='${datarootdir}/locale'
1984 mandir='${datarootdir}/man'
1990 # If the previous option needs an argument, assign it.
1991 if test -n "$ac_prev"; then
1992 eval $ac_prev=\$ac_option
1998 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2003 # Accept the important Cygnus configure options, so we can diagnose typos.
2005 case $ac_dashdash$ac_option in
2009 -bindir | --bindir | --bindi | --bind | --bin | --bi)
2011 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
2012 bindir=$ac_optarg ;;
2014 -build | --build | --buil | --bui | --bu)
2015 ac_prev=build_alias ;;
2016 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
2017 build_alias=$ac_optarg ;;
2019 -cache-file | --cache-file | --cache-fil | --cache-fi \
2020 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2021 ac_prev=cache_file ;;
2022 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2023 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2024 cache_file=$ac_optarg ;;
2026 --config-cache | -C)
2027 cache_file=config.cache ;;
2029 -datadir | --datadir | --datadi | --datad)
2031 -datadir=* | --datadir=* | --datadi=* | --datad=*)
2032 datadir=$ac_optarg ;;
2034 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
2035 | --dataroo | --dataro | --datar)
2036 ac_prev=datarootdir ;;
2037 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
2038 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
2039 datarootdir=$ac_optarg ;;
2041 -disable-* | --disable-*)
2042 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2043 # Reject names that are not valid shell variable names.
2044 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2045 as_fn_error $? "invalid feature name: $ac_useropt"
2046 ac_useropt_orig=$ac_useropt
2047 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2048 case $ac_user_opts in
2050 "enable_$ac_useropt"
2052 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2053 ac_unrecognized_sep=', ';;
2055 eval enable_$ac_useropt=no ;;
2057 -docdir | --docdir | --docdi | --doc | --do)
2059 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
2060 docdir=$ac_optarg ;;
2062 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
2064 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
2065 dvidir=$ac_optarg ;;
2067 -enable-* | --enable-*)
2068 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2069 # Reject names that are not valid shell variable names.
2070 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2071 as_fn_error $? "invalid feature name: $ac_useropt"
2072 ac_useropt_orig=$ac_useropt
2073 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2074 case $ac_user_opts in
2076 "enable_$ac_useropt"
2078 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2079 ac_unrecognized_sep=', ';;
2081 eval enable_$ac_useropt=\$ac_optarg ;;
2083 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
2084 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
2085 | --exec | --exe | --ex)
2086 ac_prev=exec_prefix ;;
2087 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
2088 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
2089 | --exec=* | --exe=* | --ex=*)
2090 exec_prefix=$ac_optarg ;;
2092 -gas | --gas | --ga | --g)
2093 # Obsolete; use --with-gas.
2096 -help | --help | --hel | --he | -h)
2097 ac_init_help=long ;;
2098 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
2099 ac_init_help=recursive ;;
2100 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
2101 ac_init_help=short ;;
2103 -host | --host | --hos | --ho)
2104 ac_prev=host_alias ;;
2105 -host=* | --host=* | --hos=* | --ho=*)
2106 host_alias=$ac_optarg ;;
2108 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
2110 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
2112 htmldir=$ac_optarg ;;
2114 -includedir | --includedir | --includedi | --included | --include \
2115 | --includ | --inclu | --incl | --inc)
2116 ac_prev=includedir ;;
2117 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
2118 | --includ=* | --inclu=* | --incl=* | --inc=*)
2119 includedir=$ac_optarg ;;
2121 -infodir | --infodir | --infodi | --infod | --info | --inf)
2123 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
2124 infodir=$ac_optarg ;;
2126 -libdir | --libdir | --libdi | --libd)
2128 -libdir=* | --libdir=* | --libdi=* | --libd=*)
2129 libdir=$ac_optarg ;;
2131 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
2132 | --libexe | --libex | --libe)
2133 ac_prev=libexecdir ;;
2134 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
2135 | --libexe=* | --libex=* | --libe=*)
2136 libexecdir=$ac_optarg ;;
2138 -localedir | --localedir | --localedi | --localed | --locale)
2139 ac_prev=localedir ;;
2140 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
2141 localedir=$ac_optarg ;;
2143 -localstatedir | --localstatedir | --localstatedi | --localstated \
2144 | --localstate | --localstat | --localsta | --localst | --locals)
2145 ac_prev=localstatedir ;;
2146 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
2147 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
2148 localstatedir=$ac_optarg ;;
2150 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
2152 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
2153 mandir=$ac_optarg ;;
2155 -nfp | --nfp | --nf)
2156 # Obsolete; use --without-fp.
2159 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
2160 | --no-cr | --no-c | -n)
2163 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
2164 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
2167 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
2168 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
2169 | --oldin | --oldi | --old | --ol | --o)
2170 ac_prev=oldincludedir ;;
2171 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
2172 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
2173 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
2174 oldincludedir=$ac_optarg ;;
2176 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
2178 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
2179 prefix=$ac_optarg ;;
2181 -program-prefix | --program-prefix | --program-prefi | --program-pref \
2182 | --program-pre | --program-pr | --program-p)
2183 ac_prev=program_prefix ;;
2184 -program-prefix=* | --program-prefix=* | --program-prefi=* \
2185 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
2186 program_prefix=$ac_optarg ;;
2188 -program-suffix | --program-suffix | --program-suffi | --program-suff \
2189 | --program-suf | --program-su | --program-s)
2190 ac_prev=program_suffix ;;
2191 -program-suffix=* | --program-suffix=* | --program-suffi=* \
2192 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
2193 program_suffix=$ac_optarg ;;
2195 -program-transform-name | --program-transform-name \
2196 | --program-transform-nam | --program-transform-na \
2197 | --program-transform-n | --program-transform- \
2198 | --program-transform | --program-transfor \
2199 | --program-transfo | --program-transf \
2200 | --program-trans | --program-tran \
2201 | --progr-tra | --program-tr | --program-t)
2202 ac_prev=program_transform_name ;;
2203 -program-transform-name=* | --program-transform-name=* \
2204 | --program-transform-nam=* | --program-transform-na=* \
2205 | --program-transform-n=* | --program-transform-=* \
2206 | --program-transform=* | --program-transfor=* \
2207 | --program-transfo=* | --program-transf=* \
2208 | --program-trans=* | --program-tran=* \
2209 | --progr-tra=* | --program-tr=* | --program-t=*)
2210 program_transform_name=$ac_optarg ;;
2212 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
2214 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
2215 pdfdir=$ac_optarg ;;
2217 -psdir | --psdir | --psdi | --psd | --ps)
2219 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
2222 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2223 | -silent | --silent | --silen | --sile | --sil)
2226 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
2228 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
2230 sbindir=$ac_optarg ;;
2232 -sharedstatedir | --sharedstatedir | --sharedstatedi \
2233 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
2234 | --sharedst | --shareds | --shared | --share | --shar \
2236 ac_prev=sharedstatedir ;;
2237 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
2238 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
2239 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
2241 sharedstatedir=$ac_optarg ;;
2243 -site | --site | --sit)
2245 -site=* | --site=* | --sit=*)
2248 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2250 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2251 srcdir=$ac_optarg ;;
2253 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
2254 | --syscon | --sysco | --sysc | --sys | --sy)
2255 ac_prev=sysconfdir ;;
2256 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
2257 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
2258 sysconfdir=$ac_optarg ;;
2260 -target | --target | --targe | --targ | --tar | --ta | --t)
2261 ac_prev=target_alias ;;
2262 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
2263 target_alias=$ac_optarg ;;
2265 -v | -verbose | --verbose | --verbos | --verbo | --verb)
2268 -version | --version | --versio | --versi | --vers | -V)
2269 ac_init_version=: ;;
2272 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2273 # Reject names that are not valid shell variable names.
2274 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2275 as_fn_error $? "invalid package name: $ac_useropt"
2276 ac_useropt_orig=$ac_useropt
2277 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2278 case $ac_user_opts in
2282 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2283 ac_unrecognized_sep=', ';;
2285 eval with_$ac_useropt=\$ac_optarg ;;
2287 -without-* | --without-*)
2288 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2289 # Reject names that are not valid shell variable names.
2290 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
2291 as_fn_error $? "invalid package name: $ac_useropt"
2292 ac_useropt_orig=$ac_useropt
2293 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2294 case $ac_user_opts in
2298 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2299 ac_unrecognized_sep=', ';;
2301 eval with_$ac_useropt=no ;;
2304 # Obsolete; use --with-x.
2307 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
2308 | --x-incl | --x-inc | --x-in | --x-i)
2309 ac_prev=x_includes ;;
2310 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
2311 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
2312 x_includes=$ac_optarg ;;
2314 -x-libraries | --x-libraries | --x-librarie | --x-librari \
2315 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
2316 ac_prev=x_libraries ;;
2317 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
2318 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
2319 x_libraries=$ac_optarg ;;
2321 -*) as_fn_error $? "unrecognized option: \`$ac_option'
2322 Try \`$0 --help' for more information"
2326 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
2327 # Reject names that are not valid shell variable names.
2328 case $ac_envvar in #(
2329 '' | [0-9]* | *[!_$as_cr_alnum]* )
2330 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
2332 eval $ac_envvar=\$ac_optarg
2333 export $ac_envvar ;;
2336 # FIXME: should be removed in autoconf 3.0.
2337 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2338 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2339 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2340 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2346 if test -n "$ac_prev"; then
2347 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2348 as_fn_error $? "missing argument to $ac_option"
2351 if test -n "$ac_unrecognized_opts"; then
2352 case $enable_option_checking in
2354 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2355 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2359 # Check all directory arguments for consistency.
2360 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2361 datadir sysconfdir sharedstatedir localstatedir includedir \
2362 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2363 libdir localedir mandir
2365 eval ac_val=\$$ac_var
2366 # Remove trailing slashes.
2369 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2370 eval $ac_var=\$ac_val;;
2372 # Be sure to have absolute directory names.
2374 [\\/$]* | ?:[\\/]* ) continue;;
2375 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2377 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2380 # There might be people who depend on the old broken behavior: `$host'
2381 # used to hold the argument of --host etc.
2382 # FIXME: To remove some day.
2385 target=$target_alias
2387 # FIXME: To remove some day.
2388 if test "x$host_alias" != x; then
2389 if test "x$build_alias" = x; then
2390 cross_compiling=maybe
2391 elif test "x$build_alias" != "x$host_alias"; then
2397 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2399 test "$silent" = yes && exec 6>/dev/null
2402 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2403 ac_ls_di=`ls -di .` &&
2404 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2405 as_fn_error $? "working directory cannot be determined"
2406 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2407 as_fn_error $? "pwd does not report name of working directory"
2410 # Find the source files, if location was not specified.
2411 if test -z "$srcdir"; then
2412 ac_srcdir_defaulted=yes
2413 # Try the directory containing this script, then the parent directory.
2414 ac_confdir=`$as_dirname -- "$as_myself" ||
2415 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2416 X"$as_myself" : 'X\(//\)[^/]' \| \
2417 X"$as_myself" : 'X\(//\)$' \| \
2418 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2419 $as_echo X"$as_myself" |
2420 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2438 if test ! -r "$srcdir/$ac_unique_file"; then
2442 ac_srcdir_defaulted=no
2444 if test ! -r "$srcdir/$ac_unique_file"; then
2445 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2446 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2448 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2450 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2452 # When building in place, set srcdir=.
2453 if test "$ac_abs_confdir" = "$ac_pwd"; then
2456 # Remove unnecessary trailing slashes from srcdir.
2457 # Double slashes in file names in object file debugging info
2458 # mess up M-x gdb in Emacs.
2460 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2462 for ac_var in $ac_precious_vars; do
2463 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2464 eval ac_env_${ac_var}_value=\$${ac_var}
2465 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2466 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2470 # Report the --help message.
2472 if test "$ac_init_help" = "long"; then
2473 # Omit some internal or obsolete options to make the list less imposing.
2474 # This message is too long to be a string in the A/UX 3.1 sh.
2476 \`configure' configures GNU findutils 4.5.14 to adapt to many kinds of systems.
2478 Usage: $0 [OPTION]... [VAR=VALUE]...
2480 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2481 VAR=VALUE. See below for descriptions of some of the useful variables.
2483 Defaults for the options are specified in brackets.
2486 -h, --help display this help and exit
2487 --help=short display options specific to this package
2488 --help=recursive display the short help of all the included packages
2489 -V, --version display version information and exit
2490 -q, --quiet, --silent do not print \`checking ...' messages
2491 --cache-file=FILE cache test results in FILE [disabled]
2492 -C, --config-cache alias for \`--cache-file=config.cache'
2493 -n, --no-create do not create output files
2494 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2496 Installation directories:
2497 --prefix=PREFIX install architecture-independent files in PREFIX
2498 [$ac_default_prefix]
2499 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2502 By default, \`make install' will install all the files in
2503 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2504 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2505 for instance \`--prefix=\$HOME'.
2507 For better control, use the options below.
2509 Fine tuning of the installation directories:
2510 --bindir=DIR user executables [EPREFIX/bin]
2511 --sbindir=DIR system admin executables [EPREFIX/sbin]
2512 --libexecdir=DIR program executables [EPREFIX/libexec]
2513 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2514 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2515 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2516 --libdir=DIR object code libraries [EPREFIX/lib]
2517 --includedir=DIR C header files [PREFIX/include]
2518 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2519 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2520 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2521 --infodir=DIR info documentation [DATAROOTDIR/info]
2522 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2523 --mandir=DIR man documentation [DATAROOTDIR/man]
2524 --docdir=DIR documentation root [DATAROOTDIR/doc/findutils]
2525 --htmldir=DIR html documentation [DOCDIR]
2526 --dvidir=DIR dvi documentation [DOCDIR]
2527 --pdfdir=DIR pdf documentation [DOCDIR]
2528 --psdir=DIR ps documentation [DOCDIR]
2534 --program-prefix=PREFIX prepend PREFIX to installed program names
2535 --program-suffix=SUFFIX append SUFFIX to installed program names
2536 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2539 --build=BUILD configure for building on BUILD [guessed]
2540 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2544 if test -n "$ac_init_help"; then
2545 case $ac_init_help in
2546 short | recursive ) echo "Configuration of GNU findutils 4.5.14:";;
2551 --disable-option-checking ignore unrecognized --enable/--with options
2552 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2553 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2554 --enable-id-cache cache all UIDs & GIDs; avoid if using NIS or Hesiod
2555 --enable-debug Enable debugging output which is likely to be
2556 interesting to people debugging findutils
2557 --enable-leaf-optimisation
2558 Enable an optimisation which saves lstat calls to
2559 identify subdirectories on filesystems having
2560 traditional Unix semantics
2561 --enable-d_type-optimization
2562 Make use of the file type data returned in struct
2563 dirent.d_type by readdir()
2564 --enable-d_type-optimisation
2565 Synonym for --enable-d_type-optimization
2566 --disable-dependency-tracking speeds up one-time build
2567 --enable-dependency-tracking do not reject slow dependency extractors
2568 --disable-largefile omit support for large files
2569 --enable-threads={posix|solaris|pth|windows}
2570 specify multithreading API
2571 --disable-threads build without multithread safety
2572 --disable-assert turn off assertions
2573 --disable-rpath do not hardcode runtime library paths
2574 --enable-compiler-warnings
2575 Enable many compiler warnings
2576 --disable-nls do not use Native Language Support
2579 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2580 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2581 --without-fts Use an older mechanism for searching the filesystem, instead of using fts()
2582 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2583 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib
2584 --without-libpth-prefix don't search for libpth in includedir and libdir
2585 --without-included-regex
2586 don't compile regex; this is the default on systems
2587 with recent-enough versions of the GNU C Library
2588 (use with caution on other systems).
2589 --without-selinux do not use SELinux, even on systems with SELinux
2590 --with-packager String identifying the packager of this software
2591 --with-packager-version Packager-specific version information
2592 --with-packager-bug-reports
2593 Packager info for bug reports (URL/e-mail/...)
2594 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2595 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2596 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2597 --without-libintl-prefix don't search for libintl in includedir and libdir
2599 Some influential environment variables:
2601 Default size of arguments to child processes of find and xargs,
2603 CC C compiler command
2604 CFLAGS C compiler flags
2605 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2606 nonstandard directory <lib dir>
2607 LIBS libraries to pass to the linker, e.g. -l<library>
2608 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2609 you have headers in a nonstandard directory <include dir>
2611 YACC The "Yet Another C Compiler" implementation to use. Defaults to
2612 'bison -y'. Values other than 'bison -y' will most likely break
2614 YFLAGS YFLAGS contains the list arguments that will be passed by
2615 default to Bison. This script will default YFLAGS to the empty
2616 string to avoid a default value of '-d' given by some make
2618 PYTHON the Python interpreter
2620 Use these variables to override the choices made by `configure' or to help
2621 it to find libraries and programs with nonstandard names/locations.
2623 Report bugs to <bug-findutils@gnu.org>.
2624 GNU findutils home page: <http://www.gnu.org/software/findutils/>.
2625 General help using GNU software: <http://www.gnu.org/gethelp/>.
2630 if test "$ac_init_help" = "recursive"; then
2631 # If there are subdirs, report their specific --help.
2632 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2633 test -d "$ac_dir" ||
2634 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2639 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2641 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2642 # A ".." for each directory in $ac_dir_suffix.
2643 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2644 case $ac_top_builddir_sub in
2645 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2646 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2649 ac_abs_top_builddir=$ac_pwd
2650 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2651 # for backward compatibility:
2652 ac_top_builddir=$ac_top_build_prefix
2655 .) # We are building in place.
2657 ac_top_srcdir=$ac_top_builddir_sub
2658 ac_abs_top_srcdir=$ac_pwd ;;
2659 [\\/]* | ?:[\\/]* ) # Absolute name.
2660 ac_srcdir=$srcdir$ac_dir_suffix;
2661 ac_top_srcdir=$srcdir
2662 ac_abs_top_srcdir=$srcdir ;;
2664 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2665 ac_top_srcdir=$ac_top_build_prefix$srcdir
2666 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2668 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2670 cd "$ac_dir" || { ac_status=$?; continue; }
2671 # Check for guested configure.
2672 if test -f "$ac_srcdir/configure.gnu"; then
2674 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2675 elif test -f "$ac_srcdir/configure"; then
2677 $SHELL "$ac_srcdir/configure" --help=recursive
2679 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2681 cd "$ac_pwd" || { ac_status=$?; break; }
2685 test -n "$ac_init_help" && exit $ac_status
2686 if $ac_init_version; then
2688 GNU findutils configure 4.5.14
2689 generated by GNU Autoconf 2.69
2691 Copyright (C) 2012 Free Software Foundation, Inc.
2692 This configure script is free software; the Free Software Foundation
2693 gives unlimited permission to copy, distribute and modify it.
2698 ## ------------------------ ##
2699 ## Autoconf initialization. ##
2700 ## ------------------------ ##
2702 # ac_fn_c_try_compile LINENO
2703 # --------------------------
2704 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2705 ac_fn_c_try_compile ()
2707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708 rm -f conftest.$ac_objext
2709 if { { ac_try="$ac_compile"
2711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712 *) ac_try_echo=$ac_try;;
2714 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2715 $as_echo "$ac_try_echo"; } >&5
2716 (eval "$ac_compile") 2>conftest.err
2718 if test -s conftest.err; then
2719 grep -v '^ *+' conftest.err >conftest.er1
2720 cat conftest.er1 >&5
2721 mv -f conftest.er1 conftest.err
2723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2724 test $ac_status = 0; } && {
2725 test -z "$ac_c_werror_flag" ||
2726 test ! -s conftest.err
2727 } && test -s conftest.$ac_objext; then :
2730 $as_echo "$as_me: failed program was:" >&5
2731 sed 's/^/| /' conftest.$ac_ext >&5
2735 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2736 as_fn_set_status $ac_retval
2738 } # ac_fn_c_try_compile
2740 # ac_fn_c_try_cpp LINENO
2741 # ----------------------
2742 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2745 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2746 if { { ac_try="$ac_cpp conftest.$ac_ext"
2748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2749 *) ac_try_echo=$ac_try;;
2751 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2752 $as_echo "$ac_try_echo"; } >&5
2753 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2755 if test -s conftest.err; then
2756 grep -v '^ *+' conftest.err >conftest.er1
2757 cat conftest.er1 >&5
2758 mv -f conftest.er1 conftest.err
2760 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2761 test $ac_status = 0; } > conftest.i && {
2762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2763 test ! -s conftest.err
2767 $as_echo "$as_me: failed program was:" >&5
2768 sed 's/^/| /' conftest.$ac_ext >&5
2772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2773 as_fn_set_status $ac_retval
2777 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2778 # -------------------------------------------------------
2779 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2780 # the include files in INCLUDES and setting the cache variable VAR
2782 ac_fn_c_check_header_mongrel ()
2784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2785 if eval \${$3+:} false; then :
2786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2787 $as_echo_n "checking for $2... " >&6; }
2788 if eval \${$3+:} false; then :
2789 $as_echo_n "(cached) " >&6
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2793 $as_echo "$ac_res" >&6; }
2795 # Is the header compilable?
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2797 $as_echo_n "checking $2 usability... " >&6; }
2798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2799 /* end confdefs.h. */
2803 if ac_fn_c_try_compile "$LINENO"; then :
2804 ac_header_compiler=yes
2806 ac_header_compiler=no
2808 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2810 $as_echo "$ac_header_compiler" >&6; }
2812 # Is the header present?
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2814 $as_echo_n "checking $2 presence... " >&6; }
2815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2816 /* end confdefs.h. */
2819 if ac_fn_c_try_cpp "$LINENO"; then :
2820 ac_header_preproc=yes
2822 ac_header_preproc=no
2824 rm -f conftest.err conftest.i conftest.$ac_ext
2825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2826 $as_echo "$ac_header_preproc" >&6; }
2828 # So? What about this header?
2829 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2832 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2834 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2838 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2840 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2842 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2844 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2846 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2847 ( $as_echo "## ------------------------------------ ##
2848 ## Report this to bug-findutils@gnu.org ##
2849 ## ------------------------------------ ##"
2850 ) | sed "s/^/$as_me: WARNING: /" >&2
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2854 $as_echo_n "checking for $2... " >&6; }
2855 if eval \${$3+:} false; then :
2856 $as_echo_n "(cached) " >&6
2858 eval "$3=\$ac_header_compiler"
2861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2862 $as_echo "$ac_res" >&6; }
2864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2866 } # ac_fn_c_check_header_mongrel
2868 # ac_fn_c_try_run LINENO
2869 # ----------------------
2870 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2871 # that executables *can* be run.
2874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2875 if { { ac_try="$ac_link"
2877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2878 *) ac_try_echo=$ac_try;;
2880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881 $as_echo "$ac_try_echo"; } >&5
2882 (eval "$ac_link") 2>&5
2884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2886 { { case "(($ac_try" in
2887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2888 *) ac_try_echo=$ac_try;;
2890 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2891 $as_echo "$ac_try_echo"; } >&5
2892 (eval "$ac_try") 2>&5
2894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2895 test $ac_status = 0; }; }; then :
2898 $as_echo "$as_me: program exited with status $ac_status" >&5
2899 $as_echo "$as_me: failed program was:" >&5
2900 sed 's/^/| /' conftest.$ac_ext >&5
2902 ac_retval=$ac_status
2904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2906 as_fn_set_status $ac_retval
2910 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2911 # -------------------------------------------------------
2912 # Tests whether HEADER exists and can be compiled using the include files in
2913 # INCLUDES, setting the cache variable VAR accordingly.
2914 ac_fn_c_check_header_compile ()
2916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2918 $as_echo_n "checking for $2... " >&6; }
2919 if eval \${$3+:} false; then :
2920 $as_echo_n "(cached) " >&6
2922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2923 /* end confdefs.h. */
2927 if ac_fn_c_try_compile "$LINENO"; then :
2932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2936 $as_echo "$ac_res" >&6; }
2937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2939 } # ac_fn_c_check_header_compile
2941 # ac_fn_c_try_link LINENO
2942 # -----------------------
2943 # Try to link conftest.$ac_ext, and return whether this succeeded.
2946 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2947 rm -f conftest.$ac_objext conftest$ac_exeext
2948 if { { ac_try="$ac_link"
2950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2951 *) ac_try_echo=$ac_try;;
2953 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2954 $as_echo "$ac_try_echo"; } >&5
2955 (eval "$ac_link") 2>conftest.err
2957 if test -s conftest.err; then
2958 grep -v '^ *+' conftest.err >conftest.er1
2959 cat conftest.er1 >&5
2960 mv -f conftest.er1 conftest.err
2962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2963 test $ac_status = 0; } && {
2964 test -z "$ac_c_werror_flag" ||
2965 test ! -s conftest.err
2966 } && test -s conftest$ac_exeext && {
2967 test "$cross_compiling" = yes ||
2968 test -x conftest$ac_exeext
2972 $as_echo "$as_me: failed program was:" >&5
2973 sed 's/^/| /' conftest.$ac_ext >&5
2977 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2978 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2979 # interfere with the next link command; also delete a directory that is
2980 # left behind by Apple's compiler. We do this before executing the actions.
2981 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2983 as_fn_set_status $ac_retval
2985 } # ac_fn_c_try_link
2987 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2988 # -------------------------------------------
2989 # Tests whether TYPE exists after having included INCLUDES, setting cache
2990 # variable VAR accordingly.
2991 ac_fn_c_check_type ()
2993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995 $as_echo_n "checking for $2... " >&6; }
2996 if eval \${$3+:} false; then :
2997 $as_echo_n "(cached) " >&6
3000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3001 /* end confdefs.h. */
3012 if ac_fn_c_try_compile "$LINENO"; then :
3013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3014 /* end confdefs.h. */
3025 if ac_fn_c_try_compile "$LINENO"; then :
3030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3036 $as_echo "$ac_res" >&6; }
3037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3039 } # ac_fn_c_check_type
3041 # ac_fn_c_check_func LINENO FUNC VAR
3042 # ----------------------------------
3043 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3044 ac_fn_c_check_func ()
3046 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3048 $as_echo_n "checking for $2... " >&6; }
3049 if eval \${$3+:} false; then :
3050 $as_echo_n "(cached) " >&6
3052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053 /* end confdefs.h. */
3054 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3055 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3056 #define $2 innocuous_$2
3058 /* System header to define __stub macros and hopefully few prototypes,
3059 which can conflict with char $2 (); below.
3060 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3061 <limits.h> exists even on freestanding compilers. */
3064 # include <limits.h>
3066 # include <assert.h>
3071 /* Override any GCC internal prototype to avoid an error.
3072 Use char because int might match the return type of a GCC
3073 builtin and then its argument prototype would still apply. */
3078 /* The GNU C library defines this for functions which it implements
3079 to always fail with ENOSYS. Some functions are actually named
3080 something starting with __ and the normal name is an alias. */
3081 #if defined __stub_$2 || defined __stub___$2
3093 if ac_fn_c_try_link "$LINENO"; then :
3098 rm -f core conftest.err conftest.$ac_objext \
3099 conftest$ac_exeext conftest.$ac_ext
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3103 $as_echo "$ac_res" >&6; }
3104 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3106 } # ac_fn_c_check_func
3108 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3109 # ---------------------------------------------
3110 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3112 ac_fn_c_check_decl ()
3114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3115 as_decl_name=`echo $2|sed 's/ *(.*//'`
3116 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3118 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3119 if eval \${$3+:} false; then :
3120 $as_echo_n "(cached) " >&6
3122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3123 /* end confdefs.h. */
3128 #ifndef $as_decl_name
3130 (void) $as_decl_use;
3132 (void) $as_decl_name;
3140 if ac_fn_c_try_compile "$LINENO"; then :
3145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3149 $as_echo "$ac_res" >&6; }
3150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3152 } # ac_fn_c_check_decl
3154 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3155 # --------------------------------------------
3156 # Tries to find the compile-time value of EXPR in a program that includes
3157 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3159 ac_fn_c_compute_int ()
3161 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3162 if test "$cross_compiling" = yes; then
3163 # Depending upon the size, compute the lo and hi bounds.
3164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3165 /* end confdefs.h. */
3170 static int test_array [1 - 2 * !(($2) >= 0)];
3172 return test_array [0];
3178 if ac_fn_c_try_compile "$LINENO"; then :
3181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3182 /* end confdefs.h. */
3187 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3189 return test_array [0];
3195 if ac_fn_c_try_compile "$LINENO"; then :
3196 ac_hi=$ac_mid; break
3198 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
3199 if test $ac_lo -le $ac_mid; then
3203 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
3205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209 /* end confdefs.h. */
3214 static int test_array [1 - 2 * !(($2) < 0)];
3216 return test_array [0];
3222 if ac_fn_c_try_compile "$LINENO"; then :
3225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3226 /* end confdefs.h. */
3231 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3233 return test_array [0];
3239 if ac_fn_c_try_compile "$LINENO"; then :
3240 ac_lo=$ac_mid; break
3242 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
3243 if test $ac_mid -le $ac_hi; then
3247 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
3249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3257 # Binary search between lo and hi bounds.
3258 while test "x$ac_lo" != "x$ac_hi"; do
3259 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
3260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3261 /* end confdefs.h. */
3266 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3268 return test_array [0];
3274 if ac_fn_c_try_compile "$LINENO"; then :
3277 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
3279 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3282 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
3286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3287 /* end confdefs.h. */
3289 static long int longval () { return $2; }
3290 static unsigned long int ulongval () { return $2; }
3297 FILE *f = fopen ("conftest.val", "w");
3302 long int i = longval ();
3305 fprintf (f, "%ld", i);
3309 unsigned long int i = ulongval ();
3312 fprintf (f, "%lu", i);
3314 /* Do not output a trailing newline, as this causes \r\n confusion
3315 on some platforms. */
3316 return ferror (f) || fclose (f) != 0;
3322 if ac_fn_c_try_run "$LINENO"; then :
3323 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
3327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3328 conftest.$ac_objext conftest.beam conftest.$ac_ext
3332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3333 as_fn_set_status $ac_retval
3335 } # ac_fn_c_compute_int
3337 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3338 # ----------------------------------------------------
3339 # Tries to find if the field MEMBER exists in type AGGR, after including
3340 # INCLUDES, setting cache variable VAR accordingly.
3341 ac_fn_c_check_member ()
3343 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3345 $as_echo_n "checking for $2.$3... " >&6; }
3346 if eval \${$4+:} false; then :
3347 $as_echo_n "(cached) " >&6
3349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3350 /* end confdefs.h. */
3362 if ac_fn_c_try_compile "$LINENO"; then :
3365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3366 /* end confdefs.h. */
3372 if (sizeof ac_aggr.$3)
3378 if ac_fn_c_try_compile "$LINENO"; then :
3383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3385 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3389 $as_echo "$ac_res" >&6; }
3390 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3392 } # ac_fn_c_check_member
3393 cat >config.log <<_ACEOF
3394 This file contains any messages produced by compilers while
3395 running configure, to aid debugging if configure makes a mistake.
3397 It was created by GNU findutils $as_me 4.5.14, which was
3398 generated by GNU Autoconf 2.69. Invocation command line was
3410 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3411 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3412 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3413 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3414 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3416 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3417 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3419 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3420 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3421 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3422 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3423 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3424 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3425 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433 test -z "$as_dir" && as_dir=.
3434 $as_echo "PATH: $as_dir"
3450 # Keep a trace of the command line.
3451 # Strip out --no-create and --no-recursion so they do not pile up.
3452 # Strip out --silent because we don't want to record it for future runs.
3453 # Also quote any args containing shell meta-characters.
3454 # Make two passes to allow for proper duplicate-argument suppression.
3458 ac_must_keep_next=false
3464 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3465 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3466 | -silent | --silent | --silen | --sile | --sil)
3469 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3472 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3474 as_fn_append ac_configure_args1 " '$ac_arg'"
3475 if test $ac_must_keep_next = true; then
3476 ac_must_keep_next=false # Got value, back to normal.
3479 *=* | --config-cache | -C | -disable-* | --disable-* \
3480 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3481 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3482 | -with-* | --with-* | -without-* | --without-* | --x)
3483 case "$ac_configure_args0 " in
3484 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3487 -* ) ac_must_keep_next=true ;;
3490 as_fn_append ac_configure_args " '$ac_arg'"
3495 { ac_configure_args0=; unset ac_configure_args0;}
3496 { ac_configure_args1=; unset ac_configure_args1;}
3498 # When interrupted or exit'd, cleanup temporary files, and complete
3499 # config.log. We remove comments because anyway the quotes in there
3500 # would cause problems or look ugly.
3501 # WARNING: Use '\'' to represent an apostrophe within the trap.
3502 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3503 trap 'exit_status=$?
3504 # Save into config.log some information that might help in debugging.
3508 $as_echo "## ---------------- ##
3509 ## Cache variables. ##
3510 ## ---------------- ##"
3512 # The following way of writing the cache mishandles newlines in values,
3514 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3515 eval ac_val=\$$ac_var
3519 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3520 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3523 _ | IFS | as_nl) ;; #(
3524 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3525 *) { eval $ac_var=; unset $ac_var;} ;;
3530 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3531 *${as_nl}ac_space=\ *)
3533 "s/'\''/'\''\\\\'\'''\''/g;
3534 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3537 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3544 $as_echo "## ----------------- ##
3545 ## Output variables. ##
3546 ## ----------------- ##"
3548 for ac_var in $ac_subst_vars
3550 eval ac_val=\$$ac_var
3552 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3554 $as_echo "$ac_var='\''$ac_val'\''"
3558 if test -n "$ac_subst_files"; then
3559 $as_echo "## ------------------- ##
3560 ## File substitutions. ##
3561 ## ------------------- ##"
3563 for ac_var in $ac_subst_files
3565 eval ac_val=\$$ac_var
3567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3569 $as_echo "$ac_var='\''$ac_val'\''"
3574 if test -s confdefs.h; then
3575 $as_echo "## ----------- ##
3582 test "$ac_signal" != 0 &&
3583 $as_echo "$as_me: caught signal $ac_signal"
3584 $as_echo "$as_me: exit $exit_status"
3586 rm -f core *.core core.conftest.* &&
3587 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3590 for ac_signal in 1 2 13 15; do
3591 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3595 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3596 rm -f -r conftest* confdefs.h
3598 $as_echo "/* confdefs.h */" > confdefs.h
3600 # Predefined preprocessor variables.
3602 cat >>confdefs.h <<_ACEOF
3603 #define PACKAGE_NAME "$PACKAGE_NAME"
3606 cat >>confdefs.h <<_ACEOF
3607 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3610 cat >>confdefs.h <<_ACEOF
3611 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3614 cat >>confdefs.h <<_ACEOF
3615 #define PACKAGE_STRING "$PACKAGE_STRING"
3618 cat >>confdefs.h <<_ACEOF
3619 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3622 cat >>confdefs.h <<_ACEOF
3623 #define PACKAGE_URL "$PACKAGE_URL"
3627 # Let the site file select an alternate cache file if it wants to.
3628 # Prefer an explicitly selected file to automatically selected ones.
3631 if test -n "$CONFIG_SITE"; then
3632 # We do not want a PATH search for config.site.
3633 case $CONFIG_SITE in #((
3634 -*) ac_site_file1=./$CONFIG_SITE;;
3635 */*) ac_site_file1=$CONFIG_SITE;;
3636 *) ac_site_file1=./$CONFIG_SITE;;
3638 elif test "x$prefix" != xNONE; then
3639 ac_site_file1=$prefix/share/config.site
3640 ac_site_file2=$prefix/etc/config.site
3642 ac_site_file1=$ac_default_prefix/share/config.site
3643 ac_site_file2=$ac_default_prefix/etc/config.site
3645 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3647 test "x$ac_site_file" = xNONE && continue
3648 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3650 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3651 sed 's/^/| /' "$ac_site_file" >&5
3653 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3654 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3655 as_fn_error $? "failed to load site script $ac_site_file
3656 See \`config.log' for more details" "$LINENO" 5; }
3660 if test -r "$cache_file"; then
3661 # Some versions of bash will fail to source /dev/null (special files
3662 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3663 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3665 $as_echo "$as_me: loading cache $cache_file" >&6;}
3667 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3668 *) . "./$cache_file";;
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3673 $as_echo "$as_me: creating cache $cache_file" >&6;}
3677 gl_func_list="$gl_func_list btowc"
3678 gl_func_list="$gl_func_list canonicalize_file_name"
3679 gl_func_list="$gl_func_list realpath"
3680 gl_func_list="$gl_func_list readlinkat"
3681 gl_header_list="$gl_header_list unistd.h"
3682 gl_header_list="$gl_header_list sys/param.h"
3683 gl_func_list="$gl_func_list _set_invalid_parameter_handler"
3684 gl_header_list="$gl_header_list sys/socket.h"
3685 gl_func_list="$gl_func_list fchdir"
3686 gl_header_list="$gl_header_list dirent.h"
3687 gl_func_list="$gl_func_list fdopendir"
3688 gl_func_list="$gl_func_list faccessat"
3689 gl_func_list="$gl_func_list fcntl"
3690 gl_func_list="$gl_func_list symlink"
3691 gl_func_list="$gl_func_list mempcpy"
3692 gl_func_list="$gl_func_list isblank"
3693 gl_func_list="$gl_func_list iswctype"
3694 gl_func_list="$gl_func_list mbsrtowcs"
3695 gl_func_list="$gl_func_list wmemchr"
3696 gl_func_list="$gl_func_list wmemcpy"
3697 gl_func_list="$gl_func_list wmempcpy"
3698 gl_header_list="$gl_header_list wctype.h"
3699 gl_fnmatch_required=GNU
3700 gl_header_list="$gl_header_list stdio_ext.h"
3701 gl_func_list="$gl_func_list fpurge"
3702 gl_func_list="$gl_func_list __fpurge"
3703 gl_func_list="$gl_func_list __freadahead"
3704 gl_func_list="$gl_func_list __freading"
3705 gl_header_list="$gl_header_list sys/stat.h"
3706 gl_func_list="$gl_func_list fstatat"
3707 gl_func_list="$gl_func_list openat"
3708 gl_func_list="$gl_func_list fstatfs"
3709 gl_header_list="$gl_header_list sys/vfs.h"
3710 gl_func_list="$gl_func_list getdelim"
3711 gl_func_list="$gl_func_list getdtablesize"
3712 gl_header_list="$gl_header_list netdb.h"
3713 gl_getopt_required=GNU
3714 gl_header_list="$gl_header_list getopt.h"
3715 gl_func_list="$gl_func_list gettimeofday"
3716 gl_func_list="$gl_func_list nanotime"
3717 gl_header_list="$gl_header_list sys/time.h"
3718 gl_header_list="$gl_header_list wchar.h"
3719 gl_header_list="$gl_header_list stdint.h"
3720 gl_header_list="$gl_header_list inttypes.h"
3721 gl_func_list="$gl_func_list iswcntrl"
3722 gl_func_list="$gl_func_list iswblank"
3723 gl_header_list="$gl_header_list langinfo.h"
3724 gl_header_list="$gl_header_list xlocale.h"
3725 gl_func_list="$gl_func_list lstat"
3726 gl_header_list="$gl_header_list math.h"
3727 gl_func_list="$gl_func_list mbsinit"
3728 gl_func_list="$gl_func_list mbrtowc"
3729 gl_func_list="$gl_func_list mbslen"
3730 gl_header_list="$gl_header_list sys/mman.h"
3731 gl_func_list="$gl_func_list mprotect"
3732 gl_header_list="$gl_header_list sys/statvfs.h"
3733 gl_func_list="$gl_func_list nl_langinfo"
3734 gl_func_list="$gl_func_list strerror_r"
3735 gl_func_list="$gl_func_list __xpg_strerror_r"
3736 gl_func_list="$gl_func_list readlink"
3737 gl_header_list="$gl_header_list malloc.h"
3738 gl_func_list="$gl_func_list pathconf"
3739 gl_header_list="$gl_header_list selinux/selinux.h"
3740 gl_func_list="$gl_func_list setenv"
3741 gl_func_list="$gl_func_list snprintf"
3742 gl_func_list="$gl_func_list strdup"
3743 gl_func_list="$gl_func_list catgets"
3744 gl_func_list="$gl_func_list tzset"
3745 gl_header_list="$gl_header_list strings.h"
3746 gl_func_list="$gl_func_list strndup"
3747 gl_func_list="$gl_func_list strtoumax"
3748 gl_header_list="$gl_header_list sys/uio.h"
3749 gl_header_list="$gl_header_list sys/utsname.h"
3750 gl_header_list="$gl_header_list sys/wait.h"
3751 gl_func_list="$gl_func_list localtime_r"
3752 gl_func_list="$gl_func_list pipe"
3753 gl_func_list="$gl_func_list unlinkat"
3754 gl_func_list="$gl_func_list vasnprintf"
3755 gl_header_list="$gl_header_list features.h"
3756 gl_func_list="$gl_func_list wcrtomb"
3757 gl_func_list="$gl_func_list wcwidth"
3758 gl_header_list="$gl_header_list arpa/inet.h"
3759 gl_func_list="$gl_func_list ftruncate"
3760 gl_header_list="$gl_header_list netinet/in.h"
3761 gl_func_list="$gl_func_list newlocale"
3762 gl_header_list="$gl_header_list sys/select.h"
3763 gl_header_list="$gl_header_list priv.h"
3764 gl_func_list="$gl_func_list sigaction"
3765 gl_func_list="$gl_func_list sigaltstack"
3766 gl_func_list="$gl_func_list siginterrupt"
3767 gl_func_list="$gl_func_list sleep"
3768 gl_func_list="$gl_func_list symlinkat"
3769 gl_header_list="$gl_header_list sys/ioctl.h"
3770 gl_func_list="$gl_func_list shutdown"
3771 gl_func_list="$gl_func_list wctob"
3772 gt_needs="$gt_needs "
3773 # Check that the precious variables saved in the cache have kept the same
3775 ac_cache_corrupted=false
3776 for ac_var in $ac_precious_vars; do
3777 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3778 eval ac_new_set=\$ac_env_${ac_var}_set
3779 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3780 eval ac_new_val=\$ac_env_${ac_var}_value
3781 case $ac_old_set,$ac_new_set in
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3784 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3785 ac_cache_corrupted=: ;;
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3788 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3789 ac_cache_corrupted=: ;;
3792 if test "x$ac_old_val" != "x$ac_new_val"; then
3793 # differences in whitespace do not lead to failure.
3794 ac_old_val_w=`echo x $ac_old_val`
3795 ac_new_val_w=`echo x $ac_new_val`
3796 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3798 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3799 ac_cache_corrupted=:
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3802 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3803 eval $ac_var=\$ac_old_val
3805 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3806 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3807 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3808 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3811 # Pass precious variables to config.status.
3812 if test "$ac_new_set" = set; then
3814 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3815 *) ac_arg=$ac_var=$ac_new_val ;;
3817 case " $ac_configure_args " in
3818 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3819 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3823 if $ac_cache_corrupted; then
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3825 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3827 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3828 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3830 ## -------------------- ##
3831 ## Main body of script. ##
3832 ## -------------------- ##
3835 ac_cpp='$CPP $CPPFLAGS'
3836 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3837 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3838 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3842 for ac_dir in build-aux "$srcdir"/build-aux; do
3843 if test -f "$ac_dir/install-sh"; then
3845 ac_install_sh="$ac_aux_dir/install-sh -c"
3847 elif test -f "$ac_dir/install.sh"; then
3849 ac_install_sh="$ac_aux_dir/install.sh -c"
3851 elif test -f "$ac_dir/shtool"; then
3853 ac_install_sh="$ac_aux_dir/shtool install -c"
3857 if test -z "$ac_aux_dir"; then
3858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3861 # These three variables are undocumented and unsupported,
3862 # and are intended to be withdrawn in a future Autoconf release.
3863 # They can cause serious problems if a builder's source tree is in a directory
3864 # whose full name contains unusual characters.
3865 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3866 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3867 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3870 am__api_version='1.11'
3872 # Find a good install program. We prefer a C program (faster),
3873 # so one script is as good as another. But avoid the broken or
3874 # incompatible versions:
3875 # SysV /etc/install, /usr/sbin/install
3876 # SunOS /usr/etc/install
3877 # IRIX /sbin/install
3879 # AmigaOS /C/install, which installs bootblocks on floppy discs
3880 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3881 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3882 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3883 # OS/2's system install, which has a completely different semantic
3884 # ./install, which can be erroneously created by make from ./install.sh.
3885 # Reject install programs that cannot install multiple files.
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3887 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3888 if test -z "$INSTALL"; then
3889 if ${ac_cv_path_install+:} false; then :
3890 $as_echo_n "(cached) " >&6
3892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3896 test -z "$as_dir" && as_dir=.
3897 # Account for people who put trailing slashes in PATH elements.
3898 case $as_dir/ in #((
3899 ./ | .// | /[cC]/* | \
3900 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3901 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3904 # OSF1 and SCO ODT 3.0 have their own names for install.
3905 # Don't use installbsd from OSF since it installs stuff as root
3907 for ac_prog in ginstall scoinst install; do
3908 for ac_exec_ext in '' $ac_executable_extensions; do
3909 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3910 if test $ac_prog = install &&
3911 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3912 # AIX install. It has an incompatible calling convention.
3914 elif test $ac_prog = install &&
3915 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3916 # program-specific install script used by HP pwplus--don't use.
3919 rm -rf conftest.one conftest.two conftest.dir
3920 echo one > conftest.one
3921 echo two > conftest.two
3923 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3924 test -s conftest.one && test -s conftest.two &&
3925 test -s conftest.dir/conftest.one &&
3926 test -s conftest.dir/conftest.two
3928 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3941 rm -rf conftest.one conftest.two conftest.dir
3944 if test "${ac_cv_path_install+set}" = set; then
3945 INSTALL=$ac_cv_path_install
3947 # As a last resort, use the slow shell script. Don't cache a
3948 # value for INSTALL within a source directory, because that will
3949 # break other packages using the cache if that directory is
3950 # removed, or if the value is a relative name.
3951 INSTALL=$ac_install_sh
3954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3955 $as_echo "$INSTALL" >&6; }
3957 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3958 # It thinks the first close brace ends the variable substitution.
3959 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3961 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3963 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3966 $as_echo_n "checking whether build environment is sane... " >&6; }
3969 echo timestamp > conftest.file
3970 # Reject unsafe characters in $srcdir or the absolute working directory
3971 # name. Accept space and tab only in the latter.
3975 *[\\\"\#\$\&\'\`$am_lf]*)
3976 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3979 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3980 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3983 # Do `set' in a subshell so we don't clobber the current shell's
3984 # arguments. Must try -L first in case configure is actually a
3985 # symlink; some systems play weird games with the mod time of symlinks
3986 # (eg FreeBSD returns the mod time of the symlink's containing
3989 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3990 if test "$*" = "X"; then
3992 set X `ls -t "$srcdir/configure" conftest.file`
3995 if test "$*" != "X $srcdir/configure conftest.file" \
3996 && test "$*" != "X conftest.file $srcdir/configure"; then
3998 # If neither matched, then we have a broken ls. This can happen
3999 # if, for instance, CONFIG_SHELL is bash and it inherits a
4000 # broken ls alias from the environment. This has actually
4001 # happened. Such a system could not be considered "sane".
4002 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
4003 alias in your environment" "$LINENO" 5
4006 test "$2" = conftest.file
4012 as_fn_error $? "newly created file is older than distributed files!
4013 Check your system clock" "$LINENO" 5
4015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4016 $as_echo "yes" >&6; }
4017 test "$program_prefix" != NONE &&
4018 program_transform_name="s&^&$program_prefix&;$program_transform_name"
4019 # Use a double $ so make ignores it.
4020 test "$program_suffix" != NONE &&
4021 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
4022 # Double any \ or $.
4023 # By default was `s,x,x', remove it if useless.
4024 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
4025 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
4027 # expand $ac_aux_dir to an absolute path
4028 am_aux_dir=`cd $ac_aux_dir && pwd`
4030 if test x"${MISSING+set}" != xset; then
4033 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
4035 MISSING="\${SHELL} $am_aux_dir/missing" ;;
4038 # Use eval to expand $SHELL
4039 if eval "$MISSING --run true"; then
4040 am_missing_run="$MISSING --run "
4043 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
4044 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
4047 if test x"${install_sh}" != xset; then
4050 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
4052 install_sh="\${SHELL} $am_aux_dir/install-sh"
4056 # Installed binaries are usually stripped using `strip' when the user
4057 # run `make install-strip'. However `strip' might not be the right
4058 # tool to use in cross-compilation environments, therefore Automake
4059 # will honor the `STRIP' environment variable to overrule this program.
4060 if test "$cross_compiling" != no; then
4061 if test -n "$ac_tool_prefix"; then
4062 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4063 set dummy ${ac_tool_prefix}strip; ac_word=$2
4064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4065 $as_echo_n "checking for $ac_word... " >&6; }
4066 if ${ac_cv_prog_STRIP+:} false; then :
4067 $as_echo_n "(cached) " >&6
4069 if test -n "$STRIP"; then
4070 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076 test -z "$as_dir" && as_dir=.
4077 for ac_exec_ext in '' $ac_executable_extensions; do
4078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4079 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4089 STRIP=$ac_cv_prog_STRIP
4090 if test -n "$STRIP"; then
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
4092 $as_echo "$STRIP" >&6; }
4094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4095 $as_echo "no" >&6; }
4100 if test -z "$ac_cv_prog_STRIP"; then
4102 # Extract the first word of "strip", so it can be a program name with args.
4103 set dummy strip; ac_word=$2
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4105 $as_echo_n "checking for $ac_word... " >&6; }
4106 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
4107 $as_echo_n "(cached) " >&6
4109 if test -n "$ac_ct_STRIP"; then
4110 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
4112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4116 test -z "$as_dir" && as_dir=.
4117 for ac_exec_ext in '' $ac_executable_extensions; do
4118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4119 ac_cv_prog_ac_ct_STRIP="strip"
4120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4129 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
4130 if test -n "$ac_ct_STRIP"; then
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
4132 $as_echo "$ac_ct_STRIP" >&6; }
4134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4135 $as_echo "no" >&6; }
4138 if test "x$ac_ct_STRIP" = x; then
4141 case $cross_compiling:$ac_tool_warned in
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4144 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4145 ac_tool_warned=yes ;;
4150 STRIP="$ac_cv_prog_STRIP"
4154 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
4156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4157 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4158 if test -z "$MKDIR_P"; then
4159 if ${ac_cv_path_mkdir+:} false; then :
4160 $as_echo_n "(cached) " >&6
4162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4163 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4166 test -z "$as_dir" && as_dir=.
4167 for ac_prog in mkdir gmkdir; do
4168 for ac_exec_ext in '' $ac_executable_extensions; do
4169 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4170 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4171 'mkdir (GNU coreutils) '* | \
4172 'mkdir (coreutils) '* | \
4173 'mkdir (fileutils) '4.1*)
4174 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4184 test -d ./--version && rmdir ./--version
4185 if test "${ac_cv_path_mkdir+set}" = set; then
4186 MKDIR_P="$ac_cv_path_mkdir -p"
4188 # As a last resort, use the slow shell script. Don't cache a
4189 # value for MKDIR_P within a source directory, because that will
4190 # break other packages using the cache if that directory is
4191 # removed, or if the value is a relative name.
4192 MKDIR_P="$ac_install_sh -d"
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4196 $as_echo "$MKDIR_P" >&6; }
4200 [\\/$]* | ?:[\\/]*) ;;
4201 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
4204 for ac_prog in gawk mawk nawk awk
4206 # Extract the first word of "$ac_prog", so it can be a program name with args.
4207 set dummy $ac_prog; ac_word=$2
4208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4209 $as_echo_n "checking for $ac_word... " >&6; }
4210 if ${ac_cv_prog_AWK+:} false; then :
4211 $as_echo_n "(cached) " >&6
4213 if test -n "$AWK"; then
4214 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220 test -z "$as_dir" && as_dir=.
4221 for ac_exec_ext in '' $ac_executable_extensions; do
4222 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4223 ac_cv_prog_AWK="$ac_prog"
4224 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4234 if test -n "$AWK"; then
4235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4236 $as_echo "$AWK" >&6; }
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4239 $as_echo "no" >&6; }
4243 test -n "$AWK" && break
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
4247 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
4249 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
4250 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
4251 $as_echo_n "(cached) " >&6
4253 cat >conftest.make <<\_ACEOF
4256 @echo '@@@%%%=$(MAKE)=@@@%%%'
4258 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
4259 case `${MAKE-make} -f conftest.make 2>/dev/null` in
4261 eval ac_cv_prog_make_${ac_make}_set=yes;;
4263 eval ac_cv_prog_make_${ac_make}_set=no;;
4267 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
4268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4269 $as_echo "yes" >&6; }
4272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4273 $as_echo "no" >&6; }
4274 SET_MAKE="MAKE=${MAKE-make}"
4277 rm -rf .tst 2>/dev/null
4278 mkdir .tst 2>/dev/null
4279 if test -d .tst; then
4284 rmdir .tst 2>/dev/null
4286 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4287 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4288 # is not polluted with repeated "-I."
4289 am__isrc=' -I$(srcdir)'
4290 # test to see if srcdir already configured
4291 if test -f $srcdir/config.status; then
4292 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4296 # test whether we have cygpath
4297 if test -z "$CYGPATH_W"; then
4298 if (cygpath --version) >/dev/null 2>/dev/null; then
4299 CYGPATH_W='cygpath -w'
4306 # Define the identity of the package.
4311 cat >>confdefs.h <<_ACEOF
4312 #define PACKAGE "$PACKAGE"
4316 cat >>confdefs.h <<_ACEOF
4317 #define VERSION "$VERSION"
4320 # Some tools Automake needs.
4322 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4325 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4328 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4331 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4334 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4336 # We need awk for the "check" target. The system "awk" is bad on
4338 # Always define AMTAR for backward compatibility. Yes, it's still used
4339 # in the wild :-( We should find a proper way to deprecate it ...
4342 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4350 ac_config_headers="$ac_config_headers config.h"
4352 # Make sure we can run config.sub.
4353 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4354 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4357 $as_echo_n "checking build system type... " >&6; }
4358 if ${ac_cv_build+:} false; then :
4359 $as_echo_n "(cached) " >&6
4361 ac_build_alias=$build_alias
4362 test "x$ac_build_alias" = x &&
4363 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4364 test "x$ac_build_alias" = x &&
4365 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4366 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4367 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4371 $as_echo "$ac_cv_build" >&6; }
4372 case $ac_cv_build in
4374 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4377 ac_save_IFS=$IFS; IFS='-'
4383 # Remember, the first character of IFS is used to create $*,
4384 # except with old shells:
4387 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4391 $as_echo_n "checking host system type... " >&6; }
4392 if ${ac_cv_host+:} false; then :
4393 $as_echo_n "(cached) " >&6
4395 if test "x$host_alias" = x; then
4396 ac_cv_host=$ac_cv_build
4398 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4399 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4404 $as_echo "$ac_cv_host" >&6; }
4407 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4410 ac_save_IFS=$IFS; IFS='-'
4416 # Remember, the first character of IFS is used to create $*,
4417 # except with old shells:
4420 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4425 ALL_LINGUAS="be bg cs ca da de el eo es et fi fr ga gl hr hu id it ja ko lg lt ms nl pl pt pt_BR ro ru rw sk sl sr sv tr uk vi zh_CN zh_TW"
4430 # Check whether --with-fts was given.
4431 if test "${with_fts+set}" = set; then :
4432 withval=$with_fts; with_fts=$withval
4438 *) as_fn_error $? "Invalid value for --with-fts: $with_fts" "$LINENO" 5
4440 if test x"${with_fts-no}" != xno; then
4448 if test x"${with_fts-no}" != xno ; then
4450 $as_echo "#define WITH_FTS 1" >>confdefs.h
4455 # Check whether --enable-id-cache was given.
4456 if test "${enable_id_cache+set}" = set; then :
4457 enableval=$enable_id_cache;
4458 $as_echo "#define CACHE_IDS 1" >>confdefs.h
4463 # Check whether --enable-debug was given.
4464 if test "${enable_debug+set}" = set; then :
4465 enableval=$enable_debug; ac_cv_debug=$enableval
4471 # Check whether --enable-leaf-optimisation was given.
4472 if test "${enable_leaf_optimisation+set}" = set; then :
4473 enableval=$enable_leaf_optimisation; ac_cv_leaf_optimisation=$enableval
4475 ac_cv_leaf_optimisation=yes
4479 # Check whether --enable-d_type-optimization was given.
4480 if test "${enable_d_type_optimization+set}" = set; then :
4481 enableval=$enable_d_type_optimization; ac_cv_d_type=$enableval
4487 # Check whether --enable-d_type-optimisation was given.
4488 if test "${enable_d_type_optimisation+set}" = set; then :
4489 enableval=$enable_d_type_optimisation; ac_cv_d_type=$enableval
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether debug output should be produced" >&5
4495 $as_echo_n "checking whether debug output should be produced... " >&6; }
4496 if test x$ac_cv_debug = xno; then
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4498 $as_echo "no" >&6; }
4500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4501 $as_echo "yes" >&6; }
4503 $as_echo "#define DEBUG 1" >>confdefs.h
4506 $as_echo "#define DEBUG_STAT 1" >>confdefs.h
4510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for leaf optimisation" >&5
4511 $as_echo_n "checking for leaf optimisation... " >&6; }
4512 if test x$ac_cv_leaf_optimisation = xno; then
4513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4514 $as_echo "no" >&6; }
4516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4517 $as_echo "yes" >&6; }
4519 $as_echo "#define LEAF_OPTIMISATION 1" >>confdefs.h
4524 if test -n "$DEFAULT_ARG_SIZE"; then
4526 cat >>confdefs.h <<_ACEOF
4527 #define DEFAULT_ARG_SIZE $DEFAULT_ARG_SIZE
4535 ac_cpp='$CPP $CPPFLAGS'
4536 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4537 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4538 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4539 if test -n "$ac_tool_prefix"; then
4540 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4541 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543 $as_echo_n "checking for $ac_word... " >&6; }
4544 if ${ac_cv_prog_CC+:} false; then :
4545 $as_echo_n "(cached) " >&6
4547 if test -n "$CC"; then
4548 ac_cv_prog_CC="$CC" # Let the user override the test.
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554 test -z "$as_dir" && as_dir=.
4555 for ac_exec_ext in '' $ac_executable_extensions; do
4556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4557 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4558 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4568 if test -n "$CC"; then
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4570 $as_echo "$CC" >&6; }
4572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573 $as_echo "no" >&6; }
4578 if test -z "$ac_cv_prog_CC"; then
4580 # Extract the first word of "gcc", so it can be a program name with args.
4581 set dummy gcc; ac_word=$2
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4583 $as_echo_n "checking for $ac_word... " >&6; }
4584 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4585 $as_echo_n "(cached) " >&6
4587 if test -n "$ac_ct_CC"; then
4588 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594 test -z "$as_dir" && as_dir=.
4595 for ac_exec_ext in '' $ac_executable_extensions; do
4596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4597 ac_cv_prog_ac_ct_CC="gcc"
4598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4607 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4608 if test -n "$ac_ct_CC"; then
4609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4610 $as_echo "$ac_ct_CC" >&6; }
4612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4613 $as_echo "no" >&6; }
4616 if test "x$ac_ct_CC" = x; then
4619 case $cross_compiling:$ac_tool_warned in
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4622 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4623 ac_tool_warned=yes ;;
4631 if test -z "$CC"; then
4632 if test -n "$ac_tool_prefix"; then
4633 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4634 set dummy ${ac_tool_prefix}cc; ac_word=$2
4635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4636 $as_echo_n "checking for $ac_word... " >&6; }
4637 if ${ac_cv_prog_CC+:} false; then :
4638 $as_echo_n "(cached) " >&6
4640 if test -n "$CC"; then
4641 ac_cv_prog_CC="$CC" # Let the user override the test.
4643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4647 test -z "$as_dir" && as_dir=.
4648 for ac_exec_ext in '' $ac_executable_extensions; do
4649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4650 ac_cv_prog_CC="${ac_tool_prefix}cc"
4651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4661 if test -n "$CC"; then
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4663 $as_echo "$CC" >&6; }
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4666 $as_echo "no" >&6; }
4672 if test -z "$CC"; then
4673 # Extract the first word of "cc", so it can be a program name with args.
4674 set dummy cc; ac_word=$2
4675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4676 $as_echo_n "checking for $ac_word... " >&6; }
4677 if ${ac_cv_prog_CC+:} false; then :
4678 $as_echo_n "(cached) " >&6
4680 if test -n "$CC"; then
4681 ac_cv_prog_CC="$CC" # Let the user override the test.
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
4690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4692 ac_prog_rejected=yes
4696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4703 if test $ac_prog_rejected = yes; then
4704 # We found a bogon in the path, so make sure we never use it.
4705 set dummy $ac_cv_prog_CC
4707 if test $# != 0; then
4708 # We chose a different compiler from the bogus one.
4709 # However, it has the same basename, so the bogon will be chosen
4710 # first if we set CC to just the basename; use the full file name.
4712 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4718 if test -n "$CC"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4720 $as_echo "$CC" >&6; }
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723 $as_echo "no" >&6; }
4728 if test -z "$CC"; then
4729 if test -n "$ac_tool_prefix"; then
4730 for ac_prog in cl.exe
4732 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4735 $as_echo_n "checking for $ac_word... " >&6; }
4736 if ${ac_cv_prog_CC+:} false; then :
4737 $as_echo_n "(cached) " >&6
4739 if test -n "$CC"; then
4740 ac_cv_prog_CC="$CC" # Let the user override the test.
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
4748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4749 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4760 if test -n "$CC"; then
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4762 $as_echo "$CC" >&6; }
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4765 $as_echo "no" >&6; }
4769 test -n "$CC" && break
4772 if test -z "$CC"; then
4774 for ac_prog in cl.exe
4776 # Extract the first word of "$ac_prog", so it can be a program name with args.
4777 set dummy $ac_prog; ac_word=$2
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779 $as_echo_n "checking for $ac_word... " >&6; }
4780 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4781 $as_echo_n "(cached) " >&6
4783 if test -n "$ac_ct_CC"; then
4784 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790 test -z "$as_dir" && as_dir=.
4791 for ac_exec_ext in '' $ac_executable_extensions; do
4792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4793 ac_cv_prog_ac_ct_CC="$ac_prog"
4794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4803 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4804 if test -n "$ac_ct_CC"; then
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4806 $as_echo "$ac_ct_CC" >&6; }
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809 $as_echo "no" >&6; }
4813 test -n "$ac_ct_CC" && break
4816 if test "x$ac_ct_CC" = x; then
4819 case $cross_compiling:$ac_tool_warned in
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4822 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4823 ac_tool_warned=yes ;;
4832 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4833 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4834 as_fn_error $? "no acceptable C compiler found in \$PATH
4835 See \`config.log' for more details" "$LINENO" 5; }
4837 # Provide some information about the compiler.
4838 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4841 for ac_option in --version -v -V -qversion; do
4842 { { ac_try="$ac_compiler $ac_option >&5"
4844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4845 *) ac_try_echo=$ac_try;;
4847 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4848 $as_echo "$ac_try_echo"; } >&5
4849 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4851 if test -s conftest.err; then
4853 ... rest of stderr output deleted ...
4854 10q' conftest.err >conftest.er1
4855 cat conftest.er1 >&5
4857 rm -f conftest.er1 conftest.err
4858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4859 test $ac_status = 0; }
4862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4863 /* end confdefs.h. */
4873 ac_clean_files_save=$ac_clean_files
4874 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4875 # Try to create an executable without -o first, disregard a.out.
4876 # It will help us diagnose broken compilers, and finding out an intuition
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4879 $as_echo_n "checking whether the C compiler works... " >&6; }
4880 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4882 # The possible output files:
4883 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4886 for ac_file in $ac_files
4889 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4890 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4895 if { { ac_try="$ac_link_default"
4897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4898 *) ac_try_echo=$ac_try;;
4900 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4901 $as_echo "$ac_try_echo"; } >&5
4902 (eval "$ac_link_default") 2>&5
4904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4905 test $ac_status = 0; }; then :
4906 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4907 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4908 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4909 # so that the user can short-circuit this test for compilers unknown to
4911 for ac_file in $ac_files ''
4913 test -f "$ac_file" || continue
4915 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4918 # We found the default executable, but exeext='' is most
4922 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4924 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4926 # We set ac_cv_exeext here because the later test for it is not
4927 # safe: cross compilers may not add the suffix if given an `-o'
4928 # argument, so we may need to know it at that point already.
4929 # Even if this section looks crufty: it has the advantage of
4936 test "$ac_cv_exeext" = no && ac_cv_exeext=
4941 if test -z "$ac_file"; then :
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4943 $as_echo "no" >&6; }
4944 $as_echo "$as_me: failed program was:" >&5
4945 sed 's/^/| /' conftest.$ac_ext >&5
4947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4948 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4949 as_fn_error 77 "C compiler cannot create executables
4950 See \`config.log' for more details" "$LINENO" 5; }
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4953 $as_echo "yes" >&6; }
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4956 $as_echo_n "checking for C compiler default output file name... " >&6; }
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4958 $as_echo "$ac_file" >&6; }
4959 ac_exeext=$ac_cv_exeext
4961 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4962 ac_clean_files=$ac_clean_files_save
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4964 $as_echo_n "checking for suffix of executables... " >&6; }
4965 if { { ac_try="$ac_link"
4967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4968 *) ac_try_echo=$ac_try;;
4970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4971 $as_echo "$ac_try_echo"; } >&5
4972 (eval "$ac_link") 2>&5
4974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4975 test $ac_status = 0; }; then :
4976 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4977 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4978 # work properly (i.e., refer to `conftest.exe'), while it won't with
4980 for ac_file in conftest.exe conftest conftest.*; do
4981 test -f "$ac_file" || continue
4983 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4984 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4991 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4992 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4993 See \`config.log' for more details" "$LINENO" 5; }
4995 rm -f conftest conftest$ac_cv_exeext
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4997 $as_echo "$ac_cv_exeext" >&6; }
4999 rm -f conftest.$ac_ext
5000 EXEEXT=$ac_cv_exeext
5002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5003 /* end confdefs.h. */
5008 FILE *f = fopen ("conftest.out", "w");
5009 return ferror (f) || fclose (f) != 0;
5015 ac_clean_files="$ac_clean_files conftest.out"
5016 # Check that the compiler produces executables we can run. If not, either
5017 # the compiler is broken, or we cross compile.
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5019 $as_echo_n "checking whether we are cross compiling... " >&6; }
5020 if test "$cross_compiling" != yes; then
5021 { { ac_try="$ac_link"
5023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5024 *) ac_try_echo=$ac_try;;
5026 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5027 $as_echo "$ac_try_echo"; } >&5
5028 (eval "$ac_link") 2>&5
5030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5031 test $ac_status = 0; }
5032 if { ac_try='./conftest$ac_cv_exeext'
5033 { { case "(($ac_try" in
5034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5035 *) ac_try_echo=$ac_try;;
5037 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5038 $as_echo "$ac_try_echo"; } >&5
5039 (eval "$ac_try") 2>&5
5041 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5042 test $ac_status = 0; }; }; then
5045 if test "$cross_compiling" = maybe; then
5048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5049 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5050 as_fn_error $? "cannot run C compiled programs.
5051 If you meant to cross compile, use \`--host'.
5052 See \`config.log' for more details" "$LINENO" 5; }
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5057 $as_echo "$cross_compiling" >&6; }
5059 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5060 ac_clean_files=$ac_clean_files_save
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5062 $as_echo_n "checking for suffix of object files... " >&6; }
5063 if ${ac_cv_objext+:} false; then :
5064 $as_echo_n "(cached) " >&6
5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h. */
5077 rm -f conftest.o conftest.obj
5078 if { { ac_try="$ac_compile"
5080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5081 *) ac_try_echo=$ac_try;;
5083 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5084 $as_echo "$ac_try_echo"; } >&5
5085 (eval "$ac_compile") 2>&5
5087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5088 test $ac_status = 0; }; then :
5089 for ac_file in conftest.o conftest.obj conftest.*; do
5090 test -f "$ac_file" || continue;
5092 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5093 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5098 $as_echo "$as_me: failed program was:" >&5
5099 sed 's/^/| /' conftest.$ac_ext >&5
5101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5102 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5103 as_fn_error $? "cannot compute suffix of object files: cannot compile
5104 See \`config.log' for more details" "$LINENO" 5; }
5106 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5109 $as_echo "$ac_cv_objext" >&6; }
5110 OBJEXT=$ac_cv_objext
5112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5113 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5114 if ${ac_cv_c_compiler_gnu+:} false; then :
5115 $as_echo_n "(cached) " >&6
5117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5118 /* end confdefs.h. */
5131 if ac_fn_c_try_compile "$LINENO"; then :
5136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5137 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5141 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
5142 if test $ac_compiler_gnu = yes; then
5147 ac_test_CFLAGS=${CFLAGS+set}
5148 ac_save_CFLAGS=$CFLAGS
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5150 $as_echo_n "checking whether $CC accepts -g... " >&6; }
5151 if ${ac_cv_prog_cc_g+:} false; then :
5152 $as_echo_n "(cached) " >&6
5154 ac_save_c_werror_flag=$ac_c_werror_flag
5155 ac_c_werror_flag=yes
5158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5159 /* end confdefs.h. */
5169 if ac_fn_c_try_compile "$LINENO"; then :
5173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5174 /* end confdefs.h. */
5184 if ac_fn_c_try_compile "$LINENO"; then :
5187 ac_c_werror_flag=$ac_save_c_werror_flag
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190 /* end confdefs.h. */
5200 if ac_fn_c_try_compile "$LINENO"; then :
5203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5208 ac_c_werror_flag=$ac_save_c_werror_flag
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5211 $as_echo "$ac_cv_prog_cc_g" >&6; }
5212 if test "$ac_test_CFLAGS" = set; then
5213 CFLAGS=$ac_save_CFLAGS
5214 elif test $ac_cv_prog_cc_g = yes; then
5215 if test "$GCC" = yes; then
5221 if test "$GCC" = yes; then
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5228 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5229 if ${ac_cv_prog_cc_c89+:} false; then :
5230 $as_echo_n "(cached) " >&6
5232 ac_cv_prog_cc_c89=no
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235 /* end confdefs.h. */
5239 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5240 struct buf { int x; };
5241 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5242 static char *e (p, i)
5248 static char *f (char * (*g) (char **, int), char **p, ...)
5253 s = g (p, va_arg (v,int));
5258 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5259 function prototypes and stuff, but not '\xHH' hex character constants.
5260 These don't provoke an error unfortunately, instead are silently treated
5261 as 'x'. The following induces an error, until -std is added to get
5262 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5263 array size at least. It's necessary to write '\x00'==0 to get something
5264 that's true only with -std. */
5265 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5267 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5268 inside strings and character constants. */
5270 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5272 int test (int i, double x);
5273 struct s1 {int (*f) (int a);};
5274 struct s2 {int (*f) (double a);};
5275 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5281 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5286 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5287 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5289 CC="$ac_save_CC $ac_arg"
5290 if ac_fn_c_try_compile "$LINENO"; then :
5291 ac_cv_prog_cc_c89=$ac_arg
5293 rm -f core conftest.err conftest.$ac_objext
5294 test "x$ac_cv_prog_cc_c89" != "xno" && break
5296 rm -f conftest.$ac_ext
5301 case "x$ac_cv_prog_cc_c89" in
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5304 $as_echo "none needed" >&6; } ;;
5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5307 $as_echo "unsupported" >&6; } ;;
5309 CC="$CC $ac_cv_prog_cc_c89"
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5311 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5313 if test "x$ac_cv_prog_cc_c89" != xno; then :
5318 ac_cpp='$CPP $CPPFLAGS'
5319 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5320 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5321 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5322 DEPDIR="${am__leading_dot}deps"
5324 ac_config_commands="$ac_config_commands depfiles"
5327 am_make=${MAKE-make}
5328 cat > confinc << 'END'
5330 @echo this is the am__doit target
5333 # If we don't find an include directive, just comment out the code.
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5335 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5339 # First try GNU make style include.
5340 echo "include confinc" > confmf
5341 # Ignore all kinds of additional output from `make'.
5342 case `$am_make -s -f confmf 2> /dev/null` in #(
5343 *the\ am__doit\ target*)
5349 # Now try BSD make style include.
5350 if test "$am__include" = "#"; then
5351 echo '.include "confinc"' > confmf
5352 case `$am_make -s -f confmf 2> /dev/null` in #(
5353 *the\ am__doit\ target*)
5354 am__include=.include
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5363 $as_echo "$_am_result" >&6; }
5364 rm -f confinc confmf
5366 # Check whether --enable-dependency-tracking was given.
5367 if test "${enable_dependency_tracking+set}" = set; then :
5368 enableval=$enable_dependency_tracking;
5371 if test "x$enable_dependency_tracking" != xno; then
5372 am_depcomp="$ac_aux_dir/depcomp"
5376 if test "x$enable_dependency_tracking" != xno; then
5386 depcc="$CC" am_compiler_list=
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5389 $as_echo_n "checking dependency style of $depcc... " >&6; }
5390 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5391 $as_echo_n "(cached) " >&6
5393 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5394 # We make a subdir and do the tests there. Otherwise we can end up
5395 # making bogus files that we don't know about and never remove. For
5396 # instance it was reported that on HP-UX the gcc test will end up
5397 # making a dummy file named `D' -- because `-MD' means `put the output
5401 # Copy depcomp to subdir because otherwise we won't find it if we're
5402 # using a relative directory.
5403 cp "$am_depcomp" conftest.dir
5405 # We will build objects and dependencies in a subdirectory because
5406 # it helps to detect inapplicable dependency modes. For instance
5407 # both Tru64's cc and ICC support -MD to output dependencies as a
5408 # side effect of compilation, but ICC will put the dependencies in
5409 # the current directory while Tru64 will put them in the object
5413 am_cv_CC_dependencies_compiler_type=none
5414 if test "$am_compiler_list" = ""; then
5415 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5418 case " $depcc " in #(
5419 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5422 for depmode in $am_compiler_list; do
5423 # Setup a source with many dependencies, because some compilers
5424 # like to wrap large dependency lists on column 80 (with \), and
5425 # we should not choose a depcomp mode which is confused by this.
5427 # We need to recreate these files for each test, as the compiler may
5428 # overwrite some of them when testing with obscure command lines.
5429 # This happens at least with the AIX C compiler.
5431 for i in 1 2 3 4 5 6; do
5432 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5433 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
5434 # Solaris 8's {/usr,}/bin/sh.
5435 touch sub/conftst$i.h
5437 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5439 # We check with `-c' and `-o' for the sake of the "dashmstdout"
5440 # mode. It turns out that the SunPro C++ compiler does not properly
5441 # handle `-M -o', and we need to detect this. Also, some Intel
5442 # versions had trouble with output in subdirs
5443 am__obj=sub/conftest.${OBJEXT-o}
5444 am__minus_obj="-o $am__obj"
5447 # This depmode causes a compiler race in universal mode.
5448 test "$am__universal" = false || continue
5451 # after this tag, mechanisms are not by side-effect, so they'll
5452 # only be used when explicitly requested
5453 if test "x$enable_dependency_tracking" = xyes; then
5459 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5460 # This compiler won't grok `-c -o', but also, the minuso test has
5461 # not run yet. These depmodes are late enough in the game, and
5462 # so weak that their functioning should not be impacted.
5463 am__obj=conftest.${OBJEXT-o}
5468 if depmode=$depmode \
5469 source=sub/conftest.c object=$am__obj \
5470 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5471 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5472 >/dev/null 2>conftest.err &&
5473 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5474 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5475 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5476 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5477 # icc doesn't choke on unknown options, it will just issue warnings
5478 # or remarks (even with -Werror). So we grep stderr for any message
5479 # that says an option was ignored or not supported.
5480 # When given -MP, icc 7.0 and 7.1 complain thusly:
5481 # icc: Command line warning: ignoring option '-M'; no argument required
5482 # The diagnosis changed in icc 8.0:
5483 # icc: Command line remark: option '-MP' not supported
5484 if (grep 'ignoring option' conftest.err ||
5485 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5486 am_cv_CC_dependencies_compiler_type=$depmode
5495 am_cv_CC_dependencies_compiler_type=none
5499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5500 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5501 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5504 test "x$enable_dependency_tracking" != xno \
5505 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5507 am__fastdepCC_FALSE='#'
5509 am__fastdepCC_TRUE='#'
5510 am__fastdepCC_FALSE=
5515 ac_cpp='$CPP $CPPFLAGS'
5516 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5517 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5520 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5521 # On Suns, sometimes $CPP names a directory.
5522 if test -n "$CPP" && test -d "$CPP"; then
5525 if test -z "$CPP"; then
5526 if ${ac_cv_prog_CPP+:} false; then :
5527 $as_echo_n "(cached) " >&6
5529 # Double quotes because CPP needs to be expanded
5530 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5533 for ac_c_preproc_warn_flag in '' yes
5535 # Use a header file that comes with gcc, so configuring glibc
5536 # with a fresh cross-compiler works.
5537 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5538 # <limits.h> exists even on freestanding compilers.
5539 # On the NeXT, cc -E runs the code through the compiler's parser,
5540 # not just through cpp. "Syntax error" is here to catch this case.
5541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5542 /* end confdefs.h. */
5544 # include <limits.h>
5546 # include <assert.h>
5550 if ac_fn_c_try_cpp "$LINENO"; then :
5553 # Broken: fails on valid input.
5556 rm -f conftest.err conftest.i conftest.$ac_ext
5558 # OK, works on sane cases. Now check whether nonexistent headers
5559 # can be detected and how.
5560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5561 /* end confdefs.h. */
5562 #include <ac_nonexistent.h>
5564 if ac_fn_c_try_cpp "$LINENO"; then :
5565 # Broken: success on invalid input.
5568 # Passes both tests.
5572 rm -f conftest.err conftest.i conftest.$ac_ext
5575 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5576 rm -f conftest.i conftest.err conftest.$ac_ext
5577 if $ac_preproc_ok; then :
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5590 $as_echo "$CPP" >&6; }
5592 for ac_c_preproc_warn_flag in '' yes
5594 # Use a header file that comes with gcc, so configuring glibc
5595 # with a fresh cross-compiler works.
5596 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5597 # <limits.h> exists even on freestanding compilers.
5598 # On the NeXT, cc -E runs the code through the compiler's parser,
5599 # not just through cpp. "Syntax error" is here to catch this case.
5600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5601 /* end confdefs.h. */
5603 # include <limits.h>
5605 # include <assert.h>
5609 if ac_fn_c_try_cpp "$LINENO"; then :
5612 # Broken: fails on valid input.
5615 rm -f conftest.err conftest.i conftest.$ac_ext
5617 # OK, works on sane cases. Now check whether nonexistent headers
5618 # can be detected and how.
5619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5620 /* end confdefs.h. */
5621 #include <ac_nonexistent.h>
5623 if ac_fn_c_try_cpp "$LINENO"; then :
5624 # Broken: success on invalid input.
5627 # Passes both tests.
5631 rm -f conftest.err conftest.i conftest.$ac_ext
5634 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5635 rm -f conftest.i conftest.err conftest.$ac_ext
5636 if $ac_preproc_ok; then :
5639 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5641 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5642 See \`config.log' for more details" "$LINENO" 5; }
5646 ac_cpp='$CPP $CPPFLAGS'
5647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5655 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5656 if ${ac_cv_path_GREP+:} false; then :
5657 $as_echo_n "(cached) " >&6
5659 if test -z "$GREP"; then
5660 ac_path_GREP_found=false
5661 # Loop through the user's path and test for each of PROGNAME-LIST
5662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5666 test -z "$as_dir" && as_dir=.
5667 for ac_prog in grep ggrep; do
5668 for ac_exec_ext in '' $ac_executable_extensions; do
5669 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5670 as_fn_executable_p "$ac_path_GREP" || continue
5671 # Check for GNU ac_path_GREP and select it if it is found.
5672 # Check for GNU $ac_path_GREP
5673 case `"$ac_path_GREP" --version 2>&1` in
5675 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5678 $as_echo_n 0123456789 >"conftest.in"
5681 cat "conftest.in" "conftest.in" >"conftest.tmp"
5682 mv "conftest.tmp" "conftest.in"
5683 cp "conftest.in" "conftest.nl"
5684 $as_echo 'GREP' >> "conftest.nl"
5685 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5686 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5687 as_fn_arith $ac_count + 1 && ac_count=$as_val
5688 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5689 # Best one so far, save it but keep looking for a better one
5690 ac_cv_path_GREP="$ac_path_GREP"
5691 ac_path_GREP_max=$ac_count
5693 # 10*(2^10) chars as input seems more than enough
5694 test $ac_count -gt 10 && break
5696 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5699 $ac_path_GREP_found && break 3
5704 if test -z "$ac_cv_path_GREP"; then
5705 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5708 ac_cv_path_GREP=$GREP
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5713 $as_echo "$ac_cv_path_GREP" >&6; }
5714 GREP="$ac_cv_path_GREP"
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5718 $as_echo_n "checking for egrep... " >&6; }
5719 if ${ac_cv_path_EGREP+:} false; then :
5720 $as_echo_n "(cached) " >&6
5722 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5723 then ac_cv_path_EGREP="$GREP -E"
5725 if test -z "$EGREP"; then
5726 ac_path_EGREP_found=false
5727 # Loop through the user's path and test for each of PROGNAME-LIST
5728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5729 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5732 test -z "$as_dir" && as_dir=.
5733 for ac_prog in egrep; do
5734 for ac_exec_ext in '' $ac_executable_extensions; do
5735 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5736 as_fn_executable_p "$ac_path_EGREP" || continue
5737 # Check for GNU ac_path_EGREP and select it if it is found.
5738 # Check for GNU $ac_path_EGREP
5739 case `"$ac_path_EGREP" --version 2>&1` in
5741 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5744 $as_echo_n 0123456789 >"conftest.in"
5747 cat "conftest.in" "conftest.in" >"conftest.tmp"
5748 mv "conftest.tmp" "conftest.in"
5749 cp "conftest.in" "conftest.nl"
5750 $as_echo 'EGREP' >> "conftest.nl"
5751 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5752 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5753 as_fn_arith $ac_count + 1 && ac_count=$as_val
5754 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5755 # Best one so far, save it but keep looking for a better one
5756 ac_cv_path_EGREP="$ac_path_EGREP"
5757 ac_path_EGREP_max=$ac_count
5759 # 10*(2^10) chars as input seems more than enough
5760 test $ac_count -gt 10 && break
5762 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5765 $ac_path_EGREP_found && break 3
5770 if test -z "$ac_cv_path_EGREP"; then
5771 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5774 ac_cv_path_EGREP=$EGREP
5779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5780 $as_echo "$ac_cv_path_EGREP" >&6; }
5781 EGREP="$ac_cv_path_EGREP"
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5787 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5788 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5789 $as_echo_n "(cached) " >&6
5792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5793 /* end confdefs.h. */
5800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5801 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5802 gl_cv_c_amsterdam_compiler=yes
5804 gl_cv_c_amsterdam_compiler=no
5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5811 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5812 if test -z "$AR"; then
5813 if test $gl_cv_c_amsterdam_compiler = yes; then
5815 if test -z "$ARFLAGS"; then
5819 if test -n "$ac_tool_prefix"; then
5820 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5821 set dummy ${ac_tool_prefix}ar; ac_word=$2
5822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5823 $as_echo_n "checking for $ac_word... " >&6; }
5824 if ${ac_cv_prog_AR+:} false; then :
5825 $as_echo_n "(cached) " >&6
5827 if test -n "$AR"; then
5828 ac_cv_prog_AR="$AR" # Let the user override the test.
5830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5834 test -z "$as_dir" && as_dir=.
5835 for ac_exec_ext in '' $ac_executable_extensions; do
5836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5837 ac_cv_prog_AR="${ac_tool_prefix}ar"
5838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5848 if test -n "$AR"; then
5849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5850 $as_echo "$AR" >&6; }
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853 $as_echo "no" >&6; }
5858 if test -z "$ac_cv_prog_AR"; then
5860 # Extract the first word of "ar", so it can be a program name with args.
5861 set dummy ar; ac_word=$2
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5863 $as_echo_n "checking for $ac_word... " >&6; }
5864 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5865 $as_echo_n "(cached) " >&6
5867 if test -n "$ac_ct_AR"; then
5868 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874 test -z "$as_dir" && as_dir=.
5875 for ac_exec_ext in '' $ac_executable_extensions; do
5876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5877 ac_cv_prog_ac_ct_AR="ar"
5878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5887 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5888 if test -n "$ac_ct_AR"; then
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5890 $as_echo "$ac_ct_AR" >&6; }
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893 $as_echo "no" >&6; }
5896 if test "x$ac_ct_AR" = x; then
5899 case $cross_compiling:$ac_tool_warned in
5901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5902 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5903 ac_tool_warned=yes ;;
5911 if test -z "$ARFLAGS"; then
5916 if test -z "$ARFLAGS"; then
5922 if test -z "$RANLIB"; then
5923 if test $gl_cv_c_amsterdam_compiler = yes; then
5926 if test -n "$ac_tool_prefix"; then
5927 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5928 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5930 $as_echo_n "checking for $ac_word... " >&6; }
5931 if ${ac_cv_prog_RANLIB+:} false; then :
5932 $as_echo_n "(cached) " >&6
5934 if test -n "$RANLIB"; then
5935 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941 test -z "$as_dir" && as_dir=.
5942 for ac_exec_ext in '' $ac_executable_extensions; do
5943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5944 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5954 RANLIB=$ac_cv_prog_RANLIB
5955 if test -n "$RANLIB"; then
5956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5957 $as_echo "$RANLIB" >&6; }
5959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960 $as_echo "no" >&6; }
5965 if test -z "$ac_cv_prog_RANLIB"; then
5966 ac_ct_RANLIB=$RANLIB
5967 # Extract the first word of "ranlib", so it can be a program name with args.
5968 set dummy ranlib; ac_word=$2
5969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5970 $as_echo_n "checking for $ac_word... " >&6; }
5971 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5972 $as_echo_n "(cached) " >&6
5974 if test -n "$ac_ct_RANLIB"; then
5975 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5981 test -z "$as_dir" && as_dir=.
5982 for ac_exec_ext in '' $ac_executable_extensions; do
5983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5984 ac_cv_prog_ac_ct_RANLIB="ranlib"
5985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5995 if test -n "$ac_ct_RANLIB"; then
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5997 $as_echo "$ac_ct_RANLIB" >&6; }
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000 $as_echo "no" >&6; }
6003 if test "x$ac_ct_RANLIB" = x; then
6006 case $cross_compiling:$ac_tool_warned in
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6009 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6010 ac_tool_warned=yes ;;
6012 RANLIB=$ac_ct_RANLIB
6015 RANLIB="$ac_cv_prog_RANLIB"
6022 if test "x$CC" != xcc; then
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
6024 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
6027 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
6029 set dummy $CC; ac_cc=`$as_echo "$2" |
6030 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
6031 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
6032 $as_echo_n "(cached) " >&6
6034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6035 /* end confdefs.h. */
6045 # Make sure it works both with $CC and with simple cc.
6046 # We do the test twice because some compilers refuse to overwrite an
6047 # existing .o file with -o, though they will create one.
6048 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
6050 if { { case "(($ac_try" in
6051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6052 *) ac_try_echo=$ac_try;;
6054 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6055 $as_echo "$ac_try_echo"; } >&5
6056 (eval "$ac_try") 2>&5
6058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6059 test $ac_status = 0; } &&
6060 test -f conftest2.$ac_objext && { { case "(($ac_try" in
6061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6062 *) ac_try_echo=$ac_try;;
6064 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6065 $as_echo "$ac_try_echo"; } >&5
6066 (eval "$ac_try") 2>&5
6068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6069 test $ac_status = 0; };
6071 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
6072 if test "x$CC" != xcc; then
6073 # Test first that cc exists at all.
6074 if { ac_try='cc -c conftest.$ac_ext >&5'
6075 { { case "(($ac_try" in
6076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6077 *) ac_try_echo=$ac_try;;
6079 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6080 $as_echo "$ac_try_echo"; } >&5
6081 (eval "$ac_try") 2>&5
6083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6084 test $ac_status = 0; }; }; then
6085 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
6087 if { { case "(($ac_try" in
6088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6089 *) ac_try_echo=$ac_try;;
6091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6092 $as_echo "$ac_try_echo"; } >&5
6093 (eval "$ac_try") 2>&5
6095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6096 test $ac_status = 0; } &&
6097 test -f conftest2.$ac_objext && { { case "(($ac_try" in
6098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099 *) ac_try_echo=$ac_try;;
6101 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
6102 $as_echo "$ac_try_echo"; } >&5
6103 (eval "$ac_try") 2>&5
6105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6106 test $ac_status = 0; };
6111 # cc exists but doesn't like -o.
6112 eval ac_cv_prog_cc_${ac_cc}_c_o=no
6117 eval ac_cv_prog_cc_${ac_cc}_c_o=no
6119 rm -f core conftest*
6122 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6124 $as_echo "yes" >&6; }
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127 $as_echo "no" >&6; }
6129 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
6133 # FIXME: we rely on the cache variable name because
6134 # there is no other way.
6136 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
6137 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
6138 if test "$am_t" != yes; then
6139 # Losing compiler, so override with the script.
6140 # FIXME: It is wrong to rewrite CC.
6141 # But if we don't then we get into trouble of one sort or another.
6142 # A longer-term fix would be to have automake use am__CC in this case,
6143 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
6144 CC="$am_aux_dir/compile $CC"
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6149 $as_echo_n "checking for ANSI C header files... " >&6; }
6150 if ${ac_cv_header_stdc+:} false; then :
6151 $as_echo_n "(cached) " >&6
6153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6154 /* end confdefs.h. */
6168 if ac_fn_c_try_compile "$LINENO"; then :
6169 ac_cv_header_stdc=yes
6171 ac_cv_header_stdc=no
6173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6175 if test $ac_cv_header_stdc = yes; then
6176 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178 /* end confdefs.h. */
6182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6183 $EGREP "memchr" >/dev/null 2>&1; then :
6186 ac_cv_header_stdc=no
6192 if test $ac_cv_header_stdc = yes; then
6193 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6195 /* end confdefs.h. */
6199 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6200 $EGREP "free" >/dev/null 2>&1; then :
6203 ac_cv_header_stdc=no
6209 if test $ac_cv_header_stdc = yes; then
6210 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6211 if test "$cross_compiling" = yes; then :
6214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6215 /* end confdefs.h. */
6218 #if ((' ' & 0x0FF) == 0x020)
6219 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6220 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6222 # define ISLOWER(c) \
6223 (('a' <= (c) && (c) <= 'i') \
6224 || ('j' <= (c) && (c) <= 'r') \
6225 || ('s' <= (c) && (c) <= 'z'))
6226 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6229 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6234 for (i = 0; i < 256; i++)
6235 if (XOR (islower (i), ISLOWER (i))
6236 || toupper (i) != TOUPPER (i))
6241 if ac_fn_c_try_run "$LINENO"; then :
6244 ac_cv_header_stdc=no
6246 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6247 conftest.$ac_objext conftest.beam conftest.$ac_ext
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6253 $as_echo "$ac_cv_header_stdc" >&6; }
6254 if test $ac_cv_header_stdc = yes; then
6256 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6260 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6261 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6262 inttypes.h stdint.h unistd.h
6264 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6265 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6267 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6268 cat >>confdefs.h <<_ACEOF
6269 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6278 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6279 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6286 if test "$MINIX" = yes; then
6288 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6291 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6294 $as_echo "#define _MINIX 1" >>confdefs.h
6297 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6303 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6304 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6305 $as_echo_n "(cached) " >&6
6307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h. */
6310 # define __EXTENSIONS__ 1
6311 $ac_includes_default
6320 if ac_fn_c_try_compile "$LINENO"; then :
6321 ac_cv_safe_to_define___extensions__=yes
6323 ac_cv_safe_to_define___extensions__=no
6325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6328 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6329 test $ac_cv_safe_to_define___extensions__ = yes &&
6330 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6332 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6334 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6336 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6338 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6340 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6343 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6344 if ${ac_cv_should_define__xopen_source+:} false; then :
6345 $as_echo_n "(cached) " >&6
6347 ac_cv_should_define__xopen_source=no
6348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6349 /* end confdefs.h. */
6361 if ac_fn_c_try_compile "$LINENO"; then :
6364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6365 /* end confdefs.h. */
6367 #define _XOPEN_SOURCE 500
6378 if ac_fn_c_try_compile "$LINENO"; then :
6379 ac_cv_should_define__xopen_source=yes
6381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6386 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6387 test $ac_cv_should_define__xopen_source = yes &&
6388 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6398 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6399 if ${ac_cv_sys_largefile_source+:} false; then :
6400 $as_echo_n "(cached) " >&6
6403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6404 /* end confdefs.h. */
6405 #include <sys/types.h> /* for off_t */
6410 int (*fp) (FILE *, off_t, int) = fseeko;
6411 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6416 if ac_fn_c_try_link "$LINENO"; then :
6417 ac_cv_sys_largefile_source=no; break
6419 rm -f core conftest.err conftest.$ac_objext \
6420 conftest$ac_exeext conftest.$ac_ext
6421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6422 /* end confdefs.h. */
6423 #define _LARGEFILE_SOURCE 1
6424 #include <sys/types.h> /* for off_t */
6429 int (*fp) (FILE *, off_t, int) = fseeko;
6430 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6435 if ac_fn_c_try_link "$LINENO"; then :
6436 ac_cv_sys_largefile_source=1; break
6438 rm -f core conftest.err conftest.$ac_objext \
6439 conftest$ac_exeext conftest.$ac_ext
6440 ac_cv_sys_largefile_source=unknown
6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6445 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6446 case $ac_cv_sys_largefile_source in #(
6449 cat >>confdefs.h <<_ACEOF
6450 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6456 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6457 # in glibc 2.1.3, but that breaks too many other things.
6458 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6459 if test $ac_cv_sys_largefile_source != unknown; then
6461 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6468 # IEEE behaviour is the default on all CPUs except Alpha and SH
6469 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6470 # and the GCC 4.1.2 manual).
6473 # On Alpha systems, a compiler option provides the behaviour.
6474 # See the ieee(3) manual page, also available at
6475 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
6476 if test -n "$GCC"; then
6477 # GCC has the option -mieee.
6478 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6479 CPPFLAGS="$CPPFLAGS -mieee"
6481 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6482 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6483 CPPFLAGS="$CPPFLAGS -ieee"
6487 if test -n "$GCC"; then
6488 # GCC has the option -mieee.
6489 CPPFLAGS="$CPPFLAGS -mieee"
6494 # Check whether --enable-largefile was given.
6495 if test "${enable_largefile+set}" = set; then :
6496 enableval=$enable_largefile;
6499 if test "$enable_largefile" != no; then
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6502 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6503 if ${ac_cv_sys_largefile_CC+:} false; then :
6504 $as_echo_n "(cached) " >&6
6506 ac_cv_sys_largefile_CC=no
6507 if test "$GCC" != yes; then
6510 # IRIX 6.2 and later do not support large files by default,
6511 # so use the C compiler's -n32 option if that helps.
6512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6513 /* end confdefs.h. */
6514 #include <sys/types.h>
6515 /* Check that off_t can represent 2**63 - 1 correctly.
6516 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6517 since some C++ compilers masquerading as C compilers
6518 incorrectly reject 9223372036854775807. */
6519 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6520 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6521 && LARGE_OFF_T % 2147483647 == 1)
6531 if ac_fn_c_try_compile "$LINENO"; then :
6534 rm -f core conftest.err conftest.$ac_objext
6536 if ac_fn_c_try_compile "$LINENO"; then :
6537 ac_cv_sys_largefile_CC=' -n32'; break
6539 rm -f core conftest.err conftest.$ac_objext
6543 rm -f conftest.$ac_ext
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6547 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6548 if test "$ac_cv_sys_largefile_CC" != no; then
6549 CC=$CC$ac_cv_sys_largefile_CC
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6553 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6554 if ${ac_cv_sys_file_offset_bits+:} false; then :
6555 $as_echo_n "(cached) " >&6
6558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6559 /* end confdefs.h. */
6560 #include <sys/types.h>
6561 /* Check that off_t can represent 2**63 - 1 correctly.
6562 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6563 since some C++ compilers masquerading as C compilers
6564 incorrectly reject 9223372036854775807. */
6565 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6566 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6567 && LARGE_OFF_T % 2147483647 == 1)
6577 if ac_fn_c_try_compile "$LINENO"; then :
6578 ac_cv_sys_file_offset_bits=no; break
6580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6582 /* end confdefs.h. */
6583 #define _FILE_OFFSET_BITS 64
6584 #include <sys/types.h>
6585 /* Check that off_t can represent 2**63 - 1 correctly.
6586 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6587 since some C++ compilers masquerading as C compilers
6588 incorrectly reject 9223372036854775807. */
6589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6590 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6591 && LARGE_OFF_T % 2147483647 == 1)
6601 if ac_fn_c_try_compile "$LINENO"; then :
6602 ac_cv_sys_file_offset_bits=64; break
6604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6605 ac_cv_sys_file_offset_bits=unknown
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6610 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6611 case $ac_cv_sys_file_offset_bits in #(
6614 cat >>confdefs.h <<_ACEOF
6615 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6620 if test $ac_cv_sys_file_offset_bits = unknown; then
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6622 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6623 if ${ac_cv_sys_large_files+:} false; then :
6624 $as_echo_n "(cached) " >&6
6627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6628 /* end confdefs.h. */
6629 #include <sys/types.h>
6630 /* Check that off_t can represent 2**63 - 1 correctly.
6631 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6632 since some C++ compilers masquerading as C compilers
6633 incorrectly reject 9223372036854775807. */
6634 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6635 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6636 && LARGE_OFF_T % 2147483647 == 1)
6646 if ac_fn_c_try_compile "$LINENO"; then :
6647 ac_cv_sys_large_files=no; break
6649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6651 /* end confdefs.h. */
6652 #define _LARGE_FILES 1
6653 #include <sys/types.h>
6654 /* Check that off_t can represent 2**63 - 1 correctly.
6655 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6656 since some C++ compilers masquerading as C compilers
6657 incorrectly reject 9223372036854775807. */
6658 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6659 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6660 && LARGE_OFF_T % 2147483647 == 1)
6670 if ac_fn_c_try_compile "$LINENO"; then :
6671 ac_cv_sys_large_files=1; break
6673 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6674 ac_cv_sys_large_files=unknown
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6679 $as_echo "$ac_cv_sys_large_files" >&6; }
6680 case $ac_cv_sys_large_files in #(
6683 cat >>confdefs.h <<_ACEOF
6684 #define _LARGE_FILES $ac_cv_sys_large_files
6692 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6696 case $ac_cv_prog_cc_stdc in #(
6698 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6701 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6702 if ${ac_cv_prog_cc_c99+:} false; then :
6703 $as_echo_n "(cached) " >&6
6705 ac_cv_prog_cc_c99=no
6707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6708 /* end confdefs.h. */
6710 #include <stdbool.h>
6715 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6716 #define debug(...) fprintf (stderr, __VA_ARGS__)
6717 #define showlist(...) puts (#__VA_ARGS__)
6718 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6720 test_varargs_macros (void)
6725 debug ("X = %d\n", x);
6726 showlist (The first, second, and third items.);
6727 report (x>y, "x is %d but y is %d", x, y);
6730 // Check long long types.
6731 #define BIG64 18446744073709551615ull
6732 #define BIG32 4294967295ul
6733 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6735 your preprocessor is broken;
6739 your preprocessor is broken;
6741 static long long int bignum = -9223372036854775807LL;
6742 static unsigned long long int ubignum = BIG64;
6744 struct incomplete_array
6752 const wchar_t *name;
6756 typedef const char *ccp;
6759 test_restrict (ccp restrict text)
6761 // See if C++-style comments work.
6762 // Iterate through items via the restricted pointer.
6763 // Also check for declarations in for loops.
6764 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6769 // Check varargs and va_copy.
6771 test_varargs (const char *format, ...)
6774 va_start (args, format);
6776 va_copy (args_copy, args);
6787 str = va_arg (args_copy, const char *);
6790 number = va_arg (args_copy, int);
6793 fnumber = va_arg (args_copy, double);
6808 _Bool success = false;
6811 if (test_restrict ("String literal") == 0)
6813 char *restrict newvar = "Another string";
6816 test_varargs ("s, d' f .", "string", 65, 34.234);
6817 test_varargs_macros ();
6819 // Check flexible array members.
6820 struct incomplete_array *ia =
6821 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6823 for (int i = 0; i < ia->datasize; ++i)
6824 ia->data[i] = i * 1.234;
6826 // Check named initializers.
6827 struct named_init ni = {
6829 .name = L"Test wide string",
6830 .average = 543.34343,
6835 int dynamic_array[ni.number];
6836 dynamic_array[ni.number - 1] = 543;
6838 // work around unused variable warnings
6839 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6840 || dynamic_array[ni.number - 1] != 543);
6846 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6848 CC="$ac_save_CC $ac_arg"
6849 if ac_fn_c_try_compile "$LINENO"; then :
6850 ac_cv_prog_cc_c99=$ac_arg
6852 rm -f core conftest.err conftest.$ac_objext
6853 test "x$ac_cv_prog_cc_c99" != "xno" && break
6855 rm -f conftest.$ac_ext
6860 case "x$ac_cv_prog_cc_c99" in
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6863 $as_echo "none needed" >&6; } ;;
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6866 $as_echo "unsupported" >&6; } ;;
6868 CC="$CC $ac_cv_prog_cc_c99"
6869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6870 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6872 if test "x$ac_cv_prog_cc_c99" != xno; then :
6873 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6876 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6877 if ${ac_cv_prog_cc_c89+:} false; then :
6878 $as_echo_n "(cached) " >&6
6880 ac_cv_prog_cc_c89=no
6882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6883 /* end confdefs.h. */
6887 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6888 struct buf { int x; };
6889 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6890 static char *e (p, i)
6896 static char *f (char * (*g) (char **, int), char **p, ...)
6901 s = g (p, va_arg (v,int));
6906 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6907 function prototypes and stuff, but not '\xHH' hex character constants.
6908 These don't provoke an error unfortunately, instead are silently treated
6909 as 'x'. The following induces an error, until -std is added to get
6910 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6911 array size at least. It's necessary to write '\x00'==0 to get something
6912 that's true only with -std. */
6913 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6915 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6916 inside strings and character constants. */
6918 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6920 int test (int i, double x);
6921 struct s1 {int (*f) (int a);};
6922 struct s2 {int (*f) (double a);};
6923 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6929 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6934 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6935 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6937 CC="$ac_save_CC $ac_arg"
6938 if ac_fn_c_try_compile "$LINENO"; then :
6939 ac_cv_prog_cc_c89=$ac_arg
6941 rm -f core conftest.err conftest.$ac_objext
6942 test "x$ac_cv_prog_cc_c89" != "xno" && break
6944 rm -f conftest.$ac_ext
6949 case "x$ac_cv_prog_cc_c89" in
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6952 $as_echo "none needed" >&6; } ;;
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6955 $as_echo "unsupported" >&6; } ;;
6957 CC="$CC $ac_cv_prog_cc_c89"
6958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6959 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6961 if test "x$ac_cv_prog_cc_c89" != xno; then :
6962 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6964 ac_cv_prog_cc_stdc=no
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6971 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6972 if ${ac_cv_prog_cc_stdc+:} false; then :
6973 $as_echo_n "(cached) " >&6
6976 case $ac_cv_prog_cc_stdc in #(
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6979 $as_echo "unsupported" >&6; } ;; #(
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6982 $as_echo "none needed" >&6; } ;; #(
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6985 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6993 # Check whether --enable-threads was given.
6994 if test "${enable_threads+set}" = set; then :
6995 enableval=$enable_threads; gl_use_threads=$enableval
6997 if test -n "$gl_use_threads_default"; then
6998 gl_use_threads="$gl_use_threads_default"
7001 osf*) gl_use_threads=no ;;
7004 1.[0-5].*) gl_use_threads=no ;;
7005 *) gl_use_threads=yes ;;
7008 *) gl_use_threads=yes ;;
7014 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
7015 # For using <pthread.h>:
7018 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
7019 # groks <pthread.h>. cc also understands the flag -pthread, but
7020 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
7021 # 2. putting a flag into CPPFLAGS that has an effect on the linker
7022 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
7023 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
7024 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
7027 # Some systems optimize for single-threaded programs by default, and
7028 # need special flags to disable these optimizations. For example, the
7029 # definition of 'errno' in <errno.h>.
7031 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
7032 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
7039 # Code from module absolute-header:
7040 # Code from module accept:
7041 # Code from module accept-tests:
7042 # Code from module alloca:
7043 # Code from module alloca-opt:
7044 # Code from module alloca-opt-tests:
7045 # Code from module allocator:
7046 # Code from module areadlink:
7047 # Code from module areadlink-tests:
7048 # Code from module areadlink-with-size:
7049 # Code from module areadlink-with-size-tests:
7050 # Code from module areadlinkat:
7051 # Code from module areadlinkat-tests:
7052 # Code from module argmatch:
7053 # Code from module argmatch-tests:
7054 # Code from module arpa_inet:
7055 # Code from module arpa_inet-tests:
7056 # Code from module assert:
7057 # Code from module at-internal:
7058 # Code from module binary-io:
7059 # Code from module binary-io-tests:
7060 # Code from module bind:
7061 # Code from module bind-tests:
7062 # Code from module bitrotate:
7063 # Code from module bitrotate-tests:
7064 # Code from module btowc:
7065 # Code from module btowc-tests:
7066 # Code from module byteswap:
7067 # Code from module byteswap-tests:
7068 # Code from module c-ctype:
7069 # Code from module c-ctype-tests:
7070 # Code from module c-strcase:
7071 # Code from module c-strcase-tests:
7072 # Code from module c-strcaseeq:
7073 # Code from module c-strcasestr:
7074 # Code from module c-strcasestr-tests:
7075 # Code from module c-strstr:
7076 # Code from module c-strstr-tests:
7077 # Code from module canonicalize:
7078 # Code from module canonicalize-tests:
7079 # Code from module careadlinkat:
7080 # Code from module chdir:
7081 # Code from module chdir-long:
7082 # Code from module chdir-tests:
7083 # Code from module clock-time:
7084 # Code from module cloexec:
7085 # Code from module cloexec-tests:
7086 # Code from module close:
7087 # Code from module close-stream:
7088 # Code from module close-tests:
7089 # Code from module closedir:
7090 # Code from module closein:
7091 # Code from module closein-tests:
7092 # Code from module closeout:
7093 # Code from module configmake:
7094 # Code from module connect:
7095 # Code from module connect-tests:
7096 # Code from module ctype:
7097 # Code from module ctype-tests:
7098 # Code from module cycle-check:
7099 # Code from module d-ino:
7100 # Code from module d-type:
7101 # Code from module dev-ino:
7102 # Code from module dirent:
7103 # Code from module dirent-safer:
7104 # Code from module dirent-safer-tests:
7105 # Code from module dirent-tests:
7106 # Code from module dirfd:
7107 # Code from module dirname:
7108 # Code from module dirname-lgpl:
7109 # Code from module dirname-tests:
7110 # Code from module dosname:
7111 # Code from module double-slash-root:
7112 # Code from module dup:
7113 # Code from module dup-tests:
7114 # Code from module dup2:
7115 # Code from module dup2-tests:
7116 # Code from module environ:
7117 # Code from module environ-tests:
7118 # Code from module errno:
7119 # Code from module errno-tests:
7120 # Code from module error:
7121 # Code from module euidaccess:
7122 # Code from module exitfail:
7123 # Code from module extensions:
7125 # Code from module extern-inline:
7126 # Code from module faccessat:
7127 # Code from module faccessat-tests:
7128 # Code from module fchdir:
7129 # Code from module fchdir-tests:
7130 # Code from module fcntl:
7131 # Code from module fcntl-h:
7132 # Code from module fcntl-h-tests:
7133 # Code from module fcntl-safer:
7134 # Code from module fcntl-safer-tests:
7135 # Code from module fcntl-tests:
7136 # Code from module fd-hook:
7137 # Code from module fd-safer-flag:
7138 # Code from module fdl:
7139 # Code from module fdopen:
7140 # Code from module fdopen-tests:
7141 # Code from module fdopendir:
7142 # Code from module fdopendir-tests:
7143 # Code from module fflush:
7145 # Code from module fflush-tests:
7146 # Code from module fgetc-tests:
7147 # Code from module file-set:
7148 # Code from module fileblocks:
7149 # Code from module filemode:
7150 # Code from module filename:
7151 # Code from module filenamecat-lgpl:
7152 # Code from module flexmember:
7153 # Code from module float:
7154 # Code from module float-tests:
7155 # Code from module fnmatch:
7156 # Code from module fnmatch-gnu:
7157 # Code from module fnmatch-tests:
7158 # Code from module fopen:
7159 # Code from module fopen-safer:
7160 # Code from module fopen-safer-tests:
7161 # Code from module fopen-tests:
7162 # Code from module fpending:
7163 # Code from module fpending-tests:
7164 # Code from module fpieee:
7166 # Code from module fpucw:
7167 # Code from module fpurge:
7168 # Code from module fpurge-tests:
7169 # Code from module fputc-tests:
7170 # Code from module fread-tests:
7171 # Code from module freadahead:
7172 # Code from module freadahead-tests:
7173 # Code from module freading:
7174 # Code from module freading-tests:
7175 # Code from module fseek:
7176 # Code from module fseek-tests:
7177 # Code from module fseeko:
7179 # Code from module fseeko-tests:
7180 # Code from module fstat:
7181 # Code from module fstat-tests:
7182 # Code from module fstatat:
7183 # Code from module fstatat-tests:
7184 # Code from module ftell:
7185 # Code from module ftell-tests:
7186 # Code from module ftello:
7188 # Code from module ftello-tests:
7189 # Code from module ftruncate:
7190 # Code from module ftruncate-tests:
7191 # Code from module fts:
7192 # Code from module fwrite-tests:
7193 # Code from module getcwd:
7194 # Code from module getcwd-lgpl:
7195 # Code from module getcwd-lgpl-tests:
7196 # Code from module getcwd-tests:
7197 # Code from module getdelim:
7198 # Code from module getdelim-tests:
7199 # Code from module getdtablesize:
7200 # Code from module getdtablesize-tests:
7201 # Code from module getgroups:
7202 # Code from module getgroups-tests:
7203 # Code from module gethostname:
7204 # Code from module gethostname-tests:
7205 # Code from module getline:
7206 # Code from module getline-tests:
7207 # Code from module getopt-gnu:
7208 # Code from module getopt-posix:
7209 # Code from module getopt-posix-tests:
7210 # Code from module getpagesize:
7211 # Code from module gettext:
7212 # Code from module gettext-h:
7213 # Code from module gettime:
7214 # Code from module gettimeofday:
7215 # Code from module gettimeofday-tests:
7216 # Code from module gnumakefile:
7217 # Code from module gpl-3.0:
7218 # Code from module group-member:
7219 # Code from module hash:
7220 # Code from module hash-pjw:
7221 # Code from module hash-tests:
7222 # Code from module hash-triple:
7223 # Code from module havelib:
7224 # Code from module human:
7225 # Code from module i-ring:
7226 # Code from module i-ring-tests:
7227 # Code from module idcache:
7228 # Code from module ignore-value:
7229 # Code from module ignore-value-tests:
7230 # Code from module include_next:
7231 # Code from module inet_pton:
7232 # Code from module inet_pton-tests:
7233 # Code from module inline:
7234 # Code from module intprops:
7235 # Code from module intprops-tests:
7236 # Code from module inttostr:
7237 # Code from module inttostr-tests:
7238 # Code from module inttypes:
7239 # Code from module inttypes-incomplete:
7240 # Code from module inttypes-tests:
7241 # Code from module ioctl:
7242 # Code from module ioctl-tests:
7243 # Code from module isblank:
7244 # Code from module isblank-tests:
7245 # Code from module isfinite:
7246 # Code from module isfinite-tests:
7247 # Code from module isinf:
7248 # Code from module isinf-tests:
7249 # Code from module isnand-nolibm:
7250 # Code from module isnand-nolibm-tests:
7251 # Code from module isnanf-nolibm:
7252 # Code from module isnanf-nolibm-tests:
7253 # Code from module isnanl-nolibm:
7254 # Code from module isnanl-nolibm-tests:
7255 # Code from module iswblank:
7256 # Code from module iswblank-tests:
7257 # Code from module langinfo:
7258 # Code from module langinfo-tests:
7259 # Code from module largefile:
7261 # Code from module listen:
7262 # Code from module listen-tests:
7263 # Code from module localcharset:
7264 # Code from module locale:
7265 # Code from module locale-tests:
7266 # Code from module localeconv:
7267 # Code from module localeconv-tests:
7268 # Code from module localename:
7269 # Code from module localename-tests:
7270 # Code from module lock:
7271 # Code from module lock-tests:
7272 # Code from module lseek:
7273 # Code from module lseek-tests:
7274 # Code from module lstat:
7275 # Code from module lstat-tests:
7276 # Code from module maintainer-makefile:
7277 # Code from module malloc:
7278 # Code from module malloc-gnu:
7279 # Code from module malloc-gnu-tests:
7280 # Code from module malloc-posix:
7281 # Code from module malloca:
7282 # Code from module malloca-tests:
7283 # Code from module manywarnings:
7284 # Code from module math:
7285 # Code from module math-tests:
7286 # Code from module mbchar:
7287 # Code from module mbrtowc:
7288 # Code from module mbrtowc-tests:
7289 # Code from module mbscasestr:
7290 # Code from module mbscasestr-tests:
7291 # Code from module mbsinit:
7292 # Code from module mbsinit-tests:
7293 # Code from module mbslen:
7294 # Code from module mbsrtowcs:
7295 # Code from module mbsrtowcs-tests:
7296 # Code from module mbsstr:
7297 # Code from module mbsstr-tests:
7298 # Code from module mbtowc:
7299 # Code from module mbuiter:
7300 # Code from module memchr:
7301 # Code from module memchr-tests:
7302 # Code from module mempcpy:
7303 # Code from module memrchr:
7304 # Code from module memrchr-tests:
7305 # Code from module mktime:
7306 # Code from module modechange:
7307 # Code from module modf:
7308 # Code from module modf-tests:
7309 # Code from module mountlist:
7310 # Code from module msvc-inval:
7311 # Code from module msvc-nothrow:
7312 # Code from module multiarch:
7313 # Code from module nanosleep:
7314 # Code from module nanosleep-tests:
7315 # Code from module netinet_in:
7316 # Code from module netinet_in-tests:
7317 # Code from module nl_langinfo:
7318 # Code from module nl_langinfo-tests:
7319 # Code from module nocrash:
7320 # Code from module open:
7321 # Code from module open-tests:
7322 # Code from module openat:
7323 # Code from module openat-die:
7324 # Code from module openat-h:
7325 # Code from module openat-safer:
7326 # Code from module openat-safer-tests:
7327 # Code from module openat-tests:
7328 # Code from module opendir:
7329 # Code from module parse-datetime:
7330 # Code from module parse-datetime-tests:
7331 # Code from module pathmax:
7332 # Code from module pathmax-tests:
7333 # Code from module perror:
7334 # Code from module perror-tests:
7335 # Code from module pipe-posix:
7336 # Code from module pipe-posix-tests:
7337 # Code from module priv-set:
7338 # Code from module priv-set-tests:
7339 # Code from module progname:
7340 # Code from module putenv:
7341 # Code from module quote:
7342 # Code from module quotearg:
7343 # Code from module quotearg-simple:
7344 # Code from module quotearg-simple-tests:
7345 # Code from module raise:
7346 # Code from module raise-tests:
7347 # Code from module read:
7348 # Code from module read-tests:
7349 # Code from module readdir:
7350 # Code from module readlink:
7351 # Code from module readlink-tests:
7352 # Code from module readlinkat:
7353 # Code from module readlinkat-tests:
7354 # Code from module realloc:
7355 # Code from module realloc-gnu:
7356 # Code from module realloc-gnu-tests:
7357 # Code from module realloc-posix:
7358 # Code from module regex:
7359 # Code from module regex-tests:
7360 # Code from module rewinddir:
7361 # Code from module rmdir:
7362 # Code from module rmdir-tests:
7363 # Code from module root-uid:
7364 # Code from module rpmatch:
7365 # Code from module safe-read:
7366 # Code from module same:
7367 # Code from module same-inode:
7368 # Code from module save-cwd:
7369 # Code from module savedir:
7370 # Code from module select:
7371 # Code from module select-tests:
7372 # Code from module selinux-at:
7373 # Code from module selinux-h:
7374 # Code from module setenv:
7375 # Code from module setenv-tests:
7376 # Code from module setlocale:
7377 # Code from module setlocale-tests:
7378 # Code from module setsockopt:
7379 # Code from module setsockopt-tests:
7380 # Code from module sigaction:
7381 # Code from module sigaction-tests:
7382 # Code from module signal-h:
7383 # Code from module signal-h-tests:
7384 # Code from module sigprocmask:
7385 # Code from module sigprocmask-tests:
7386 # Code from module size_max:
7387 # Code from module sleep:
7388 # Code from module sleep-tests:
7389 # Code from module snippet/_Noreturn:
7390 # Code from module snippet/arg-nonnull:
7391 # Code from module snippet/c++defs:
7392 # Code from module snippet/unused-parameter:
7393 # Code from module snippet/warn-on-use:
7394 # Code from module snprintf:
7395 # Code from module snprintf-tests:
7396 # Code from module socket:
7397 # Code from module socketlib:
7398 # Code from module sockets:
7399 # Code from module sockets-tests:
7400 # Code from module socklen:
7401 # Code from module ssize_t:
7402 # Code from module stat:
7403 # Code from module stat-macros:
7404 # Code from module stat-size:
7405 # Code from module stat-tests:
7406 # Code from module stat-time:
7407 # Code from module stat-time-tests:
7408 # Code from module statat:
7409 # Code from module statat-tests:
7410 # Code from module stdalign:
7411 # Code from module stdalign-tests:
7412 # Code from module stdarg:
7416 # Code from module stdbool:
7417 # Code from module stdbool-tests:
7418 # Code from module stddef:
7419 # Code from module stddef-tests:
7420 # Code from module stdint:
7421 # Code from module stdint-tests:
7422 # Code from module stdio:
7423 # Code from module stdio-tests:
7424 # Code from module stdlib:
7425 # Code from module stdlib-tests:
7426 # Code from module stpcpy:
7427 # Code from module strcase:
7428 # Code from module strcasestr:
7429 # Code from module strcasestr-simple:
7430 # Code from module strcasestr-tests:
7431 # Code from module strdup-posix:
7432 # Code from module streq:
7433 # Code from module strerror:
7434 # Code from module strerror-override:
7435 # Code from module strerror-tests:
7436 # Code from module strerror_r-posix:
7437 # Code from module strerror_r-posix-tests:
7438 # Code from module strftime:
7439 # Code from module strftime-tests:
7440 # Code from module string:
7441 # Code from module string-tests:
7442 # Code from module strings:
7443 # Code from module strings-tests:
7444 # Code from module strndup:
7445 # Code from module strnlen:
7446 # Code from module strnlen-tests:
7447 # Code from module strnlen1:
7448 # Code from module strstr:
7449 # Code from module strstr-simple:
7450 # Code from module strstr-tests:
7451 # Code from module strtol:
7452 # Code from module strtol-tests:
7453 # Code from module strtoul:
7454 # Code from module strtoul-tests:
7455 # Code from module strtoull:
7456 # Code from module strtoull-tests:
7457 # Code from module strtoumax:
7458 # Code from module strtoumax-tests:
7459 # Code from module symlink:
7460 # Code from module symlink-tests:
7461 # Code from module symlinkat:
7462 # Code from module symlinkat-tests:
7463 # Code from module sys_ioctl:
7464 # Code from module sys_ioctl-tests:
7465 # Code from module sys_select:
7466 # Code from module sys_select-tests:
7467 # Code from module sys_socket:
7468 # Code from module sys_socket-tests:
7469 # Code from module sys_stat:
7470 # Code from module sys_stat-tests:
7471 # Code from module sys_time:
7472 # Code from module sys_time-tests:
7473 # Code from module sys_types:
7474 # Code from module sys_types-tests:
7475 # Code from module sys_uio:
7476 # Code from module sys_uio-tests:
7477 # Code from module sys_utsname:
7478 # Code from module sys_utsname-tests:
7479 # Code from module sys_wait:
7480 # Code from module sys_wait-tests:
7481 # Code from module test-framework-sh:
7482 # Code from module test-framework-sh-tests:
7483 # Code from module thread:
7484 # Code from module thread-tests:
7485 # Code from module threadlib:
7489 # Code from module time:
7490 # Code from module time-tests:
7491 # Code from module time_r:
7492 # Code from module timespec:
7493 # Code from module trunc:
7494 # Code from module trunc-tests:
7495 # Code from module uname:
7496 # Code from module uname-tests:
7497 # Code from module unistd:
7498 # Code from module unistd-safer:
7499 # Code from module unistd-safer-tests:
7500 # Code from module unistd-tests:
7501 # Code from module unitypes:
7502 # Code from module uniwidth/base:
7503 # Code from module uniwidth/width:
7504 # Code from module uniwidth/width-tests:
7505 # Code from module unlink:
7506 # Code from module unlink-tests:
7507 # Code from module unlinkat:
7508 # Code from module unlinkat-tests:
7509 # Code from module unlinkdir:
7510 # Code from module unsetenv:
7511 # Code from module unsetenv-tests:
7512 # Code from module update-copyright:
7513 # Code from module update-copyright-tests:
7514 # Code from module useless-if-before-free:
7515 # Code from module vasnprintf:
7516 # Code from module vasnprintf-tests:
7517 # Code from module vc-list-files:
7518 # Code from module vc-list-files-tests:
7519 # Code from module verify:
7520 # Code from module verify-tests:
7521 # Code from module version-etc:
7522 # Code from module version-etc-fsf:
7523 # Code from module version-etc-tests:
7524 # Code from module warnings:
7525 # Code from module wchar:
7526 # Code from module wchar-tests:
7527 # Code from module wcrtomb:
7528 # Code from module wcrtomb-tests:
7529 # Code from module wctob:
7530 # Code from module wctomb:
7531 # Code from module wctype-h:
7532 # Code from module wctype-h-tests:
7533 # Code from module wcwidth:
7534 # Code from module wcwidth-tests:
7535 # Code from module xalloc:
7536 # Code from module xalloc-die:
7537 # Code from module xalloc-die-tests:
7538 # Code from module xalloc-oversized:
7539 # Code from module xgetcwd:
7540 # Code from module xsize:
7541 # Code from module xstrndup:
7542 # Code from module xstrtod:
7543 # Code from module xstrtol:
7544 # Code from module xstrtol-tests:
7545 # Code from module xstrtoumax:
7546 # Code from module xstrtoumax-tests:
7547 # Code from module yesno:
7548 # Code from module yesno-tests:
7549 # Code from module yield:
7553 if test -n "$ac_tool_prefix"; then
7556 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7557 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7559 $as_echo_n "checking for $ac_word... " >&6; }
7560 if ${ac_cv_prog_AR+:} false; then :
7561 $as_echo_n "(cached) " >&6
7563 if test -n "$AR"; then
7564 ac_cv_prog_AR="$AR" # Let the user override the test.
7566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7570 test -z "$as_dir" && as_dir=.
7571 for ac_exec_ext in '' $ac_executable_extensions; do
7572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7573 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7584 if test -n "$AR"; then
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7586 $as_echo "$AR" >&6; }
7588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7589 $as_echo "no" >&6; }
7593 test -n "$AR" && break
7596 if test -z "$AR"; then
7600 # Extract the first word of "$ac_prog", so it can be a program name with args.
7601 set dummy $ac_prog; ac_word=$2
7602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7603 $as_echo_n "checking for $ac_word... " >&6; }
7604 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7605 $as_echo_n "(cached) " >&6
7607 if test -n "$ac_ct_AR"; then
7608 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7610 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7614 test -z "$as_dir" && as_dir=.
7615 for ac_exec_ext in '' $ac_executable_extensions; do
7616 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7617 ac_cv_prog_ac_ct_AR="$ac_prog"
7618 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7628 if test -n "$ac_ct_AR"; then
7629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7630 $as_echo "$ac_ct_AR" >&6; }
7632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7633 $as_echo "no" >&6; }
7637 test -n "$ac_ct_AR" && break
7640 if test "x$ac_ct_AR" = x; then
7643 case $cross_compiling:$ac_tool_warned in
7645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7646 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7647 ac_tool_warned=yes ;;
7653 if test -n "$ac_tool_prefix"; then
7654 for ac_prog in ranlib
7656 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7657 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7659 $as_echo_n "checking for $ac_word... " >&6; }
7660 if ${ac_cv_prog_RANLIB+:} false; then :
7661 $as_echo_n "(cached) " >&6
7663 if test -n "$RANLIB"; then
7664 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7670 test -z "$as_dir" && as_dir=.
7671 for ac_exec_ext in '' $ac_executable_extensions; do
7672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7673 ac_cv_prog_RANLIB="$ac_tool_prefix$ac_prog"
7674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7683 RANLIB=$ac_cv_prog_RANLIB
7684 if test -n "$RANLIB"; then
7685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7686 $as_echo "$RANLIB" >&6; }
7688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689 $as_echo "no" >&6; }
7693 test -n "$RANLIB" && break
7696 if test -z "$RANLIB"; then
7697 ac_ct_RANLIB=$RANLIB
7698 for ac_prog in ranlib
7700 # Extract the first word of "$ac_prog", so it can be a program name with args.
7701 set dummy $ac_prog; ac_word=$2
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7703 $as_echo_n "checking for $ac_word... " >&6; }
7704 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7705 $as_echo_n "(cached) " >&6
7707 if test -n "$ac_ct_RANLIB"; then
7708 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7714 test -z "$as_dir" && as_dir=.
7715 for ac_exec_ext in '' $ac_executable_extensions; do
7716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7717 ac_cv_prog_ac_ct_RANLIB="$ac_prog"
7718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7727 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7728 if test -n "$ac_ct_RANLIB"; then
7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7730 $as_echo "$ac_ct_RANLIB" >&6; }
7732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7733 $as_echo "no" >&6; }
7737 test -n "$ac_ct_RANLIB" && break
7740 if test "x$ac_ct_RANLIB" = x; then
7743 case $cross_compiling:$ac_tool_warned in
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747 ac_tool_warned=yes ;;
7749 RANLIB=$ac_ct_RANLIB
7753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
7754 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
7756 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
7757 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
7758 $as_echo_n "(cached) " >&6
7760 cat >conftest.make <<\_ACEOF
7763 @echo '@@@%%%=$(MAKE)=@@@%%%'
7765 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
7766 case `${MAKE-make} -f conftest.make 2>/dev/null` in
7768 eval ac_cv_prog_make_${ac_make}_set=yes;;
7770 eval ac_cv_prog_make_${ac_make}_set=no;;
7774 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
7775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7776 $as_echo "yes" >&6; }
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7781 SET_MAKE="MAKE=${MAKE-make}"
7784 # Check whether --enable-largefile was given.
7785 if test "${enable_largefile+set}" = set; then :
7786 enableval=$enable_largefile;
7789 if test "$enable_largefile" != no; then
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7792 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7793 if ${ac_cv_sys_largefile_CC+:} false; then :
7794 $as_echo_n "(cached) " >&6
7796 ac_cv_sys_largefile_CC=no
7797 if test "$GCC" != yes; then
7800 # IRIX 6.2 and later do not support large files by default,
7801 # so use the C compiler's -n32 option if that helps.
7802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7803 /* end confdefs.h. */
7804 #include <sys/types.h>
7805 /* Check that off_t can represent 2**63 - 1 correctly.
7806 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7807 since some C++ compilers masquerading as C compilers
7808 incorrectly reject 9223372036854775807. */
7809 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7810 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7811 && LARGE_OFF_T % 2147483647 == 1)
7821 if ac_fn_c_try_compile "$LINENO"; then :
7824 rm -f core conftest.err conftest.$ac_objext
7826 if ac_fn_c_try_compile "$LINENO"; then :
7827 ac_cv_sys_largefile_CC=' -n32'; break
7829 rm -f core conftest.err conftest.$ac_objext
7833 rm -f conftest.$ac_ext
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7837 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7838 if test "$ac_cv_sys_largefile_CC" != no; then
7839 CC=$CC$ac_cv_sys_largefile_CC
7842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7843 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7844 if ${ac_cv_sys_file_offset_bits+:} false; then :
7845 $as_echo_n "(cached) " >&6
7848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849 /* end confdefs.h. */
7850 #include <sys/types.h>
7851 /* Check that off_t can represent 2**63 - 1 correctly.
7852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7853 since some C++ compilers masquerading as C compilers
7854 incorrectly reject 9223372036854775807. */
7855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7857 && LARGE_OFF_T % 2147483647 == 1)
7867 if ac_fn_c_try_compile "$LINENO"; then :
7868 ac_cv_sys_file_offset_bits=no; break
7870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872 /* end confdefs.h. */
7873 #define _FILE_OFFSET_BITS 64
7874 #include <sys/types.h>
7875 /* Check that off_t can represent 2**63 - 1 correctly.
7876 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7877 since some C++ compilers masquerading as C compilers
7878 incorrectly reject 9223372036854775807. */
7879 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7880 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7881 && LARGE_OFF_T % 2147483647 == 1)
7891 if ac_fn_c_try_compile "$LINENO"; then :
7892 ac_cv_sys_file_offset_bits=64; break
7894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7895 ac_cv_sys_file_offset_bits=unknown
7899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7900 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7901 case $ac_cv_sys_file_offset_bits in #(
7904 cat >>confdefs.h <<_ACEOF
7905 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7910 if test $ac_cv_sys_file_offset_bits = unknown; then
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7912 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7913 if ${ac_cv_sys_large_files+:} false; then :
7914 $as_echo_n "(cached) " >&6
7917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7918 /* end confdefs.h. */
7919 #include <sys/types.h>
7920 /* Check that off_t can represent 2**63 - 1 correctly.
7921 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7922 since some C++ compilers masquerading as C compilers
7923 incorrectly reject 9223372036854775807. */
7924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7925 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7926 && LARGE_OFF_T % 2147483647 == 1)
7936 if ac_fn_c_try_compile "$LINENO"; then :
7937 ac_cv_sys_large_files=no; break
7939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7941 /* end confdefs.h. */
7942 #define _LARGE_FILES 1
7943 #include <sys/types.h>
7944 /* Check that off_t can represent 2**63 - 1 correctly.
7945 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7946 since some C++ compilers masquerading as C compilers
7947 incorrectly reject 9223372036854775807. */
7948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7949 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7950 && LARGE_OFF_T % 2147483647 == 1)
7960 if ac_fn_c_try_compile "$LINENO"; then :
7961 ac_cv_sys_large_files=1; break
7963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7964 ac_cv_sys_large_files=unknown
7968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7969 $as_echo "$ac_cv_sys_large_files" >&6; }
7970 case $ac_cv_sys_large_files in #(
7973 cat >>confdefs.h <<_ACEOF
7974 #define _LARGE_FILES $ac_cv_sys_large_files
7982 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7993 LIBC_FATAL_STDERR_=1
7994 export LIBC_FATAL_STDERR_
7996 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7997 if test "x$ac_cv_type_size_t" = xyes; then :
8001 cat >>confdefs.h <<_ACEOF
8002 #define size_t unsigned int
8007 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8008 # for constant arguments. Useless!
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8010 $as_echo_n "checking for working alloca.h... " >&6; }
8011 if ${ac_cv_working_alloca_h+:} false; then :
8012 $as_echo_n "(cached) " >&6
8014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8015 /* end confdefs.h. */
8020 char *p = (char *) alloca (2 * sizeof (int));
8026 if ac_fn_c_try_link "$LINENO"; then :
8027 ac_cv_working_alloca_h=yes
8029 ac_cv_working_alloca_h=no
8031 rm -f core conftest.err conftest.$ac_objext \
8032 conftest$ac_exeext conftest.$ac_ext
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8035 $as_echo "$ac_cv_working_alloca_h" >&6; }
8036 if test $ac_cv_working_alloca_h = yes; then
8038 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8043 $as_echo_n "checking for alloca... " >&6; }
8044 if ${ac_cv_func_alloca_works+:} false; then :
8045 $as_echo_n "(cached) " >&6
8047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h. */
8050 # define alloca __builtin_alloca
8053 # include <malloc.h>
8054 # define alloca _alloca
8056 # ifdef HAVE_ALLOCA_H
8057 # include <alloca.h>
8062 # ifndef alloca /* predefined by HP cc +Olibcalls */
8063 void *alloca (size_t);
8073 char *p = (char *) alloca (1);
8079 if ac_fn_c_try_link "$LINENO"; then :
8080 ac_cv_func_alloca_works=yes
8082 ac_cv_func_alloca_works=no
8084 rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext conftest.$ac_ext
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8088 $as_echo "$ac_cv_func_alloca_works" >&6; }
8090 if test $ac_cv_func_alloca_works = yes; then
8092 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8095 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8096 # that cause trouble. Some versions do not even contain alloca or
8097 # contain a buggy version. If you still want to use their alloca,
8098 # use ar to extract alloca.o from them instead of compiling alloca.c.
8104 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8106 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8110 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8111 if ${ac_cv_os_cray+:} false; then :
8112 $as_echo_n "(cached) " >&6
8114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115 /* end confdefs.h. */
8116 #if defined CRAY && ! defined CRAY2
8123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8124 $EGREP "webecray" >/dev/null 2>&1; then :
8132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8133 $as_echo "$ac_cv_os_cray" >&6; }
8134 if test $ac_cv_os_cray = yes; then
8135 for ac_func in _getb67 GETB67 getb67; do
8136 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8137 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8138 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8140 cat >>confdefs.h <<_ACEOF
8141 #define CRAY_STACKSEG_END $ac_func
8150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8151 $as_echo_n "checking stack direction for C alloca... " >&6; }
8152 if ${ac_cv_c_stack_direction+:} false; then :
8153 $as_echo_n "(cached) " >&6
8155 if test "$cross_compiling" = yes; then :
8156 ac_cv_c_stack_direction=0
8158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8159 /* end confdefs.h. */
8160 $ac_includes_default
8162 find_stack_direction (int *addr, int depth)
8167 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8168 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8173 main (int argc, char **argv)
8175 return find_stack_direction (0, argc + !argv + 20) < 0;
8178 if ac_fn_c_try_run "$LINENO"; then :
8179 ac_cv_c_stack_direction=1
8181 ac_cv_c_stack_direction=-1
8183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8184 conftest.$ac_objext conftest.beam conftest.$ac_ext
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8189 $as_echo "$ac_cv_c_stack_direction" >&6; }
8190 cat >>confdefs.h <<_ACEOF
8191 #define STACK_DIRECTION $ac_cv_c_stack_direction
8204 GNULIB_MBSNRTOWCS=0;
8207 GNULIB_WCSNRTOMBS=0;
8224 GNULIB_WCSCASECMP=0;
8225 GNULIB_WCSNCASECMP=0;
8275 HAVE_DECL_WCWIDTH=1;
8276 REPLACE_MBSTATE_T=0;
8282 REPLACE_MBSRTOWCS=0;
8283 REPLACE_MBSNRTOWCS=0;
8285 REPLACE_WCSRTOMBS=0;
8286 REPLACE_WCSNRTOMBS=0;
8291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8292 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8293 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8294 $as_echo_n "(cached) " >&6
8296 gl_cv_header_wchar_h_correct_inline=yes
8297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8298 /* end confdefs.h. */
8300 #define wcstod renamed_wcstod
8301 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8303 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8304 included before <wchar.h>. */
8309 extern int zero (void);
8310 int main () { return zero(); }
8313 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8314 (eval $ac_compile) 2>&5
8316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8317 test $ac_status = 0; }; then
8318 mv conftest.$ac_objext conftest1.$ac_objext
8319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8320 /* end confdefs.h. */
8322 #define wcstod renamed_wcstod
8323 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8325 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8326 included before <wchar.h>. */
8331 int zero (void) { return 0; }
8334 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8335 (eval $ac_compile) 2>&5
8337 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8338 test $ac_status = 0; }; then
8339 mv conftest.$ac_objext conftest2.$ac_objext
8340 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8343 gl_cv_header_wchar_h_correct_inline=no
8347 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8351 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8352 if test $gl_cv_header_wchar_h_correct_inline = no; then
8353 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8354 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8355 C99 mode. You have four options:
8356 - Add the flag -fgnu89-inline to CC and reconfigure, or
8357 - Fix your include files, using parts of
8358 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8359 - Use a gcc version older than 4.3, or
8360 - Don't use the flags -std=c99 or -std=gnu99.
8361 Configuration aborted." "$LINENO" 5
8368 for ac_func in $gl_func_list
8370 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8371 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8372 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8373 cat >>confdefs.h <<_ACEOF
8374 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8386 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8387 if ${am_cv_langinfo_codeset+:} false; then :
8388 $as_echo_n "(cached) " >&6
8390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8391 /* end confdefs.h. */
8392 #include <langinfo.h>
8396 char* cs = nl_langinfo(CODESET); return !cs;
8401 if ac_fn_c_try_link "$LINENO"; then :
8402 am_cv_langinfo_codeset=yes
8404 am_cv_langinfo_codeset=no
8406 rm -f core conftest.err conftest.$ac_objext \
8407 conftest$ac_exeext conftest.$ac_ext
8410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8411 $as_echo "$am_cv_langinfo_codeset" >&6; }
8412 if test $am_cv_langinfo_codeset = yes; then
8414 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8422 $as_echo_n "checking for a traditional french locale... " >&6; }
8423 if ${gt_cv_locale_fr+:} false; then :
8424 $as_echo_n "(cached) " >&6
8427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8428 /* end confdefs.h. */
8432 #if HAVE_LANGINFO_CODESET
8433 # include <langinfo.h>
8440 /* Check whether the given locale name is recognized by the system. */
8441 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8442 /* On native Windows, setlocale(category, "") looks at the system settings,
8443 not at the environment variables. Also, when an encoding suffix such
8444 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8445 category of the locale to "C". */
8446 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8447 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8450 if (setlocale (LC_ALL, "") == NULL) return 1;
8452 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8453 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8454 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8455 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8456 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8457 some unit tests fail.
8458 On MirBSD 10, when an unsupported locale is specified, setlocale()
8459 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8460 #if HAVE_LANGINFO_CODESET
8462 const char *cs = nl_langinfo (CODESET);
8463 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8464 || strcmp (cs, "UTF-8") == 0)
8469 /* On Cygwin, avoid locale names without encoding suffix, because the
8470 locale_charset() function relies on the encoding suffix. Note that
8471 LC_ALL is set on the command line. */
8472 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8474 /* Check whether in the abbreviation of the second month, the second
8475 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8476 one byte long. This excludes the UTF-8 encoding. */
8477 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8478 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8479 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8480 /* Check whether the decimal separator is a comma.
8481 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8482 are nl_langinfo(RADIXCHAR) are both ".". */
8483 if (localeconv () ->decimal_point[0] != ',') return 1;
8489 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8490 (eval $ac_link) 2>&5
8492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8493 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8495 # Handle native Windows specially, because there setlocale() interprets
8496 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8497 # "fr" or "fra" as "French" or "French_France.1252",
8498 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8499 # "ja" as "Japanese" or "Japanese_Japan.932",
8502 # Test for the native Windows locale name.
8503 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8504 gt_cv_locale_fr=French_France.1252
8507 gt_cv_locale_fr=none
8511 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8512 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8513 # configure script would override the LC_ALL setting. Likewise for
8514 # LC_CTYPE, which is also set at the beginning of the configure script.
8515 # Test for the usual locale name.
8516 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8517 gt_cv_locale_fr=fr_FR
8519 # Test for the locale name with explicit encoding suffix.
8520 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8521 gt_cv_locale_fr=fr_FR.ISO-8859-1
8523 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8524 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8525 gt_cv_locale_fr=fr_FR.ISO8859-1
8527 # Test for the HP-UX locale name.
8528 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8529 gt_cv_locale_fr=fr_FR.iso88591
8531 # Test for the Solaris 7 locale name.
8532 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8536 gt_cv_locale_fr=none
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8549 $as_echo "$gt_cv_locale_fr" >&6; }
8550 LOCALE_FR=$gt_cv_locale_fr
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8561 $as_echo_n "checking whether // is distinct from /... " >&6; }
8562 if ${gl_cv_double_slash_root+:} false; then :
8563 $as_echo_n "(cached) " >&6
8565 if test x"$cross_compiling" = xyes ; then
8566 # When cross-compiling, there is no way to tell whether // is special
8567 # short of a list of hosts. However, the only known hosts to date
8568 # that have a distinct // are Apollo DomainOS (too old to port to),
8569 # Cygwin, and z/OS. If anyone knows of another system for which // has
8570 # special semantics and is distinct from /, please report it to
8571 # <bug-gnulib@gnu.org>.
8573 *-cygwin | i370-ibm-openedition)
8574 gl_cv_double_slash_root=yes ;;
8576 # Be optimistic and assume that / and // are the same when we
8578 gl_cv_double_slash_root='unknown, assuming no' ;;
8581 set x `ls -di / // 2>/dev/null`
8582 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8583 gl_cv_double_slash_root=no
8585 gl_cv_double_slash_root=yes
8589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8590 $as_echo "$gl_cv_double_slash_root" >&6; }
8591 if test "$gl_cv_double_slash_root" = yes; then
8593 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8611 $as_echo_n "checking whether realpath works... " >&6; }
8612 if ${gl_cv_func_realpath_works+:} false; then :
8613 $as_echo_n "(cached) " >&6
8618 if test "$cross_compiling" = yes; then :
8620 # Guess yes on glibc systems.
8621 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8622 # If we don't know, assume the worst.
8623 *) gl_cv_func_realpath_works="guessing no" ;;
8627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8628 /* end confdefs.h. */
8633 #if defined __MACH__ && defined __APPLE__
8634 /* Avoid a crash on Mac OS X. */
8635 #include <mach/mach.h>
8636 #include <mach/mach_error.h>
8637 #include <mach/thread_status.h>
8638 #include <mach/exception.h>
8639 #include <mach/task.h>
8640 #include <pthread.h>
8641 /* The exception port on which our thread listens. */
8642 static mach_port_t our_exception_port;
8643 /* The main function of the thread listening for exceptions of type
8646 mach_exception_thread (void *arg)
8648 /* Buffer for a message to be received. */
8650 mach_msg_header_t head;
8651 mach_msg_body_t msgh_body;
8654 mach_msg_return_t retval;
8655 /* Wait for a message on the exception port. */
8656 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8657 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8658 if (retval != MACH_MSG_SUCCESS)
8665 mach_port_t self = mach_task_self ();
8666 /* Allocate a port on which the thread shall listen for exceptions. */
8667 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8669 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
8670 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8671 MACH_MSG_TYPE_MAKE_SEND)
8673 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
8675 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8676 /* Create the thread listening on the exception port. */
8677 pthread_attr_t attr;
8679 if (pthread_attr_init (&attr) == 0
8680 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8681 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8682 pthread_attr_destroy (&attr);
8683 /* Replace the exception port info for these exceptions with our own.
8684 Note that we replace the exception port for the entire task, not only
8685 for a particular thread. This has the effect that when our exception
8686 port gets the message, the thread specific exception port has already
8687 been asked, and we don't need to bother about it.
8688 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
8689 task_set_exception_ports (self, mask, our_exception_port,
8690 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8695 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8696 /* Avoid a crash on native Windows. */
8697 #define WIN32_LEAN_AND_MEAN
8698 #include <windows.h>
8699 #include <winerror.h>
8701 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8703 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8705 case EXCEPTION_ACCESS_VIOLATION:
8706 case EXCEPTION_IN_PAGE_ERROR:
8707 case EXCEPTION_STACK_OVERFLOW:
8708 case EXCEPTION_GUARD_PAGE:
8709 case EXCEPTION_PRIV_INSTRUCTION:
8710 case EXCEPTION_ILLEGAL_INSTRUCTION:
8711 case EXCEPTION_DATATYPE_MISALIGNMENT:
8712 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8713 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8716 return EXCEPTION_CONTINUE_SEARCH;
8721 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8724 /* Avoid a crash on POSIX systems. */
8726 /* A POSIX signal handler. */
8728 exception_handler (int sig)
8736 signal (SIGSEGV, exception_handler);
8739 signal (SIGBUS, exception_handler);
8753 char *name = realpath ("conftest.a", NULL);
8754 if (!(name && *name == '/'))
8758 char *name = realpath ("conftest.b/../conftest.a", NULL);
8763 char *name = realpath ("conftest.a/", NULL);
8768 char *name1 = realpath (".", NULL);
8769 char *name2 = realpath ("conftest.d//./..", NULL);
8770 if (strcmp (name1, name2) != 0)
8780 if ac_fn_c_try_run "$LINENO"; then :
8781 gl_cv_func_realpath_works=yes
8783 gl_cv_func_realpath_works=no
8785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8786 conftest.$ac_objext conftest.beam conftest.$ac_ext
8789 rm -rf conftest.a conftest.d
8792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8793 $as_echo "$gl_cv_func_realpath_works" >&6; }
8794 case "$gl_cv_func_realpath_works" in
8797 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8805 GNULIB_CALLOC_POSIX=0;
8806 GNULIB_CANONICALIZE_FILE_NAME=0;
8807 GNULIB_GETLOADAVG=0;
8810 GNULIB_MALLOC_POSIX=0;
8817 GNULIB_POSIX_OPENPT=0;
8823 GNULIB_REALLOC_POSIX=0;
8826 GNULIB_SECURE_GETENV=0;
8831 GNULIB_SYSTEM_POSIX=0;
8837 HAVE_CANONICALIZE_FILE_NAME=1;
8838 HAVE_DECL_GETLOADAVG=1;
8846 HAVE_POSIX_OPENPT=1;
8854 HAVE_SECURE_GETENV=1;
8860 HAVE_STRUCT_RANDOM_DATA=1;
8861 HAVE_SYS_LOADAVG_H=0;
8863 HAVE_DECL_UNSETENV=1;
8865 REPLACE_CANONICALIZE_FILE_NAME=0;
8870 REPLACE_PTSNAME_R=0;
8893 GNULIB_EUIDACCESS=0;
8901 GNULIB_GETDOMAINNAME=0;
8902 GNULIB_GETDTABLESIZE=0;
8904 GNULIB_GETHOSTNAME=0;
8906 GNULIB_GETLOGIN_R=0;
8907 GNULIB_GETPAGESIZE=0;
8908 GNULIB_GETUSERSHELL=0;
8909 GNULIB_GROUP_MEMBER=0;
8921 GNULIB_READLINKAT=0;
8923 GNULIB_SETHOSTNAME=0;
8928 GNULIB_UNISTD_H_NONBLOCKING=0;
8929 GNULIB_UNISTD_H_SIGPIPE=0;
8944 HAVE_GETDTABLESIZE=1;
8949 HAVE_GROUP_MEMBER=1;
8965 HAVE_DECL_ENVIRON=1;
8967 HAVE_DECL_FDATASYNC=1;
8968 HAVE_DECL_GETDOMAINNAME=1;
8969 HAVE_DECL_GETLOGIN_R=1;
8970 HAVE_DECL_GETPAGESIZE=1;
8971 HAVE_DECL_GETUSERSHELL=1;
8972 HAVE_DECL_SETHOSTNAME=1;
8973 HAVE_DECL_TTYNAME_R=1;
8981 REPLACE_FTRUNCATE=0;
8983 REPLACE_GETDOMAINNAME=0;
8984 REPLACE_GETDTABLESIZE=0;
8985 REPLACE_GETLOGIN_R=0;
8986 REPLACE_GETGROUPS=0;
8987 REPLACE_GETPAGESIZE=0;
9000 REPLACE_TTYNAME_R=0;
9005 UNISTD_H_HAVE_WINSOCK2_H=0;
9006 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9013 for ac_header in $gl_header_list
9015 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9016 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9017 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9018 cat >>confdefs.h <<_ACEOF
9019 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9060 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9061 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9063 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9066 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9072 SYS_IOCTL_H_HAVE_WINSOCK2_H=0;
9073 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9101 HAVE_DECL_FDOPENDIR=1;
9108 REPLACE_FDOPENDIR=0;
9116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9117 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9118 if ${gl_cv_have_include_next+:} false; then :
9119 $as_echo_n "(cached) " >&6
9121 rm -rf conftestd1a conftestd1b conftestd2
9122 mkdir conftestd1a conftestd1b conftestd2
9123 cat <<EOF > conftestd1a/conftest.h
9124 #define DEFINED_IN_CONFTESTD1
9125 #include_next <conftest.h>
9126 #ifdef DEFINED_IN_CONFTESTD2
9129 #error "include_next doesn't work"
9132 cat <<EOF > conftestd1b/conftest.h
9133 #define DEFINED_IN_CONFTESTD1
9135 #include_next <conftest.h>
9136 #ifdef DEFINED_IN_CONFTESTD2
9139 #error "include_next doesn't work"
9142 cat <<EOF > conftestd2/conftest.h
9143 #ifndef DEFINED_IN_CONFTESTD1
9144 #error "include_next test doesn't work"
9146 #define DEFINED_IN_CONFTESTD2
9148 gl_save_CPPFLAGS="$CPPFLAGS"
9149 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9151 /* end confdefs.h. */
9152 #include <conftest.h>
9154 if ac_fn_c_try_compile "$LINENO"; then :
9155 gl_cv_have_include_next=yes
9157 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9159 /* end confdefs.h. */
9160 #include <conftest.h>
9162 if ac_fn_c_try_compile "$LINENO"; then :
9163 gl_cv_have_include_next=buggy
9165 gl_cv_have_include_next=no
9167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9171 CPPFLAGS="$gl_save_CPPFLAGS"
9172 rm -rf conftestd1a conftestd1b conftestd2
9175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9176 $as_echo "$gl_cv_have_include_next" >&6; }
9177 PRAGMA_SYSTEM_HEADER=
9178 if test $gl_cv_have_include_next = yes; then
9179 INCLUDE_NEXT=include_next
9180 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9181 if test -n "$GCC"; then
9182 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9185 if test $gl_cv_have_include_next = buggy; then
9186 INCLUDE_NEXT=include
9187 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9189 INCLUDE_NEXT=include
9190 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9197 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9198 if ${gl_cv_pragma_columns+:} false; then :
9199 $as_echo_n "(cached) " >&6
9201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9202 /* end confdefs.h. */
9209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9210 $EGREP "choke me" >/dev/null 2>&1; then :
9211 gl_cv_pragma_columns=yes
9213 gl_cv_pragma_columns=no
9219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9220 $as_echo "$gl_cv_pragma_columns" >&6; }
9221 if test $gl_cv_pragma_columns = yes; then
9222 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9256 $as_echo_n "checking if environ is properly declared... " >&6; }
9257 if ${gt_cv_var_environ_declaration+:} false; then :
9258 $as_echo_n "(cached) " >&6
9261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9262 /* end confdefs.h. */
9266 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9269 extern struct { int foo; } environ;
9278 if ac_fn_c_try_compile "$LINENO"; then :
9279 gt_cv_var_environ_declaration=no
9281 gt_cv_var_environ_declaration=yes
9283 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9287 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9288 if test $gt_cv_var_environ_declaration = yes; then
9290 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9295 if test $gt_cv_var_environ_declaration != yes; then
9301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9302 $as_echo_n "checking for complete errno.h... " >&6; }
9303 if ${gl_cv_header_errno_h_complete+:} false; then :
9304 $as_echo_n "(cached) " >&6
9307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9308 /* end confdefs.h. */
9311 #if !defined ETXTBSY
9320 #if !defined ENOLINK
9326 #if !defined EMULTIHOP
9329 #if !defined EBADMSG
9332 #if !defined EOVERFLOW
9335 #if !defined ENOTSUP
9338 #if !defined ENETRESET
9341 #if !defined ECONNABORTED
9350 #if !defined ECANCELED
9353 #if !defined EOWNERDEAD
9356 #if !defined ENOTRECOVERABLE
9364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9365 $EGREP "booboo" >/dev/null 2>&1; then :
9366 gl_cv_header_errno_h_complete=no
9368 gl_cv_header_errno_h_complete=yes
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9375 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9376 if test $gl_cv_header_errno_h_complete = yes; then
9387 if test $gl_cv_have_include_next = yes; then
9388 gl_cv_next_errno_h='<'errno.h'>'
9390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9391 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9392 if ${gl_cv_next_errno_h+:} false; then :
9393 $as_echo_n "(cached) " >&6
9398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9399 /* end confdefs.h. */
9403 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9404 *) gl_absname_cpp="$ac_cpp" ;;
9409 gl_dirsep_regex='[/\\]'
9412 gl_dirsep_regex='\/'
9415 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9416 gl_header_literal_regex=`echo 'errno.h' \
9417 | sed -e "$gl_make_literal_regex_sed"`
9418 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9419 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9425 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9426 sed -n "$gl_absolute_header_sed"`
9428 gl_header=$gl_cv_absolute_errno_h
9429 gl_cv_next_errno_h='"'$gl_header'"'
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9434 $as_echo "$gl_cv_next_errno_h" >&6; }
9436 NEXT_ERRNO_H=$gl_cv_next_errno_h
9438 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9439 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9440 gl_next_as_first_directive='<'errno.h'>'
9442 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9443 gl_next_as_first_directive=$gl_cv_next_errno_h
9445 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9453 if test -n "$ERRNO_H"; then
9454 GL_GENERATE_ERRNO_H_TRUE=
9455 GL_GENERATE_ERRNO_H_FALSE='#'
9457 GL_GENERATE_ERRNO_H_TRUE='#'
9458 GL_GENERATE_ERRNO_H_FALSE=
9462 if test -n "$ERRNO_H"; then
9463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9464 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9465 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9466 $as_echo_n "(cached) " >&6
9469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9470 /* end confdefs.h. */
9478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9479 $EGREP "yes" >/dev/null 2>&1; then :
9480 gl_cv_header_errno_h_EMULTIHOP=yes
9482 gl_cv_header_errno_h_EMULTIHOP=no
9486 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9488 /* end confdefs.h. */
9490 #define _XOPEN_SOURCE_EXTENDED 1
9497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9498 $EGREP "yes" >/dev/null 2>&1; then :
9499 gl_cv_header_errno_h_EMULTIHOP=hidden
9503 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9504 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
9505 #define _XOPEN_SOURCE_EXTENDED 1
9507 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9519 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9520 case $gl_cv_header_errno_h_EMULTIHOP in
9522 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9525 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9533 if test -n "$ERRNO_H"; then
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9535 $as_echo_n "checking for ENOLINK value... " >&6; }
9536 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9537 $as_echo_n "(cached) " >&6
9540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541 /* end confdefs.h. */
9549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9550 $EGREP "yes" >/dev/null 2>&1; then :
9551 gl_cv_header_errno_h_ENOLINK=yes
9553 gl_cv_header_errno_h_ENOLINK=no
9557 if test $gl_cv_header_errno_h_ENOLINK = no; then
9558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9559 /* end confdefs.h. */
9561 #define _XOPEN_SOURCE_EXTENDED 1
9568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9569 $EGREP "yes" >/dev/null 2>&1; then :
9570 gl_cv_header_errno_h_ENOLINK=hidden
9574 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9575 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9576 #define _XOPEN_SOURCE_EXTENDED 1
9578 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9590 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9591 case $gl_cv_header_errno_h_ENOLINK in
9593 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9596 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9604 if test -n "$ERRNO_H"; then
9605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9606 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9607 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9608 $as_echo_n "(cached) " >&6
9611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9612 /* end confdefs.h. */
9620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9621 $EGREP "yes" >/dev/null 2>&1; then :
9622 gl_cv_header_errno_h_EOVERFLOW=yes
9624 gl_cv_header_errno_h_EOVERFLOW=no
9628 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
9629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9630 /* end confdefs.h. */
9632 #define _XOPEN_SOURCE_EXTENDED 1
9639 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9640 $EGREP "yes" >/dev/null 2>&1; then :
9641 gl_cv_header_errno_h_EOVERFLOW=hidden
9645 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
9646 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9647 #define _XOPEN_SOURCE_EXTENDED 1
9649 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9661 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9662 case $gl_cv_header_errno_h_EOVERFLOW in
9664 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
9667 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
9675 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9676 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
9682 cat >>confdefs.h <<_ACEOF
9683 #define HAVE_DECL_STRERROR_R $ac_have_decl
9686 for ac_func in strerror_r
9688 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9689 if test "x$ac_cv_func_strerror_r" = xyes; then :
9690 cat >>confdefs.h <<_ACEOF
9691 #define HAVE_STRERROR_R 1
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9698 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9699 if ${ac_cv_func_strerror_r_char_p+:} false; then :
9700 $as_echo_n "(cached) " >&6
9703 ac_cv_func_strerror_r_char_p=no
9704 if test $ac_cv_have_decl_strerror_r = yes; then
9705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9706 /* end confdefs.h. */
9707 $ac_includes_default
9713 char x = *strerror_r (0, buf, sizeof buf);
9714 char *p = strerror_r (0, buf, sizeof buf);
9721 if ac_fn_c_try_compile "$LINENO"; then :
9722 ac_cv_func_strerror_r_char_p=yes
9724 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9726 # strerror_r is not declared. Choose between
9727 # systems that have relatively inaccessible declarations for the
9728 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9729 # former has a strerror_r that returns char*, while the latter
9730 # has a strerror_r that returns `int'.
9731 # This test should segfault on the DEC system.
9732 if test "$cross_compiling" = yes; then :
9735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9736 /* end confdefs.h. */
9737 $ac_includes_default
9738 extern char *strerror_r ();
9743 char x = *strerror_r (0, buf, sizeof buf);
9744 return ! isalpha (x);
9749 if ac_fn_c_try_run "$LINENO"; then :
9750 ac_cv_func_strerror_r_char_p=yes
9752 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9753 conftest.$ac_objext conftest.beam conftest.$ac_ext
9759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9760 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9761 if test $ac_cv_func_strerror_r_char_p = yes; then
9763 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9768 XGETTEXT_EXTRA_OPTIONS=
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9776 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9777 if ${ac_cv_type_uid_t+:} false; then :
9778 $as_echo_n "(cached) " >&6
9780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781 /* end confdefs.h. */
9782 #include <sys/types.h>
9785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9786 $EGREP "uid_t" >/dev/null 2>&1; then :
9787 ac_cv_type_uid_t=yes
9794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9795 $as_echo "$ac_cv_type_uid_t" >&6; }
9796 if test $ac_cv_type_uid_t = no; then
9798 $as_echo "#define uid_t int" >>confdefs.h
9801 $as_echo "#define gid_t int" >>confdefs.h
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
9806 $as_echo_n "checking type of array argument to getgroups... " >&6; }
9807 if ${ac_cv_type_getgroups+:} false; then :
9808 $as_echo_n "(cached) " >&6
9810 if test "$cross_compiling" = yes; then :
9811 ac_cv_type_getgroups=cross
9813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9814 /* end confdefs.h. */
9815 /* Thanks to Mike Rendell for this test. */
9816 $ac_includes_default
9819 #define MAX(x, y) ((x) > (y) ? (x) : (y))
9826 union { gid_t gval; long int lval; } val;
9829 for (i = 0; i < NGID; i++)
9830 gidset[i] = val.gval;
9831 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
9833 /* Exit non-zero if getgroups seems to require an array of ints. This
9834 happens when gid_t is short int but getgroups modifies an array
9836 return n > 0 && gidset[n] != val.gval;
9839 if ac_fn_c_try_run "$LINENO"; then :
9840 ac_cv_type_getgroups=gid_t
9842 ac_cv_type_getgroups=int
9844 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9845 conftest.$ac_objext conftest.beam conftest.$ac_ext
9848 if test $ac_cv_type_getgroups = cross; then
9849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850 /* end confdefs.h. */
9854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9855 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
9856 ac_cv_type_getgroups=gid_t
9858 ac_cv_type_getgroups=int
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
9865 $as_echo "$ac_cv_type_getgroups" >&6; }
9867 cat >>confdefs.h <<_ACEOF
9868 #define GETGROUPS_T $ac_cv_type_getgroups
9876 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9877 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
9883 cat >>confdefs.h <<_ACEOF
9884 #define HAVE_DECL_FCHDIR $ac_have_decl
9890 GNULIB_NONBLOCKING=0;
9926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9927 $as_echo_n "checking for working fcntl.h... " >&6; }
9928 if ${gl_cv_header_working_fcntl_h+:} false; then :
9929 $as_echo_n "(cached) " >&6
9931 if test "$cross_compiling" = yes; then :
9932 gl_cv_header_working_fcntl_h=cross-compiling
9934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9935 /* end confdefs.h. */
9936 #include <sys/types.h>
9937 #include <sys/stat.h>
9939 # include <unistd.h>
9940 #else /* on Windows with MSVC */
9942 # include <stdlib.h>
9943 # defined sleep(n) _sleep ((n) * 1000)
9950 #define O_NOFOLLOW 0
9952 static int const constants[] =
9954 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9955 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9962 int result = !constants;
9965 static char const sym[] = "conftest.sym";
9966 if (symlink ("/dev/null", sym) != 0)
9970 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9977 if (unlink (sym) != 0 || symlink (".", sym) != 0)
9981 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9992 static char const file[] = "confdefs.h";
9993 int fd = open (file, O_RDONLY | O_NOATIME);
9999 if (fstat (fd, &st0) != 0)
10005 if (read (fd, &c, 1) != 1)
10009 if (close (fd) != 0)
10014 if (stat (file, &st1) != 0)
10017 if (st0.st_atime != st1.st_atime)
10029 if ac_fn_c_try_run "$LINENO"; then :
10030 gl_cv_header_working_fcntl_h=yes
10033 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10034 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10035 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10036 *) gl_cv_header_working_fcntl_h='no';;
10039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10040 conftest.$ac_objext conftest.beam conftest.$ac_ext
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10045 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10047 case $gl_cv_header_working_fcntl_h in #(
10048 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10052 cat >>confdefs.h <<_ACEOF
10053 #define HAVE_WORKING_O_NOATIME $ac_val
10057 case $gl_cv_header_working_fcntl_h in #(
10058 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10062 cat >>confdefs.h <<_ACEOF
10063 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10067 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
10068 if test "x$ac_cv_type_pid_t" = xyes; then :
10072 cat >>confdefs.h <<_ACEOF
10078 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
10079 if test "x$ac_cv_type_mode_t" = xyes; then :
10083 cat >>confdefs.h <<_ACEOF
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
10092 $as_echo_n "checking for promoted mode_t type... " >&6; }
10093 if ${gl_cv_promoted_mode_t+:} false; then :
10094 $as_echo_n "(cached) " >&6
10097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10098 /* end confdefs.h. */
10099 #include <sys/types.h>
10103 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
10108 if ac_fn_c_try_compile "$LINENO"; then :
10109 gl_cv_promoted_mode_t='int'
10111 gl_cv_promoted_mode_t='mode_t'
10113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
10117 $as_echo "$gl_cv_promoted_mode_t" >&6; }
10119 cat >>confdefs.h <<_ACEOF
10120 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
10133 GNULIB_FPRINTF_POSIX=0;
10149 GNULIB_OBSTACK_PRINTF=0;
10150 GNULIB_OBSTACK_PRINTF_POSIX=0;
10155 GNULIB_PRINTF_POSIX=0;
10164 GNULIB_SPRINTF_POSIX=0;
10165 GNULIB_STDIO_H_NONBLOCKING=0;
10166 GNULIB_STDIO_H_SIGPIPE=0;
10168 GNULIB_VASPRINTF=0;
10173 GNULIB_VFPRINTF_POSIX=0;
10175 GNULIB_VPRINTF_POSIX=0;
10176 GNULIB_VSNPRINTF=0;
10177 GNULIB_VSPRINTF_POSIX=0;
10178 HAVE_DECL_FPURGE=1;
10179 HAVE_DECL_FSEEKO=1;
10180 HAVE_DECL_FTELLO=1;
10181 HAVE_DECL_GETDELIM=1;
10182 HAVE_DECL_GETLINE=1;
10183 HAVE_DECL_OBSTACK_PRINTF=1;
10184 HAVE_DECL_SNPRINTF=1;
10185 HAVE_DECL_VSNPRINTF=1;
10206 REPLACE_GETDELIM=0;
10208 REPLACE_OBSTACK_PRINTF=0;
10214 REPLACE_RENAMEAT=0;
10215 REPLACE_SNPRINTF=0;
10217 REPLACE_STDIO_READ_FUNCS=0;
10218 REPLACE_STDIO_WRITE_FUNCS=0;
10220 REPLACE_VASPRINTF=0;
10221 REPLACE_VDPRINTF=0;
10222 REPLACE_VFPRINTF=0;
10224 REPLACE_VSNPRINTF=0;
10225 REPLACE_VSPRINTF=0;
10227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_dm_mode in struct stat" >&5
10228 $as_echo_n "checking for st_dm_mode in struct stat... " >&6; }
10229 if ${ac_cv_struct_st_dm_mode+:} false; then :
10230 $as_echo_n "(cached) " >&6
10232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10233 /* end confdefs.h. */
10235 #include <sys/types.h>
10236 #include <sys/stat.h>
10240 struct stat s; s.st_dm_mode;
10245 if ac_fn_c_try_compile "$LINENO"; then :
10246 ac_cv_struct_st_dm_mode=yes
10248 ac_cv_struct_st_dm_mode=no
10250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_st_dm_mode" >&5
10253 $as_echo "$ac_cv_struct_st_dm_mode" >&6; }
10255 if test $ac_cv_struct_st_dm_mode = yes; then
10257 $as_echo "#define HAVE_ST_DM_MODE 1" >>confdefs.h
10263 ac_fn_c_check_decl "$LINENO" "strmode" "ac_cv_have_decl_strmode" "$ac_includes_default"
10264 if test "x$ac_cv_have_decl_strmode" = xyes; then :
10270 cat >>confdefs.h <<_ACEOF
10271 #define HAVE_DECL_STRMODE $ac_have_decl
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10283 $as_echo_n "checking for mbstate_t... " >&6; }
10284 if ${ac_cv_type_mbstate_t+:} false; then :
10285 $as_echo_n "(cached) " >&6
10287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10288 /* end confdefs.h. */
10289 $ac_includes_default
10290 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10292 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10293 included before <wchar.h>. */
10294 #include <stddef.h>
10301 mbstate_t x; return sizeof x;
10306 if ac_fn_c_try_compile "$LINENO"; then :
10307 ac_cv_type_mbstate_t=yes
10309 ac_cv_type_mbstate_t=no
10311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10314 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10315 if test $ac_cv_type_mbstate_t = yes; then
10317 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10321 $as_echo "#define mbstate_t int" >>confdefs.h
10386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10387 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10388 if ${gl_cv_var_stdin_large_offset+:} false; then :
10389 $as_echo_n "(cached) " >&6
10391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10392 /* end confdefs.h. */
10397 #if defined __SL64 && defined __SCLE /* cygwin */
10398 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10399 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
10400 it is easier to do a version check than building a runtime test. */
10401 # include <cygwin/version.h>
10402 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10410 if ac_fn_c_try_link "$LINENO"; then :
10411 gl_cv_var_stdin_large_offset=yes
10413 gl_cv_var_stdin_large_offset=no
10415 rm -f core conftest.err conftest.$ac_objext \
10416 conftest$ac_exeext conftest.$ac_ext
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10419 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10428 $as_echo_n "checking for 64-bit off_t... " >&6; }
10429 if ${gl_cv_type_off_t_64+:} false; then :
10430 $as_echo_n "(cached) " >&6
10432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10433 /* end confdefs.h. */
10434 #include <sys/types.h>
10435 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10445 if ac_fn_c_try_compile "$LINENO"; then :
10446 gl_cv_type_off_t_64=yes
10448 gl_cv_type_off_t_64=no
10450 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10454 $as_echo "$gl_cv_type_off_t_64" >&6; }
10455 if test $gl_cv_type_off_t_64 = no; then
10456 WINDOWS_64_BIT_OFF_T=1
10458 WINDOWS_64_BIT_OFF_T=0
10460 WINDOWS_64_BIT_ST_SIZE=1
10463 WINDOWS_64_BIT_OFF_T=0
10464 WINDOWS_64_BIT_ST_SIZE=0
10484 if test $gl_cv_have_include_next = yes; then
10485 gl_cv_next_sys_types_h='<'sys/types.h'>'
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10488 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10489 if ${gl_cv_next_sys_types_h+:} false; then :
10490 $as_echo_n "(cached) " >&6
10495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h. */
10497 #include <sys/types.h>
10500 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10501 *) gl_absname_cpp="$ac_cpp" ;;
10506 gl_dirsep_regex='[/\\]'
10509 gl_dirsep_regex='\/'
10512 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10513 gl_header_literal_regex=`echo 'sys/types.h' \
10514 | sed -e "$gl_make_literal_regex_sed"`
10515 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10516 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10522 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10523 sed -n "$gl_absolute_header_sed"`
10525 gl_header=$gl_cv_absolute_sys_types_h
10526 gl_cv_next_sys_types_h='"'$gl_header'"'
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10531 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10533 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10535 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10536 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10537 gl_next_as_first_directive='<'sys/types.h'>'
10539 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10540 gl_next_as_first_directive=$gl_cv_next_sys_types_h
10542 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10555 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10556 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10562 cat >>confdefs.h <<_ACEOF
10563 #define HAVE_DECL_FSEEKO $ac_have_decl
10575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10576 $as_echo_n "checking for fseeko... " >&6; }
10577 if ${gl_cv_func_fseeko+:} false; then :
10578 $as_echo_n "(cached) " >&6
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10582 /* end confdefs.h. */
10588 fseeko (stdin, 0, 0);
10593 if ac_fn_c_try_link "$LINENO"; then :
10594 gl_cv_func_fseeko=yes
10596 gl_cv_func_fseeko=no
10598 rm -f core conftest.err conftest.$ac_objext \
10599 conftest$ac_exeext conftest.$ac_ext
10602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10603 $as_echo "$gl_cv_func_fseeko" >&6; }
10612 if test $ac_cv_have_decl_fseeko = no; then
10616 if test $gl_cv_func_fseeko = no; then
10619 if test $WINDOWS_64_BIT_OFF_T = 1; then
10622 if test $gl_cv_var_stdin_large_offset = no; then
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
10635 $as_echo_n "checking whether fflush works on input streams... " >&6; }
10636 if ${gl_cv_func_fflush_stdin+:} false; then :
10637 $as_echo_n "(cached) " >&6
10639 echo hello world > conftest.txt
10640 if test "$cross_compiling" = yes; then :
10641 gl_cv_func_fflush_stdin=cross
10643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10644 /* end confdefs.h. */
10648 # include <unistd.h>
10649 #else /* on Windows with MSVC */
10656 FILE *f = fopen ("conftest.txt", "r");
10663 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
10665 /* For deterministic results, ensure f read a bigger buffer. */
10666 if (lseek (fd, 0, SEEK_CUR) == 5)
10668 /* POSIX requires fflush-fseek to set file offset of fd. This fails
10669 on BSD systems and on mingw. */
10670 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
10672 if (lseek (fd, 0, SEEK_CUR) != 5)
10674 /* Verify behaviour of fflush after ungetc. See
10675 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
10676 /* Verify behaviour of fflush after a backup ungetc. This fails on
10681 if (fgetc (f) != c)
10683 /* Verify behaviour of fflush after a non-backup ungetc. This fails
10684 on glibc 2.8 and on BSD systems. */
10688 if (fgetc (f) != c)
10696 if ac_fn_c_try_run "$LINENO"; then :
10697 gl_cv_func_fflush_stdin=yes
10699 gl_cv_func_fflush_stdin=no
10701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10702 conftest.$ac_objext conftest.beam conftest.$ac_ext
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
10709 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
10710 case $gl_cv_func_fflush_stdin in
10711 yes) gl_func_fflush_stdin=1 ;;
10712 no) gl_func_fflush_stdin=0 ;;
10713 *) gl_func_fflush_stdin='(-1)' ;;
10716 cat >>confdefs.h <<_ACEOF
10717 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
10721 if test $gl_cv_func_fflush_stdin != yes; then
10740 GNULIB_UTIMENSAT=0;
10754 REPLACE_FUTIMENS=0;
10760 REPLACE_UTIMENSAT=0;
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10763 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10764 if ${ac_cv_header_stat_broken+:} false; then :
10765 $as_echo_n "(cached) " >&6
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10768 /* end confdefs.h. */
10769 #include <sys/types.h>
10770 #include <sys/stat.h>
10772 #if defined S_ISBLK && defined S_IFDIR
10773 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10776 #if defined S_ISBLK && defined S_IFCHR
10777 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10780 #if defined S_ISLNK && defined S_IFREG
10781 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10784 #if defined S_ISSOCK && defined S_IFREG
10785 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10789 if ac_fn_c_try_compile "$LINENO"; then :
10790 ac_cv_header_stat_broken=no
10792 ac_cv_header_stat_broken=yes
10794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10797 $as_echo "$ac_cv_header_stat_broken" >&6; }
10798 if test $ac_cv_header_stat_broken = yes; then
10800 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10829 if test $gl_cv_have_include_next = yes; then
10830 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10833 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10834 if ${gl_cv_next_sys_stat_h+:} false; then :
10835 $as_echo_n "(cached) " >&6
10838 if test $ac_cv_header_sys_stat_h = yes; then
10843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844 /* end confdefs.h. */
10845 #include <sys/stat.h>
10848 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10849 *) gl_absname_cpp="$ac_cpp" ;;
10854 gl_dirsep_regex='[/\\]'
10857 gl_dirsep_regex='\/'
10860 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10861 gl_header_literal_regex=`echo 'sys/stat.h' \
10862 | sed -e "$gl_make_literal_regex_sed"`
10863 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10864 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10870 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10871 sed -n "$gl_absolute_header_sed"`
10873 gl_header=$gl_cv_absolute_sys_stat_h
10874 gl_cv_next_sys_stat_h='"'$gl_header'"'
10876 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10882 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10884 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10886 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10887 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10888 gl_next_as_first_directive='<'sys/stat.h'>'
10890 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10891 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10893 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10905 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10907 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10911 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10912 #include <sys/stat.h>
10914 if test "x$ac_cv_type_nlink_t" = xyes; then :
10918 $as_echo "#define nlink_t int" >>confdefs.h
10924 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
10925 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10927 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10928 if eval \${$as_gl_Symbol+:} false; then :
10929 $as_echo_n "(cached) " >&6
10931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10932 /* end confdefs.h. */
10933 #include <sys/stat.h>
10944 if ac_fn_c_try_compile "$LINENO"; then :
10945 eval "$as_gl_Symbol=yes"
10947 eval "$as_gl_Symbol=no"
10949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10951 eval ac_res=\$$as_gl_Symbol
10952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
10953 $as_echo "$ac_res" >&6; }
10954 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
10955 cat >>confdefs.h <<_ACEOF
10956 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
10959 eval ac_cv_have_decl_$gl_func=yes
10965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
10966 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
10967 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
10968 $as_echo_n "(cached) " >&6
10970 rm -f conftest.sym conftest.file
10971 echo >conftest.file
10972 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
10973 if test "$cross_compiling" = yes; then :
10975 # Guess yes on glibc systems.
10976 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
10977 # If we don't know, assume the worst.
10978 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983 /* end confdefs.h. */
10984 $ac_includes_default
10989 /* Linux will dereference the symlink and fail, as required by
10990 POSIX. That is better in the sense that it means we will not
10991 have to compile and use the lstat wrapper. */
10992 return lstat ("conftest.sym/", &sbuf) == 0;
10998 if ac_fn_c_try_run "$LINENO"; then :
10999 gl_cv_func_lstat_dereferences_slashed_symlink=yes
11001 gl_cv_func_lstat_dereferences_slashed_symlink=no
11003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11004 conftest.$ac_objext conftest.beam conftest.$ac_ext
11008 # If the 'ln -s' command failed, then we probably don't even
11009 # have an lstat function.
11010 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11012 rm -f conftest.sym conftest.file
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11016 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11017 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11020 cat >>confdefs.h <<_ACEOF
11021 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11033 ac_fn_c_check_decl "$LINENO" "ftello" "ac_cv_have_decl_ftello" "$ac_includes_default"
11034 if test "x$ac_cv_have_decl_ftello" = xyes; then :
11040 cat >>confdefs.h <<_ACEOF
11041 #define HAVE_DECL_FTELLO $ac_have_decl
11060 if test $ac_cv_have_decl_ftello = no; then
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
11065 $as_echo_n "checking for ftello... " >&6; }
11066 if ${gl_cv_func_ftello+:} false; then :
11067 $as_echo_n "(cached) " >&6
11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11071 /* end confdefs.h. */
11081 if ac_fn_c_try_link "$LINENO"; then :
11082 gl_cv_func_ftello=yes
11084 gl_cv_func_ftello=no
11086 rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
11090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
11091 $as_echo "$gl_cv_func_ftello" >&6; }
11092 if test $gl_cv_func_ftello = no; then
11095 if test $WINDOWS_64_BIT_OFF_T = 1; then
11098 if test $gl_cv_var_stdin_large_offset = no; then
11101 if test $REPLACE_FTELLO = 0; then
11103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
11104 $as_echo_n "checking whether ftello works... " >&6; }
11105 if ${gl_cv_func_ftello_works+:} false; then :
11106 $as_echo_n "(cached) " >&6
11110 # Guess no on Solaris.
11111 solaris*) gl_cv_func_ftello_works="guessing no" ;;
11112 # Guess yes otherwise.
11113 *) gl_cv_func_ftello_works="guessing yes" ;;
11115 if test "$cross_compiling" = yes; then :
11118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11119 /* end confdefs.h. */
11122 #include <stdlib.h>
11123 #include <string.h>
11124 #define TESTFILE "conftest.tmp"
11130 /* Create a file with some contents. */
11131 fp = fopen (TESTFILE, "w");
11134 if (fwrite ("foogarsh", 1, 8, fp) < 8)
11139 /* The file's contents is now "foogarsh". */
11141 /* Try writing after reading to EOF. */
11142 fp = fopen (TESTFILE, "r+");
11145 if (fseek (fp, -1, SEEK_END))
11147 if (!(getc (fp) == 'h'))
11149 if (!(getc (fp) == EOF))
11151 if (!(ftell (fp) == 8))
11153 if (!(ftell (fp) == 8))
11155 if (!(putc ('!', fp) == '!'))
11157 if (!(ftell (fp) == 9))
11159 if (!(fclose (fp) == 0))
11161 fp = fopen (TESTFILE, "r");
11166 if (!(fread (buf, 1, 10, fp) == 9))
11168 if (!(memcmp (buf, "foogarsh!", 9) == 0))
11171 if (!(fclose (fp) == 0))
11174 /* The file's contents is now "foogarsh!". */
11179 if ac_fn_c_try_run "$LINENO"; then :
11180 gl_cv_func_ftello_works=yes
11182 gl_cv_func_ftello_works=no
11184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11185 conftest.$ac_objext conftest.beam conftest.$ac_ext
11190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
11191 $as_echo "$gl_cv_func_ftello_works" >&6; }
11192 case "$gl_cv_func_ftello_works" in
11197 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
11227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11228 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11229 if ${gl_cv_func_getcwd_null+:} false; then :
11230 $as_echo_n "(cached) " >&6
11232 if test "$cross_compiling" = yes; then :
11234 # Guess yes on glibc systems.
11235 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
11236 # Guess yes on Cygwin.
11237 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11238 # If we don't know, assume the worst.
11239 *) gl_cv_func_getcwd_null="guessing no";;
11243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244 /* end confdefs.h. */
11247 # include <unistd.h>
11248 # else /* on Windows with MSVC */
11249 # include <direct.h>
11259 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11260 /* mingw cwd does not start with '/', but getcwd does allocate.
11261 However, mingw fails to honor non-zero size. */
11263 if (chdir ("/") != 0)
11267 char *f = getcwd (NULL, 0);
11282 if ac_fn_c_try_run "$LINENO"; then :
11283 gl_cv_func_getcwd_null=yes
11285 gl_cv_func_getcwd_null=no
11287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11288 conftest.$ac_objext conftest.beam conftest.$ac_ext
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11293 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11297 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11298 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11299 $as_echo_n "(cached) " >&6
11301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11302 /* end confdefs.h. */
11303 #include <unistd.h>
11311 char *getcwd (char *, size_t);
11318 if ac_fn_c_try_compile "$LINENO"; then :
11319 gl_cv_func_getcwd_posix_signature=yes
11321 gl_cv_func_getcwd_posix_signature=no
11323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11327 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11330 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11331 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11337 cat >>confdefs.h <<_ACEOF
11338 #define HAVE_DECL_GETCWD $ac_have_decl
11343 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11344 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11350 cat >>confdefs.h <<_ACEOF
11351 #define HAVE_DECL_GETDELIM $ac_have_decl
11371 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11372 if test "x$ac_cv_have_decl_getline" = xyes; then :
11378 cat >>confdefs.h <<_ACEOF
11379 #define HAVE_DECL_GETLINE $ac_have_decl
11407 if test $gl_cv_have_include_next = yes; then
11408 gl_cv_next_getopt_h='<'getopt.h'>'
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11411 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11412 if ${gl_cv_next_getopt_h+:} false; then :
11413 $as_echo_n "(cached) " >&6
11416 if test $ac_cv_header_getopt_h = yes; then
11421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11422 /* end confdefs.h. */
11423 #include <getopt.h>
11426 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11427 *) gl_absname_cpp="$ac_cpp" ;;
11432 gl_dirsep_regex='[/\\]'
11435 gl_dirsep_regex='\/'
11438 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11439 gl_header_literal_regex=`echo 'getopt.h' \
11440 | sed -e "$gl_make_literal_regex_sed"`
11441 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11442 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11448 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11449 sed -n "$gl_absolute_header_sed"`
11451 gl_header=$gl_cv_absolute_getopt_h
11452 gl_cv_next_getopt_h='"'$gl_header'"'
11454 gl_cv_next_getopt_h='<'getopt.h'>'
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11460 $as_echo "$gl_cv_next_getopt_h" >&6; }
11462 NEXT_GETOPT_H=$gl_cv_next_getopt_h
11464 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11465 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11466 gl_next_as_first_directive='<'getopt.h'>'
11468 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11469 gl_next_as_first_directive=$gl_cv_next_getopt_h
11471 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11476 if test $ac_cv_header_getopt_h = yes; then
11485 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11486 for ac_header in getopt.h
11488 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11489 if test "x$ac_cv_header_getopt_h" = xyes; then :
11490 cat >>confdefs.h <<_ACEOF
11491 #define HAVE_GETOPT_H 1
11495 gl_replace_getopt=yes
11502 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11503 for ac_func in getopt_long_only
11505 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11506 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11507 cat >>confdefs.h <<_ACEOF
11508 #define HAVE_GETOPT_LONG_ONLY 1
11512 gl_replace_getopt=yes
11518 if test -z "$gl_replace_getopt"; then
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11520 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11521 if ${gl_cv_func_getopt_posix+:} false; then :
11522 $as_echo_n "(cached) " >&6
11525 if test $cross_compiling = no; then
11526 if test "$cross_compiling" = yes; then :
11527 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11528 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11529 as_fn_error $? "cannot run test program while cross compiling
11530 See \`config.log' for more details" "$LINENO" 5; }
11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h. */
11535 #include <unistd.h>
11536 #include <stdlib.h>
11537 #include <string.h>
11542 static char program[] = "program";
11543 static char a[] = "-a";
11544 static char foo[] = "foo";
11545 static char bar[] = "bar";
11546 char *argv[] = { program, a, foo, bar, NULL };
11549 c = getopt (4, argv, "ab");
11552 c = getopt (4, argv, "ab");
11555 if (!(optind == 2))
11561 if ac_fn_c_try_run "$LINENO"; then :
11562 gl_cv_func_getopt_posix=maybe
11564 gl_cv_func_getopt_posix=no
11566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11567 conftest.$ac_objext conftest.beam conftest.$ac_ext
11570 if test $gl_cv_func_getopt_posix = maybe; then
11571 if test "$cross_compiling" = yes; then :
11572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11573 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11574 as_fn_error $? "cannot run test program while cross compiling
11575 See \`config.log' for more details" "$LINENO" 5; }
11577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11578 /* end confdefs.h. */
11580 #include <unistd.h>
11581 #include <stdlib.h>
11582 #include <string.h>
11587 static char program[] = "program";
11588 static char donald[] = "donald";
11589 static char p[] = "-p";
11590 static char billy[] = "billy";
11591 static char duck[] = "duck";
11592 static char a[] = "-a";
11593 static char bar[] = "bar";
11594 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11597 c = getopt (7, argv, "+abp:q:");
11600 if (!(strcmp (argv[0], "program") == 0))
11602 if (!(strcmp (argv[1], "donald") == 0))
11604 if (!(strcmp (argv[2], "-p") == 0))
11606 if (!(strcmp (argv[3], "billy") == 0))
11608 if (!(strcmp (argv[4], "duck") == 0))
11610 if (!(strcmp (argv[5], "-a") == 0))
11612 if (!(strcmp (argv[6], "bar") == 0))
11614 if (!(optind == 1))
11620 if ac_fn_c_try_run "$LINENO"; then :
11621 gl_cv_func_getopt_posix=maybe
11623 gl_cv_func_getopt_posix=no
11625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11626 conftest.$ac_objext conftest.beam conftest.$ac_ext
11630 if test $gl_cv_func_getopt_posix = maybe; then
11631 if test "$cross_compiling" = yes; then :
11632 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11633 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11634 as_fn_error $? "cannot run test program while cross compiling
11635 See \`config.log' for more details" "$LINENO" 5; }
11637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11638 /* end confdefs.h. */
11640 #include <unistd.h>
11641 #include <stdlib.h>
11642 #include <string.h>
11647 static char program[] = "program";
11648 static char ab[] = "-ab";
11649 char *argv[3] = { program, ab, NULL };
11650 if (getopt (2, argv, "ab:") != 'a')
11652 if (getopt (2, argv, "ab:") != '?')
11662 if ac_fn_c_try_run "$LINENO"; then :
11663 gl_cv_func_getopt_posix=yes
11665 gl_cv_func_getopt_posix=no
11667 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11668 conftest.$ac_objext conftest.beam conftest.$ac_ext
11674 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11675 *) gl_cv_func_getopt_posix="guessing yes";;
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11681 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11682 case "$gl_cv_func_getopt_posix" in
11683 *no) gl_replace_getopt=yes ;;
11687 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11689 $as_echo_n "checking for working GNU getopt function... " >&6; }
11690 if ${gl_cv_func_getopt_gnu+:} false; then :
11691 $as_echo_n "(cached) " >&6
11693 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11694 # optstring is necessary for programs like m4 that have POSIX-mandated
11695 # semantics for supporting options interspersed with files.
11696 # Also, since getopt_long is a GNU extension, we require optind=0.
11697 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11698 # so take care to revert to the correct (non-)export state.
11699 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11700 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11701 xx) gl_had_POSIXLY_CORRECT=exported ;;
11702 x) gl_had_POSIXLY_CORRECT=yes ;;
11703 *) gl_had_POSIXLY_CORRECT= ;;
11706 export POSIXLY_CORRECT
11707 if test "$cross_compiling" = yes; then :
11708 gl_cv_func_getopt_gnu="guessing no"
11711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11712 /* end confdefs.h. */
11713 #include <getopt.h>
11714 #include <stddef.h>
11715 #include <string.h>
11717 #include <stdlib.h>
11718 #if defined __MACH__ && defined __APPLE__
11719 /* Avoid a crash on Mac OS X. */
11720 #include <mach/mach.h>
11721 #include <mach/mach_error.h>
11722 #include <mach/thread_status.h>
11723 #include <mach/exception.h>
11724 #include <mach/task.h>
11725 #include <pthread.h>
11726 /* The exception port on which our thread listens. */
11727 static mach_port_t our_exception_port;
11728 /* The main function of the thread listening for exceptions of type
11731 mach_exception_thread (void *arg)
11733 /* Buffer for a message to be received. */
11735 mach_msg_header_t head;
11736 mach_msg_body_t msgh_body;
11739 mach_msg_return_t retval;
11740 /* Wait for a message on the exception port. */
11741 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11742 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11743 if (retval != MACH_MSG_SUCCESS)
11748 nocrash_init (void)
11750 mach_port_t self = mach_task_self ();
11751 /* Allocate a port on which the thread shall listen for exceptions. */
11752 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11754 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11755 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11756 MACH_MSG_TYPE_MAKE_SEND)
11758 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11760 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11761 /* Create the thread listening on the exception port. */
11762 pthread_attr_t attr;
11764 if (pthread_attr_init (&attr) == 0
11765 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11766 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11767 pthread_attr_destroy (&attr);
11768 /* Replace the exception port info for these exceptions with our own.
11769 Note that we replace the exception port for the entire task, not only
11770 for a particular thread. This has the effect that when our exception
11771 port gets the message, the thread specific exception port has already
11772 been asked, and we don't need to bother about it.
11773 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11774 task_set_exception_ports (self, mask, our_exception_port,
11775 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11780 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11781 /* Avoid a crash on native Windows. */
11782 #define WIN32_LEAN_AND_MEAN
11783 #include <windows.h>
11784 #include <winerror.h>
11786 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11788 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11790 case EXCEPTION_ACCESS_VIOLATION:
11791 case EXCEPTION_IN_PAGE_ERROR:
11792 case EXCEPTION_STACK_OVERFLOW:
11793 case EXCEPTION_GUARD_PAGE:
11794 case EXCEPTION_PRIV_INSTRUCTION:
11795 case EXCEPTION_ILLEGAL_INSTRUCTION:
11796 case EXCEPTION_DATATYPE_MISALIGNMENT:
11797 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11798 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11801 return EXCEPTION_CONTINUE_SEARCH;
11804 nocrash_init (void)
11806 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11809 /* Avoid a crash on POSIX systems. */
11810 #include <signal.h>
11811 /* A POSIX signal handler. */
11813 exception_handler (int sig)
11818 nocrash_init (void)
11821 signal (SIGSEGV, exception_handler);
11824 signal (SIGBUS, exception_handler);
11838 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11839 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11840 OSF/1 5.1, Solaris 10. */
11842 static char conftest[] = "conftest";
11843 static char plus[] = "-+";
11844 char *argv[3] = { conftest, plus, NULL };
11846 if (getopt (2, argv, "+a") != '?')
11849 /* This code succeeds on glibc 2.8, mingw,
11850 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11851 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
11853 static char program[] = "program";
11854 static char p[] = "-p";
11855 static char foo[] = "foo";
11856 static char bar[] = "bar";
11857 char *argv[] = { program, p, foo, bar, NULL };
11860 if (getopt (4, argv, "p::") != 'p')
11862 else if (optarg != NULL)
11864 else if (getopt (4, argv, "p::") != -1)
11866 else if (optind != 2)
11869 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
11871 static char program[] = "program";
11872 static char foo[] = "foo";
11873 static char p[] = "-p";
11874 char *argv[] = { program, foo, p, NULL };
11876 if (getopt (3, argv, "-p") != 1)
11878 else if (getopt (3, argv, "-p") != 'p')
11881 /* This code fails on glibc 2.11. */
11883 static char program[] = "program";
11884 static char b[] = "-b";
11885 static char a[] = "-a";
11886 char *argv[] = { program, b, a, NULL };
11887 optind = opterr = 0;
11888 if (getopt (3, argv, "+:a:b") != 'b')
11890 else if (getopt (3, argv, "+:a:b") != ':')
11893 /* This code dumps core on glibc 2.14. */
11895 static char program[] = "program";
11896 static char w[] = "-W";
11897 static char dummy[] = "dummy";
11898 char *argv[] = { program, w, dummy, NULL };
11899 optind = opterr = 1;
11900 if (getopt (3, argv, "W;") != 'W')
11909 if ac_fn_c_try_run "$LINENO"; then :
11910 gl_cv_func_getopt_gnu=yes
11912 gl_cv_func_getopt_gnu=no
11914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11915 conftest.$ac_objext conftest.beam conftest.$ac_ext
11918 case $gl_had_POSIXLY_CORRECT in
11920 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11921 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11926 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11927 if test "$gl_cv_func_getopt_gnu" != yes; then
11928 gl_replace_getopt=yes
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11931 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11932 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11933 $as_echo_n "(cached) " >&6
11935 if test "$cross_compiling" = yes; then :
11937 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11938 *) gl_cv_func_getopt_long_gnu="guessing yes";;
11942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11943 /* end confdefs.h. */
11944 #include <getopt.h>
11945 #include <stddef.h>
11946 #include <string.h>
11951 static const struct option long_options[] =
11953 { "xtremely-",no_argument, NULL, 1003 },
11954 { "xtra", no_argument, NULL, 1001 },
11955 { "xtreme", no_argument, NULL, 1002 },
11956 { "xtremely", no_argument, NULL, 1003 },
11957 { NULL, 0, NULL, 0 }
11959 /* This code fails on OpenBSD 5.0. */
11961 static char program[] = "program";
11962 static char xtremel[] = "--xtremel";
11963 char *argv[] = { program, xtremel, NULL };
11965 optind = 1; opterr = 0;
11966 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11975 if ac_fn_c_try_run "$LINENO"; then :
11976 gl_cv_func_getopt_long_gnu=yes
11978 gl_cv_func_getopt_long_gnu=no
11980 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11981 conftest.$ac_objext conftest.beam conftest.$ac_ext
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11987 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11988 case "$gl_cv_func_getopt_long_gnu" in
11990 *) gl_replace_getopt=yes ;;
12001 if test -n "$gl_replace_getopt"; then
12005 if test $REPLACE_GETOPT = 1; then
12009 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12016 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12017 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12023 cat >>confdefs.h <<_ACEOF
12024 #define HAVE_DECL_GETENV $ac_have_decl
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
12040 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
12041 if ${ac_cv_c_restrict+:} false; then :
12042 $as_echo_n "(cached) " >&6
12044 ac_cv_c_restrict=no
12045 # The order here caters to the fact that C++ does not require restrict.
12046 for ac_kw in __restrict __restrict__ _Restrict restrict; do
12047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048 /* end confdefs.h. */
12049 typedef int * int_ptr;
12050 int foo (int_ptr $ac_kw ip) {
12057 int * $ac_kw t = s;
12064 if ac_fn_c_try_compile "$LINENO"; then :
12065 ac_cv_c_restrict=$ac_kw
12067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12068 test "$ac_cv_c_restrict" != no && break
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
12073 $as_echo "$ac_cv_c_restrict" >&6; }
12075 case $ac_cv_c_restrict in
12077 no) $as_echo "#define restrict /**/" >>confdefs.h
12079 *) cat >>confdefs.h <<_ACEOF
12080 #define restrict $ac_cv_c_restrict
12086 GNULIB_GETTIMEOFDAY=0;
12087 HAVE_GETTIMEOFDAY=1;
12088 HAVE_STRUCT_TIMEVAL=1;
12090 REPLACE_GETTIMEOFDAY=0;
12091 REPLACE_STRUCT_TIMEVAL=0;
12123 if test $gl_cv_have_include_next = yes; then
12124 gl_cv_next_sys_time_h='<'sys/time.h'>'
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12127 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12128 if ${gl_cv_next_sys_time_h+:} false; then :
12129 $as_echo_n "(cached) " >&6
12132 if test $ac_cv_header_sys_time_h = yes; then
12137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12138 /* end confdefs.h. */
12139 #include <sys/time.h>
12142 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12143 *) gl_absname_cpp="$ac_cpp" ;;
12148 gl_dirsep_regex='[/\\]'
12151 gl_dirsep_regex='\/'
12154 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12155 gl_header_literal_regex=`echo 'sys/time.h' \
12156 | sed -e "$gl_make_literal_regex_sed"`
12157 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12158 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12164 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12165 sed -n "$gl_absolute_header_sed"`
12167 gl_header=$gl_cv_absolute_sys_time_h
12168 gl_cv_next_sys_time_h='"'$gl_header'"'
12170 gl_cv_next_sys_time_h='<'sys/time.h'>'
12175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12176 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12178 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12180 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12181 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12182 gl_next_as_first_directive='<'sys/time.h'>'
12184 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12185 gl_next_as_first_directive=$gl_cv_next_sys_time_h
12187 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12193 if test $ac_cv_header_sys_time_h != yes; then
12207 if test $ac_cv_header_sys_socket_h != yes; then
12208 for ac_header in winsock2.h
12210 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12211 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12212 cat >>confdefs.h <<_ACEOF
12213 #define HAVE_WINSOCK2_H 1
12221 if test "$ac_cv_header_winsock2_h" = yes; then
12223 UNISTD_H_HAVE_WINSOCK2_H=1
12224 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12231 $as_echo_n "checking for struct timeval... " >&6; }
12232 if ${gl_cv_sys_struct_timeval+:} false; then :
12233 $as_echo_n "(cached) " >&6
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h. */
12237 #if HAVE_SYS_TIME_H
12238 #include <sys/time.h>
12241 #if HAVE_WINSOCK2_H
12242 # include <winsock2.h>
12248 static struct timeval x; x.tv_sec = x.tv_usec;
12253 if ac_fn_c_try_compile "$LINENO"; then :
12254 gl_cv_sys_struct_timeval=yes
12256 gl_cv_sys_struct_timeval=no
12258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12262 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12263 if test $gl_cv_sys_struct_timeval != yes; then
12264 HAVE_STRUCT_TIMEVAL=0
12266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12267 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12268 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12269 $as_echo_n "(cached) " >&6
12271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12272 /* end confdefs.h. */
12273 #if HAVE_SYS_TIME_H
12274 #include <sys/time.h>
12277 #if HAVE_WINSOCK2_H
12278 # include <winsock2.h>
12284 static struct timeval x;
12285 typedef int verify_tv_sec_type[
12286 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12293 if ac_fn_c_try_compile "$LINENO"; then :
12294 gl_cv_sys_struct_timeval_tv_sec=yes
12296 gl_cv_sys_struct_timeval_tv_sec=no
12298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12302 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12303 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12304 REPLACE_STRUCT_TIMEVAL=1
12309 for gl_func in gettimeofday; do
12310 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12312 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12313 if eval \${$as_gl_Symbol+:} false; then :
12314 $as_echo_n "(cached) " >&6
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317 /* end confdefs.h. */
12319 #if HAVE_SYS_TIME_H
12320 # include <sys/time.h>
12333 if ac_fn_c_try_compile "$LINENO"; then :
12334 eval "$as_gl_Symbol=yes"
12336 eval "$as_gl_Symbol=no"
12338 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12340 eval ac_res=\$$as_gl_Symbol
12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12342 $as_echo "$ac_res" >&6; }
12343 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12344 cat >>confdefs.h <<_ACEOF
12345 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12348 eval ac_cv_have_decl_$gl_func=yes
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12357 $as_echo_n "checking for inline... " >&6; }
12358 if ${ac_cv_c_inline+:} false; then :
12359 $as_echo_n "(cached) " >&6
12362 for ac_kw in inline __inline__ __inline; do
12363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364 /* end confdefs.h. */
12365 #ifndef __cplusplus
12367 static $ac_kw foo_t static_foo () {return 0; }
12368 $ac_kw foo_t foo () {return 0; }
12372 if ac_fn_c_try_compile "$LINENO"; then :
12373 ac_cv_c_inline=$ac_kw
12375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376 test "$ac_cv_c_inline" != no && break
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12381 $as_echo "$ac_cv_c_inline" >&6; }
12383 case $ac_cv_c_inline in
12386 case $ac_cv_c_inline in
12388 *) ac_val=$ac_cv_c_inline;;
12390 cat >>confdefs.h <<_ACEOF
12391 #ifndef __cplusplus
12392 #define inline $ac_val
12399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12400 $as_echo_n "checking for unsigned long long int... " >&6; }
12401 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12402 $as_echo_n "(cached) " >&6
12404 ac_cv_type_unsigned_long_long_int=yes
12405 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h. */
12409 /* For now, do not test the preprocessor; as of 2007 there are too many
12410 implementations with broken preprocessors. Perhaps this can
12411 be revisited in 2012. In the meantime, code should not expect
12412 #if to work with literals wider than 32 bits. */
12413 /* Test literals. */
12414 long long int ll = 9223372036854775807ll;
12415 long long int nll = -9223372036854775807LL;
12416 unsigned long long int ull = 18446744073709551615ULL;
12417 /* Test constant expressions. */
12418 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12420 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12426 /* Test availability of runtime routines for shift and division. */
12427 long long int llmax = 9223372036854775807ll;
12428 unsigned long long int ullmax = 18446744073709551615ull;
12429 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12430 | (llmax / ll) | (llmax % ll)
12431 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12432 | (ullmax / ull) | (ullmax % ull));
12438 if ac_fn_c_try_link "$LINENO"; then :
12441 ac_cv_type_unsigned_long_long_int=no
12443 rm -f core conftest.err conftest.$ac_objext \
12444 conftest$ac_exeext conftest.$ac_ext
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12448 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12449 if test $ac_cv_type_unsigned_long_long_int = yes; then
12451 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12458 $as_echo_n "checking for long long int... " >&6; }
12459 if ${ac_cv_type_long_long_int+:} false; then :
12460 $as_echo_n "(cached) " >&6
12462 ac_cv_type_long_long_int=yes
12463 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12464 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12465 if test $ac_cv_type_long_long_int = yes; then
12466 if test "$cross_compiling" = yes; then :
12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h. */
12471 #include <limits.h>
12474 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12475 # define LLONG_MAX (HALF - 1 + HALF)
12480 long long int n = 1;
12484 long long int m = n << i;
12487 if (LLONG_MAX / 2 < m)
12495 if ac_fn_c_try_run "$LINENO"; then :
12498 ac_cv_type_long_long_int=no
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501 conftest.$ac_objext conftest.beam conftest.$ac_ext
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12508 $as_echo "$ac_cv_type_long_long_int" >&6; }
12509 if test $ac_cv_type_long_long_int = yes; then
12511 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12526 gl_cv_c_multiarch=no
12527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12528 /* end confdefs.h. */
12529 #ifndef __APPLE_CC__
12530 not a universal capable compiler
12535 if ac_fn_c_try_compile "$LINENO"; then :
12539 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12540 if test -n "$prev"; then
12542 i?86 | x86_64 | ppc | ppc64)
12543 if test -z "$arch" || test "$arch" = "$word"; then
12546 gl_cv_c_multiarch=yes
12552 if test "x$word" = "x-arch"; then
12559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12560 if test $gl_cv_c_multiarch = yes; then
12561 APPLE_UNIVERSAL_BUILD=1
12563 APPLE_UNIVERSAL_BUILD=0
12570 if test $ac_cv_type_long_long_int = yes; then
12571 HAVE_LONG_LONG_INT=1
12573 HAVE_LONG_LONG_INT=0
12577 if test $ac_cv_type_unsigned_long_long_int = yes; then
12578 HAVE_UNSIGNED_LONG_LONG_INT=1
12580 HAVE_UNSIGNED_LONG_LONG_INT=0
12591 if test $ac_cv_header_wchar_h = yes; then
12598 if test $ac_cv_header_inttypes_h = yes; then
12605 if test $ac_cv_header_sys_types_h = yes; then
12627 if test $gl_cv_have_include_next = yes; then
12628 gl_cv_next_stdint_h='<'stdint.h'>'
12630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12631 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12632 if ${gl_cv_next_stdint_h+:} false; then :
12633 $as_echo_n "(cached) " >&6
12636 if test $ac_cv_header_stdint_h = yes; then
12641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12642 /* end confdefs.h. */
12643 #include <stdint.h>
12646 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12647 *) gl_absname_cpp="$ac_cpp" ;;
12652 gl_dirsep_regex='[/\\]'
12655 gl_dirsep_regex='\/'
12658 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12659 gl_header_literal_regex=`echo 'stdint.h' \
12660 | sed -e "$gl_make_literal_regex_sed"`
12661 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12662 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12668 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12669 sed -n "$gl_absolute_header_sed"`
12671 gl_header=$gl_cv_absolute_stdint_h
12672 gl_cv_next_stdint_h='"'$gl_header'"'
12674 gl_cv_next_stdint_h='<'stdint.h'>'
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12680 $as_echo "$gl_cv_next_stdint_h" >&6; }
12682 NEXT_STDINT_H=$gl_cv_next_stdint_h
12684 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12686 gl_next_as_first_directive='<'stdint.h'>'
12688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12689 gl_next_as_first_directive=$gl_cv_next_stdint_h
12691 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12696 if test $ac_cv_header_stdint_h = yes; then
12703 if test $ac_cv_header_stdint_h = yes; then
12704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12705 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12706 if ${gl_cv_header_working_stdint_h+:} false; then :
12707 $as_echo_n "(cached) " >&6
12709 gl_cv_header_working_stdint_h=no
12710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711 /* end confdefs.h. */
12714 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12715 #include <stdint.h>
12716 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12717 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12718 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12722 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12723 included before <wchar.h>. */
12724 #include <stddef.h>
12725 #include <signal.h>
12727 # include <stdio.h>
12729 # include <wchar.h>
12734 int8_t a1 = INT8_MAX;
12735 int8_t a1min = INT8_MIN;
12738 int16_t a2 = INT16_MAX;
12739 int16_t a2min = INT16_MIN;
12742 int32_t a3 = INT32_MAX;
12743 int32_t a3min = INT32_MIN;
12746 int64_t a4 = INT64_MAX;
12747 int64_t a4min = INT64_MIN;
12750 uint8_t b1 = UINT8_MAX;
12752 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12755 uint16_t b2 = UINT16_MAX;
12758 uint32_t b3 = UINT32_MAX;
12761 uint64_t b4 = UINT64_MAX;
12763 int_least8_t c1 = INT8_C (0x7f);
12764 int_least8_t c1max = INT_LEAST8_MAX;
12765 int_least8_t c1min = INT_LEAST8_MIN;
12766 int_least16_t c2 = INT16_C (0x7fff);
12767 int_least16_t c2max = INT_LEAST16_MAX;
12768 int_least16_t c2min = INT_LEAST16_MIN;
12769 int_least32_t c3 = INT32_C (0x7fffffff);
12770 int_least32_t c3max = INT_LEAST32_MAX;
12771 int_least32_t c3min = INT_LEAST32_MIN;
12772 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12773 int_least64_t c4max = INT_LEAST64_MAX;
12774 int_least64_t c4min = INT_LEAST64_MIN;
12775 uint_least8_t d1 = UINT8_C (0xff);
12776 uint_least8_t d1max = UINT_LEAST8_MAX;
12777 uint_least16_t d2 = UINT16_C (0xffff);
12778 uint_least16_t d2max = UINT_LEAST16_MAX;
12779 uint_least32_t d3 = UINT32_C (0xffffffff);
12780 uint_least32_t d3max = UINT_LEAST32_MAX;
12781 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12782 uint_least64_t d4max = UINT_LEAST64_MAX;
12783 int_fast8_t e1 = INT_FAST8_MAX;
12784 int_fast8_t e1min = INT_FAST8_MIN;
12785 int_fast16_t e2 = INT_FAST16_MAX;
12786 int_fast16_t e2min = INT_FAST16_MIN;
12787 int_fast32_t e3 = INT_FAST32_MAX;
12788 int_fast32_t e3min = INT_FAST32_MIN;
12789 int_fast64_t e4 = INT_FAST64_MAX;
12790 int_fast64_t e4min = INT_FAST64_MIN;
12791 uint_fast8_t f1 = UINT_FAST8_MAX;
12792 uint_fast16_t f2 = UINT_FAST16_MAX;
12793 uint_fast32_t f3 = UINT_FAST32_MAX;
12794 uint_fast64_t f4 = UINT_FAST64_MAX;
12796 intptr_t g = INTPTR_MAX;
12797 intptr_t gmin = INTPTR_MIN;
12800 uintptr_t h = UINTPTR_MAX;
12802 intmax_t i = INTMAX_MAX;
12803 uintmax_t j = UINTMAX_MAX;
12805 #include <limits.h> /* for CHAR_BIT */
12806 #define TYPE_MINIMUM(t) \
12807 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12808 #define TYPE_MAXIMUM(t) \
12809 ((t) ((t) 0 < (t) -1 \
12811 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12814 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12815 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12817 /* Detect bug in FreeBSD 6.0 / ia64. */
12818 int check_SIG_ATOMIC:
12819 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12820 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12822 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12824 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12825 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12827 /* Detect bug in mingw. */
12829 WINT_MIN == TYPE_MINIMUM (wint_t)
12830 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12833 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12835 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12836 int check_UINT16_C:
12837 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12839 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12841 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12844 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12847 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12850 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12852 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12853 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12854 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12855 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12856 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12857 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12858 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12859 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12860 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12861 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12862 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12873 if ac_fn_c_try_compile "$LINENO"; then :
12874 if test "$cross_compiling" = yes; then :
12875 gl_cv_header_working_stdint_h=yes
12878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12879 /* end confdefs.h. */
12882 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12883 #include <stdint.h>
12886 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12887 included before <wchar.h>. */
12888 #include <stddef.h>
12889 #include <signal.h>
12891 # include <stdio.h>
12893 # include <wchar.h>
12898 #include <string.h>
12899 #define MVAL(macro) MVAL1(macro)
12900 #define MVAL1(expression) #expression
12901 static const char *macro_values[] =
12935 for (mv = macro_values; *mv != NULL; mv++)
12937 const char *value = *mv;
12938 /* Test whether it looks like a cast expression. */
12939 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12940 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12941 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12942 || strncmp (value, "((int)"/*)*/, 6) == 0
12943 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12944 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12945 return mv - macro_values + 1;
12953 if ac_fn_c_try_run "$LINENO"; then :
12954 gl_cv_header_working_stdint_h=yes
12956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12957 conftest.$ac_objext conftest.beam conftest.$ac_ext
12962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12966 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12968 if test "$gl_cv_header_working_stdint_h" = yes; then
12971 for ac_header in sys/inttypes.h sys/bitypes.h
12973 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12974 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12975 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12976 cat >>confdefs.h <<_ACEOF
12977 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12984 if test $ac_cv_header_sys_inttypes_h = yes; then
12985 HAVE_SYS_INTTYPES_H=1
12987 HAVE_SYS_INTTYPES_H=0
12990 if test $ac_cv_header_sys_bitypes_h = yes; then
12991 HAVE_SYS_BITYPES_H=1
12993 HAVE_SYS_BITYPES_H=0
12999 if test $APPLE_UNIVERSAL_BUILD = 0; then
13002 for gltype in ptrdiff_t size_t ; do
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13004 $as_echo_n "checking for bit size of $gltype... " >&6; }
13005 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13006 $as_echo_n "(cached) " >&6
13008 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13009 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13010 included before <wchar.h>. */
13011 #include <stddef.h>
13012 #include <signal.h>
13014 # include <stdio.h>
13016 # include <wchar.h>
13019 #include <limits.h>"; then :
13025 eval gl_cv_bitsizeof_${gltype}=\$result
13028 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13030 $as_echo "$ac_res" >&6; }
13031 eval result=\$gl_cv_bitsizeof_${gltype}
13032 if test $result = unknown; then
13035 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13036 cat >>confdefs.h <<_ACEOF
13037 #define BITSIZEOF_${GLTYPE} $result
13040 eval BITSIZEOF_${GLTYPE}=\$result
13047 for gltype in sig_atomic_t wchar_t wint_t ; do
13048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13049 $as_echo_n "checking for bit size of $gltype... " >&6; }
13050 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
13051 $as_echo_n "(cached) " >&6
13053 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13054 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13055 included before <wchar.h>. */
13056 #include <stddef.h>
13057 #include <signal.h>
13059 # include <stdio.h>
13061 # include <wchar.h>
13064 #include <limits.h>"; then :
13070 eval gl_cv_bitsizeof_${gltype}=\$result
13073 eval ac_res=\$gl_cv_bitsizeof_${gltype}
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13075 $as_echo "$ac_res" >&6; }
13076 eval result=\$gl_cv_bitsizeof_${gltype}
13077 if test $result = unknown; then
13080 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13081 cat >>confdefs.h <<_ACEOF
13082 #define BITSIZEOF_${GLTYPE} $result
13085 eval BITSIZEOF_${GLTYPE}=\$result
13091 for gltype in sig_atomic_t wchar_t wint_t ; do
13092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13093 $as_echo_n "checking whether $gltype is signed... " >&6; }
13094 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
13095 $as_echo_n "(cached) " >&6
13097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13098 /* end confdefs.h. */
13100 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13101 included before <wchar.h>. */
13102 #include <stddef.h>
13103 #include <signal.h>
13105 # include <stdio.h>
13107 # include <wchar.h>
13110 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13119 if ac_fn_c_try_compile "$LINENO"; then :
13124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13125 eval gl_cv_type_${gltype}_signed=\$result
13128 eval ac_res=\$gl_cv_type_${gltype}_signed
13129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13130 $as_echo "$ac_res" >&6; }
13131 eval result=\$gl_cv_type_${gltype}_signed
13132 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13133 if test "$result" = yes; then
13134 cat >>confdefs.h <<_ACEOF
13135 #define HAVE_SIGNED_${GLTYPE} 1
13138 eval HAVE_SIGNED_${GLTYPE}=1
13140 eval HAVE_SIGNED_${GLTYPE}=0
13145 gl_cv_type_ptrdiff_t_signed=yes
13146 gl_cv_type_size_t_signed=no
13147 if test $APPLE_UNIVERSAL_BUILD = 0; then
13150 for gltype in ptrdiff_t size_t ; do
13151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13152 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13153 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13154 $as_echo_n "(cached) " >&6
13156 eval gl_cv_type_${gltype}_suffix=no
13157 eval result=\$gl_cv_type_${gltype}_signed
13158 if test "$result" = yes; then
13163 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13165 '') gltype1='int';;
13166 l) gltype1='long int';;
13167 ll) gltype1='long long int';;
13168 i64) gltype1='__int64';;
13169 u) gltype1='unsigned int';;
13170 ul) gltype1='unsigned long int';;
13171 ull) gltype1='unsigned long long int';;
13172 ui64)gltype1='unsigned __int64';;
13174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13175 /* end confdefs.h. */
13177 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13178 included before <wchar.h>. */
13179 #include <stddef.h>
13180 #include <signal.h>
13182 # include <stdio.h>
13184 # include <wchar.h>
13187 extern $gltype foo;
13188 extern $gltype1 foo;
13197 if ac_fn_c_try_compile "$LINENO"; then :
13198 eval gl_cv_type_${gltype}_suffix=\$glsuf
13200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13201 eval result=\$gl_cv_type_${gltype}_suffix
13202 test "$result" != no && break
13205 eval ac_res=\$gl_cv_type_${gltype}_suffix
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13207 $as_echo "$ac_res" >&6; }
13208 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13209 eval result=\$gl_cv_type_${gltype}_suffix
13210 test "$result" = no && result=
13211 eval ${GLTYPE}_SUFFIX=\$result
13212 cat >>confdefs.h <<_ACEOF
13213 #define ${GLTYPE}_SUFFIX $result
13222 for gltype in sig_atomic_t wchar_t wint_t ; do
13223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13224 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13225 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13226 $as_echo_n "(cached) " >&6
13228 eval gl_cv_type_${gltype}_suffix=no
13229 eval result=\$gl_cv_type_${gltype}_signed
13230 if test "$result" = yes; then
13235 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13237 '') gltype1='int';;
13238 l) gltype1='long int';;
13239 ll) gltype1='long long int';;
13240 i64) gltype1='__int64';;
13241 u) gltype1='unsigned int';;
13242 ul) gltype1='unsigned long int';;
13243 ull) gltype1='unsigned long long int';;
13244 ui64)gltype1='unsigned __int64';;
13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h. */
13249 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13250 included before <wchar.h>. */
13251 #include <stddef.h>
13252 #include <signal.h>
13254 # include <stdio.h>
13256 # include <wchar.h>
13259 extern $gltype foo;
13260 extern $gltype1 foo;
13269 if ac_fn_c_try_compile "$LINENO"; then :
13270 eval gl_cv_type_${gltype}_suffix=\$glsuf
13272 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13273 eval result=\$gl_cv_type_${gltype}_suffix
13274 test "$result" != no && break
13277 eval ac_res=\$gl_cv_type_${gltype}_suffix
13278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13279 $as_echo "$ac_res" >&6; }
13280 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13281 eval result=\$gl_cv_type_${gltype}_suffix
13282 test "$result" = no && result=
13283 eval ${GLTYPE}_SUFFIX=\$result
13284 cat >>confdefs.h <<_ACEOF
13285 #define ${GLTYPE}_SUFFIX $result
13292 if test $BITSIZEOF_WINT_T -lt 32; then
13293 BITSIZEOF_WINT_T=32
13299 if test -n "$STDINT_H"; then
13300 GL_GENERATE_STDINT_H_TRUE=
13301 GL_GENERATE_STDINT_H_FALSE='#'
13303 GL_GENERATE_STDINT_H_TRUE='#'
13304 GL_GENERATE_STDINT_H_FALSE=
13316 GNULIB_STRTOIMAX=0;
13317 GNULIB_STRTOUMAX=0;
13318 HAVE_DECL_IMAXABS=1;
13319 HAVE_DECL_IMAXDIV=1;
13320 HAVE_DECL_STRTOIMAX=1;
13321 HAVE_DECL_STRTOUMAX=1;
13322 REPLACE_STRTOIMAX=0;
13323 REPLACE_STRTOUMAX=0;
13324 INT32_MAX_LT_INTMAX_MAX=1;
13325 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13326 PRI_MACROS_BROKEN=0;
13327 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13328 UINT32_MAX_LT_UINTMAX_MAX=1;
13329 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13357 if test $gl_cv_have_include_next = yes; then
13358 gl_cv_next_inttypes_h='<'inttypes.h'>'
13360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13361 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13362 if ${gl_cv_next_inttypes_h+:} false; then :
13363 $as_echo_n "(cached) " >&6
13366 if test $ac_cv_header_inttypes_h = yes; then
13371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13372 /* end confdefs.h. */
13373 #include <inttypes.h>
13376 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13377 *) gl_absname_cpp="$ac_cpp" ;;
13382 gl_dirsep_regex='[/\\]'
13385 gl_dirsep_regex='\/'
13388 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13389 gl_header_literal_regex=`echo 'inttypes.h' \
13390 | sed -e "$gl_make_literal_regex_sed"`
13391 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13392 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13398 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13399 sed -n "$gl_absolute_header_sed"`
13401 gl_header=$gl_cv_absolute_inttypes_h
13402 gl_cv_next_inttypes_h='"'$gl_header'"'
13404 gl_cv_next_inttypes_h='<'inttypes.h'>'
13409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13410 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13412 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13414 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13415 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13416 gl_next_as_first_directive='<'inttypes.h'>'
13418 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13419 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13421 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13430 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13431 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13433 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13434 if eval \${$as_gl_Symbol+:} false; then :
13435 $as_echo_n "(cached) " >&6
13437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13438 /* end confdefs.h. */
13439 #include <inttypes.h>
13450 if ac_fn_c_try_compile "$LINENO"; then :
13451 eval "$as_gl_Symbol=yes"
13453 eval "$as_gl_Symbol=no"
13455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13457 eval ac_res=\$$as_gl_Symbol
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13459 $as_echo "$ac_res" >&6; }
13460 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13461 cat >>confdefs.h <<_ACEOF
13462 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13465 eval ac_cv_have_decl_$gl_func=yes
13471 for ac_header in inttypes.h
13473 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13474 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13475 cat >>confdefs.h <<_ACEOF
13476 #define HAVE_INTTYPES_H 1
13483 if test $ac_cv_header_inttypes_h = yes; then
13484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13485 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13486 if ${gt_cv_inttypes_pri_broken+:} false; then :
13487 $as_echo_n "(cached) " >&6
13490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13491 /* end confdefs.h. */
13493 #include <inttypes.h>
13506 if ac_fn_c_try_compile "$LINENO"; then :
13507 gt_cv_inttypes_pri_broken=no
13509 gt_cv_inttypes_pri_broken=yes
13511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13515 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13517 if test "$gt_cv_inttypes_pri_broken" = yes; then
13519 cat >>confdefs.h <<_ACEOF
13520 #define PRI_MACROS_BROKEN 1
13523 PRI_MACROS_BROKEN=1
13525 PRI_MACROS_BROKEN=0
13544 GNULIB_COPYSIGNF=0;
13545 GNULIB_COPYSIGNL=0;
13604 GNULIB_REMAINDER=0;
13605 GNULIB_REMAINDERF=0;
13606 GNULIB_REMAINDERL=0;
13692 HAVE_DECL_COPYSIGNF=1;
13698 HAVE_DECL_EXPM1L=1;
13699 HAVE_DECL_FLOORF=1;
13700 HAVE_DECL_FLOORL=1;
13701 HAVE_DECL_FREXPL=1;
13702 HAVE_DECL_LDEXPL=1;
13704 HAVE_DECL_LOG10L=1;
13709 HAVE_DECL_REMAINDER=1;
13710 HAVE_DECL_REMAINDERL=1;
13713 HAVE_DECL_ROUNDF=1;
13714 HAVE_DECL_ROUNDL=1;
13719 HAVE_DECL_TRUNCF=1;
13720 HAVE_DECL_TRUNCL=1;
13743 REPLACE_HUGE_VAL=0;
13749 REPLACE_ISFINITE=0;
13772 REPLACE_REMAINDER=0;
13773 REPLACE_REMAINDERF=0;
13774 REPLACE_REMAINDERL=0;
13779 REPLACE_SIGNBIT_USING_GCC=0;
13786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13787 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13788 if ${ac_cv_c_bigendian+:} false; then :
13789 $as_echo_n "(cached) " >&6
13791 ac_cv_c_bigendian=unknown
13792 # See if we're dealing with a universal compiler.
13793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794 /* end confdefs.h. */
13795 #ifndef __APPLE_CC__
13796 not a universal capable compiler
13801 if ac_fn_c_try_compile "$LINENO"; then :
13803 # Check for potential -arch flags. It is not universal unless
13804 # there are at least two -arch flags with different values.
13807 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13808 if test -n "$ac_prev"; then
13810 i?86 | x86_64 | ppc | ppc64)
13811 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13814 ac_cv_c_bigendian=universal
13820 elif test "x$ac_word" = "x-arch"; then
13825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13826 if test $ac_cv_c_bigendian = unknown; then
13827 # See if sys/param.h defines the BYTE_ORDER macro.
13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h. */
13830 #include <sys/types.h>
13831 #include <sys/param.h>
13836 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13837 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13839 bogus endian macros
13846 if ac_fn_c_try_compile "$LINENO"; then :
13847 # It does; now see whether it defined to BIG_ENDIAN or not.
13848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13849 /* end confdefs.h. */
13850 #include <sys/types.h>
13851 #include <sys/param.h>
13856 #if BYTE_ORDER != BIG_ENDIAN
13864 if ac_fn_c_try_compile "$LINENO"; then :
13865 ac_cv_c_bigendian=yes
13867 ac_cv_c_bigendian=no
13869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13873 if test $ac_cv_c_bigendian = unknown; then
13874 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13876 /* end confdefs.h. */
13877 #include <limits.h>
13882 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13883 bogus endian macros
13890 if ac_fn_c_try_compile "$LINENO"; then :
13891 # It does; now see whether it defined to _BIG_ENDIAN or not.
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h. */
13894 #include <limits.h>
13899 #ifndef _BIG_ENDIAN
13907 if ac_fn_c_try_compile "$LINENO"; then :
13908 ac_cv_c_bigendian=yes
13910 ac_cv_c_bigendian=no
13912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13916 if test $ac_cv_c_bigendian = unknown; then
13917 # Compile a test program.
13918 if test "$cross_compiling" = yes; then :
13919 # Try to guess by grepping values from an object file.
13920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13921 /* end confdefs.h. */
13922 short int ascii_mm[] =
13923 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13924 short int ascii_ii[] =
13925 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13926 int use_ascii (int i) {
13927 return ascii_mm[i] + ascii_ii[i];
13929 short int ebcdic_ii[] =
13930 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13931 short int ebcdic_mm[] =
13932 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13933 int use_ebcdic (int i) {
13934 return ebcdic_mm[i] + ebcdic_ii[i];
13941 return use_ascii (foo) == use_ebcdic (foo);
13946 if ac_fn_c_try_compile "$LINENO"; then :
13947 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13948 ac_cv_c_bigendian=yes
13950 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13951 if test "$ac_cv_c_bigendian" = unknown; then
13952 ac_cv_c_bigendian=no
13954 # finding both strings is unlikely to happen, but who knows?
13955 ac_cv_c_bigendian=unknown
13959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13962 /* end confdefs.h. */
13963 $ac_includes_default
13968 /* Are we little or big endian? From Harbison&Steele. */
13972 char c[sizeof (long int)];
13975 return u.c[sizeof (long int) - 1] == 1;
13981 if ac_fn_c_try_run "$LINENO"; then :
13982 ac_cv_c_bigendian=no
13984 ac_cv_c_bigendian=yes
13986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13987 conftest.$ac_objext conftest.beam conftest.$ac_ext
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13993 $as_echo "$ac_cv_c_bigendian" >&6; }
13994 case $ac_cv_c_bigendian in #(
13996 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14002 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14006 as_fn_error $? "unknown endianness
14007 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
14013 $as_echo_n "checking whether long double and double are the same... " >&6; }
14014 if ${gl_cv_long_double_equals_double+:} false; then :
14015 $as_echo_n "(cached) " >&6
14017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14018 /* end confdefs.h. */
14023 typedef int check[sizeof (long double) == sizeof (double)
14024 && LDBL_MANT_DIG == DBL_MANT_DIG
14025 && LDBL_MAX_EXP == DBL_MAX_EXP
14026 && LDBL_MIN_EXP == DBL_MIN_EXP
14033 if ac_fn_c_try_compile "$LINENO"; then :
14034 gl_cv_long_double_equals_double=yes
14036 gl_cv_long_double_equals_double=no
14038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
14042 $as_echo "$gl_cv_long_double_equals_double" >&6; }
14043 if test $gl_cv_long_double_equals_double = yes; then
14045 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
14047 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1
14049 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
14055 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
14056 if ${gl_cv_cc_double_expbit0+:} false; then :
14057 $as_echo_n "(cached) " >&6
14060 if test "$cross_compiling" = yes; then :
14062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14063 /* end confdefs.h. */
14065 #if defined arm || defined __arm || defined __arm__
14070 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14071 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
14072 gl_cv_cc_double_expbit0="unknown"
14076 if ${ac_cv_c_bigendian+:} false; then :
14077 $as_echo_n "(cached) " >&6
14079 ac_cv_c_bigendian=unknown
14080 # See if we're dealing with a universal compiler.
14081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14082 /* end confdefs.h. */
14083 #ifndef __APPLE_CC__
14084 not a universal capable compiler
14089 if ac_fn_c_try_compile "$LINENO"; then :
14091 # Check for potential -arch flags. It is not universal unless
14092 # there are at least two -arch flags with different values.
14095 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14096 if test -n "$ac_prev"; then
14098 i?86 | x86_64 | ppc | ppc64)
14099 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14102 ac_cv_c_bigendian=universal
14108 elif test "x$ac_word" = "x-arch"; then
14113 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14114 if test $ac_cv_c_bigendian = unknown; then
14115 # See if sys/param.h defines the BYTE_ORDER macro.
14116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14117 /* end confdefs.h. */
14118 #include <sys/types.h>
14119 #include <sys/param.h>
14124 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14125 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14127 bogus endian macros
14134 if ac_fn_c_try_compile "$LINENO"; then :
14135 # It does; now see whether it defined to BIG_ENDIAN or not.
14136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137 /* end confdefs.h. */
14138 #include <sys/types.h>
14139 #include <sys/param.h>
14144 #if BYTE_ORDER != BIG_ENDIAN
14152 if ac_fn_c_try_compile "$LINENO"; then :
14153 ac_cv_c_bigendian=yes
14155 ac_cv_c_bigendian=no
14157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14161 if test $ac_cv_c_bigendian = unknown; then
14162 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14164 /* end confdefs.h. */
14165 #include <limits.h>
14170 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14171 bogus endian macros
14178 if ac_fn_c_try_compile "$LINENO"; then :
14179 # It does; now see whether it defined to _BIG_ENDIAN or not.
14180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h. */
14182 #include <limits.h>
14187 #ifndef _BIG_ENDIAN
14195 if ac_fn_c_try_compile "$LINENO"; then :
14196 ac_cv_c_bigendian=yes
14198 ac_cv_c_bigendian=no
14200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14204 if test $ac_cv_c_bigendian = unknown; then
14205 # Compile a test program.
14206 if test "$cross_compiling" = yes; then :
14207 # Try to guess by grepping values from an object file.
14208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14209 /* end confdefs.h. */
14210 short int ascii_mm[] =
14211 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14212 short int ascii_ii[] =
14213 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14214 int use_ascii (int i) {
14215 return ascii_mm[i] + ascii_ii[i];
14217 short int ebcdic_ii[] =
14218 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14219 short int ebcdic_mm[] =
14220 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14221 int use_ebcdic (int i) {
14222 return ebcdic_mm[i] + ebcdic_ii[i];
14229 return use_ascii (foo) == use_ebcdic (foo);
14234 if ac_fn_c_try_compile "$LINENO"; then :
14235 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14236 ac_cv_c_bigendian=yes
14238 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14239 if test "$ac_cv_c_bigendian" = unknown; then
14240 ac_cv_c_bigendian=no
14242 # finding both strings is unlikely to happen, but who knows?
14243 ac_cv_c_bigendian=unknown
14247 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14250 /* end confdefs.h. */
14251 $ac_includes_default
14256 /* Are we little or big endian? From Harbison&Steele. */
14260 char c[sizeof (long int)];
14263 return u.c[sizeof (long int) - 1] == 1;
14269 if ac_fn_c_try_run "$LINENO"; then :
14270 ac_cv_c_bigendian=no
14272 ac_cv_c_bigendian=yes
14274 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14275 conftest.$ac_objext conftest.beam conftest.$ac_ext
14281 case $ac_cv_c_bigendian in #(
14283 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
14285 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
14288 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14292 gl_cv_cc_double_expbit0="unknown" ;;
14301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14302 /* end confdefs.h. */
14305 #include <stddef.h>
14307 #include <string.h>
14309 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14310 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
14311 static unsigned int ored_words[NWORDS];
14312 static unsigned int anded_words[NWORDS];
14313 static void add_to_ored_words (double x)
14317 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
14318 memset (&m, 0, sizeof (memory_double));
14320 for (i = 0; i < NWORDS; i++)
14322 ored_words[i] |= m.word[i];
14323 anded_words[i] &= m.word[i];
14329 FILE *fp = fopen ("conftest.out", "w");
14332 for (j = 0; j < NWORDS; j++)
14333 anded_words[j] = ~ (unsigned int) 0;
14334 add_to_ored_words (0.25);
14335 add_to_ored_words (0.5);
14336 add_to_ored_words (1.0);
14337 add_to_ored_words (2.0);
14338 add_to_ored_words (4.0);
14339 /* Remove bits that are common (e.g. if representation of the first mantissa
14340 bit is explicit). */
14341 for (j = 0; j < NWORDS; j++)
14342 ored_words[j] &= ~anded_words[j];
14343 /* Now find the nonzero word. */
14344 for (j = 0; j < NWORDS; j++)
14345 if (ored_words[j] != 0)
14350 for (i = j + 1; i < NWORDS; i++)
14351 if (ored_words[i] != 0)
14353 fprintf (fp, "unknown");
14354 return (fclose (fp) != 0);
14357 if ((ored_words[j] >> i) & 1)
14359 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14360 return (fclose (fp) != 0);
14363 fprintf (fp, "unknown");
14364 return (fclose (fp) != 0);
14368 if ac_fn_c_try_run "$LINENO"; then :
14369 gl_cv_cc_double_expbit0=`cat conftest.out`
14371 gl_cv_cc_double_expbit0="unknown"
14373 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14374 conftest.$ac_objext conftest.beam conftest.$ac_ext
14380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
14381 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
14382 case "$gl_cv_cc_double_expbit0" in
14384 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14385 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
14387 cat >>confdefs.h <<_ACEOF
14388 #define DBL_EXPBIT0_WORD $word
14392 cat >>confdefs.h <<_ACEOF
14393 #define DBL_EXPBIT0_BIT $bit
14400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
14401 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
14402 if ${gl_cv_cc_float_expbit0+:} false; then :
14403 $as_echo_n "(cached) " >&6
14406 if test "$cross_compiling" = yes; then :
14407 gl_cv_cc_float_expbit0="word 0 bit 23"
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14410 /* end confdefs.h. */
14413 #include <stddef.h>
14415 #include <string.h>
14417 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
14418 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
14419 static unsigned int ored_words[NWORDS];
14420 static unsigned int anded_words[NWORDS];
14421 static void add_to_ored_words (float x)
14425 /* Clear it first, in case
14426 sizeof (float) < sizeof (memory_float). */
14427 memset (&m, 0, sizeof (memory_float));
14429 for (i = 0; i < NWORDS; i++)
14431 ored_words[i] |= m.word[i];
14432 anded_words[i] &= m.word[i];
14438 FILE *fp = fopen ("conftest.out", "w");
14441 for (j = 0; j < NWORDS; j++)
14442 anded_words[j] = ~ (unsigned int) 0;
14443 add_to_ored_words (0.25f);
14444 add_to_ored_words (0.5f);
14445 add_to_ored_words (1.0f);
14446 add_to_ored_words (2.0f);
14447 add_to_ored_words (4.0f);
14448 /* Remove bits that are common (e.g. if representation of the first mantissa
14449 bit is explicit). */
14450 for (j = 0; j < NWORDS; j++)
14451 ored_words[j] &= ~anded_words[j];
14452 /* Now find the nonzero word. */
14453 for (j = 0; j < NWORDS; j++)
14454 if (ored_words[j] != 0)
14459 for (i = j + 1; i < NWORDS; i++)
14460 if (ored_words[i] != 0)
14462 fprintf (fp, "unknown");
14463 return (fclose (fp) != 0);
14466 if ((ored_words[j] >> i) & 1)
14468 fprintf (fp, "word %d bit %d", (int) j, (int) i);
14469 return (fclose (fp) != 0);
14472 fprintf (fp, "unknown");
14473 return (fclose (fp) != 0);
14477 if ac_fn_c_try_run "$LINENO"; then :
14478 gl_cv_cc_float_expbit0=`cat conftest.out`
14480 gl_cv_cc_float_expbit0="unknown"
14482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14483 conftest.$ac_objext conftest.beam conftest.$ac_ext
14489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
14490 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
14491 case "$gl_cv_cc_float_expbit0" in
14493 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
14494 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
14496 cat >>confdefs.h <<_ACEOF
14497 #define FLT_EXPBIT0_WORD $word
14501 cat >>confdefs.h <<_ACEOF
14502 #define FLT_EXPBIT0_BIT $bit
14513 GNULIB_TOWCTRANS=0;
14517 REPLACE_ISWBLANK=0;
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
14526 $as_echo_n "checking for wint_t... " >&6; }
14527 if ${gt_cv_c_wint_t+:} false; then :
14528 $as_echo_n "(cached) " >&6
14530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14531 /* end confdefs.h. */
14533 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14535 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
14536 before <wchar.h>. */
14537 #include <stddef.h>
14541 wint_t foo = (wchar_t)'\0';
14550 if ac_fn_c_try_compile "$LINENO"; then :
14555 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
14558 $as_echo "$gt_cv_c_wint_t" >&6; }
14559 if test $gt_cv_c_wint_t = yes; then
14561 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
14576 if test $ac_cv_func_iswcntrl = yes; then
14584 if test $gt_cv_c_wint_t = yes; then
14606 if test $gl_cv_have_include_next = yes; then
14607 gl_cv_next_wctype_h='<'wctype.h'>'
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
14610 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
14611 if ${gl_cv_next_wctype_h+:} false; then :
14612 $as_echo_n "(cached) " >&6
14615 if test $ac_cv_header_wctype_h = yes; then
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621 /* end confdefs.h. */
14622 #include <wctype.h>
14625 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14626 *) gl_absname_cpp="$ac_cpp" ;;
14631 gl_dirsep_regex='[/\\]'
14634 gl_dirsep_regex='\/'
14637 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14638 gl_header_literal_regex=`echo 'wctype.h' \
14639 | sed -e "$gl_make_literal_regex_sed"`
14640 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14641 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14647 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14648 sed -n "$gl_absolute_header_sed"`
14650 gl_header=$gl_cv_absolute_wctype_h
14651 gl_cv_next_wctype_h='"'$gl_header'"'
14653 gl_cv_next_wctype_h='<'wctype.h'>'
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
14659 $as_echo "$gl_cv_next_wctype_h" >&6; }
14661 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
14663 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14664 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14665 gl_next_as_first_directive='<'wctype.h'>'
14667 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14668 gl_next_as_first_directive=$gl_cv_next_wctype_h
14670 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
14675 if test $ac_cv_header_wctype_h = yes; then
14676 if test $ac_cv_func_iswcntrl = yes; then
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
14678 $as_echo_n "checking whether iswcntrl works... " >&6; }
14679 if ${gl_cv_func_iswcntrl_works+:} false; then :
14680 $as_echo_n "(cached) " >&6
14683 if test "$cross_compiling" = yes; then :
14684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685 /* end confdefs.h. */
14686 #include <stdlib.h>
14687 #if __GNU_LIBRARY__ == 1
14688 Linux libc5 i18n is broken.
14698 if ac_fn_c_try_compile "$LINENO"; then :
14699 gl_cv_func_iswcntrl_works="guessing yes"
14701 gl_cv_func_iswcntrl_works="guessing no"
14703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14707 /* end confdefs.h. */
14709 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14710 included before <wchar.h>.
14711 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14712 must be included before <wchar.h>. */
14713 #include <stddef.h>
14717 #include <wctype.h>
14718 int main () { return iswprint ('x') == 0; }
14721 if ac_fn_c_try_run "$LINENO"; then :
14722 gl_cv_func_iswcntrl_works=yes
14724 gl_cv_func_iswcntrl_works=no
14726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14727 conftest.$ac_objext conftest.beam conftest.$ac_ext
14732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
14733 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
14741 case "$gl_cv_func_iswcntrl_works" in
14742 *yes) REPLACE_ISWCNTRL=0 ;;
14743 *) REPLACE_ISWCNTRL=1 ;;
14747 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
14751 if test $REPLACE_ISWCNTRL = 1; then
14754 for ac_func in towlower
14756 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
14757 if test "x$ac_cv_func_towlower" = xyes; then :
14758 cat >>confdefs.h <<_ACEOF
14759 #define HAVE_TOWLOWER 1
14765 if test $ac_cv_func_towlower = yes; then
14768 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14769 included before <wchar.h>.
14770 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14771 must be included before <wchar.h>. */
14772 #include <stddef.h>
14777 # include <wctype.h>
14781 if test "x$ac_cv_have_decl_towlower" = xyes; then :
14787 cat >>confdefs.h <<_ACEOF
14788 #define HAVE_DECL_TOWLOWER $ac_have_decl
14791 if test $ac_cv_have_decl_towlower = yes; then
14800 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
14805 $as_echo_n "checking for wctype_t... " >&6; }
14806 if ${gl_cv_type_wctype_t+:} false; then :
14807 $as_echo_n "(cached) " >&6
14809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14810 /* end confdefs.h. */
14811 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14812 included before <wchar.h>.
14813 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14814 must be included before <wchar.h>. */
14815 #include <stddef.h>
14820 # include <wctype.h>
14832 if ac_fn_c_try_compile "$LINENO"; then :
14833 gl_cv_type_wctype_t=yes
14835 gl_cv_type_wctype_t=no
14837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
14841 $as_echo "$gl_cv_type_wctype_t" >&6; }
14842 if test $gl_cv_type_wctype_t = no; then
14846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
14847 $as_echo_n "checking for wctrans_t... " >&6; }
14848 if ${gl_cv_type_wctrans_t+:} false; then :
14849 $as_echo_n "(cached) " >&6
14851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14852 /* end confdefs.h. */
14853 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
14854 included before <wchar.h>.
14855 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
14856 must be included before <wchar.h>. */
14857 #include <stddef.h>
14861 #include <wctype.h>
14872 if ac_fn_c_try_compile "$LINENO"; then :
14873 gl_cv_type_wctrans_t=yes
14875 gl_cv_type_wctrans_t=no
14877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
14881 $as_echo "$gl_cv_type_wctrans_t" >&6; }
14882 if test $gl_cv_type_wctrans_t = no; then
14887 for gl_func in wctype iswctype wctrans towctrans ; do
14888 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
14890 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
14891 if eval \${$as_gl_Symbol+:} false; then :
14892 $as_echo_n "(cached) " >&6
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14897 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14899 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14900 included before <wchar.h>. */
14901 #if !(defined __GLIBC__ && !defined __UCLIBC__)
14902 # include <stddef.h>
14903 # include <stdio.h>
14905 # include <wchar.h>
14907 #include <wctype.h>
14918 if ac_fn_c_try_compile "$LINENO"; then :
14919 eval "$as_gl_Symbol=yes"
14921 eval "$as_gl_Symbol=no"
14923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14925 eval ac_res=\$$as_gl_Symbol
14926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14927 $as_echo "$ac_res" >&6; }
14928 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
14929 cat >>confdefs.h <<_ACEOF
14930 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
14933 eval ac_cv_have_decl_$gl_func=yes
14944 GNULIB_NL_LANGINFO=0;
14945 HAVE_NL_LANGINFO=1;
14946 REPLACE_NL_LANGINFO=0;
14954 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
14955 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
14961 cat >>confdefs.h <<_ACEOF
14962 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
14967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
14968 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
14969 if ${ac_cv_gnu_library_2_1+:} false; then :
14970 $as_echo_n "(cached) " >&6
14972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973 /* end confdefs.h. */
14975 #include <features.h>
14976 #ifdef __GNU_LIBRARY__
14977 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
14986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14987 $EGREP "Lucky" >/dev/null 2>&1; then :
14988 ac_cv_gnu_library_2_1=yes
14990 ac_cv_gnu_library_2_1=no
14997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
14998 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
15000 GLIBC21="$ac_cv_gnu_library_2_1"
15004 GNULIB_LOCALECONV=0;
15005 GNULIB_SETLOCALE=0;
15006 GNULIB_DUPLOCALE=0;
15008 REPLACE_LOCALECONV=0;
15009 REPLACE_SETLOCALE=0;
15010 REPLACE_DUPLOCALE=0;
15011 REPLACE_STRUCT_LCONV=0;
15018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
15019 $as_echo_n "checking for wchar_t... " >&6; }
15020 if ${gt_cv_c_wchar_t+:} false; then :
15021 $as_echo_n "(cached) " >&6
15023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15024 /* end confdefs.h. */
15025 #include <stddef.h>
15026 wchar_t foo = (wchar_t)'\0';
15035 if ac_fn_c_try_compile "$LINENO"; then :
15036 gt_cv_c_wchar_t=yes
15040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
15043 $as_echo "$gt_cv_c_wchar_t" >&6; }
15044 if test $gt_cv_c_wchar_t = yes; then
15046 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
15054 if test $gt_cv_c_wchar_t = no; then
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
15059 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
15060 if ${gl_cv_decl_null_works+:} false; then :
15061 $as_echo_n "(cached) " >&6
15063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064 /* end confdefs.h. */
15065 #include <stddef.h>
15066 int test[2 * (sizeof NULL == sizeof (void *)) -1];
15076 if ac_fn_c_try_compile "$LINENO"; then :
15077 gl_cv_decl_null_works=yes
15079 gl_cv_decl_null_works=no
15081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
15084 $as_echo "$gl_cv_decl_null_works" >&6; }
15085 if test $gl_cv_decl_null_works = no; then
15090 if test -n "$STDDEF_H"; then
15091 GL_GENERATE_STDDEF_H_TRUE=
15092 GL_GENERATE_STDDEF_H_FALSE='#'
15094 GL_GENERATE_STDDEF_H_TRUE='#'
15095 GL_GENERATE_STDDEF_H_FALSE=
15098 if test -n "$STDDEF_H"; then
15107 if test $gl_cv_have_include_next = yes; then
15108 gl_cv_next_stddef_h='<'stddef.h'>'
15110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
15111 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
15112 if ${gl_cv_next_stddef_h+:} false; then :
15113 $as_echo_n "(cached) " >&6
15118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15119 /* end confdefs.h. */
15120 #include <stddef.h>
15123 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15124 *) gl_absname_cpp="$ac_cpp" ;;
15129 gl_dirsep_regex='[/\\]'
15132 gl_dirsep_regex='\/'
15135 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15136 gl_header_literal_regex=`echo 'stddef.h' \
15137 | sed -e "$gl_make_literal_regex_sed"`
15138 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15139 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15145 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15146 sed -n "$gl_absolute_header_sed"`
15148 gl_header=$gl_cv_absolute_stddef_h
15149 gl_cv_next_stddef_h='"'$gl_header'"'
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
15154 $as_echo "$gl_cv_next_stddef_h" >&6; }
15156 NEXT_STDDEF_H=$gl_cv_next_stddef_h
15158 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15159 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15160 gl_next_as_first_directive='<'stddef.h'>'
15162 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15163 gl_next_as_first_directive=$gl_cv_next_stddef_h
15165 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
15178 if test "X$prefix" = "XNONE"; then
15179 acl_final_prefix="$ac_default_prefix"
15181 acl_final_prefix="$prefix"
15183 if test "X$exec_prefix" = "XNONE"; then
15184 acl_final_exec_prefix='${prefix}'
15186 acl_final_exec_prefix="$exec_prefix"
15188 acl_save_prefix="$prefix"
15189 prefix="$acl_final_prefix"
15190 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
15191 prefix="$acl_save_prefix"
15195 # Check whether --with-gnu-ld was given.
15196 if test "${with_gnu_ld+set}" = set; then :
15197 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
15202 # Prepare PATH_SEPARATOR.
15203 # The user is always right.
15204 if test "${PATH_SEPARATOR+set}" != set; then
15205 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
15206 # contains only /bin. Note that ksh looks also at the FPATH variable,
15207 # so we have to set that as well for the test.
15209 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15210 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
15211 || PATH_SEPARATOR=';'
15216 if test "$GCC" = yes; then
15217 # Check if gcc -print-prog-name=ld gives a path.
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
15219 $as_echo_n "checking for ld used by $CC... " >&6; }
15222 # gcc leaves a trailing carriage return which upsets mingw
15223 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
15225 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
15228 # Accept absolute paths.
15230 re_direlt='/[^/][^/]*/\.\./'
15231 # Canonicalize the pathname of ld
15232 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
15233 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
15234 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
15236 test -z "$LD" && LD="$ac_prog"
15239 # If it fails, then pretend we aren't using GCC.
15243 # If it is relative, then search for the first ld in PATH.
15244 with_gnu_ld=unknown
15247 elif test "$with_gnu_ld" = yes; then
15248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
15249 $as_echo_n "checking for GNU ld... " >&6; }
15251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
15252 $as_echo_n "checking for non-GNU ld... " >&6; }
15254 if ${acl_cv_path_LD+:} false; then :
15255 $as_echo_n "(cached) " >&6
15257 if test -z "$LD"; then
15258 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
15259 for ac_dir in $PATH; do
15260 IFS="$acl_save_ifs"
15261 test -z "$ac_dir" && ac_dir=.
15262 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
15263 acl_cv_path_LD="$ac_dir/$ac_prog"
15264 # Check to see if the program is GNU ld. I'd rather use --version,
15265 # but apparently some variants of GNU ld only accept -v.
15266 # Break only if it was the GNU/non-GNU ld that we prefer.
15267 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
15268 *GNU* | *'with BFD'*)
15269 test "$with_gnu_ld" != no && break
15272 test "$with_gnu_ld" != yes && break
15277 IFS="$acl_save_ifs"
15279 acl_cv_path_LD="$LD" # Let the user override the test with a path.
15283 LD="$acl_cv_path_LD"
15284 if test -n "$LD"; then
15285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
15286 $as_echo "$LD" >&6; }
15288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15289 $as_echo "no" >&6; }
15291 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
15293 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
15294 if ${acl_cv_prog_gnu_ld+:} false; then :
15295 $as_echo_n "(cached) " >&6
15297 # I'd rather use --version here, but apparently some GNU lds only accept -v.
15298 case `$LD -v 2>&1 </dev/null` in
15299 *GNU* | *'with BFD'*)
15300 acl_cv_prog_gnu_ld=yes
15303 acl_cv_prog_gnu_ld=no
15307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
15308 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
15309 with_gnu_ld=$acl_cv_prog_gnu_ld
15314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
15315 $as_echo_n "checking for shared library run path origin... " >&6; }
15316 if ${acl_cv_rpath+:} false; then :
15317 $as_echo_n "(cached) " >&6
15320 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
15321 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
15323 rm -f ./conftest.sh
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
15328 $as_echo "$acl_cv_rpath" >&6; }
15330 acl_libext="$acl_cv_libext"
15331 acl_shlibext="$acl_cv_shlibext"
15332 acl_libname_spec="$acl_cv_libname_spec"
15333 acl_library_names_spec="$acl_cv_library_names_spec"
15334 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
15335 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
15336 acl_hardcode_direct="$acl_cv_hardcode_direct"
15337 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
15338 # Check whether --enable-rpath was given.
15339 if test "${enable_rpath+set}" = set; then :
15340 enableval=$enable_rpath; :
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
15353 $as_echo_n "checking for 64-bit host... " >&6; }
15354 if ${gl_cv_solaris_64bit+:} false; then :
15355 $as_echo_n "(cached) " >&6
15357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15358 /* end confdefs.h. */
15365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15366 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
15367 gl_cv_solaris_64bit=yes
15369 gl_cv_solaris_64bit=no
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
15376 $as_echo "$gl_cv_solaris_64bit" >&6; }
15377 if test $gl_cv_solaris_64bit = yes; then
15378 acl_libdirstem=lib/64
15379 case "$host_cpu" in
15380 sparc*) acl_libdirstem2=lib/sparcv9 ;;
15381 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
15386 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
15387 if test -n "$searchpath"; then
15388 acl_save_IFS="${IFS= }"; IFS=":"
15389 for searchdir in $searchpath; do
15390 if test -d "$searchdir"; then
15391 case "$searchdir" in
15392 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
15394 # Better ignore directories of this form. They are misleading.
15396 *) searchdir=`cd "$searchdir" && pwd`
15397 case "$searchdir" in
15398 */lib64 ) acl_libdirstem=lib64 ;;
15403 IFS="$acl_save_IFS"
15407 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
15411 gl_threads_api=none
15416 if test "$gl_use_threads" != no; then
15417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
15418 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
15419 if ${gl_cv_have_weak+:} false; then :
15420 $as_echo_n "(cached) " >&6
15423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15424 /* end confdefs.h. */
15425 extern void xyzzy ();
15435 if ac_fn_c_try_link "$LINENO"; then :
15436 gl_cv_have_weak=maybe
15438 rm -f core conftest.err conftest.$ac_objext \
15439 conftest$ac_exeext conftest.$ac_ext
15440 if test $gl_cv_have_weak = maybe; then
15441 if test "$cross_compiling" = yes; then :
15442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15443 /* end confdefs.h. */
15445 Extensible Linking Format
15449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15450 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then :
15451 gl_cv_have_weak="guessing yes"
15453 gl_cv_have_weak="guessing no"
15459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15460 /* end confdefs.h. */
15466 return (fputs == NULL);
15469 if ac_fn_c_try_run "$LINENO"; then :
15470 gl_cv_have_weak=yes
15474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15475 conftest.$ac_objext conftest.beam conftest.$ac_ext
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
15482 $as_echo "$gl_cv_have_weak" >&6; }
15483 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
15484 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
15485 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
15486 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15487 if test "x$ac_cv_header_pthread_h" = xyes; then :
15488 gl_have_pthread_h=yes
15490 gl_have_pthread_h=no
15494 if test "$gl_have_pthread_h" = yes; then
15495 # Other possible tests:
15496 # -lpthreads (FSU threads, PCthreads)
15499 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
15500 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
15501 # the second one only in libpthread, and lock.c needs it.
15502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15503 /* end confdefs.h. */
15504 #include <pthread.h>
15508 pthread_mutex_lock((pthread_mutex_t*)0);
15509 pthread_mutexattr_init((pthread_mutexattr_t*)0);
15514 if ac_fn_c_try_link "$LINENO"; then :
15515 gl_have_pthread=yes
15517 rm -f core conftest.err conftest.$ac_objext \
15518 conftest$ac_exeext conftest.$ac_ext
15519 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
15520 # since it is defined as a macro on OSF/1.)
15521 if test -n "$gl_have_pthread"; then
15522 # The program links fine without libpthread. But it may actually
15523 # need to link with libpthread in order to create multiple threads.
15524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15525 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15526 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15527 $as_echo_n "(cached) " >&6
15529 ac_check_lib_save_LIBS=$LIBS
15530 LIBS="-lpthread $LIBS"
15531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15532 /* end confdefs.h. */
15534 /* Override any GCC internal prototype to avoid an error.
15535 Use char because int might match the return type of a GCC
15536 builtin and then its argument prototype would still apply. */
15540 char pthread_kill ();
15544 return pthread_kill ();
15549 if ac_fn_c_try_link "$LINENO"; then :
15550 ac_cv_lib_pthread_pthread_kill=yes
15552 ac_cv_lib_pthread_pthread_kill=no
15554 rm -f core conftest.err conftest.$ac_objext \
15555 conftest$ac_exeext conftest.$ac_ext
15556 LIBS=$ac_check_lib_save_LIBS
15558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15559 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15560 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15561 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15562 # On Solaris and HP-UX, most pthread functions exist also in libc.
15563 # Therefore pthread_in_use() needs to actually try to create a
15564 # thread: pthread_create from libc will fail, whereas
15565 # pthread_create will actually create a thread.
15569 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15576 # Some library is needed. Try libpthread and libc_r.
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15578 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15579 if ${ac_cv_lib_pthread_pthread_kill+:} false; then :
15580 $as_echo_n "(cached) " >&6
15582 ac_check_lib_save_LIBS=$LIBS
15583 LIBS="-lpthread $LIBS"
15584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15585 /* end confdefs.h. */
15587 /* Override any GCC internal prototype to avoid an error.
15588 Use char because int might match the return type of a GCC
15589 builtin and then its argument prototype would still apply. */
15593 char pthread_kill ();
15597 return pthread_kill ();
15602 if ac_fn_c_try_link "$LINENO"; then :
15603 ac_cv_lib_pthread_pthread_kill=yes
15605 ac_cv_lib_pthread_pthread_kill=no
15607 rm -f core conftest.err conftest.$ac_objext \
15608 conftest$ac_exeext conftest.$ac_ext
15609 LIBS=$ac_check_lib_save_LIBS
15611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15612 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15613 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then :
15614 gl_have_pthread=yes
15615 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
15616 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
15619 if test -z "$gl_have_pthread"; then
15621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15622 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15623 if ${ac_cv_lib_c_r_pthread_kill+:} false; then :
15624 $as_echo_n "(cached) " >&6
15626 ac_check_lib_save_LIBS=$LIBS
15628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15629 /* end confdefs.h. */
15631 /* Override any GCC internal prototype to avoid an error.
15632 Use char because int might match the return type of a GCC
15633 builtin and then its argument prototype would still apply. */
15637 char pthread_kill ();
15641 return pthread_kill ();
15646 if ac_fn_c_try_link "$LINENO"; then :
15647 ac_cv_lib_c_r_pthread_kill=yes
15649 ac_cv_lib_c_r_pthread_kill=no
15651 rm -f core conftest.err conftest.$ac_objext \
15652 conftest$ac_exeext conftest.$ac_ext
15653 LIBS=$ac_check_lib_save_LIBS
15655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15656 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15657 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then :
15658 gl_have_pthread=yes
15659 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
15660 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r
15665 if test -n "$gl_have_pthread"; then
15666 gl_threads_api=posix
15668 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
15670 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
15671 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15673 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
15682 if test -z "$gl_have_pthread"; then
15683 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
15684 gl_have_solaristhread=
15685 gl_save_LIBS="$LIBS"
15686 LIBS="$LIBS -lthread"
15687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688 /* end confdefs.h. */
15690 #include <thread.h>
15701 if ac_fn_c_try_link "$LINENO"; then :
15702 gl_have_solaristhread=yes
15704 rm -f core conftest.err conftest.$ac_objext \
15705 conftest$ac_exeext conftest.$ac_ext
15706 LIBS="$gl_save_LIBS"
15707 if test -n "$gl_have_solaristhread"; then
15708 gl_threads_api=solaris
15710 LTLIBTHREAD=-lthread
15711 LIBMULTITHREAD="$LIBTHREAD"
15712 LTLIBMULTITHREAD="$LTLIBTHREAD"
15714 $as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h
15716 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
15718 $as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h
15726 if test "$gl_use_threads" = pth; then
15727 gl_save_CPPFLAGS="$CPPFLAGS"
15733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5
15734 $as_echo_n "checking how to link with libpth... " >&6; }
15735 if ${ac_cv_libpth_libs+:} false; then :
15736 $as_echo_n "(cached) " >&6
15748 acl_save_prefix="$prefix"
15749 prefix="$acl_final_prefix"
15750 acl_save_exec_prefix="$exec_prefix"
15751 exec_prefix="$acl_final_exec_prefix"
15753 eval additional_includedir=\"$includedir\"
15754 eval additional_libdir=\"$libdir\"
15756 exec_prefix="$acl_save_exec_prefix"
15757 prefix="$acl_save_prefix"
15760 # Check whether --with-libpth-prefix was given.
15761 if test "${with_libpth_prefix+set}" = set; then :
15762 withval=$with_libpth_prefix;
15763 if test "X$withval" = "Xno"; then
15766 if test "X$withval" = "X"; then
15768 acl_save_prefix="$prefix"
15769 prefix="$acl_final_prefix"
15770 acl_save_exec_prefix="$exec_prefix"
15771 exec_prefix="$acl_final_exec_prefix"
15773 eval additional_includedir=\"$includedir\"
15774 eval additional_libdir=\"$libdir\"
15776 exec_prefix="$acl_save_exec_prefix"
15777 prefix="$acl_save_prefix"
15780 additional_includedir="$withval/include"
15781 additional_libdir="$withval/$acl_libdirstem"
15782 if test "$acl_libdirstem2" != "$acl_libdirstem" \
15783 && ! test -d "$withval/$acl_libdirstem"; then
15784 additional_libdir="$withval/$acl_libdirstem2"
15798 names_already_handled=
15799 names_next_round='pth '
15800 while test -n "$names_next_round"; do
15801 names_this_round="$names_next_round"
15803 for name in $names_this_round; do
15805 for n in $names_already_handled; do
15806 if test "$n" = "$name"; then
15807 already_handled=yes
15811 if test -z "$already_handled"; then
15812 names_already_handled="$names_already_handled $name"
15813 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
15814 eval value=\"\$HAVE_LIB$uppername\"
15815 if test -n "$value"; then
15816 if test "$value" = yes; then
15817 eval value=\"\$LIB$uppername\"
15818 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value"
15819 eval value=\"\$LTLIB$uppername\"
15820 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value"
15829 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
15830 if test -n "$acl_shlibext"; then
15831 shrext=".$acl_shlibext" # typically: shrext=.so
15835 if test $use_additional = yes; then
15836 dir="$additional_libdir"
15837 if test -n "$acl_shlibext"; then
15838 if test -f "$dir/$libname$shrext"; then
15840 found_so="$dir/$libname$shrext"
15842 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15843 ver=`(cd "$dir" && \
15844 for f in "$libname$shrext".*; do echo "$f"; done \
15845 | sed -e "s,^$libname$shrext\\\\.,," \
15846 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15847 | sed 1q ) 2>/dev/null`
15848 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15850 found_so="$dir/$libname$shrext.$ver"
15853 eval library_names=\"$acl_library_names_spec\"
15854 for f in $library_names; do
15855 if test -f "$dir/$f"; then
15864 if test "X$found_dir" = "X"; then
15865 if test -f "$dir/$libname.$acl_libext"; then
15867 found_a="$dir/$libname.$acl_libext"
15870 if test "X$found_dir" != "X"; then
15871 if test -f "$dir/$libname.la"; then
15872 found_la="$dir/$libname.la"
15876 if test "X$found_dir" = "X"; then
15877 for x in $LDFLAGS $LTLIBPTH; do
15879 acl_save_prefix="$prefix"
15880 prefix="$acl_final_prefix"
15881 acl_save_exec_prefix="$exec_prefix"
15882 exec_prefix="$acl_final_exec_prefix"
15884 exec_prefix="$acl_save_exec_prefix"
15885 prefix="$acl_save_prefix"
15889 dir=`echo "X$x" | sed -e 's/^X-L//'`
15890 if test -n "$acl_shlibext"; then
15891 if test -f "$dir/$libname$shrext"; then
15893 found_so="$dir/$libname$shrext"
15895 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
15896 ver=`(cd "$dir" && \
15897 for f in "$libname$shrext".*; do echo "$f"; done \
15898 | sed -e "s,^$libname$shrext\\\\.,," \
15899 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
15900 | sed 1q ) 2>/dev/null`
15901 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
15903 found_so="$dir/$libname$shrext.$ver"
15906 eval library_names=\"$acl_library_names_spec\"
15907 for f in $library_names; do
15908 if test -f "$dir/$f"; then
15917 if test "X$found_dir" = "X"; then
15918 if test -f "$dir/$libname.$acl_libext"; then
15920 found_a="$dir/$libname.$acl_libext"
15923 if test "X$found_dir" != "X"; then
15924 if test -f "$dir/$libname.la"; then
15925 found_la="$dir/$libname.la"
15930 if test "X$found_dir" != "X"; then
15935 if test "X$found_dir" != "X"; then
15936 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name"
15937 if test "X$found_so" != "X"; then
15938 if test "$enable_rpath" = no \
15939 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
15940 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
15941 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15944 for x in $ltrpathdirs; do
15945 if test "X$x" = "X$found_dir"; then
15950 if test -z "$haveit"; then
15951 ltrpathdirs="$ltrpathdirs $found_dir"
15953 if test "$acl_hardcode_direct" = yes; then
15954 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15956 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
15957 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15959 for x in $rpathdirs; do
15960 if test "X$x" = "X$found_dir"; then
15965 if test -z "$haveit"; then
15966 rpathdirs="$rpathdirs $found_dir"
15970 for x in $LDFLAGS $LIBPTH; do
15972 acl_save_prefix="$prefix"
15973 prefix="$acl_final_prefix"
15974 acl_save_exec_prefix="$exec_prefix"
15975 exec_prefix="$acl_final_exec_prefix"
15977 exec_prefix="$acl_save_exec_prefix"
15978 prefix="$acl_save_prefix"
15980 if test "X$x" = "X-L$found_dir"; then
15985 if test -z "$haveit"; then
15986 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir"
15988 if test "$acl_hardcode_minus_L" != no; then
15989 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so"
15991 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
15997 if test "X$found_a" != "X"; then
15998 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a"
16000 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name"
16003 additional_includedir=
16004 case "$found_dir" in
16005 */$acl_libdirstem | */$acl_libdirstem/)
16006 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
16007 if test "$name" = 'pth'; then
16008 LIBPTH_PREFIX="$basedir"
16010 additional_includedir="$basedir/include"
16012 */$acl_libdirstem2 | */$acl_libdirstem2/)
16013 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
16014 if test "$name" = 'pth'; then
16015 LIBPTH_PREFIX="$basedir"
16017 additional_includedir="$basedir/include"
16020 if test "X$additional_includedir" != "X"; then
16021 if test "X$additional_includedir" != "X/usr/include"; then
16023 if test "X$additional_includedir" = "X/usr/local/include"; then
16024 if test -n "$GCC"; then
16026 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16030 if test -z "$haveit"; then
16031 for x in $CPPFLAGS $INCPTH; do
16033 acl_save_prefix="$prefix"
16034 prefix="$acl_final_prefix"
16035 acl_save_exec_prefix="$exec_prefix"
16036 exec_prefix="$acl_final_exec_prefix"
16038 exec_prefix="$acl_save_exec_prefix"
16039 prefix="$acl_save_prefix"
16041 if test "X$x" = "X-I$additional_includedir"; then
16046 if test -z "$haveit"; then
16047 if test -d "$additional_includedir"; then
16048 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir"
16054 if test -n "$found_la"; then
16055 save_libdir="$libdir"
16056 case "$found_la" in
16057 */* | *\\*) . "$found_la" ;;
16058 *) . "./$found_la" ;;
16060 libdir="$save_libdir"
16061 for dep in $dependency_libs; do
16064 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16065 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
16066 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
16068 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
16069 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
16070 if test -n "$GCC"; then
16072 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
16076 if test -z "$haveit"; then
16078 for x in $LDFLAGS $LIBPTH; do
16080 acl_save_prefix="$prefix"
16081 prefix="$acl_final_prefix"
16082 acl_save_exec_prefix="$exec_prefix"
16083 exec_prefix="$acl_final_exec_prefix"
16085 exec_prefix="$acl_save_exec_prefix"
16086 prefix="$acl_save_prefix"
16088 if test "X$x" = "X-L$additional_libdir"; then
16093 if test -z "$haveit"; then
16094 if test -d "$additional_libdir"; then
16095 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir"
16099 for x in $LDFLAGS $LTLIBPTH; do
16101 acl_save_prefix="$prefix"
16102 prefix="$acl_final_prefix"
16103 acl_save_exec_prefix="$exec_prefix"
16104 exec_prefix="$acl_final_exec_prefix"
16106 exec_prefix="$acl_save_exec_prefix"
16107 prefix="$acl_save_prefix"
16109 if test "X$x" = "X-L$additional_libdir"; then
16114 if test -z "$haveit"; then
16115 if test -d "$additional_libdir"; then
16116 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir"
16123 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16124 if test "$enable_rpath" != no; then
16126 for x in $rpathdirs; do
16127 if test "X$x" = "X$dir"; then
16132 if test -z "$haveit"; then
16133 rpathdirs="$rpathdirs $dir"
16136 for x in $ltrpathdirs; do
16137 if test "X$x" = "X$dir"; then
16142 if test -z "$haveit"; then
16143 ltrpathdirs="$ltrpathdirs $dir"
16148 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16151 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16154 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep"
16155 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep"
16161 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name"
16162 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name"
16168 if test "X$rpathdirs" != "X"; then
16169 if test -n "$acl_hardcode_libdir_separator"; then
16171 for found_dir in $rpathdirs; do
16172 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
16174 acl_save_libdir="$libdir"
16176 eval flag=\"$acl_hardcode_libdir_flag_spec\"
16177 libdir="$acl_save_libdir"
16178 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
16180 for found_dir in $rpathdirs; do
16181 acl_save_libdir="$libdir"
16182 libdir="$found_dir"
16183 eval flag=\"$acl_hardcode_libdir_flag_spec\"
16184 libdir="$acl_save_libdir"
16185 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag"
16189 if test "X$ltrpathdirs" != "X"; then
16190 for found_dir in $ltrpathdirs; do
16191 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir"
16200 ac_cv_libpth_libs="$LIBPTH"
16201 ac_cv_libpth_ltlibs="$LTLIBPTH"
16202 ac_cv_libpth_cppflags="$INCPTH"
16203 ac_cv_libpth_prefix="$LIBPTH_PREFIX"
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5
16207 $as_echo "$ac_cv_libpth_libs" >&6; }
16208 LIBPTH="$ac_cv_libpth_libs"
16209 LTLIBPTH="$ac_cv_libpth_ltlibs"
16210 INCPTH="$ac_cv_libpth_cppflags"
16211 LIBPTH_PREFIX="$ac_cv_libpth_prefix"
16213 for element in $INCPTH; do
16215 for x in $CPPFLAGS; do
16217 acl_save_prefix="$prefix"
16218 prefix="$acl_final_prefix"
16219 acl_save_exec_prefix="$exec_prefix"
16220 exec_prefix="$acl_final_exec_prefix"
16222 exec_prefix="$acl_save_exec_prefix"
16223 prefix="$acl_save_prefix"
16225 if test "X$x" = "X$element"; then
16230 if test -z "$haveit"; then
16231 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16243 gl_save_LIBS="$LIBS"
16244 LIBS="$LIBS $LIBPTH"
16245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16246 /* end confdefs.h. */
16256 if ac_fn_c_try_link "$LINENO"; then :
16259 rm -f core conftest.err conftest.$ac_objext \
16260 conftest$ac_exeext conftest.$ac_ext
16261 LIBS="$gl_save_LIBS"
16262 if test -n "$gl_have_pth"; then
16264 LIBTHREAD="$LIBPTH"
16265 LTLIBTHREAD="$LTLIBPTH"
16266 LIBMULTITHREAD="$LIBTHREAD"
16267 LTLIBMULTITHREAD="$LTLIBTHREAD"
16269 $as_echo "#define USE_PTH_THREADS 1" >>confdefs.h
16271 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
16272 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
16274 $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h
16281 CPPFLAGS="$gl_save_CPPFLAGS"
16284 if test -z "$gl_have_pthread"; then
16285 case "$gl_use_threads" in
16286 yes | windows | win32) # The 'win32' is for backward compatibility.
16287 if { case "$host_os" in
16292 gl_threads_api=windows
16294 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
16302 $as_echo_n "checking for multithread API to use... " >&6; }
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
16304 $as_echo "$gl_threads_api" >&6; }
16319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
16320 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
16321 if ${ac_cv_path_SED+:} false; then :
16322 $as_echo_n "(cached) " >&6
16324 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
16325 for ac_i in 1 2 3 4 5 6 7; do
16326 ac_script="$ac_script$as_nl$ac_script"
16328 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
16329 { ac_script=; unset ac_script;}
16330 if test -z "$SED"; then
16331 ac_path_SED_found=false
16332 # Loop through the user's path and test for each of PROGNAME-LIST
16333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16334 for as_dir in $PATH
16337 test -z "$as_dir" && as_dir=.
16338 for ac_prog in sed gsed; do
16339 for ac_exec_ext in '' $ac_executable_extensions; do
16340 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
16341 as_fn_executable_p "$ac_path_SED" || continue
16342 # Check for GNU ac_path_SED and select it if it is found.
16343 # Check for GNU $ac_path_SED
16344 case `"$ac_path_SED" --version 2>&1` in
16346 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
16349 $as_echo_n 0123456789 >"conftest.in"
16352 cat "conftest.in" "conftest.in" >"conftest.tmp"
16353 mv "conftest.tmp" "conftest.in"
16354 cp "conftest.in" "conftest.nl"
16355 $as_echo '' >> "conftest.nl"
16356 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
16357 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
16358 as_fn_arith $ac_count + 1 && ac_count=$as_val
16359 if test $ac_count -gt ${ac_path_SED_max-0}; then
16360 # Best one so far, save it but keep looking for a better one
16361 ac_cv_path_SED="$ac_path_SED"
16362 ac_path_SED_max=$ac_count
16364 # 10*(2^10) chars as input seems more than enough
16365 test $ac_count -gt 10 && break
16367 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
16370 $ac_path_SED_found && break 3
16375 if test -z "$ac_cv_path_SED"; then
16376 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
16379 ac_cv_path_SED=$SED
16383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
16384 $as_echo "$ac_cv_path_SED" >&6; }
16385 SED="$ac_cv_path_SED"
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
16390 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
16391 if ${gl_cv_func_malloc_posix+:} false; then :
16392 $as_echo_n "(cached) " >&6
16395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396 /* end confdefs.h. */
16401 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
16409 if ac_fn_c_try_compile "$LINENO"; then :
16410 gl_cv_func_malloc_posix=yes
16412 gl_cv_func_malloc_posix=no
16414 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
16418 $as_echo "$gl_cv_func_malloc_posix" >&6; }
16422 for ac_header in stdlib.h
16424 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16425 if test "x$ac_cv_header_stdlib_h" = xyes; then :
16426 cat >>confdefs.h <<_ACEOF
16427 #define HAVE_STDLIB_H 1
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
16435 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
16436 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
16437 $as_echo_n "(cached) " >&6
16439 if test "$cross_compiling" = yes; then :
16441 # Guess yes on platforms where we know the result.
16442 *-gnu* | freebsd* | netbsd* | openbsd* \
16443 | hpux* | solaris* | cygwin* | mingw*)
16444 ac_cv_func_malloc_0_nonnull=yes ;;
16445 # If we don't know, assume the worst.
16446 *) ac_cv_func_malloc_0_nonnull=no ;;
16450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451 /* end confdefs.h. */
16452 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16453 # include <stdlib.h>
16461 return ! malloc (0);
16467 if ac_fn_c_try_run "$LINENO"; then :
16468 ac_cv_func_malloc_0_nonnull=yes
16470 ac_cv_func_malloc_0_nonnull=no
16472 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16473 conftest.$ac_objext conftest.beam conftest.$ac_ext
16478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
16479 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
16480 if test $ac_cv_func_malloc_0_nonnull = yes; then :
16481 gl_cv_func_malloc_0_nonnull=1
16483 gl_cv_func_malloc_0_nonnull=0
16487 cat >>confdefs.h <<_ACEOF
16488 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
16510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
16511 $as_echo_n "checking for a traditional japanese locale... " >&6; }
16512 if ${gt_cv_locale_ja+:} false; then :
16513 $as_echo_n "(cached) " >&6
16516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16517 /* end confdefs.h. */
16519 #include <locale.h>
16521 #if HAVE_LANGINFO_CODESET
16522 # include <langinfo.h>
16524 #include <stdlib.h>
16525 #include <string.h>
16531 /* Check whether the given locale name is recognized by the system. */
16532 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16533 /* On native Windows, setlocale(category, "") looks at the system settings,
16534 not at the environment variables. Also, when an encoding suffix such
16535 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16536 category of the locale to "C". */
16537 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16538 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16541 if (setlocale (LC_ALL, "") == NULL) return 1;
16543 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16544 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16545 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16546 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16547 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16548 some unit tests fail.
16549 On MirBSD 10, when an unsupported locale is specified, setlocale()
16550 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
16551 #if HAVE_LANGINFO_CODESET
16553 const char *cs = nl_langinfo (CODESET);
16554 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16555 || strcmp (cs, "UTF-8") == 0)
16560 /* On Cygwin, avoid locale names without encoding suffix, because the
16561 locale_charset() function relies on the encoding suffix. Note that
16562 LC_ALL is set on the command line. */
16563 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16565 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
16566 on Cygwin 1.5.x. */
16567 if (MB_CUR_MAX == 1)
16569 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16570 This excludes the UTF-8 encoding (except on MirBSD). */
16571 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16572 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16573 for (p = buf; *p != '\0'; p++)
16574 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16580 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16581 (eval $ac_link) 2>&5
16583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16584 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16586 # Handle native Windows specially, because there setlocale() interprets
16587 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16588 # "fr" or "fra" as "French" or "French_France.1252",
16589 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16590 # "ja" as "Japanese" or "Japanese_Japan.932",
16593 # Note that on native Windows, the Japanese locale is
16594 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
16595 # cannot use it here.
16596 gt_cv_locale_ja=none
16599 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16600 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16601 # configure script would override the LC_ALL setting. Likewise for
16602 # LC_CTYPE, which is also set at the beginning of the configure script.
16603 # Test for the AIX locale name.
16604 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16605 gt_cv_locale_ja=ja_JP
16607 # Test for the locale name with explicit encoding suffix.
16608 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16609 gt_cv_locale_ja=ja_JP.EUC-JP
16611 # Test for the HP-UX, OSF/1, NetBSD locale name.
16612 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16613 gt_cv_locale_ja=ja_JP.eucJP
16615 # Test for the IRIX, FreeBSD locale name.
16616 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16617 gt_cv_locale_ja=ja_JP.EUC
16619 # Test for the Solaris 7 locale name.
16620 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16623 # Special test for NetBSD 1.6.
16624 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
16625 gt_cv_locale_ja=ja_JP.eucJP
16628 gt_cv_locale_ja=none
16641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
16642 $as_echo "$gt_cv_locale_ja" >&6; }
16643 LOCALE_JA=$gt_cv_locale_ja
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
16650 $as_echo_n "checking for a transitional chinese locale... " >&6; }
16651 if ${gt_cv_locale_zh_CN+:} false; then :
16652 $as_echo_n "(cached) " >&6
16655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16656 /* end confdefs.h. */
16658 #include <locale.h>
16659 #include <stdlib.h>
16661 #if HAVE_LANGINFO_CODESET
16662 # include <langinfo.h>
16664 #include <stdlib.h>
16665 #include <string.h>
16671 /* Check whether the given locale name is recognized by the system. */
16672 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16673 /* On native Windows, setlocale(category, "") looks at the system settings,
16674 not at the environment variables. Also, when an encoding suffix such
16675 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16676 category of the locale to "C". */
16677 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16678 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16681 if (setlocale (LC_ALL, "") == NULL) return 1;
16683 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16684 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16685 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16686 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16687 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16688 some unit tests fail.
16689 On MirBSD 10, when an unsupported locale is specified, setlocale()
16690 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
16691 #if HAVE_LANGINFO_CODESET
16693 const char *cs = nl_langinfo (CODESET);
16694 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
16695 || strcmp (cs, "UTF-8") == 0)
16700 /* On Cygwin, avoid locale names without encoding suffix, because the
16701 locale_charset() function relies on the encoding suffix. Note that
16702 LC_ALL is set on the command line. */
16703 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16705 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
16706 This excludes the UTF-8 encoding (except on MirBSD). */
16707 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16708 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
16709 for (p = buf; *p != '\0'; p++)
16710 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
16712 /* Check whether a typical GB18030 multibyte sequence is recognized as a
16713 single wide character. This excludes the GB2312 and GBK encodings. */
16714 if (mblen ("\203\062\332\066", 5) != 4)
16720 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16721 (eval $ac_link) 2>&5
16723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16724 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16726 # Handle native Windows specially, because there setlocale() interprets
16727 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16728 # "fr" or "fra" as "French" or "French_France.1252",
16729 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16730 # "ja" as "Japanese" or "Japanese_Japan.932",
16733 # Test for the hypothetical native Windows locale name.
16734 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16735 gt_cv_locale_zh_CN=Chinese_China.54936
16738 gt_cv_locale_zh_CN=none
16742 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
16743 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
16744 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
16745 gt_cv_locale_zh_CN=none
16748 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16749 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16750 # configure script would override the LC_ALL setting. Likewise for
16751 # LC_CTYPE, which is also set at the beginning of the configure script.
16752 # Test for the locale name without encoding suffix.
16753 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16754 gt_cv_locale_zh_CN=zh_CN
16756 # Test for the locale name with explicit encoding suffix.
16757 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16758 gt_cv_locale_zh_CN=zh_CN.GB18030
16761 gt_cv_locale_zh_CN=none
16767 # If there was a link error, due to mblen(), the system is so old that
16768 # it certainly doesn't have a chinese locale.
16769 gt_cv_locale_zh_CN=none
16774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
16775 $as_echo "$gt_cv_locale_zh_CN" >&6; }
16776 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
16781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
16782 $as_echo_n "checking for a french Unicode locale... " >&6; }
16783 if ${gt_cv_locale_fr_utf8+:} false; then :
16784 $as_echo_n "(cached) " >&6
16787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16788 /* end confdefs.h. */
16790 #include <locale.h>
16792 #if HAVE_LANGINFO_CODESET
16793 # include <langinfo.h>
16795 #include <stdlib.h>
16796 #include <string.h>
16800 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
16801 imitates locale dependent behaviour by looking at the environment
16802 variables, and all locales use the UTF-8 encoding. */
16803 #if !(defined __BEOS__ || defined __HAIKU__)
16804 /* Check whether the given locale name is recognized by the system. */
16805 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
16806 /* On native Windows, setlocale(category, "") looks at the system settings,
16807 not at the environment variables. Also, when an encoding suffix such
16808 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
16809 category of the locale to "C". */
16810 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
16811 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
16814 if (setlocale (LC_ALL, "") == NULL) return 1;
16816 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
16817 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
16818 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
16819 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
16820 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
16821 some unit tests fail. */
16822 # if HAVE_LANGINFO_CODESET
16824 const char *cs = nl_langinfo (CODESET);
16825 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
16830 /* On Cygwin, avoid locale names without encoding suffix, because the
16831 locale_charset() function relies on the encoding suffix. Note that
16832 LC_ALL is set on the command line. */
16833 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
16835 /* Check whether in the abbreviation of the second month, the second
16836 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
16837 two bytes long, with UTF-8 encoding. */
16838 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
16839 if (strftime (buf, sizeof (buf), "%b", &t) < 4
16840 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
16843 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
16844 /* Check whether the decimal separator is a comma.
16845 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
16846 are nl_langinfo(RADIXCHAR) are both ".". */
16847 if (localeconv () ->decimal_point[0] != ',') return 1;
16853 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
16854 (eval $ac_link) 2>&5
16856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16857 test $ac_status = 0; } && test -s conftest$ac_exeext; then
16859 # Handle native Windows specially, because there setlocale() interprets
16860 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
16861 # "fr" or "fra" as "French" or "French_France.1252",
16862 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
16863 # "ja" as "Japanese" or "Japanese_Japan.932",
16866 # Test for the hypothetical native Windows locale name.
16867 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16868 gt_cv_locale_fr_utf8=French_France.65001
16871 gt_cv_locale_fr_utf8=none
16875 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
16876 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
16877 # configure script would override the LC_ALL setting. Likewise for
16878 # LC_CTYPE, which is also set at the beginning of the configure script.
16879 # Test for the usual locale name.
16880 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16881 gt_cv_locale_fr_utf8=fr_FR
16883 # Test for the locale name with explicit encoding suffix.
16884 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16885 gt_cv_locale_fr_utf8=fr_FR.UTF-8
16887 # Test for the Solaris 7 locale name.
16888 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
16889 gt_cv_locale_fr_utf8=fr.UTF-8
16892 gt_cv_locale_fr_utf8=none
16902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
16903 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
16904 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
16914 GNULIB_RAWMEMCHR=0;
16917 GNULIB_STRCHRNUL=0;
16925 GNULIB_STRCASESTR=0;
16932 GNULIB_MBSCASECMP=0;
16933 GNULIB_MBSNCASECMP=0;
16934 GNULIB_MBSPCASECMP=0;
16935 GNULIB_MBSCASESTR=0;
16942 GNULIB_STRERROR_R=0;
16943 GNULIB_STRSIGNAL=0;
16944 GNULIB_STRVERSCMP=0;
16949 HAVE_DECL_MEMMEM=1;
16951 HAVE_DECL_MEMRCHR=1;
16956 HAVE_DECL_STRDUP=1;
16957 HAVE_DECL_STRNDUP=1;
16958 HAVE_DECL_STRNLEN=1;
16962 HAVE_DECL_STRTOK_R=1;
16963 HAVE_DECL_STRERROR_R=1;
16964 HAVE_DECL_STRSIGNAL=1;
16971 REPLACE_STRCASESTR=0;
16972 REPLACE_STRCHRNUL=0;
16973 REPLACE_STRERROR=0;
16974 REPLACE_STRERROR_R=0;
16978 REPLACE_STRSIGNAL=0;
16979 REPLACE_STRTOK_R=0;
16980 UNDEFINE_STRTOK_R=0;
17001 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
17002 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
17003 # irrelevant for anonymous mappings.
17004 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
17005 if test "x$ac_cv_func_mmap" = xyes; then :
17012 # Try to allow MAP_ANONYMOUS.
17013 gl_have_mmap_anonymous=no
17014 if test $gl_have_mmap = yes; then
17015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
17016 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
17017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17018 /* end confdefs.h. */
17020 #include <sys/mman.h>
17021 #ifdef MAP_ANONYMOUS
17022 I cannot identify this map
17026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17027 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17028 gl_have_mmap_anonymous=yes
17032 if test $gl_have_mmap_anonymous != yes; then
17033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17034 /* end confdefs.h. */
17036 #include <sys/mman.h>
17038 I cannot identify this map
17042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17043 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
17045 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
17047 gl_have_mmap_anonymous=yes
17052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
17053 $as_echo "$gl_have_mmap_anonymous" >&6; }
17054 if test $gl_have_mmap_anonymous = yes; then
17056 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
17078 if test $HAVE_MEMCHR = 1; then
17079 # Detect platform-specific bugs in some versions of glibc:
17080 # memchr should not dereference anything with length 0
17081 # http://bugzilla.redhat.com/499689
17082 # memchr should not dereference overestimated length after a match
17083 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
17084 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
17085 # Assume that memchr works on platforms that lack mprotect.
17086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
17087 $as_echo_n "checking whether memchr works... " >&6; }
17088 if ${gl_cv_func_memchr_works+:} false; then :
17089 $as_echo_n "(cached) " >&6
17091 if test "$cross_compiling" = yes; then :
17092 gl_cv_func_memchr_works="guessing no"
17094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095 /* end confdefs.h. */
17097 #include <string.h>
17098 #if HAVE_SYS_MMAN_H
17099 # include <fcntl.h>
17100 # include <unistd.h>
17101 # include <sys/types.h>
17102 # include <sys/mman.h>
17104 # define MAP_FILE 0
17113 char *fence = NULL;
17114 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
17115 # if HAVE_MAP_ANONYMOUS
17116 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
17118 # else /* !HAVE_MAP_ANONYMOUS */
17119 const int flags = MAP_FILE | MAP_PRIVATE;
17120 int fd = open ("/dev/zero", O_RDONLY, 0666);
17124 int pagesize = getpagesize ();
17126 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
17128 if (two_pages != (char *)(-1)
17129 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
17130 fence = two_pages + pagesize;
17135 if (memchr (fence, 0, 0))
17137 strcpy (fence - 9, "12345678");
17138 if (memchr (fence - 9, 0, 79) != fence - 1)
17140 if (memchr (fence - 1, 0, 3) != fence - 1)
17149 if ac_fn_c_try_run "$LINENO"; then :
17150 gl_cv_func_memchr_works=yes
17152 gl_cv_func_memchr_works=no
17154 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17155 conftest.$ac_objext conftest.beam conftest.$ac_ext
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
17160 $as_echo "$gl_cv_func_memchr_works" >&6; }
17161 if test "$gl_cv_func_memchr_works" != yes; then
17167 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
17168 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
17174 cat >>confdefs.h <<_ACEOF
17175 #define HAVE_DECL_MEMRCHR $ac_have_decl
17181 GNULIB_NANOSLEEP=0;
17185 HAVE_DECL_LOCALTIME_R=1;
17189 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
17190 REPLACE_MKTIME=GNULIB_PORTCHECK;
17191 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
17192 REPLACE_TIMEGM=GNULIB_PORTCHECK;
17194 : ${GNULIB_GETTIMEOFDAY=0};
17196 REPLACE_LOCALTIME=0;
17199 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
17200 if test "x$ac_cv_have_decl_alarm" = xyes; then :
17206 cat >>confdefs.h <<_ACEOF
17207 #define HAVE_DECL_ALARM $ac_have_decl
17215 ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include <math.h>
17217 if test "x$ac_cv_have_decl_trunc" = xyes; then :
17223 cat >>confdefs.h <<_ACEOF
17224 #define HAVE_DECL_TRUNC $ac_have_decl
17227 if test "$ac_cv_have_decl_trunc" = yes; then
17229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17230 /* end confdefs.h. */
17231 #ifndef __NO_MATH_INLINES
17232 # define __NO_MATH_INLINES 1 /* for glibc */
17244 if ac_fn_c_try_link "$LINENO"; then :
17247 rm -f core conftest.err conftest.$ac_objext \
17248 conftest$ac_exeext conftest.$ac_ext
17249 if test "$TRUNC_LIBM" = "?"; then
17252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17253 /* end confdefs.h. */
17254 #ifndef __NO_MATH_INLINES
17255 # define __NO_MATH_INLINES 1 /* for glibc */
17267 if ac_fn_c_try_link "$LINENO"; then :
17270 rm -f core conftest.err conftest.$ac_objext \
17271 conftest$ac_exeext conftest.$ac_ext
17274 if test "$TRUNC_LIBM" = "?"; then
17281 if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
17296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
17297 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
17298 if ${ac_cv_header_stdbool_h+:} false; then :
17299 $as_echo_n "(cached) " >&6
17301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17302 /* end confdefs.h. */
17304 #include <stdbool.h>
17306 "error: bool is not defined"
17309 "error: false is not defined"
17312 "error: false is not 0"
17315 "error: true is not defined"
17318 "error: true is not 1"
17320 #ifndef __bool_true_false_are_defined
17321 "error: __bool_true_false_are_defined is not defined"
17324 struct s { _Bool s: 1; _Bool t; } s;
17326 char a[true == 1 ? 1 : -1];
17327 char b[false == 0 ? 1 : -1];
17328 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
17329 char d[(bool) 0.5 == true ? 1 : -1];
17330 /* See body of main program for 'e'. */
17331 char f[(_Bool) 0.0 == false ? 1 : -1];
17333 char h[sizeof (_Bool)];
17334 char i[sizeof s.t];
17335 enum { j = false, k = true, l = false * true, m = true * 256 };
17336 /* The following fails for
17337 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
17339 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
17340 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
17341 /* Catch a bug in an HP-UX C compiler. See
17342 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
17343 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
17355 /* Refer to every declared value, to avoid compiler optimizations. */
17356 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
17357 + !m + !n + !o + !p + !q + !pq);
17363 if ac_fn_c_try_compile "$LINENO"; then :
17364 ac_cv_header_stdbool_h=yes
17366 ac_cv_header_stdbool_h=no
17368 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
17371 $as_echo "$ac_cv_header_stdbool_h" >&6; }
17372 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
17373 if test "x$ac_cv_type__Bool" = xyes; then :
17375 cat >>confdefs.h <<_ACEOF
17376 #define HAVE__BOOL 1
17386 # Define two additional variables used in the Makefile substitution.
17388 if test "$ac_cv_header_stdbool_h" = yes; then
17391 STDBOOL_H='stdbool.h'
17394 if test -n "$STDBOOL_H"; then
17395 GL_GENERATE_STDBOOL_H_TRUE=
17396 GL_GENERATE_STDBOOL_H_FALSE='#'
17398 GL_GENERATE_STDBOOL_H_TRUE='#'
17399 GL_GENERATE_STDBOOL_H_FALSE=
17403 if test "$ac_cv_type__Bool" = yes; then
17411 # parse-datetime.y works with bison only.
17412 : ${YACC='bison -y'}
17415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
17416 $as_echo_n "checking for compound literals... " >&6; }
17417 if ${gl_cv_compound_literals+:} false; then :
17418 $as_echo_n "(cached) " >&6
17420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17421 /* end confdefs.h. */
17422 struct s { int i, j; };
17426 struct s t = (struct s) { 3, 4 };
17427 if (t.i != 0) return 0;
17432 if ac_fn_c_try_compile "$LINENO"; then :
17433 gl_cv_compound_literals=yes
17435 gl_cv_compound_literals=no
17437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
17440 $as_echo "$gl_cv_compound_literals" >&6; }
17441 if test $gl_cv_compound_literals = yes; then
17443 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
17448 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
17449 if ${ac_cv_struct_tm+:} false; then :
17450 $as_echo_n "(cached) " >&6
17452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17453 /* end confdefs.h. */
17454 #include <sys/types.h>
17461 int *p = &tm.tm_sec;
17467 if ac_fn_c_try_compile "$LINENO"; then :
17468 ac_cv_struct_tm=time.h
17470 ac_cv_struct_tm=sys/time.h
17472 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
17475 $as_echo "$ac_cv_struct_tm" >&6; }
17476 if test $ac_cv_struct_tm = sys/time.h; then
17478 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
17483 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
17485 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
17487 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
17493 REPLACE_STRERROR_0=0
17494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
17495 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
17496 if ${gl_cv_func_strerror_0_works+:} false; then :
17497 $as_echo_n "(cached) " >&6
17499 if test "$cross_compiling" = yes; then :
17501 # Guess yes on glibc systems.
17502 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
17503 # If we don't know, assume the worst.
17504 *) gl_cv_func_strerror_0_works="guessing no" ;;
17508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17509 /* end confdefs.h. */
17510 #include <string.h>
17519 str = strerror (0);
17520 if (!*str) result |= 1;
17521 if (errno) result |= 2;
17522 if (strstr (str, "nknown") || strstr (str, "ndefined"))
17529 if ac_fn_c_try_run "$LINENO"; then :
17530 gl_cv_func_strerror_0_works=yes
17532 gl_cv_func_strerror_0_works=no
17534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17535 conftest.$ac_objext conftest.beam conftest.$ac_ext
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
17541 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
17542 case "$gl_cv_func_strerror_0_works" in
17545 REPLACE_STRERROR_0=1
17547 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
17573 if test $ac_cv_func_strerror_r = yes; then
17574 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
17576 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
17577 if ${gl_cv_func_strerror_r_posix_signature+:} false; then :
17578 $as_echo_n "(cached) " >&6
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h. */
17582 #include <string.h>
17583 int strerror_r (int, char *, size_t);
17593 if ac_fn_c_try_compile "$LINENO"; then :
17594 gl_cv_func_strerror_r_posix_signature=yes
17596 gl_cv_func_strerror_r_posix_signature=no
17598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
17602 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
17603 if test $gl_cv_func_strerror_r_posix_signature = yes; then
17604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
17605 $as_echo_n "checking whether strerror_r works... " >&6; }
17606 if ${gl_cv_func_strerror_r_works+:} false; then :
17607 $as_echo_n "(cached) " >&6
17609 if test "$cross_compiling" = yes; then :
17613 aix*) gl_cv_func_strerror_r_works="guessing no";;
17614 # Guess no on HP-UX.
17615 hpux*) gl_cv_func_strerror_r_works="guessing no";;
17616 # Guess no on BSD variants.
17617 *bsd*) gl_cv_func_strerror_r_works="guessing no";;
17618 # Guess yes otherwise.
17619 *) gl_cv_func_strerror_r_works="guessing yes";;
17623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17624 /* end confdefs.h. */
17626 #include <string.h>
17633 if (strerror_r (EACCES, buf, 0) < 0)
17636 if (strerror_r (EACCES, buf, sizeof buf) != 0)
17638 strcpy (buf, "Unknown");
17639 if (strerror_r (0, buf, sizeof buf) != 0)
17643 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
17647 if (strerror_r (-3, buf, sizeof buf) < 0)
17659 if ac_fn_c_try_run "$LINENO"; then :
17660 gl_cv_func_strerror_r_works=yes
17662 gl_cv_func_strerror_r_works=no
17664 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17665 conftest.$ac_objext conftest.beam conftest.$ac_ext
17670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17671 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17680 if test $ac_cv_func___xpg_strerror_r = yes; then
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
17682 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
17683 if ${gl_cv_func_strerror_r_works+:} false; then :
17684 $as_echo_n "(cached) " >&6
17686 if test "$cross_compiling" = yes; then :
17687 gl_cv_func_strerror_r_works="guessing no"
17690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17691 /* end confdefs.h. */
17693 #include <string.h>
17698 int __xpg_strerror_r(int, char *, size_t);
17704 char buf[256] = "^";
17706 char *str = strerror (-1);
17707 strcpy (copy, str);
17708 if (__xpg_strerror_r (-2, buf, 1) == 0)
17712 __xpg_strerror_r (-2, buf, 256);
17713 if (strcmp (str, copy))
17721 if ac_fn_c_try_run "$LINENO"; then :
17722 gl_cv_func_strerror_r_works=yes
17724 gl_cv_func_strerror_r_works=no
17726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17727 conftest.$ac_objext conftest.beam conftest.$ac_ext
17732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
17733 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
17740 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
17741 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
17747 cat >>confdefs.h <<_ACEOF
17748 #define HAVE_DECL_STRERROR_R $ac_have_decl
17765 if test $ac_cv_have_decl_strerror_r = no; then
17766 HAVE_DECL_STRERROR_R=0
17769 if test $ac_cv_func_strerror_r = yes; then
17770 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
17771 if test $gl_cv_func_strerror_r_posix_signature = yes; then
17772 case "$gl_cv_func_strerror_r_works" in
17773 *no) REPLACE_STRERROR_R=1 ;;
17776 REPLACE_STRERROR_R=1
17779 REPLACE_STRERROR_R=1
17794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17795 $as_echo_n "checking for ssize_t... " >&6; }
17796 if ${gt_cv_ssize_t+:} false; then :
17797 $as_echo_n "(cached) " >&6
17799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17800 /* end confdefs.h. */
17801 #include <sys/types.h>
17805 int x = sizeof (ssize_t *) + sizeof (ssize_t);
17811 if ac_fn_c_try_compile "$LINENO"; then :
17816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17819 $as_echo "$gt_cv_ssize_t" >&6; }
17820 if test $gt_cv_ssize_t = no; then
17822 $as_echo "#define ssize_t int" >>confdefs.h
17826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
17827 $as_echo_n "checking for long file names... " >&6; }
17828 if ${ac_cv_sys_long_file_names+:} false; then :
17829 $as_echo_n "(cached) " >&6
17831 ac_cv_sys_long_file_names=yes
17832 # Test for long file names in all the places we know might matter:
17833 # . the current directory, where building will happen
17834 # $prefix/lib where we will be installing things
17835 # $exec_prefix/lib likewise
17836 # $TMPDIR if set, where it might want to write temporary files
17837 # /tmp where it might want to write temporary files
17838 # /var/tmp likewise
17839 # /usr/tmp likewise
17840 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
17841 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
17842 # in the usual case where exec_prefix is '${prefix}'.
17844 . | /* | ?:[\\/]*) ;; #(
17847 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
17848 ac_xdir=$ac_dir/cf$$
17849 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
17850 ac_tf1=$ac_xdir/conftest9012345
17851 ac_tf2=$ac_xdir/conftest9012346
17852 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
17853 ac_cv_sys_long_file_names=no
17854 rm -f -r "$ac_xdir" 2>/dev/null
17855 test $ac_cv_sys_long_file_names = no && break
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
17859 $as_echo "$ac_cv_sys_long_file_names" >&6; }
17860 if test $ac_cv_sys_long_file_names = yes; then
17862 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
17876 # Check whether --with-selinux was given.
17877 if test "${with_selinux+set}" = set; then :
17878 withval=$with_selinux;
17885 if test "$with_selinux" != no; then
17887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
17888 $as_echo_n "checking for library containing setfilecon... " >&6; }
17889 if ${ac_cv_search_setfilecon+:} false; then :
17890 $as_echo_n "(cached) " >&6
17892 ac_func_search_save_LIBS=$LIBS
17893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17894 /* end confdefs.h. */
17896 /* Override any GCC internal prototype to avoid an error.
17897 Use char because int might match the return type of a GCC
17898 builtin and then its argument prototype would still apply. */
17902 char setfilecon ();
17906 return setfilecon ();
17911 for ac_lib in '' selinux; do
17912 if test -z "$ac_lib"; then
17913 ac_res="none required"
17916 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17918 if ac_fn_c_try_link "$LINENO"; then :
17919 ac_cv_search_setfilecon=$ac_res
17921 rm -f core conftest.err conftest.$ac_objext \
17923 if ${ac_cv_search_setfilecon+:} false; then :
17927 if ${ac_cv_search_setfilecon+:} false; then :
17930 ac_cv_search_setfilecon=no
17932 rm conftest.$ac_ext
17933 LIBS=$ac_func_search_save_LIBS
17935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
17936 $as_echo "$ac_cv_search_setfilecon" >&6; }
17937 ac_res=$ac_cv_search_setfilecon
17938 if test "$ac_res" != no; then :
17939 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17940 test "$ac_cv_search_setfilecon" = "none required" ||
17941 LIB_SELINUX=$ac_cv_search_setfilecon
17948 # Warn if SELinux is found but libselinux is absent;
17949 if test "$ac_cv_search_setfilecon" = no; then
17950 if test "$host" = "$build" && test -d /selinux; then
17951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
17952 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
17953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
17954 $as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
17965 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
17966 if test "x$ac_cv_have_decl_setenv" = xyes; then :
17972 cat >>confdefs.h <<_ACEOF
17973 #define HAVE_DECL_SETENV $ac_have_decl
17991 if test $ac_cv_have_decl_setenv = no; then
18011 for ac_header in search.h
18013 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
18014 if test "x$ac_cv_header_search_h" = xyes; then :
18015 cat >>confdefs.h <<_ACEOF
18016 #define HAVE_SEARCH_H 1
18023 for ac_func in tsearch
18025 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
18026 if test "x$ac_cv_func_tsearch" = xyes; then :
18027 cat >>confdefs.h <<_ACEOF
18028 #define HAVE_TSEARCH 1
18053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
18054 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
18055 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
18056 $as_echo_n "(cached) " >&6
18059 if test "$cross_compiling" = yes; then :
18062 # Guess yes on glibc systems.
18063 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18064 # Guess yes on FreeBSD >= 5.
18065 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
18066 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18067 # Guess yes on Mac OS X >= 10.3.
18068 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
18069 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18070 # Guess yes on OpenBSD >= 3.9.
18071 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
18072 gl_cv_func_snprintf_retval_c99="guessing no";;
18073 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18074 # Guess yes on Solaris >= 2.10.
18075 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
18076 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
18077 # Guess yes on AIX >= 4.
18078 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
18079 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18080 # Guess yes on NetBSD >= 3.
18081 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
18082 gl_cv_func_snprintf_retval_c99="guessing no";;
18083 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18084 # Guess yes on BeOS.
18085 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
18086 # If we don't know, assume the worst.
18087 *) gl_cv_func_snprintf_retval_c99="guessing no";;
18091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18092 /* end confdefs.h. */
18095 #include <string.h>
18097 # define my_snprintf snprintf
18099 # include <stdarg.h>
18100 static int my_snprintf (char *buf, int size, const char *format, ...)
18104 va_start (args, format);
18105 ret = vsnprintf (buf, size, format, args);
18110 static char buf[100];
18113 strcpy (buf, "ABCDEF");
18114 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
18116 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
18118 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
18123 if ac_fn_c_try_run "$LINENO"; then :
18124 gl_cv_func_snprintf_retval_c99=yes
18126 gl_cv_func_snprintf_retval_c99=no
18128 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18129 conftest.$ac_objext conftest.beam conftest.$ac_ext
18134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
18135 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
18138 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
18139 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
18145 cat >>confdefs.h <<_ACEOF
18146 #define HAVE_DECL_SNPRINTF $ac_have_decl
18157 if test $ac_cv_header_sys_socket_h = no; then
18158 for ac_header in ws2tcpip.h
18160 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
18161 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
18162 cat >>confdefs.h <<_ACEOF
18163 #define HAVE_WS2TCPIP_H 1
18176 HAVE_DECL_STRNCASECMP=1;
18184 for ac_func in strcasestr
18186 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
18187 if test "x$ac_cv_func_strcasestr" = xyes; then :
18188 cat >>confdefs.h <<_ACEOF
18189 #define HAVE_STRCASESTR 1
18195 if test $ac_cv_func_strcasestr = no; then
18198 if test "$gl_cv_func_memchr_works" != yes; then
18199 REPLACE_STRCASESTR=1
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
18202 $as_echo_n "checking whether strcasestr works... " >&6; }
18203 if ${gl_cv_func_strcasestr_works_always+:} false; then :
18204 $as_echo_n "(cached) " >&6
18206 if test "$cross_compiling" = yes; then :
18207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18208 /* end confdefs.h. */
18210 #ifdef __GNU_LIBRARY__
18211 #include <features.h>
18212 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18213 || defined __UCLIBC__
18216 #elif defined __CYGWIN__
18217 #include <cygwin/version.h>
18218 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18227 $EGREP "Lucky user" >/dev/null 2>&1; then :
18228 gl_cv_func_strcasestr_works_always="guessing yes"
18230 gl_cv_func_strcasestr_works_always="guessing no"
18236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18237 /* end confdefs.h. */
18239 #include <string.h> /* for strcasestr */
18240 #define P "_EF_BF_BD"
18241 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18242 #define NEEDLE P P P P P
18247 return !!strcasestr (HAYSTACK, NEEDLE);
18253 if ac_fn_c_try_run "$LINENO"; then :
18254 gl_cv_func_strcasestr_works_always=yes
18256 gl_cv_func_strcasestr_works_always=no
18258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18259 conftest.$ac_objext conftest.beam conftest.$ac_ext
18264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
18265 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
18266 case "$gl_cv_func_strcasestr_works_always" in
18269 REPLACE_STRCASESTR=1
18281 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
18282 if test "x$ac_cv_have_decl_strdup" = xyes; then :
18288 cat >>confdefs.h <<_ACEOF
18289 #define HAVE_DECL_STRDUP $ac_have_decl
18314 if test $gl_cv_have_include_next = yes; then
18315 gl_cv_next_string_h='<'string.h'>'
18317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
18318 $as_echo_n "checking absolute name of <string.h>... " >&6; }
18319 if ${gl_cv_next_string_h+:} false; then :
18320 $as_echo_n "(cached) " >&6
18325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18326 /* end confdefs.h. */
18327 #include <string.h>
18330 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18331 *) gl_absname_cpp="$ac_cpp" ;;
18336 gl_dirsep_regex='[/\\]'
18339 gl_dirsep_regex='\/'
18342 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18343 gl_header_literal_regex=`echo 'string.h' \
18344 | sed -e "$gl_make_literal_regex_sed"`
18345 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18346 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18352 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18353 sed -n "$gl_absolute_header_sed"`
18355 gl_header=$gl_cv_absolute_string_h
18356 gl_cv_next_string_h='"'$gl_header'"'
18360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
18361 $as_echo "$gl_cv_next_string_h" >&6; }
18363 NEXT_STRING_H=$gl_cv_next_string_h
18365 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18366 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18367 gl_next_as_first_directive='<'string.h'>'
18369 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18370 gl_next_as_first_directive=$gl_cv_next_string_h
18372 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
18379 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do
18380 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18382 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18383 if eval \${$as_gl_Symbol+:} false; then :
18384 $as_echo_n "(cached) " >&6
18386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18387 /* end confdefs.h. */
18388 #include <string.h>
18399 if ac_fn_c_try_compile "$LINENO"; then :
18400 eval "$as_gl_Symbol=yes"
18402 eval "$as_gl_Symbol=no"
18404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18406 eval ac_res=\$$as_gl_Symbol
18407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18408 $as_echo "$ac_res" >&6; }
18409 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18410 cat >>confdefs.h <<_ACEOF
18411 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18414 eval ac_cv_have_decl_$gl_func=yes
18442 if test $gl_cv_have_include_next = yes; then
18443 gl_cv_next_strings_h='<'strings.h'>'
18445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
18446 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
18447 if ${gl_cv_next_strings_h+:} false; then :
18448 $as_echo_n "(cached) " >&6
18451 if test $ac_cv_header_strings_h = yes; then
18456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18457 /* end confdefs.h. */
18458 #include <strings.h>
18461 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18462 *) gl_absname_cpp="$ac_cpp" ;;
18467 gl_dirsep_regex='[/\\]'
18470 gl_dirsep_regex='\/'
18473 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18474 gl_header_literal_regex=`echo 'strings.h' \
18475 | sed -e "$gl_make_literal_regex_sed"`
18476 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18477 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18483 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18484 sed -n "$gl_absolute_header_sed"`
18486 gl_header=$gl_cv_absolute_strings_h
18487 gl_cv_next_strings_h='"'$gl_header'"'
18489 gl_cv_next_strings_h='<'strings.h'>'
18494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
18495 $as_echo "$gl_cv_next_strings_h" >&6; }
18497 NEXT_STRINGS_H=$gl_cv_next_strings_h
18499 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18500 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18501 gl_next_as_first_directive='<'strings.h'>'
18503 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18504 gl_next_as_first_directive=$gl_cv_next_strings_h
18506 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
18511 if test $ac_cv_header_strings_h = yes; then
18519 for gl_func in ffs strcasecmp strncasecmp; do
18520 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18522 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18523 if eval \${$as_gl_Symbol+:} false; then :
18524 $as_echo_n "(cached) " >&6
18526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18527 /* end confdefs.h. */
18529 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
18531 #include <sys/types.h>
18532 #include <strings.h>
18543 if ac_fn_c_try_compile "$LINENO"; then :
18544 eval "$as_gl_Symbol=yes"
18546 eval "$as_gl_Symbol=no"
18548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18550 eval ac_res=\$$as_gl_Symbol
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18552 $as_echo "$ac_res" >&6; }
18553 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18554 cat >>confdefs.h <<_ACEOF
18555 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18558 eval ac_cv_have_decl_$gl_func=yes
18564 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
18565 if test "x$ac_cv_have_decl_strndup" = xyes; then :
18571 cat >>confdefs.h <<_ACEOF
18572 #define HAVE_DECL_STRNDUP $ac_have_decl
18582 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
18583 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
18589 cat >>confdefs.h <<_ACEOF
18590 #define HAVE_DECL_STRNLEN $ac_have_decl
18597 if test "$gl_cv_func_memchr_works" != yes; then
18600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
18601 $as_echo_n "checking whether strstr works... " >&6; }
18602 if ${gl_cv_func_strstr_works_always+:} false; then :
18603 $as_echo_n "(cached) " >&6
18605 if test "$cross_compiling" = yes; then :
18606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18607 /* end confdefs.h. */
18609 #ifdef __GNU_LIBRARY__
18610 #include <features.h>
18611 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
18612 || defined __UCLIBC__
18615 #elif defined __CYGWIN__
18616 #include <cygwin/version.h>
18617 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
18625 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18626 $EGREP "Lucky user" >/dev/null 2>&1; then :
18627 gl_cv_func_strstr_works_always="guessing yes"
18629 gl_cv_func_strstr_works_always="guessing no"
18635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18636 /* end confdefs.h. */
18638 #include <string.h> /* for strstr */
18639 #define P "_EF_BF_BD"
18640 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
18641 #define NEEDLE P P P P P
18646 return !!strstr (HAYSTACK, NEEDLE);
18652 if ac_fn_c_try_run "$LINENO"; then :
18653 gl_cv_func_strstr_works_always=yes
18655 gl_cv_func_strstr_works_always=no
18657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18658 conftest.$ac_objext conftest.beam conftest.$ac_ext
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
18664 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
18665 case "$gl_cv_func_strstr_works_always" in
18679 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
18680 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
18686 cat >>confdefs.h <<_ACEOF
18687 #define HAVE_DECL_STRTOUMAX $ac_have_decl
18696 GNULIB_GETPEERNAME=0;
18697 GNULIB_GETSOCKNAME=0;
18698 GNULIB_GETSOCKOPT=0;
18704 GNULIB_SETSOCKOPT=0;
18707 HAVE_STRUCT_SOCKADDR_STORAGE=1;
18708 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
18710 HAVE_SA_FAMILY_T=1;
18723 HAVE_STRUCT_UTSNAME=1;
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
18747 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
18748 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
18749 $as_echo_n "(cached) " >&6
18751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18752 /* end confdefs.h. */
18758 static struct timespec x; x.tv_sec = x.tv_nsec;
18763 if ac_fn_c_try_compile "$LINENO"; then :
18764 gl_cv_sys_struct_timespec_in_time_h=yes
18766 gl_cv_sys_struct_timespec_in_time_h=no
18768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
18771 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
18773 TIME_H_DEFINES_STRUCT_TIMESPEC=0
18774 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
18775 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
18776 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
18777 TIME_H_DEFINES_STRUCT_TIMESPEC=1
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
18780 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
18781 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
18782 $as_echo_n "(cached) " >&6
18784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18785 /* end confdefs.h. */
18786 #include <sys/time.h>
18791 static struct timespec x; x.tv_sec = x.tv_nsec;
18796 if ac_fn_c_try_compile "$LINENO"; then :
18797 gl_cv_sys_struct_timespec_in_sys_time_h=yes
18799 gl_cv_sys_struct_timespec_in_sys_time_h=no
18801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
18804 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
18805 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
18806 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
18808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
18809 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
18810 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
18811 $as_echo_n "(cached) " >&6
18813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18814 /* end confdefs.h. */
18815 #include <pthread.h>
18820 static struct timespec x; x.tv_sec = x.tv_nsec;
18825 if ac_fn_c_try_compile "$LINENO"; then :
18826 gl_cv_sys_struct_timespec_in_pthread_h=yes
18828 gl_cv_sys_struct_timespec_in_pthread_h=no
18830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
18833 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
18834 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
18835 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
18854 if test $gl_cv_have_include_next = yes; then
18855 gl_cv_next_time_h='<'time.h'>'
18857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
18858 $as_echo_n "checking absolute name of <time.h>... " >&6; }
18859 if ${gl_cv_next_time_h+:} false; then :
18860 $as_echo_n "(cached) " >&6
18865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18866 /* end confdefs.h. */
18870 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18871 *) gl_absname_cpp="$ac_cpp" ;;
18876 gl_dirsep_regex='[/\\]'
18879 gl_dirsep_regex='\/'
18882 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18883 gl_header_literal_regex=`echo 'time.h' \
18884 | sed -e "$gl_make_literal_regex_sed"`
18885 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18886 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18892 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18893 sed -n "$gl_absolute_header_sed"`
18895 gl_header=$gl_cv_absolute_time_h
18896 gl_cv_next_time_h='"'$gl_header'"'
18900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
18901 $as_echo "$gl_cv_next_time_h" >&6; }
18903 NEXT_TIME_H=$gl_cv_next_time_h
18905 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18906 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18907 gl_next_as_first_directive='<'time.h'>'
18909 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18910 gl_next_as_first_directive=$gl_cv_next_time_h
18912 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
18935 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
18940 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
18945 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;}
18952 if test "$HAVE_LIBUNISTRING" = yes; then
18953 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
18954 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
18955 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
18964 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
18965 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
18971 cat >>confdefs.h <<_ACEOF
18972 #define HAVE_DECL_UNSETENV $ac_have_decl
18994 if test $ac_cv_header_features_h = yes; then
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
19003 $as_echo_n "checking for inttypes.h... " >&6; }
19004 if ${gl_cv_header_inttypes_h+:} false; then :
19005 $as_echo_n "(cached) " >&6
19007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19008 /* end confdefs.h. */
19010 #include <sys/types.h>
19011 #include <inttypes.h>
19016 uintmax_t i = (uintmax_t) -1; return !i;
19021 if ac_fn_c_try_compile "$LINENO"; then :
19022 gl_cv_header_inttypes_h=yes
19024 gl_cv_header_inttypes_h=no
19026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
19029 $as_echo "$gl_cv_header_inttypes_h" >&6; }
19030 if test $gl_cv_header_inttypes_h = yes; then
19032 cat >>confdefs.h <<_ACEOF
19033 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
19039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
19040 $as_echo_n "checking for stdint.h... " >&6; }
19041 if ${gl_cv_header_stdint_h+:} false; then :
19042 $as_echo_n "(cached) " >&6
19044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19045 /* end confdefs.h. */
19046 #include <sys/types.h>
19047 #include <stdint.h>
19051 uintmax_t i = (uintmax_t) -1; return !i;
19056 if ac_fn_c_try_compile "$LINENO"; then :
19057 gl_cv_header_stdint_h=yes
19059 gl_cv_header_stdint_h=no
19061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
19064 $as_echo "$gl_cv_header_stdint_h" >&6; }
19065 if test $gl_cv_header_stdint_h = yes; then
19067 cat >>confdefs.h <<_ACEOF
19068 #define HAVE_STDINT_H_WITH_UINTMAX 1
19076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
19077 $as_echo_n "checking for intmax_t... " >&6; }
19078 if ${gt_cv_c_intmax_t+:} false; then :
19079 $as_echo_n "(cached) " >&6
19081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19082 /* end confdefs.h. */
19084 #include <stddef.h>
19085 #include <stdlib.h>
19086 #if HAVE_STDINT_H_WITH_UINTMAX
19087 #include <stdint.h>
19089 #if HAVE_INTTYPES_H_WITH_UINTMAX
19090 #include <inttypes.h>
19096 intmax_t x = -1; return !x;
19101 if ac_fn_c_try_compile "$LINENO"; then :
19102 gt_cv_c_intmax_t=yes
19104 gt_cv_c_intmax_t=no
19106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
19109 $as_echo "$gt_cv_c_intmax_t" >&6; }
19110 if test $gt_cv_c_intmax_t = yes; then
19112 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
19116 test $ac_cv_type_long_long_int = yes \
19117 && ac_type='long long' \
19120 cat >>confdefs.h <<_ACEOF
19121 #define intmax_t $ac_type
19131 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
19133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19134 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19135 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
19136 cat >>confdefs.h <<_ACEOF
19137 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19143 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
19145 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
19151 cat >>confdefs.h <<_ACEOF
19152 #define HAVE_DECL__SNPRINTF $ac_have_decl
19157 case "$gl_cv_func_snprintf_retval_c99" in
19160 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
19176 GNULIB_INET_NTOP=0;
19177 GNULIB_INET_PTON=0;
19178 HAVE_DECL_INET_NTOP=1;
19179 HAVE_DECL_INET_PTON=1;
19180 REPLACE_INET_NTOP=0;
19181 REPLACE_INET_PTON=0;
19191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
19192 $as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
19193 if ${gl_cv_func_ungetc_works+:} false; then :
19194 $as_echo_n "(cached) " >&6
19196 if test "$cross_compiling" = yes; then :
19198 # Guess yes on glibc systems.
19199 *-gnu*) gl_cv_func_ungetc_works="guessing yes" ;;
19200 # If we don't know, assume the worst.
19201 *) gl_cv_func_ungetc_works="guessing no" ;;
19205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19206 /* end confdefs.h. */
19214 if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
19215 if (fputs ("abc", f) < 0) return 2;
19217 if (fgetc (f) != 'a') return 3;
19218 if (fgetc (f) != 'b') return 4;
19219 if (ungetc ('d', f) != 'd') return 5;
19220 if (ftell (f) != 1) return 6;
19221 if (fgetc (f) != 'd') return 7;
19222 if (ftell (f) != 2) return 8;
19223 if (fseek (f, 0, SEEK_CUR) != 0) return 9;
19224 if (ftell (f) != 2) return 10;
19225 if (fgetc (f) != 'c') return 11;
19226 fclose (f); remove ("conftest.tmp");
19231 if ac_fn_c_try_run "$LINENO"; then :
19232 gl_cv_func_ungetc_works=yes
19234 gl_cv_func_ungetc_works=no
19236 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19237 conftest.$ac_objext conftest.beam conftest.$ac_ext
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
19243 $as_echo "$gl_cv_func_ungetc_works" >&6; }
19244 case "$gl_cv_func_ungetc_works" in
19248 $as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
19265 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
19271 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
19272 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
19273 $as_echo_n "(cached) " >&6
19276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19277 /* end confdefs.h. */
19278 #include <sys/socket.h>
19287 if ac_fn_c_try_compile "$LINENO"; then :
19288 gl_cv_header_sys_socket_h_selfcontained=yes
19290 gl_cv_header_sys_socket_h_selfcontained=no
19292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
19296 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
19297 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
19298 for ac_func in shutdown
19300 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
19301 if test "x$ac_cv_func_shutdown" = xyes; then :
19302 cat >>confdefs.h <<_ACEOF
19303 #define HAVE_SHUTDOWN 1
19309 if test $ac_cv_func_shutdown = yes; then
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
19311 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
19312 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
19313 $as_echo_n "(cached) " >&6
19316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19317 /* end confdefs.h. */
19318 #include <sys/socket.h>
19322 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
19327 if ac_fn_c_try_compile "$LINENO"; then :
19328 gl_cv_header_sys_socket_h_shut=yes
19330 gl_cv_header_sys_socket_h_shut=no
19332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
19336 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
19337 if test $gl_cv_header_sys_socket_h_shut = no; then
19338 SYS_SOCKET_H='sys/socket.h'
19342 # We need to check for ws2tcpip.h now.
19360 if test $gl_cv_have_include_next = yes; then
19361 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
19364 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
19365 if ${gl_cv_next_sys_socket_h+:} false; then :
19366 $as_echo_n "(cached) " >&6
19369 if test $ac_cv_header_sys_socket_h = yes; then
19374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19375 /* end confdefs.h. */
19376 #include <sys/socket.h>
19379 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19380 *) gl_absname_cpp="$ac_cpp" ;;
19385 gl_dirsep_regex='[/\\]'
19388 gl_dirsep_regex='\/'
19391 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19392 gl_header_literal_regex=`echo 'sys/socket.h' \
19393 | sed -e "$gl_make_literal_regex_sed"`
19394 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19395 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19401 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19402 sed -n "$gl_absolute_header_sed"`
19404 gl_header=$gl_cv_absolute_sys_socket_h
19405 gl_cv_next_sys_socket_h='"'$gl_header'"'
19407 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
19412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
19413 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
19415 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
19417 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19418 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19419 gl_next_as_first_directive='<'sys/socket.h'>'
19421 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19422 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
19424 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
19429 if test $ac_cv_header_sys_socket_h = yes; then
19430 HAVE_SYS_SOCKET_H=1
19433 HAVE_SYS_SOCKET_H=0
19434 if test $ac_cv_header_ws2tcpip_h = yes; then
19443 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
19444 /* sys/types.h is not needed according to POSIX, but the
19445 sys/socket.h in i386-unknown-freebsd4.10 and
19446 powerpc-apple-darwin5.5 required it. */
19447 #include <sys/types.h>
19448 #ifdef HAVE_SYS_SOCKET_H
19449 #include <sys/socket.h>
19451 #ifdef HAVE_WS2TCPIP_H
19452 #include <ws2tcpip.h>
19456 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
19458 cat >>confdefs.h <<_ACEOF
19459 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
19464 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
19465 /* sys/types.h is not needed according to POSIX, but the
19466 sys/socket.h in i386-unknown-freebsd4.10 and
19467 powerpc-apple-darwin5.5 required it. */
19468 #include <sys/types.h>
19469 #ifdef HAVE_SYS_SOCKET_H
19470 #include <sys/socket.h>
19472 #ifdef HAVE_WS2TCPIP_H
19473 #include <ws2tcpip.h>
19477 if test "x$ac_cv_type_sa_family_t" = xyes; then :
19479 cat >>confdefs.h <<_ACEOF
19480 #define HAVE_SA_FAMILY_T 1
19486 if test $ac_cv_type_struct_sockaddr_storage = no; then
19487 HAVE_STRUCT_SOCKADDR_STORAGE=0
19489 if test $ac_cv_type_sa_family_t = no; then
19492 if test $ac_cv_type_struct_sockaddr_storage != no; then
19493 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
19494 #ifdef HAVE_SYS_SOCKET_H
19495 #include <sys/socket.h>
19497 #ifdef HAVE_WS2TCPIP_H
19498 #include <ws2tcpip.h>
19502 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
19504 cat >>confdefs.h <<_ACEOF
19505 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
19510 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
19514 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
19515 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
19516 SYS_SOCKET_H='sys/socket.h'
19528 if test $ac_cv_header_sys_socket_h != yes; then
19529 for ac_header in winsock2.h
19531 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
19532 if test "x$ac_cv_header_winsock2_h" = xyes; then :
19533 cat >>confdefs.h <<_ACEOF
19534 #define HAVE_WINSOCK2_H 1
19542 if test "$ac_cv_header_winsock2_h" = yes; then
19544 UNISTD_H_HAVE_WINSOCK2_H=1
19545 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
19553 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
19554 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19556 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19557 if eval \${$as_gl_Symbol+:} false; then :
19558 $as_echo_n "(cached) " >&6
19560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19561 /* end confdefs.h. */
19563 /* Some systems require prerequisite headers. */
19564 #include <sys/types.h>
19565 #include <sys/socket.h>
19576 if ac_fn_c_try_compile "$LINENO"; then :
19577 eval "$as_gl_Symbol=yes"
19579 eval "$as_gl_Symbol=no"
19581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19583 eval ac_res=\$$as_gl_Symbol
19584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19585 $as_echo "$ac_res" >&6; }
19586 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19587 cat >>confdefs.h <<_ACEOF
19588 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19591 eval ac_cv_have_decl_$gl_func=yes
19611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
19612 $as_echo_n "checking for IPv4 sockets... " >&6; }
19613 if ${gl_cv_socket_ipv4+:} false; then :
19614 $as_echo_n "(cached) " >&6
19616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19617 /* end confdefs.h. */
19618 #include <sys/types.h>
19619 #ifdef HAVE_SYS_SOCKET_H
19620 #include <sys/socket.h>
19622 #ifdef HAVE_NETINET_IN_H
19623 #include <netinet/in.h>
19625 #ifdef HAVE_WINSOCK2_H
19626 #include <winsock2.h>
19631 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
19632 if (&x && &y && &z) return 0;
19637 if ac_fn_c_try_compile "$LINENO"; then :
19638 gl_cv_socket_ipv4=yes
19640 gl_cv_socket_ipv4=no
19642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
19646 $as_echo "$gl_cv_socket_ipv4" >&6; }
19647 if test $gl_cv_socket_ipv4 = yes; then
19649 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
19653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
19654 $as_echo_n "checking for IPv6 sockets... " >&6; }
19655 if ${gl_cv_socket_ipv6+:} false; then :
19656 $as_echo_n "(cached) " >&6
19658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19659 /* end confdefs.h. */
19660 #include <sys/types.h>
19661 #ifdef HAVE_SYS_SOCKET_H
19662 #include <sys/socket.h>
19664 #ifdef HAVE_NETINET_IN_H
19665 #include <netinet/in.h>
19667 #ifdef HAVE_WINSOCK2_H
19668 #include <winsock2.h>
19670 #ifdef HAVE_WS2TCPIP_H
19671 #include <ws2tcpip.h>
19676 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
19677 if (&x && &y && &z) return 0;
19682 if ac_fn_c_try_compile "$LINENO"; then :
19683 gl_cv_socket_ipv6=yes
19685 gl_cv_socket_ipv6=no
19687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
19691 $as_echo "$gl_cv_socket_ipv6" >&6; }
19692 if test $gl_cv_socket_ipv6 = yes; then
19694 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
19698 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
19699 if test "x$ac_cv_type_off_t" = xyes; then :
19703 cat >>confdefs.h <<_ACEOF
19704 #define off_t long int
19715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
19716 $as_echo_n "checking for LC_MESSAGES... " >&6; }
19717 if ${gt_cv_val_LC_MESSAGES+:} false; then :
19718 $as_echo_n "(cached) " >&6
19720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19721 /* end confdefs.h. */
19722 #include <locale.h>
19731 if ac_fn_c_try_link "$LINENO"; then :
19732 gt_cv_val_LC_MESSAGES=yes
19734 gt_cv_val_LC_MESSAGES=no
19736 rm -f core conftest.err conftest.$ac_objext \
19737 conftest$ac_exeext conftest.$ac_ext
19739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
19740 $as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
19741 if test $gt_cv_val_LC_MESSAGES = yes; then
19743 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
19748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
19749 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
19750 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
19751 $as_echo_n "(cached) " >&6
19753 gt_save_LIBS="$LIBS"
19754 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19756 /* end confdefs.h. */
19757 #include <CoreFoundation/CFPreferences.h>
19761 CFPreferencesCopyAppValue(NULL, NULL)
19766 if ac_fn_c_try_link "$LINENO"; then :
19767 gt_cv_func_CFPreferencesCopyAppValue=yes
19769 gt_cv_func_CFPreferencesCopyAppValue=no
19771 rm -f core conftest.err conftest.$ac_objext \
19772 conftest$ac_exeext conftest.$ac_ext
19773 LIBS="$gt_save_LIBS"
19775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
19776 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
19777 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
19779 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
19783 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
19784 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
19785 $as_echo_n "(cached) " >&6
19787 gt_save_LIBS="$LIBS"
19788 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
19789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19790 /* end confdefs.h. */
19791 #include <CoreFoundation/CFLocale.h>
19795 CFLocaleCopyCurrent();
19800 if ac_fn_c_try_link "$LINENO"; then :
19801 gt_cv_func_CFLocaleCopyCurrent=yes
19803 gt_cv_func_CFLocaleCopyCurrent=no
19805 rm -f core conftest.err conftest.$ac_objext \
19806 conftest$ac_exeext conftest.$ac_ext
19807 LIBS="$gt_save_LIBS"
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
19810 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
19811 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
19813 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
19817 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
19818 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
19837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
19838 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
19839 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
19840 $as_echo_n "(cached) " >&6
19843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19844 /* end confdefs.h. */
19845 #include <sys/select.h>
19854 if ac_fn_c_try_compile "$LINENO"; then :
19855 gl_cv_header_sys_select_h_selfcontained=yes
19857 gl_cv_header_sys_select_h_selfcontained=no
19859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19860 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
19861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19862 /* end confdefs.h. */
19863 #include <sys/select.h>
19867 int memset; int bzero;
19873 if ac_fn_c_try_compile "$LINENO"; then :
19874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19875 /* end confdefs.h. */
19876 #include <sys/select.h>
19882 #define memset nonexistent_memset
19887 void *memset (void *, int, unsigned long);
19889 #define bzero nonexistent_bzero
19894 void bzero (void *, unsigned long);
19903 if ac_fn_c_try_link "$LINENO"; then :
19906 gl_cv_header_sys_select_h_selfcontained=no
19908 rm -f core conftest.err conftest.$ac_objext \
19909 conftest$ac_exeext conftest.$ac_ext
19912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
19917 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
19933 if test $gl_cv_have_include_next = yes; then
19934 gl_cv_next_sys_select_h='<'sys/select.h'>'
19936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
19937 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
19938 if ${gl_cv_next_sys_select_h+:} false; then :
19939 $as_echo_n "(cached) " >&6
19942 if test $ac_cv_header_sys_select_h = yes; then
19947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19948 /* end confdefs.h. */
19949 #include <sys/select.h>
19952 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19953 *) gl_absname_cpp="$ac_cpp" ;;
19958 gl_dirsep_regex='[/\\]'
19961 gl_dirsep_regex='\/'
19964 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19965 gl_header_literal_regex=`echo 'sys/select.h' \
19966 | sed -e "$gl_make_literal_regex_sed"`
19967 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19968 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19974 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19975 sed -n "$gl_absolute_header_sed"`
19977 gl_header=$gl_cv_absolute_sys_select_h
19978 gl_cv_next_sys_select_h='"'$gl_header'"'
19980 gl_cv_next_sys_select_h='<'sys/select.h'>'
19985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
19986 $as_echo "$gl_cv_next_sys_select_h" >&6; }
19988 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
19990 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19991 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19992 gl_next_as_first_directive='<'sys/select.h'>'
19994 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19995 gl_next_as_first_directive=$gl_cv_next_sys_select_h
19997 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
20002 if test $ac_cv_header_sys_select_h = yes; then
20003 HAVE_SYS_SELECT_H=1
20005 HAVE_SYS_SELECT_H=0
20018 if test $ac_cv_header_sys_socket_h != yes; then
20019 for ac_header in winsock2.h
20021 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20022 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20023 cat >>confdefs.h <<_ACEOF
20024 #define HAVE_WINSOCK2_H 1
20032 if test "$ac_cv_header_winsock2_h" = yes; then
20034 UNISTD_H_HAVE_WINSOCK2_H=1
20035 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20043 for gl_func in pselect select; do
20044 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
20045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
20046 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
20047 if eval \${$as_gl_Symbol+:} false; then :
20048 $as_echo_n "(cached) " >&6
20050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20051 /* end confdefs.h. */
20053 /* Some systems require prerequisite headers. */
20054 #include <sys/types.h>
20055 #if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
20056 # include <sys/time.h>
20058 #include <sys/select.h>
20069 if ac_fn_c_try_compile "$LINENO"; then :
20070 eval "$as_gl_Symbol=yes"
20072 eval "$as_gl_Symbol=no"
20074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20076 eval ac_res=\$$as_gl_Symbol
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20078 $as_echo "$ac_res" >&6; }
20079 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
20080 cat >>confdefs.h <<_ACEOF
20081 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
20084 eval ac_cv_have_decl_$gl_func=yes
20100 if test $ac_cv_header_sys_socket_h != yes; then
20101 for ac_header in winsock2.h
20103 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
20104 if test "x$ac_cv_header_winsock2_h" = xyes; then :
20105 cat >>confdefs.h <<_ACEOF
20106 #define HAVE_WINSOCK2_H 1
20114 if test "$ac_cv_header_winsock2_h" = yes; then
20116 UNISTD_H_HAVE_WINSOCK2_H=1
20117 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
20123 if test $HAVE_WINSOCK2_H = 1; then
20124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
20125 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
20126 if ${gl_cv_func_wsastartup+:} false; then :
20127 $as_echo_n "(cached) " >&6
20130 gl_save_LIBS="$LIBS"
20131 LIBS="$LIBS -lws2_32"
20132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20133 /* end confdefs.h. */
20135 #ifdef HAVE_WINSOCK2_H
20136 # include <winsock2.h>
20142 WORD wVersionRequested = MAKEWORD(1, 1);
20144 int err = WSAStartup(wVersionRequested, &wsaData);
20150 if ac_fn_c_try_link "$LINENO"; then :
20151 gl_cv_func_wsastartup=yes
20153 gl_cv_func_wsastartup=no
20155 rm -f core conftest.err conftest.$ac_objext \
20156 conftest$ac_exeext conftest.$ac_ext
20157 LIBS="$gl_save_LIBS"
20160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
20161 $as_echo "$gl_cv_func_wsastartup" >&6; }
20162 if test "$gl_cv_func_wsastartup" = "yes"; then
20164 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
20166 LIBSOCKET='-lws2_32'
20169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
20170 $as_echo_n "checking for library containing setsockopt... " >&6; }
20171 if ${gl_cv_lib_socket+:} false; then :
20172 $as_echo_n "(cached) " >&6
20176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20177 /* end confdefs.h. */
20191 if ac_fn_c_try_link "$LINENO"; then :
20194 gl_save_LIBS="$LIBS"
20195 LIBS="$gl_save_LIBS -lsocket"
20196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20197 /* end confdefs.h. */
20211 if ac_fn_c_try_link "$LINENO"; then :
20212 gl_cv_lib_socket="-lsocket"
20214 rm -f core conftest.err conftest.$ac_objext \
20215 conftest$ac_exeext conftest.$ac_ext
20216 if test -z "$gl_cv_lib_socket"; then
20217 LIBS="$gl_save_LIBS -lnetwork"
20218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20219 /* end confdefs.h. */
20233 if ac_fn_c_try_link "$LINENO"; then :
20234 gl_cv_lib_socket="-lnetwork"
20236 rm -f core conftest.err conftest.$ac_objext \
20237 conftest$ac_exeext conftest.$ac_ext
20238 if test -z "$gl_cv_lib_socket"; then
20239 LIBS="$gl_save_LIBS -lnet"
20240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20241 /* end confdefs.h. */
20255 if ac_fn_c_try_link "$LINENO"; then :
20256 gl_cv_lib_socket="-lnet"
20258 rm -f core conftest.err conftest.$ac_objext \
20259 conftest$ac_exeext conftest.$ac_ext
20262 LIBS="$gl_save_LIBS"
20265 rm -f core conftest.err conftest.$ac_objext \
20266 conftest$ac_exeext conftest.$ac_ext
20267 if test -z "$gl_cv_lib_socket"; then
20268 gl_cv_lib_socket="none needed"
20272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
20273 $as_echo "$gl_cv_lib_socket" >&6; }
20274 if test "$gl_cv_lib_socket" != "none needed"; then
20275 LIBSOCKET="$gl_cv_lib_socket"
20290 if test "$ac_cv_header_winsock2_h" = yes; then
20300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
20301 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
20302 if ${gl_cv_func_select_supports0+:} false; then :
20303 $as_echo_n "(cached) " >&6
20306 if test "$cross_compiling" = yes; then :
20309 # Guess no on Interix.
20310 interix*) gl_cv_func_select_supports0="guessing no";;
20311 # Guess yes otherwise.
20312 *) gl_cv_func_select_supports0="guessing yes";;
20316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20317 /* end confdefs.h. */
20319 #include <sys/types.h>
20320 #include <sys/time.h>
20321 #if HAVE_SYS_SELECT_H
20322 #include <sys/select.h>
20326 struct timeval timeout;
20327 timeout.tv_sec = 0;
20328 timeout.tv_usec = 5;
20329 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
20332 if ac_fn_c_try_run "$LINENO"; then :
20333 gl_cv_func_select_supports0=yes
20335 gl_cv_func_select_supports0=no
20337 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20338 conftest.$ac_objext conftest.beam conftest.$ac_ext
20343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
20344 $as_echo "$gl_cv_func_select_supports0" >&6; }
20345 case "$gl_cv_func_select_supports0" in
20347 *) REPLACE_SELECT=1 ;;
20350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
20351 $as_echo_n "checking whether select detects invalid fds... " >&6; }
20352 if ${gl_cv_func_select_detects_ebadf+:} false; then :
20353 $as_echo_n "(cached) " >&6
20356 if test "$cross_compiling" = yes; then :
20359 # Guess yes on glibc systems.
20360 *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
20361 # If we don't know, assume the worst.
20362 *) gl_cv_func_select_detects_ebadf="guessing no" ;;
20366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367 /* end confdefs.h. */
20369 #include <sys/types.h>
20370 #include <sys/time.h>
20371 #if HAVE_SYS_SELECT_H
20372 # include <sys/select.h>
20374 #include <unistd.h>
20386 struct timeval timeout;
20387 timeout.tv_sec = 0;
20388 timeout.tv_usec = 5;
20389 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
20395 if ac_fn_c_try_run "$LINENO"; then :
20396 gl_cv_func_select_detects_ebadf=yes
20398 gl_cv_func_select_detects_ebadf=no
20400 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20401 conftest.$ac_objext conftest.beam conftest.$ac_ext
20406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
20407 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
20408 case $gl_cv_func_select_detects_ebadf in
20410 *) REPLACE_SELECT=1 ;;
20414 LIB_SELECT="$LIBSOCKET"
20415 if test $REPLACE_SELECT = 1; then
20418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20419 /* end confdefs.h. */
20421 #define WIN32_LEAN_AND_MEAN
20422 #include <windows.h>
20426 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
20430 if ac_fn_c_try_link "$LINENO"; then :
20433 LIB_SELECT="$LIB_SELECT -luser32"
20435 rm -f core conftest.err conftest.$ac_objext \
20436 conftest$ac_exeext conftest.$ac_ext
20448 GNULIB_PTHREAD_SIGMASK=0;
20450 GNULIB_SIGNAL_H_SIGPIPE=0;
20451 GNULIB_SIGPROCMASK=0;
20452 GNULIB_SIGACTION=0;
20453 HAVE_POSIX_SIGNALBLOCKING=1;
20454 HAVE_PTHREAD_SIGMASK=1;
20459 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
20461 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
20463 HAVE_SIGHANDLER_T=1;
20464 REPLACE_PTHREAD_SIGMASK=0;
20468 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
20469 #include <signal.h>
20470 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
20471 #include <sys/types.h>
20474 if test "x$ac_cv_type_sigset_t" = xyes; then :
20476 cat >>confdefs.h <<_ACEOF
20477 #define HAVE_SIGSET_T 1
20480 gl_cv_type_sigset_t=yes
20482 gl_cv_type_sigset_t=no
20485 if test $gl_cv_type_sigset_t != yes; then
20531 GL_COND_LIBTOOL_TRUE=
20532 GL_COND_LIBTOOL_FALSE='#'
20534 GL_COND_LIBTOOL_TRUE='#'
20535 GL_COND_LIBTOOL_FALSE=
20538 gl_cond_libtool=false
20551 gl_source_base='gl/lib'
20554 if test $ac_cv_func_alloca_works = no; then
20558 # Define an additional variable used in the Makefile substitution.
20559 if test $ac_cv_working_alloca_h = yes; then
20560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
20561 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
20562 if ${gl_cv_rpl_alloca+:} false; then :
20563 $as_echo_n "(cached) " >&6
20566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20567 /* end confdefs.h. */
20569 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
20574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20575 $EGREP "Need own alloca" >/dev/null 2>&1; then :
20576 gl_cv_rpl_alloca=yes
20578 gl_cv_rpl_alloca=no
20584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
20585 $as_echo "$gl_cv_rpl_alloca" >&6; }
20586 if test $gl_cv_rpl_alloca = yes; then
20588 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
20598 if test -n "$ALLOCA_H"; then
20599 GL_GENERATE_ALLOCA_H_TRUE=
20600 GL_GENERATE_ALLOCA_H_FALSE='#'
20602 GL_GENERATE_ALLOCA_H_TRUE='#'
20603 GL_GENERATE_ALLOCA_H_FALSE=
20609 cat >>confdefs.h <<_ACEOF
20610 #define GNULIB_AREADLINKAT 1
20615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
20616 $as_echo_n "checking whether to enable assertions... " >&6; }
20617 # Check whether --enable-assert was given.
20618 if test "${enable_assert+set}" = set; then :
20619 enableval=$enable_assert; if test "x$enableval" = xno; then :
20621 $as_echo "#define NDEBUG 1" >>confdefs.h
20623 elif test "x$enableval" != xyes; then :
20624 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
20625 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
20632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
20633 $as_echo "$enable_assert" >&6; }
20643 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
20657 if test $ac_cv_func_btowc = no; then
20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
20665 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
20666 if ${gl_cv_func_btowc_nul+:} false; then :
20667 $as_echo_n "(cached) " >&6
20670 if test "$cross_compiling" = yes; then :
20673 # Guess no on Cygwin.
20674 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
20675 # Guess yes otherwise.
20676 *) gl_cv_func_btowc_nul="guessing yes" ;;
20680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20681 /* end confdefs.h. */
20683 #include <string.h>
20684 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20686 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20687 included before <wchar.h>. */
20688 #include <stddef.h>
20694 if (btowc ('\0') != 0)
20699 if ac_fn_c_try_run "$LINENO"; then :
20700 gl_cv_func_btowc_nul=yes
20702 gl_cv_func_btowc_nul=no
20704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20705 conftest.$ac_objext conftest.beam conftest.$ac_ext
20710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
20711 $as_echo "$gl_cv_func_btowc_nul" >&6; }
20713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
20714 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
20715 if ${gl_cv_func_btowc_eof+:} false; then :
20716 $as_echo_n "(cached) " >&6
20720 # Guess no on IRIX.
20721 irix*) gl_cv_func_btowc_eof="guessing no" ;;
20722 # Guess yes otherwise.
20723 *) gl_cv_func_btowc_eof="guessing yes" ;;
20725 if test $LOCALE_FR != none; then
20726 if test "$cross_compiling" = yes; then :
20729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20730 /* end confdefs.h. */
20732 #include <locale.h>
20733 #include <string.h>
20734 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
20736 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
20737 included before <wchar.h>. */
20738 #include <stddef.h>
20744 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
20746 if (btowc (EOF) != WEOF)
20752 if ac_fn_c_try_run "$LINENO"; then :
20753 gl_cv_func_btowc_eof=yes
20755 gl_cv_func_btowc_eof=no
20757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20758 conftest.$ac_objext conftest.beam conftest.$ac_ext
20764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
20765 $as_echo "$gl_cv_func_btowc_eof" >&6; }
20767 case "$gl_cv_func_btowc_nul" in
20769 *) REPLACE_BTOWC=1 ;;
20771 case "$gl_cv_func_btowc_eof" in
20773 *) REPLACE_BTOWC=1 ;;
20777 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
20786 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
20803 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
20808 for ac_header in byteswap.h
20810 ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default"
20811 if test "x$ac_cv_header_byteswap_h" = xyes; then :
20812 cat >>confdefs.h <<_ACEOF
20813 #define HAVE_BYTESWAP_H 1
20820 BYTESWAP_H='byteswap.h'
20827 if test -n "$BYTESWAP_H"; then
20828 GL_GENERATE_BYTESWAP_H_TRUE=
20829 GL_GENERATE_BYTESWAP_H_FALSE='#'
20831 GL_GENERATE_BYTESWAP_H_TRUE='#'
20832 GL_GENERATE_BYTESWAP_H_FALSE=
20847 if test $ac_cv_func_canonicalize_file_name = no; then
20848 HAVE_CANONICALIZE_FILE_NAME=0
20850 case "$gl_cv_func_realpath_works" in
20852 *) REPLACE_CANONICALIZE_FILE_NAME=1 ;;
20858 cat >>confdefs.h <<_ACEOF
20859 #define GNULIB_CANONICALIZE 1
20865 $as_echo "#define GNULIB_TEST_CANONICALIZE 1" >>confdefs.h
20873 GNULIB_CANONICALIZE_FILE_NAME=1
20879 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
20901 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
20907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
20908 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
20909 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
20910 $as_echo_n "(cached) " >&6
20912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20913 /* end confdefs.h. */
20915 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20917 # include <unistd.h>
20919 #include <limits.h>
20920 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20921 # include <sys/param.h>
20923 #if !defined PATH_MAX && defined MAXPATHLEN
20924 # define PATH_MAX MAXPATHLEN
20928 # define PATH_MAX 1024
20930 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20932 # define PATH_MAX 260
20936 have_arbitrary_file_name_length_limit
20939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20940 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
20941 gl_cv_have_arbitrary_file_name_length_limit=yes
20943 gl_cv_have_arbitrary_file_name_length_limit=no
20948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
20949 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
20951 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
20960 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
20967 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
20968 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
20970 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
20971 # programs in the package would end up linked with that potentially-shared
20972 # library, inducing unnecessary run-time overhead.
20975 gl_saved_libs=$LIBS
20976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
20977 $as_echo_n "checking for library containing clock_gettime... " >&6; }
20978 if ${ac_cv_search_clock_gettime+:} false; then :
20979 $as_echo_n "(cached) " >&6
20981 ac_func_search_save_LIBS=$LIBS
20982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20983 /* end confdefs.h. */
20985 /* Override any GCC internal prototype to avoid an error.
20986 Use char because int might match the return type of a GCC
20987 builtin and then its argument prototype would still apply. */
20991 char clock_gettime ();
20995 return clock_gettime ();
21000 for ac_lib in '' rt posix4; do
21001 if test -z "$ac_lib"; then
21002 ac_res="none required"
21005 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
21007 if ac_fn_c_try_link "$LINENO"; then :
21008 ac_cv_search_clock_gettime=$ac_res
21010 rm -f core conftest.err conftest.$ac_objext \
21012 if ${ac_cv_search_clock_gettime+:} false; then :
21016 if ${ac_cv_search_clock_gettime+:} false; then :
21019 ac_cv_search_clock_gettime=no
21021 rm conftest.$ac_ext
21022 LIBS=$ac_func_search_save_LIBS
21024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
21025 $as_echo "$ac_cv_search_clock_gettime" >&6; }
21026 ac_res=$ac_cv_search_clock_gettime
21027 if test "$ac_res" != no; then :
21028 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
21029 test "$ac_cv_search_clock_gettime" = "none required" ||
21030 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
21033 for ac_func in clock_gettime clock_settime
21035 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21036 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
21037 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
21038 cat >>confdefs.h <<_ACEOF
21039 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21045 LIBS=$gl_saved_libs
21049 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
21055 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21069 if test $ac_cv_header_sys_socket_h != yes; then
21070 for ac_header in winsock2.h
21072 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
21073 if test "x$ac_cv_header_winsock2_h" = xyes; then :
21074 cat >>confdefs.h <<_ACEOF
21075 #define HAVE_WINSOCK2_H 1
21083 if test "$ac_cv_header_winsock2_h" = yes; then
21085 UNISTD_H_HAVE_WINSOCK2_H=1
21086 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
21092 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
21097 if test $REPLACE_CLOSE = 0; then
21107 if test $ac_cv_func_fchdir = no; then
21111 if test $HAVE_FCHDIR = 0; then
21117 if test $REPLACE_CLOSE = 1; then
21126 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
21140 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
21149 cat >>confdefs.h <<_ACEOF
21150 #define GNULIB_CLOSE_STREAM 1
21157 for ac_func in closedir
21159 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
21160 if test "x$ac_cv_func_closedir" = xyes; then :
21161 cat >>confdefs.h <<_ACEOF
21162 #define HAVE_CLOSEDIR 1
21168 if test $ac_cv_func_closedir = no; then
21181 if test $ac_cv_func_fchdir = no; then
21185 if test $HAVE_FCHDIR = 0; then
21186 if test $HAVE_CLOSEDIR = 1; then
21192 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
21201 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
21215 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
21226 if test "x$datarootdir" = x; then
21227 datarootdir='${datadir}'
21230 if test "x$docdir" = x; then
21231 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21234 if test "x$htmldir" = x; then
21235 htmldir='${docdir}'
21238 if test "x$dvidir" = x; then
21242 if test "x$pdfdir" = x; then
21246 if test "x$psdir" = x; then
21250 if test "x$lispdir" = x; then
21251 lispdir='${datarootdir}/emacs/site-lisp'
21254 if test "x$localedir" = x; then
21255 localedir='${datarootdir}/locale'
21258 if test "x$runstatedir" = x; then
21259 runstatedir='${localstatedir}/run'
21263 pkglibexecdir='${libexecdir}/${PACKAGE}'
21277 if test $gl_cv_have_include_next = yes; then
21278 gl_cv_next_ctype_h='<'ctype.h'>'
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
21281 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
21282 if ${gl_cv_next_ctype_h+:} false; then :
21283 $as_echo_n "(cached) " >&6
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289 /* end confdefs.h. */
21293 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21294 *) gl_absname_cpp="$ac_cpp" ;;
21299 gl_dirsep_regex='[/\\]'
21302 gl_dirsep_regex='\/'
21305 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21306 gl_header_literal_regex=`echo 'ctype.h' \
21307 | sed -e "$gl_make_literal_regex_sed"`
21308 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21309 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21315 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21316 sed -n "$gl_absolute_header_sed"`
21318 gl_header=$gl_cv_absolute_ctype_h
21319 gl_cv_next_ctype_h='"'$gl_header'"'
21323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
21324 $as_echo "$gl_cv_next_ctype_h" >&6; }
21326 NEXT_CTYPE_H=$gl_cv_next_ctype_h
21328 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21329 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21330 gl_next_as_first_directive='<'ctype.h'>'
21332 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21333 gl_next_as_first_directive=$gl_cv_next_ctype_h
21335 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive
21342 for gl_func in isblank; do
21343 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21345 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21346 if eval \${$as_gl_Symbol+:} false; then :
21347 $as_echo_n "(cached) " >&6
21349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21350 /* end confdefs.h. */
21362 if ac_fn_c_try_compile "$LINENO"; then :
21363 eval "$as_gl_Symbol=yes"
21365 eval "$as_gl_Symbol=no"
21367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21369 eval ac_res=\$$as_gl_Symbol
21370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21371 $as_echo "$ac_res" >&6; }
21372 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21373 cat >>confdefs.h <<_ACEOF
21374 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21377 eval ac_cv_have_decl_$gl_func=yes
21383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
21384 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
21385 if ${gl_cv_struct_dirent_d_ino+:} false; then :
21386 $as_echo_n "(cached) " >&6
21388 if test "$cross_compiling" = yes; then :
21390 # Guess yes on glibc systems with Linux kernel.
21391 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
21392 # If we don't know, assume the worst.
21393 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
21397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21398 /* end confdefs.h. */
21399 #include <sys/types.h>
21400 #include <sys/stat.h>
21401 #include <dirent.h>
21406 DIR *dp = opendir (".");
21414 if (lstat (e->d_name, &st) != 0)
21416 if (e->d_ino != st.st_ino)
21424 if ac_fn_c_try_run "$LINENO"; then :
21425 gl_cv_struct_dirent_d_ino=yes
21427 gl_cv_struct_dirent_d_ino=no
21429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21430 conftest.$ac_objext conftest.beam conftest.$ac_ext
21434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
21435 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
21436 case "$gl_cv_struct_dirent_d_ino" in
21439 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
21445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
21446 $as_echo_n "checking for d_type member in directory struct... " >&6; }
21447 if ${gl_cv_struct_dirent_d_type+:} false; then :
21448 $as_echo_n "(cached) " >&6
21450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21451 /* end confdefs.h. */
21453 #include <sys/types.h>
21454 #include <dirent.h>
21459 struct dirent dp; dp.d_type = 0;
21464 if ac_fn_c_try_link "$LINENO"; then :
21465 gl_cv_struct_dirent_d_type=yes
21467 gl_cv_struct_dirent_d_type=no
21469 rm -f core conftest.err conftest.$ac_objext \
21470 conftest$ac_exeext conftest.$ac_ext
21474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
21475 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
21476 if test $gl_cv_struct_dirent_d_type = yes; then
21478 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
21501 if test $gl_cv_have_include_next = yes; then
21502 gl_cv_next_dirent_h='<'dirent.h'>'
21504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
21505 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
21506 if ${gl_cv_next_dirent_h+:} false; then :
21507 $as_echo_n "(cached) " >&6
21510 if test $ac_cv_header_dirent_h = yes; then
21515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21516 /* end confdefs.h. */
21517 #include <dirent.h>
21520 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21521 *) gl_absname_cpp="$ac_cpp" ;;
21526 gl_dirsep_regex='[/\\]'
21529 gl_dirsep_regex='\/'
21532 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21533 gl_header_literal_regex=`echo 'dirent.h' \
21534 | sed -e "$gl_make_literal_regex_sed"`
21535 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21536 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21542 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21543 sed -n "$gl_absolute_header_sed"`
21545 gl_header=$gl_cv_absolute_dirent_h
21546 gl_cv_next_dirent_h='"'$gl_header'"'
21548 gl_cv_next_dirent_h='<'dirent.h'>'
21553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
21554 $as_echo "$gl_cv_next_dirent_h" >&6; }
21556 NEXT_DIRENT_H=$gl_cv_next_dirent_h
21558 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21559 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21560 gl_next_as_first_directive='<'dirent.h'>'
21562 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21563 gl_next_as_first_directive=$gl_cv_next_dirent_h
21565 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
21570 if test $ac_cv_header_dirent_h = yes; then
21578 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
21579 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21581 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21582 if eval \${$as_gl_Symbol+:} false; then :
21583 $as_echo_n "(cached) " >&6
21585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21586 /* end confdefs.h. */
21587 #include <dirent.h>
21598 if ac_fn_c_try_compile "$LINENO"; then :
21599 eval "$as_gl_Symbol=yes"
21601 eval "$as_gl_Symbol=no"
21603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21605 eval ac_res=\$$as_gl_Symbol
21606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21607 $as_echo "$ac_res" >&6; }
21608 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21609 cat >>confdefs.h <<_ACEOF
21610 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21613 eval ac_cv_have_decl_$gl_func=yes
21629 cat >>confdefs.h <<_ACEOF
21630 #define GNULIB_DIRENT_SAFER 1
21639 for ac_func in dirfd
21641 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
21642 if test "x$ac_cv_func_dirfd" = xyes; then :
21643 cat >>confdefs.h <<_ACEOF
21644 #define HAVE_DIRFD 1
21650 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
21651 #include <dirent.h>
21653 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
21659 cat >>confdefs.h <<_ACEOF
21660 #define HAVE_DECL_DIRFD $ac_have_decl
21663 if test $ac_cv_have_decl_dirfd = no; then
21667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
21668 $as_echo_n "checking whether dirfd is a macro... " >&6; }
21669 if ${gl_cv_func_dirfd_macro+:} false; then :
21670 $as_echo_n "(cached) " >&6
21672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21673 /* end confdefs.h. */
21675 #include <sys/types.h>
21676 #include <dirent.h>
21678 dirent_header_defines_dirfd
21681 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21682 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
21683 gl_cv_func_dirfd_macro=yes
21685 gl_cv_func_dirfd_macro=no
21690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
21691 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
21693 # Use the replacement only if we have no function or macro with that name.
21694 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
21695 if test $ac_cv_have_decl_dirfd = yes; then
21696 # If the system declares dirfd already, let's declare rpl_dirfd instead.
21701 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
21710 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
21713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
21714 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
21715 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
21716 $as_echo_n "(cached) " >&6
21719 dirfd_save_CFLAGS=$CFLAGS
21720 for ac_expr in d_fd dd_fd; do
21722 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
21723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21724 /* end confdefs.h. */
21726 #include <sys/types.h>
21727 #include <dirent.h>
21731 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
21736 if ac_fn_c_try_compile "$LINENO"; then :
21740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21741 CFLAGS=$dirfd_save_CFLAGS
21742 test "$dir_fd_found" = yes && break
21744 test "$dir_fd_found" = yes || ac_expr=no_such_member
21746 gl_cv_sys_dir_fd_member_name=$ac_expr
21750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
21751 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
21752 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
21754 cat >>confdefs.h <<_ACEOF
21755 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
21773 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
21782 cat >>confdefs.h <<_ACEOF
21783 #define GNULIB_DIRNAME 1
21793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
21794 $as_echo_n "checking whether // is distinct from /... " >&6; }
21795 if ${gl_cv_double_slash_root+:} false; then :
21796 $as_echo_n "(cached) " >&6
21798 if test x"$cross_compiling" = xyes ; then
21799 # When cross-compiling, there is no way to tell whether // is special
21800 # short of a list of hosts. However, the only known hosts to date
21801 # that have a distinct // are Apollo DomainOS (too old to port to),
21802 # Cygwin, and z/OS. If anyone knows of another system for which // has
21803 # special semantics and is distinct from /, please report it to
21804 # <bug-gnulib@gnu.org>.
21806 *-cygwin | i370-ibm-openedition)
21807 gl_cv_double_slash_root=yes ;;
21809 # Be optimistic and assume that / and // are the same when we
21811 gl_cv_double_slash_root='unknown, assuming no' ;;
21814 set x `ls -di / // 2>/dev/null`
21815 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
21816 gl_cv_double_slash_root=no
21818 gl_cv_double_slash_root=yes
21822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
21823 $as_echo "$gl_cv_double_slash_root" >&6; }
21824 if test "$gl_cv_double_slash_root" = yes; then
21826 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
21833 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
21846 if test $ac_cv_func_fchdir = no; then
21850 if test $HAVE_FCHDIR = 0; then
21855 if test $REPLACE_DUP = 1; then
21864 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
21879 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
21888 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
21891 if test $HAVE_DUP2 = 1; then
21892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
21893 $as_echo_n "checking whether dup2 works... " >&6; }
21894 if ${gl_cv_func_dup2_works+:} false; then :
21895 $as_echo_n "(cached) " >&6
21897 if test "$cross_compiling" = yes; then :
21899 mingw*) # on this platform, dup2 always returns 0 for success
21900 gl_cv_func_dup2_works="guessing no" ;;
21901 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
21902 gl_cv_func_dup2_works="guessing no" ;;
21903 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
21904 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
21905 gl_cv_func_dup2_works="guessing no" ;;
21906 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
21907 gl_cv_func_dup2_works="guessing no" ;;
21908 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
21909 gl_cv_func_dup2_works="guessing no" ;;
21910 *) gl_cv_func_dup2_works="guessing yes" ;;
21913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21914 /* end confdefs.h. */
21916 #include <unistd.h>
21924 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
21927 if (dup2 (1, 1) == 0)
21930 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
21934 if (dup2 (0, 0) != -1)
21936 /* Many gnulib modules require POSIX conformance of EBADF. */
21937 if (dup2 (2, 1000000) == -1 && errno != EBADF)
21939 /* Flush out some cygwin core dumps. */
21940 if (dup2 (2, -1) != -1 || errno != EBADF)
21951 if ac_fn_c_try_run "$LINENO"; then :
21952 gl_cv_func_dup2_works=yes
21954 gl_cv_func_dup2_works=no
21956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21957 conftest.$ac_objext conftest.beam conftest.$ac_ext
21962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
21963 $as_echo "$gl_cv_func_dup2_works" >&6; }
21964 case "$gl_cv_func_dup2_works" in
21968 for ac_func in setdtablesize
21970 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
21971 if test "x$ac_cv_func_setdtablesize" = xyes; then :
21972 cat >>confdefs.h <<_ACEOF
21973 #define HAVE_SETDTABLESIZE 1
21992 if test $ac_cv_func_fchdir = no; then
21996 if test $HAVE_FCHDIR = 0; then
21997 if test $HAVE_DUP2 = 1; then
22003 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
22012 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
22027 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
22043 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
22049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
22050 $as_echo_n "checking for error_at_line... " >&6; }
22051 if ${ac_cv_lib_error_at_line+:} false; then :
22052 $as_echo_n "(cached) " >&6
22054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22055 /* end confdefs.h. */
22060 error_at_line (0, 0, "", 0, "an error occurred");
22065 if ac_fn_c_try_link "$LINENO"; then :
22066 ac_cv_lib_error_at_line=yes
22068 ac_cv_lib_error_at_line=no
22070 rm -f core conftest.err conftest.$ac_objext \
22071 conftest$ac_exeext conftest.$ac_ext
22073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
22074 $as_echo "$ac_cv_lib_error_at_line" >&6; }
22076 if test $ac_cv_lib_error_at_line = no; then
22085 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
22094 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
22098 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
22105 for ac_func in euidaccess
22107 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
22108 if test "x$ac_cv_func_euidaccess" = xyes; then :
22109 cat >>confdefs.h <<_ACEOF
22110 #define HAVE_EUIDACCESS 1
22116 if test $ac_cv_func_euidaccess = no; then
22120 if test $HAVE_EUIDACCESS = 0; then
22129 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
22139 for ac_header in libgen.h
22141 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
22142 if test "x$ac_cv_header_libgen_h" = xyes; then :
22143 cat >>confdefs.h <<_ACEOF
22144 #define HAVE_LIBGEN_H 1
22152 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
22153 if test "x$ac_cv_func_getgroups" = xyes; then :
22158 # If we don't yet have getgroups, see if it's in -lbsd.
22159 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
22161 if test $ac_cv_func_getgroups = no; then
22162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
22163 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
22164 if ${ac_cv_lib_bsd_getgroups+:} false; then :
22165 $as_echo_n "(cached) " >&6
22167 ac_check_lib_save_LIBS=$LIBS
22169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22170 /* end confdefs.h. */
22172 /* Override any GCC internal prototype to avoid an error.
22173 Use char because int might match the return type of a GCC
22174 builtin and then its argument prototype would still apply. */
22182 return getgroups ();
22187 if ac_fn_c_try_link "$LINENO"; then :
22188 ac_cv_lib_bsd_getgroups=yes
22190 ac_cv_lib_bsd_getgroups=no
22192 rm -f core conftest.err conftest.$ac_objext \
22193 conftest$ac_exeext conftest.$ac_ext
22194 LIBS=$ac_check_lib_save_LIBS
22196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
22197 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
22198 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
22199 GETGROUPS_LIB=-lbsd
22204 # Run the program to test the functionality of the system-supplied
22205 # getgroups function only if there is such a function.
22206 if test $ac_cv_func_getgroups = yes; then
22207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
22208 $as_echo_n "checking for working getgroups... " >&6; }
22209 if ${ac_cv_func_getgroups_works+:} false; then :
22210 $as_echo_n "(cached) " >&6
22212 if test "$cross_compiling" = yes; then :
22213 case "$host_os" in # ((
22214 # Guess yes on glibc systems.
22215 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
22216 # If we don't know, assume the worst.
22217 *) ac_cv_func_getgroups_works="guessing no" ;;
22221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22222 /* end confdefs.h. */
22223 $ac_includes_default
22227 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
22228 return getgroups (0, 0) == -1;
22234 if ac_fn_c_try_run "$LINENO"; then :
22235 ac_cv_func_getgroups_works=yes
22237 ac_cv_func_getgroups_works=no
22239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22240 conftest.$ac_objext conftest.beam conftest.$ac_ext
22245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
22246 $as_echo "$ac_cv_func_getgroups_works" >&6; }
22248 ac_cv_func_getgroups_works=no
22250 case "$ac_cv_func_getgroups_works" in
22253 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
22260 # Solaris 9 and 10 need -lgen to get the eaccess function.
22261 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
22262 # programs in the package would end up linked with that potentially-shared
22263 # library, inducing unnecessary run-time overhead.
22266 gl_saved_libs=$LIBS
22267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
22268 $as_echo_n "checking for library containing eaccess... " >&6; }
22269 if ${ac_cv_search_eaccess+:} false; then :
22270 $as_echo_n "(cached) " >&6
22272 ac_func_search_save_LIBS=$LIBS
22273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22274 /* end confdefs.h. */
22276 /* Override any GCC internal prototype to avoid an error.
22277 Use char because int might match the return type of a GCC
22278 builtin and then its argument prototype would still apply. */
22291 for ac_lib in '' gen; do
22292 if test -z "$ac_lib"; then
22293 ac_res="none required"
22296 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
22298 if ac_fn_c_try_link "$LINENO"; then :
22299 ac_cv_search_eaccess=$ac_res
22301 rm -f core conftest.err conftest.$ac_objext \
22303 if ${ac_cv_search_eaccess+:} false; then :
22307 if ${ac_cv_search_eaccess+:} false; then :
22310 ac_cv_search_eaccess=no
22312 rm conftest.$ac_ext
22313 LIBS=$ac_func_search_save_LIBS
22315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
22316 $as_echo "$ac_cv_search_eaccess" >&6; }
22317 ac_res=$ac_cv_search_eaccess
22318 if test "$ac_res" != no; then :
22319 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
22320 test "$ac_cv_search_eaccess" = "none required" ||
22321 LIB_EACCESS=$ac_cv_search_eaccess
22324 for ac_func in eaccess
22326 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
22327 if test "x$ac_cv_func_eaccess" = xyes; then :
22328 cat >>confdefs.h <<_ACEOF
22329 #define HAVE_EACCESS 1
22335 LIBS=$gl_saved_libs
22343 GNULIB_EUIDACCESS=1
22349 $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
22366 if test $ac_cv_func_faccessat = no; then
22370 if test $HAVE_FACCESSAT = 0; then
22379 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
22382 for ac_func in access
22384 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
22385 if test "x$ac_cv_func_access" = xyes; then :
22386 cat >>confdefs.h <<_ACEOF
22387 #define HAVE_ACCESS 1
22397 cat >>confdefs.h <<_ACEOF
22398 #define GNULIB_FACCESSAT 1
22413 $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
22428 if test $ac_cv_have_decl_fchdir = no; then
22433 if test $HAVE_FCHDIR = 0; then
22442 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
22446 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
22448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
22449 $as_echo_n "checking whether open can visit directories... " >&6; }
22450 if ${gl_cv_func_open_directory_works+:} false; then :
22451 $as_echo_n "(cached) " >&6
22453 if test "$cross_compiling" = yes; then :
22455 # Guess yes on glibc systems.
22456 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
22457 # If we don't know, assume the worst.
22458 *) gl_cv_func_open_directory_works="guessing no" ;;
22462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22463 /* end confdefs.h. */
22469 return open(".", O_RDONLY) < 0;
22474 if ac_fn_c_try_run "$LINENO"; then :
22475 gl_cv_func_open_directory_works=yes
22477 gl_cv_func_open_directory_works=no
22479 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22480 conftest.$ac_objext conftest.beam conftest.$ac_ext
22484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
22485 $as_echo "$gl_cv_func_open_directory_works" >&6; }
22486 case "$gl_cv_func_open_directory_works" in
22490 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
22507 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
22522 if test $ac_cv_func_fcntl = no; then
22532 if test $ac_cv_func_fcntl = no; then
22539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
22540 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
22541 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
22542 $as_echo_n "(cached) " >&6
22544 if test "$cross_compiling" = yes; then :
22545 # Guess that it works on glibc systems
22546 case $host_os in #((
22547 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
22548 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
22551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22552 /* end confdefs.h. */
22561 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
22562 if (errno != EINVAL) result |= 2;
22569 if ac_fn_c_try_run "$LINENO"; then :
22570 gl_cv_func_fcntl_f_dupfd_works=yes
22572 gl_cv_func_fcntl_f_dupfd_works=no
22574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22575 conftest.$ac_objext conftest.beam conftest.$ac_ext
22579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
22580 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
22581 case $gl_cv_func_fcntl_f_dupfd_works in
22592 if test $ac_cv_func_fcntl = no; then
22599 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
22603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
22604 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
22605 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
22606 $as_echo_n "(cached) " >&6
22608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22609 /* end confdefs.h. */
22612 #ifndef F_DUPFD_CLOEXEC
22624 if ac_fn_c_try_compile "$LINENO"; then :
22625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22626 /* end confdefs.h. */
22629 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
22630 it to support the semantics on older kernels that failed with EINVAL. */
22642 if ac_fn_c_try_compile "$LINENO"; then :
22643 gl_cv_func_fcntl_f_dupfd_cloexec=yes
22645 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
22647 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22649 gl_cv_func_fcntl_f_dupfd_cloexec=no
22651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
22654 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
22655 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
22665 if test $ac_cv_func_fcntl = no; then
22683 if test $ac_cv_func_fchdir = no; then
22687 if test $HAVE_FCHDIR = 0; then
22697 if test $ac_cv_func_fcntl = no; then
22706 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
22715 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
22729 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
22744 if test $gl_cv_have_include_next = yes; then
22745 gl_cv_next_fcntl_h='<'fcntl.h'>'
22747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
22748 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
22749 if ${gl_cv_next_fcntl_h+:} false; then :
22750 $as_echo_n "(cached) " >&6
22755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22756 /* end confdefs.h. */
22760 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22761 *) gl_absname_cpp="$ac_cpp" ;;
22766 gl_dirsep_regex='[/\\]'
22769 gl_dirsep_regex='\/'
22772 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22773 gl_header_literal_regex=`echo 'fcntl.h' \
22774 | sed -e "$gl_make_literal_regex_sed"`
22775 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22776 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22782 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22783 sed -n "$gl_absolute_header_sed"`
22785 gl_header=$gl_cv_absolute_fcntl_h
22786 gl_cv_next_fcntl_h='"'$gl_header'"'
22790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
22791 $as_echo "$gl_cv_next_fcntl_h" >&6; }
22793 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
22795 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22796 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22797 gl_next_as_first_directive='<'fcntl.h'>'
22799 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22800 gl_next_as_first_directive=$gl_cv_next_fcntl_h
22802 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
22813 for gl_func in fcntl openat; do
22814 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22816 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22817 if eval \${$as_gl_Symbol+:} false; then :
22818 $as_echo_n "(cached) " >&6
22820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22821 /* end confdefs.h. */
22833 if ac_fn_c_try_compile "$LINENO"; then :
22834 eval "$as_gl_Symbol=yes"
22836 eval "$as_gl_Symbol=no"
22838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22840 eval ac_res=\$$as_gl_Symbol
22841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22842 $as_echo "$ac_res" >&6; }
22843 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22844 cat >>confdefs.h <<_ACEOF
22845 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22848 eval ac_cv_have_decl_$gl_func=yes
22858 cat >>confdefs.h <<_ACEOF
22859 #define GNULIB_FCNTL_SAFER 1
22868 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
22869 #include <dirent.h>
22872 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
22878 cat >>confdefs.h <<_ACEOF
22879 #define HAVE_DECL_FDOPENDIR $ac_have_decl
22881 if test $ac_have_decl = 1; then :
22884 HAVE_DECL_FDOPENDIR=0
22894 if test $ac_cv_func_fdopendir = no; then
22897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
22898 $as_echo_n "checking whether fdopendir works... " >&6; }
22899 if ${gl_cv_func_fdopendir_works+:} false; then :
22900 $as_echo_n "(cached) " >&6
22902 if test "$cross_compiling" = yes; then :
22904 # Guess yes on glibc systems.
22905 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
22906 # If we don't know, assume the worst.
22907 *) gl_cv_func_fdopendir_works="guessing no" ;;
22911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22912 /* end confdefs.h. */
22914 #include <dirent.h>
22916 #include <unistd.h>
22917 #if !HAVE_DECL_FDOPENDIR
22919 # ifdef __cplusplus
22922 DIR *fdopendir (int);
22929 int fd = open ("conftest.c", O_RDONLY);
22930 if (fd < 0) result |= 1;
22931 if (fdopendir (fd)) result |= 2;
22932 if (close (fd)) result |= 4;
22938 if ac_fn_c_try_run "$LINENO"; then :
22939 gl_cv_func_fdopendir_works=yes
22941 gl_cv_func_fdopendir_works=no
22943 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22944 conftest.$ac_objext conftest.beam conftest.$ac_ext
22948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
22949 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
22950 case "$gl_cv_func_fdopendir_works" in
22953 REPLACE_FDOPENDIR=1
22958 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
22967 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
22981 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
22987 cat >>confdefs.h <<_ACEOF
22988 #define GNULIB_FDOPENDIR 1
23002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
23003 $as_echo_n "checking whether fflush works on input streams... " >&6; }
23004 if ${gl_cv_func_fflush_stdin+:} false; then :
23005 $as_echo_n "(cached) " >&6
23007 echo hello world > conftest.txt
23008 if test "$cross_compiling" = yes; then :
23009 gl_cv_func_fflush_stdin=cross
23011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23012 /* end confdefs.h. */
23016 # include <unistd.h>
23017 #else /* on Windows with MSVC */
23024 FILE *f = fopen ("conftest.txt", "r");
23031 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
23033 /* For deterministic results, ensure f read a bigger buffer. */
23034 if (lseek (fd, 0, SEEK_CUR) == 5)
23036 /* POSIX requires fflush-fseek to set file offset of fd. This fails
23037 on BSD systems and on mingw. */
23038 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
23040 if (lseek (fd, 0, SEEK_CUR) != 5)
23042 /* Verify behaviour of fflush after ungetc. See
23043 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
23044 /* Verify behaviour of fflush after a backup ungetc. This fails on
23049 if (fgetc (f) != c)
23051 /* Verify behaviour of fflush after a non-backup ungetc. This fails
23052 on glibc 2.8 and on BSD systems. */
23056 if (fgetc (f) != c)
23064 if ac_fn_c_try_run "$LINENO"; then :
23065 gl_cv_func_fflush_stdin=yes
23067 gl_cv_func_fflush_stdin=no
23069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23070 conftest.$ac_objext conftest.beam conftest.$ac_ext
23076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
23077 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
23078 case $gl_cv_func_fflush_stdin in
23079 yes) gl_func_fflush_stdin=1 ;;
23080 no) gl_func_fflush_stdin=0 ;;
23081 *) gl_func_fflush_stdin='(-1)' ;;
23084 cat >>confdefs.h <<_ACEOF
23085 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
23089 if test $gl_cv_func_fflush_stdin != yes; then
23093 if test $REPLACE_FFLUSH = 1; then
23102 gl_LIBOBJS="$gl_LIBOBJS fflush.$ac_objext"
23108 cat >>confdefs.h <<_ACEOF
23109 #define GNULIB_FFLUSH 1
23124 $as_echo "#define GNULIB_TEST_FFLUSH 1" >>confdefs.h
23130 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
23131 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
23133 cat >>confdefs.h <<_ACEOF
23134 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
23138 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
23147 if test $ac_cv_member_struct_stat_st_blocks = no; then
23156 gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
23189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
23190 $as_echo_n "checking for flexible array member... " >&6; }
23191 if ${ac_cv_c_flexmember+:} false; then :
23192 $as_echo_n "(cached) " >&6
23194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23195 /* end confdefs.h. */
23196 #include <stdlib.h>
23198 #include <stddef.h>
23199 struct s { int n; double d[]; };
23203 int m = getchar ();
23204 struct s *p = malloc (offsetof (struct s, d)
23205 + m * sizeof (double));
23207 return p->d != (double *) NULL;
23212 if ac_fn_c_try_compile "$LINENO"; then :
23213 ac_cv_c_flexmember=yes
23215 ac_cv_c_flexmember=no
23217 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
23220 $as_echo "$ac_cv_c_flexmember" >&6; }
23221 if test $ac_cv_c_flexmember = yes; then
23223 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
23226 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
23234 REPLACE_FLOAT_LDBL=0
23236 aix* | beos* | openbsd* | mirbsd* | irix*)
23240 case "$host_cpu" in
23245 # On x86_64 systems, the C compiler may still be generating
23247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23248 /* end confdefs.h. */
23249 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
23253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23254 $EGREP "yes" >/dev/null 2>&1; then :
23265 case "$host_cpu" in
23273 aix* | freebsd* | linux*)
23274 if test -n "$FLOAT_H"; then
23275 REPLACE_FLOAT_LDBL=1
23281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
23282 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
23283 if ${gl_cv_func_itold_works+:} false; then :
23284 $as_echo_n "(cached) " >&6
23287 if test "$cross_compiling" = yes; then :
23290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23291 /* end confdefs.h. */
23292 #if defined __LP64__ || defined __arch64__
23296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23297 $EGREP "yes" >/dev/null 2>&1; then :
23298 gl_cv_func_itold_works="guessing no"
23300 gl_cv_func_itold_works="guessing yes"
23305 *) gl_cv_func_itold_works="guessing yes" ;;
23309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23310 /* end confdefs.h. */
23313 volatile long double ld;
23322 if ac_fn_c_try_run "$LINENO"; then :
23323 gl_cv_func_itold_works=yes
23325 gl_cv_func_itold_works=no
23327 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23328 conftest.$ac_objext conftest.beam conftest.$ac_ext
23333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
23334 $as_echo "$gl_cv_func_itold_works" >&6; }
23335 case "$gl_cv_func_itold_works" in
23342 if test -n "$FLOAT_H"; then
23351 if test $gl_cv_have_include_next = yes; then
23352 gl_cv_next_float_h='<'float.h'>'
23354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
23355 $as_echo_n "checking absolute name of <float.h>... " >&6; }
23356 if ${gl_cv_next_float_h+:} false; then :
23357 $as_echo_n "(cached) " >&6
23362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23363 /* end confdefs.h. */
23367 aix*) gl_absname_cpp="$ac_cpp -C" ;;
23368 *) gl_absname_cpp="$ac_cpp" ;;
23373 gl_dirsep_regex='[/\\]'
23376 gl_dirsep_regex='\/'
23379 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
23380 gl_header_literal_regex=`echo 'float.h' \
23381 | sed -e "$gl_make_literal_regex_sed"`
23382 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23383 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23389 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23390 sed -n "$gl_absolute_header_sed"`
23392 gl_header=$gl_cv_absolute_float_h
23393 gl_cv_next_float_h='"'$gl_header'"'
23397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
23398 $as_echo "$gl_cv_next_float_h" >&6; }
23400 NEXT_FLOAT_H=$gl_cv_next_float_h
23402 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
23403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23404 gl_next_as_first_directive='<'float.h'>'
23406 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23407 gl_next_as_first_directive=$gl_cv_next_float_h
23409 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
23416 if test -n "$FLOAT_H"; then
23417 GL_GENERATE_FLOAT_H_TRUE=
23418 GL_GENERATE_FLOAT_H_FALSE='#'
23420 GL_GENERATE_FLOAT_H_TRUE='#'
23421 GL_GENERATE_FLOAT_H_FALSE=
23426 if test $REPLACE_FLOAT_LDBL = 1; then
23435 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
23438 if test $REPLACE_ITOLD = 1; then
23447 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
23456 gl_fnmatch_required_lowercase=`
23457 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
23459 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
23460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
23461 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
23462 if eval \${$gl_fnmatch_cache_var+:} false; then :
23463 $as_echo_n "(cached) " >&6
23465 if test $gl_fnmatch_required = GNU; then
23466 gl_fnmatch_gnu_start=
23467 gl_fnmatch_gnu_end=
23469 gl_fnmatch_gnu_start='#if 0'
23470 gl_fnmatch_gnu_end='#endif'
23472 if test "$cross_compiling" = yes; then :
23473 eval "$gl_fnmatch_cache_var=\"guessing no\""
23475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23476 /* end confdefs.h. */
23477 #include <fnmatch.h>
23479 y (char const *pattern, char const *string, int flags)
23481 return fnmatch (pattern, string, flags) == 0;
23484 n (char const *pattern, char const *string, int flags)
23486 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
23492 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
23493 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
23494 static char const A_1[] = { 'A' - 1, 0 };
23495 static char const A01[] = { 'A' + 1, 0 };
23496 static char const a_1[] = { 'a' - 1, 0 };
23497 static char const a01[] = { 'a' + 1, 0 };
23498 static char const bs_1[] = { '\\\\' - 1, 0 };
23499 static char const bs01[] = { '\\\\' + 1, 0 };
23501 if (!n ("a*", "", 0))
23503 if (!y ("a*", "abc", 0))
23505 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
23507 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
23509 if (!y ("a\\\\bc", "abc", 0))
23511 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
23513 if (!y ("*x", ".x", 0))
23515 if (!n ("*x", ".x", FNM_PERIOD))
23517 if (!y (Apat, "\\\\", 0))
23519 if (!y (Apat, "A", 0))
23521 if (!y (apat, "\\\\", 0))
23523 if (!y (apat, "a", 0))
23525 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
23527 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
23529 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
23531 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
23533 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
23535 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
23537 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
23539 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
23541 $gl_fnmatch_gnu_start
23542 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
23544 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
23546 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
23548 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
23550 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
23552 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
23554 $gl_fnmatch_gnu_end
23561 if ac_fn_c_try_run "$LINENO"; then :
23562 eval "$gl_fnmatch_cache_var=yes"
23564 eval "$gl_fnmatch_cache_var=no"
23566 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23567 conftest.$ac_objext conftest.beam conftest.$ac_ext
23572 eval ac_res=\$$gl_fnmatch_cache_var
23573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
23574 $as_echo "$ac_res" >&6; }
23575 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
23576 if test "$gl_fnmatch_result" = yes; then
23577 rm -f "$gl_source_base/fnmatch.h"
23579 FNMATCH_H=fnmatch.h
23582 if test -n "$FNMATCH_H"; then
23583 GL_GENERATE_FNMATCH_H_TRUE=
23584 GL_GENERATE_FNMATCH_H_FALSE='#'
23586 GL_GENERATE_FNMATCH_H_TRUE='#'
23587 GL_GENERATE_FNMATCH_H_FALSE=
23591 if test -n "$FNMATCH_H"; then
23600 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
23604 cat >>confdefs.h <<_ACEOF
23605 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
23609 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23611 if test "x$ac_cv_have_decl_isblank" = xyes; then :
23617 cat >>confdefs.h <<_ACEOF
23618 #define HAVE_DECL_ISBLANK $ac_have_decl
23663 if test -n "$FNMATCH_H"; then
23672 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
23676 cat >>confdefs.h <<_ACEOF
23677 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
23681 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
23683 if test "x$ac_cv_have_decl_isblank" = xyes; then :
23689 cat >>confdefs.h <<_ACEOF
23690 #define HAVE_DECL_ISBLANK $ac_have_decl
23736 gl_cv_func_fopen_slash="guessing no"
23739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
23740 $as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
23741 if ${gl_cv_func_fopen_slash+:} false; then :
23742 $as_echo_n "(cached) " >&6
23745 if test "$cross_compiling" = yes; then :
23748 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
23749 gl_cv_func_fopen_slash="guessing no" ;;
23751 gl_cv_func_fopen_slash="guessing yes" ;;
23755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23756 /* end confdefs.h. */
23758 #include <stddef.h>
23762 return fopen ("conftest.sl/", "w") != NULL;
23765 if ac_fn_c_try_run "$LINENO"; then :
23766 gl_cv_func_fopen_slash=yes
23768 gl_cv_func_fopen_slash=no
23770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23771 conftest.$ac_objext conftest.beam conftest.$ac_ext
23777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
23778 $as_echo "$gl_cv_func_fopen_slash" >&6; }
23781 case "$gl_cv_func_fopen_slash" in
23784 $as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
23790 if test $REPLACE_FOPEN = 1; then
23799 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext"
23814 $as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h
23820 cat >>confdefs.h <<_ACEOF
23821 #define GNULIB_FOPEN_SAFER 1
23835 #if HAVE_STDIO_EXT_H
23836 # include <stdio_ext.h>
23839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
23840 $as_echo_n "checking for __fpending... " >&6; }
23841 if ${gl_cv_func___fpending+:} false; then :
23842 $as_echo_n "(cached) " >&6
23845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23846 /* end confdefs.h. */
23851 return ! __fpending (stdin);
23856 if ac_fn_c_try_link "$LINENO"; then :
23857 gl_cv_func___fpending=yes
23859 gl_cv_func___fpending=no
23861 rm -f core conftest.err conftest.$ac_objext \
23862 conftest$ac_exeext conftest.$ac_ext
23865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
23866 $as_echo "$gl_cv_func___fpending" >&6; }
23867 if test $gl_cv_func___fpending = yes; then
23868 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
23870 if test "x$ac_cv_have_decl___fpending" = xyes; then :
23876 cat >>confdefs.h <<_ACEOF
23877 #define HAVE_DECL___FPENDING $ac_have_decl
23882 if test $gl_cv_func___fpending = no; then
23891 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
23894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
23895 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
23896 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
23897 $as_echo_n "(cached) " >&6
23903 'fp->_IO_write_ptr - fp->_IO_write_base' \
23905 '# traditional Unix' \
23906 'fp->_ptr - fp->_base' \
23909 'fp->_p - fp->_bf._base' \
23911 '# SCO, Unixware' \
23912 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
23915 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
23918 'fp->__bufp - fp->__buffer' \
23920 '# old glibc iostream?' \
23921 'fp->_pptr - fp->_pbase' \
23924 'fp->_ptr - fp->_buffer' \
23927 'fp->_ptr - fp->_buf' \
23930 'fp->wp - fp->buf' \
23933 '(*fp)->_ptr - (*fp)->_base' \
23935 '# e.g., DGUX R4.11; the info is not available' \
23939 # Skip each embedded comment.
23940 case "$ac_expr" in '#'*) continue;; esac
23942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23943 /* end confdefs.h. */
23948 FILE *fp = stdin; (void) ($ac_expr);
23953 if ac_fn_c_try_compile "$LINENO"; then :
23957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23958 test "$fp_done" = yes && break
23961 ac_cv_sys_pending_output_n_bytes=$ac_expr
23965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
23966 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
23968 cat >>confdefs.h <<_ACEOF
23969 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
23990 ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
23992 if test "x$ac_cv_have_decl_fpurge" = xyes; then :
23998 cat >>confdefs.h <<_ACEOF
23999 #define HAVE_DECL_FPURGE $ac_have_decl
24002 if test "x$ac_cv_func_fpurge" = xyes; then
24004 # Detect BSD bug. Only cygwin 1.7 is known to be immune.
24005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
24006 $as_echo_n "checking whether fpurge works... " >&6; }
24007 if ${gl_cv_func_fpurge_works+:} false; then :
24008 $as_echo_n "(cached) " >&6
24010 if test "$cross_compiling" = yes; then :
24011 gl_cv_func_fpurge_works='guessing no'
24013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24014 /* end confdefs.h. */
24020 FILE *f = fopen ("conftest.txt", "w+");
24022 if (fputc ('a', f) != 'a') return 2;
24024 if (fgetc (f) != 'a') return 3;
24025 if (fgetc (f) != EOF) return 4;
24026 if (fpurge (f) != 0) return 5;
24027 if (putc ('b', f) != 'b') return 6;
24028 if (fclose (f) != 0) return 7;
24029 if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
24030 if (fgetc (f) != 'a') return 9;
24031 if (fgetc (f) != 'b') return 10;
24032 if (fgetc (f) != EOF) return 11;
24033 if (fclose (f) != 0) return 12;
24034 if (remove ("conftest.txt") != 0) return 13;
24040 if ac_fn_c_try_run "$LINENO"; then :
24041 gl_cv_func_fpurge_works=yes
24043 gl_cv_func_fpurge_works=no
24045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24046 conftest.$ac_objext conftest.beam conftest.$ac_ext
24050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
24051 $as_echo "$gl_cv_func_fpurge_works" >&6; }
24052 if test "x$gl_cv_func_fpurge_works" != xyes; then
24058 if test "x$ac_cv_have_decl_fpurge" = xno; then
24062 if test $HAVE_FPURGE = 0 || test $REPLACE_FPURGE = 1; then
24071 gl_LIBOBJS="$gl_LIBOBJS fpurge.$ac_objext"
24085 $as_echo "#define GNULIB_TEST_FPURGE 1" >>confdefs.h
24098 if test $ac_cv_func___freadahead = no; then
24107 gl_LIBOBJS="$gl_LIBOBJS freadahead.$ac_objext"
24122 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
24126 if test $REPLACE_FSEEK = 1; then
24135 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
24149 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
24161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
24162 $as_echo_n "checking for fseeko... " >&6; }
24163 if ${gl_cv_func_fseeko+:} false; then :
24164 $as_echo_n "(cached) " >&6
24167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24168 /* end confdefs.h. */
24174 fseeko (stdin, 0, 0);
24179 if ac_fn_c_try_link "$LINENO"; then :
24180 gl_cv_func_fseeko=yes
24182 gl_cv_func_fseeko=no
24184 rm -f core conftest.err conftest.$ac_objext \
24185 conftest$ac_exeext conftest.$ac_ext
24188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
24189 $as_echo "$gl_cv_func_fseeko" >&6; }
24198 if test $ac_cv_have_decl_fseeko = no; then
24202 if test $gl_cv_func_fseeko = no; then
24205 if test $WINDOWS_64_BIT_OFF_T = 1; then
24208 if test $gl_cv_var_stdin_large_offset = no; then
24220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
24221 $as_echo_n "checking whether fflush works on input streams... " >&6; }
24222 if ${gl_cv_func_fflush_stdin+:} false; then :
24223 $as_echo_n "(cached) " >&6
24225 echo hello world > conftest.txt
24226 if test "$cross_compiling" = yes; then :
24227 gl_cv_func_fflush_stdin=cross
24229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24230 /* end confdefs.h. */
24234 # include <unistd.h>
24235 #else /* on Windows with MSVC */
24242 FILE *f = fopen ("conftest.txt", "r");
24249 if (fd < 0 || fread (buffer, 1, 5, f) != 5)
24251 /* For deterministic results, ensure f read a bigger buffer. */
24252 if (lseek (fd, 0, SEEK_CUR) == 5)
24254 /* POSIX requires fflush-fseek to set file offset of fd. This fails
24255 on BSD systems and on mingw. */
24256 if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
24258 if (lseek (fd, 0, SEEK_CUR) != 5)
24260 /* Verify behaviour of fflush after ungetc. See
24261 <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
24262 /* Verify behaviour of fflush after a backup ungetc. This fails on
24267 if (fgetc (f) != c)
24269 /* Verify behaviour of fflush after a non-backup ungetc. This fails
24270 on glibc 2.8 and on BSD systems. */
24274 if (fgetc (f) != c)
24282 if ac_fn_c_try_run "$LINENO"; then :
24283 gl_cv_func_fflush_stdin=yes
24285 gl_cv_func_fflush_stdin=no
24287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24288 conftest.$ac_objext conftest.beam conftest.$ac_ext
24294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
24295 $as_echo "$gl_cv_func_fflush_stdin" >&6; }
24296 case $gl_cv_func_fflush_stdin in
24297 yes) gl_func_fflush_stdin=1 ;;
24298 no) gl_func_fflush_stdin=0 ;;
24299 *) gl_func_fflush_stdin='(-1)' ;;
24302 cat >>confdefs.h <<_ACEOF
24303 #define FUNC_FFLUSH_STDIN $gl_func_fflush_stdin
24307 if test $gl_cv_func_fflush_stdin != yes; then
24313 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
24322 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
24325 for ac_func in _fseeki64
24327 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
24328 if test "x$ac_cv_func__fseeki64" = xyes; then :
24329 cat >>confdefs.h <<_ACEOF
24330 #define HAVE__FSEEKI64 1
24349 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
24357 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24362 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
24376 if test $ac_cv_func_fchdir = no; then
24380 if test $HAVE_FCHDIR = 0; then
24381 case "$gl_cv_func_open_directory_works" in
24390 if test $REPLACE_FSTAT = 1; then
24399 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
24414 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
24430 if test $ac_cv_func_fstatat = no; then
24433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
24434 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
24435 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
24436 $as_echo_n "(cached) " >&6
24438 if test "$cross_compiling" = yes; then :
24440 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
24441 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
24445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24446 /* end confdefs.h. */
24449 #include <sys/stat.h>
24454 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
24458 if ac_fn_c_try_run "$LINENO"; then :
24459 gl_cv_func_fstatat_zero_flag=yes
24461 gl_cv_func_fstatat_zero_flag=no
24463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24464 conftest.$ac_objext conftest.beam conftest.$ac_ext
24469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
24470 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
24472 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
24474 *) REPLACE_FSTATAT=1
24475 case $gl_cv_func_fstatat_zero_flag in
24478 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
24486 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
24495 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
24509 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
24516 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
24520 if test $REPLACE_FTELL = 1; then
24529 gl_LIBOBJS="$gl_LIBOBJS ftell.$ac_objext"
24543 $as_echo "#define GNULIB_TEST_FTELL 1" >>confdefs.h
24562 if test $ac_cv_have_decl_ftello = no; then
24566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
24567 $as_echo_n "checking for ftello... " >&6; }
24568 if ${gl_cv_func_ftello+:} false; then :
24569 $as_echo_n "(cached) " >&6
24572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24573 /* end confdefs.h. */
24583 if ac_fn_c_try_link "$LINENO"; then :
24584 gl_cv_func_ftello=yes
24586 gl_cv_func_ftello=no
24588 rm -f core conftest.err conftest.$ac_objext \
24589 conftest$ac_exeext conftest.$ac_ext
24592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
24593 $as_echo "$gl_cv_func_ftello" >&6; }
24594 if test $gl_cv_func_ftello = no; then
24597 if test $WINDOWS_64_BIT_OFF_T = 1; then
24600 if test $gl_cv_var_stdin_large_offset = no; then
24603 if test $REPLACE_FTELLO = 0; then
24605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ftello works" >&5
24606 $as_echo_n "checking whether ftello works... " >&6; }
24607 if ${gl_cv_func_ftello_works+:} false; then :
24608 $as_echo_n "(cached) " >&6
24612 # Guess no on Solaris.
24613 solaris*) gl_cv_func_ftello_works="guessing no" ;;
24614 # Guess yes otherwise.
24615 *) gl_cv_func_ftello_works="guessing yes" ;;
24617 if test "$cross_compiling" = yes; then :
24620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24621 /* end confdefs.h. */
24624 #include <stdlib.h>
24625 #include <string.h>
24626 #define TESTFILE "conftest.tmp"
24632 /* Create a file with some contents. */
24633 fp = fopen (TESTFILE, "w");
24636 if (fwrite ("foogarsh", 1, 8, fp) < 8)
24641 /* The file's contents is now "foogarsh". */
24643 /* Try writing after reading to EOF. */
24644 fp = fopen (TESTFILE, "r+");
24647 if (fseek (fp, -1, SEEK_END))
24649 if (!(getc (fp) == 'h'))
24651 if (!(getc (fp) == EOF))
24653 if (!(ftell (fp) == 8))
24655 if (!(ftell (fp) == 8))
24657 if (!(putc ('!', fp) == '!'))
24659 if (!(ftell (fp) == 9))
24661 if (!(fclose (fp) == 0))
24663 fp = fopen (TESTFILE, "r");
24668 if (!(fread (buf, 1, 10, fp) == 9))
24670 if (!(memcmp (buf, "foogarsh!", 9) == 0))
24673 if (!(fclose (fp) == 0))
24676 /* The file's contents is now "foogarsh!". */
24681 if ac_fn_c_try_run "$LINENO"; then :
24682 gl_cv_func_ftello_works=yes
24684 gl_cv_func_ftello_works=no
24686 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24687 conftest.$ac_objext conftest.beam conftest.$ac_ext
24692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello_works" >&5
24693 $as_echo "$gl_cv_func_ftello_works" >&6; }
24694 case "$gl_cv_func_ftello_works" in
24699 $as_echo "#define FTELLO_BROKEN_AFTER_SWITCHING_FROM_READ_TO_WRITE 1" >>confdefs.h
24706 if test $HAVE_FTELLO = 0 || test $REPLACE_FTELLO = 1; then
24715 gl_LIBOBJS="$gl_LIBOBJS ftello.$ac_objext"
24718 for ac_func in _ftelli64
24720 ac_fn_c_check_func "$LINENO" "_ftelli64" "ac_cv_func__ftelli64"
24721 if test "x$ac_cv_func__ftelli64" = xyes; then :
24722 cat >>confdefs.h <<_ACEOF
24723 #define HAVE__FTELLI64 1
24742 $as_echo "#define GNULIB_TEST_FTELLO 1" >>confdefs.h
24759 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
24763 # Solaris 9 has *at functions, but uniformly mishandles trailing
24764 # slash in all of them.
24789 ac_fn_c_check_member "$LINENO" "struct statfs" "f_type" "ac_cv_member_struct_statfs_f_type" "$ac_includes_default
24790 #include <sys/vfs.h>
24792 if test "x$ac_cv_member_struct_statfs_f_type" = xyes; then :
24794 cat >>confdefs.h <<_ACEOF
24795 #define HAVE_STRUCT_STATFS_F_TYPE 1
24811 gl_LIBOBJS="$gl_LIBOBJS fts.$ac_objext"
24821 gl_cv_func_getcwd_path_max=yes
24841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
24842 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
24843 if ${gl_cv_func_getcwd_path_max+:} false; then :
24844 $as_echo_n "(cached) " >&6
24846 # Arrange for deletion of the temporary directory this test creates.
24847 ac_clean_files="$ac_clean_files confdir3"
24848 if test "$cross_compiling" = yes; then :
24850 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
24851 *) gl_cv_func_getcwd_path_max=no;;
24854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24855 /* end confdefs.h. */
24858 #include <stdlib.h>
24860 # include <unistd.h>
24862 # include <direct.h>
24864 #include <string.h>
24865 #include <limits.h>
24866 #include <sys/stat.h>
24867 #include <sys/types.h>
24871 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
24873 # include <unistd.h>
24875 #include <limits.h>
24876 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
24877 # include <sys/param.h>
24879 #if !defined PATH_MAX && defined MAXPATHLEN
24880 # define PATH_MAX MAXPATHLEN
24884 # define PATH_MAX 1024
24886 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
24888 # define PATH_MAX 260
24893 # define AT_FDCWD 0
24895 #ifdef ENAMETOOLONG
24896 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
24898 # define is_ENAMETOOLONG(x) 0
24901 /* Use the getcwd function, not any macro. */
24904 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
24908 # define S_IRWXU 0700
24911 /* The length of this name must be 8. */
24912 #define DIR_NAME "confdir3"
24913 #define DIR_NAME_LEN 8
24914 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
24916 /* The length of "../". */
24917 #define DOTDOTSLASH_LEN 3
24919 /* Leftover bytes in the buffer, to work around library or OS bugs. */
24920 #define BUF_SLOP 20
24926 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
24927 at least not on a local file system. And if we were to start worrying
24928 about remote file systems, we'd have to enable the wrapper function
24929 all of the time, just to be safe. That's not worth the cost. */
24931 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
24932 - DIR_NAME_SIZE - BUF_SLOP) \
24934 /* FIXME: Assuming there's a system for which this is true,
24935 this should be done in a compile test. */
24938 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
24939 + DIR_NAME_SIZE + BUF_SLOP];
24940 char *cwd = getcwd (buf, PATH_MAX);
24941 size_t initial_cwd_len;
24944 size_t n_chdirs = 0;
24949 cwd_len = initial_cwd_len = strlen (cwd);
24953 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
24956 cwd_len += DIR_NAME_SIZE;
24957 /* If mkdir or chdir fails, it could be that this system cannot create
24958 any file with an absolute name longer than PATH_MAX, such as cygwin.
24959 If so, leave fail as 0, because the current working directory can't
24960 be too long for getcwd if it can't even be created. For other
24961 errors, be pessimistic and consider that as a failure, too. */
24962 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
24964 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
24969 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
24971 c = getcwd (buf, PATH_MAX);
24972 if (!c && errno == ENOENT)
24982 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
24989 if (dotdot_max <= cwd_len - initial_cwd_len)
24991 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
24993 c = getcwd (buf, cwd_len + 1);
24996 if (! (errno == ERANGE || errno == ENOENT
24997 || is_ENAMETOOLONG (errno)))
25002 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
25010 if (c && strlen (c) != cwd_len)
25018 /* Leaving behind such a deep directory is not polite.
25019 So clean up here, right away, even though the driving
25020 shell script would also clean up. */
25024 /* Try rmdir first, in case the chdir failed. */
25026 for (i = 0; i <= n_chdirs; i++)
25028 if (chdir ("..") < 0)
25030 if (rmdir (DIR_NAME) != 0)
25040 if ac_fn_c_try_run "$LINENO"; then :
25041 gl_cv_func_getcwd_path_max=yes
25044 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
25045 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
25046 *) gl_cv_func_getcwd_path_max=no;;
25049 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25050 conftest.$ac_objext conftest.beam conftest.$ac_ext
25055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
25056 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
25058 case "$gl_cv_func_getcwd_null" in
25076 for ac_func in getpagesize
25078 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
25079 if test "x$ac_cv_func_getpagesize" = xyes; then :
25080 cat >>confdefs.h <<_ACEOF
25081 #define HAVE_GETPAGESIZE 1
25087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
25088 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
25089 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
25090 $as_echo_n "(cached) " >&6
25092 # Remove any remnants of a previous test.
25093 rm -rf confdir-14B---
25094 # Arrange for deletion of the temporary directory this test creates.
25095 ac_clean_files="$ac_clean_files confdir-14B---"
25096 if test "$cross_compiling" = yes; then :
25097 gl_cv_func_getcwd_abort_bug=yes
25099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25100 /* end confdefs.h. */
25103 #include <stdlib.h>
25105 # include <unistd.h>
25106 #else /* on Windows with MSVC */
25107 # include <direct.h>
25109 #include <string.h>
25110 #include <sys/stat.h>
25113 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
25115 # include <unistd.h>
25117 #include <limits.h>
25118 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
25119 # include <sys/param.h>
25121 #if !defined PATH_MAX && defined MAXPATHLEN
25122 # define PATH_MAX MAXPATHLEN
25126 # define PATH_MAX 1024
25128 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
25130 # define PATH_MAX 260
25134 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
25138 # define S_IRWXU 0700
25141 /* FIXME: skip the run-test altogether on systems without getpagesize. */
25142 #if ! HAVE_GETPAGESIZE
25143 # define getpagesize() 0
25146 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
25147 the 16kB pagesize on ia64 linux. Those conditions make the code below
25148 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
25149 #define TARGET_LEN (5 * 1024)
25155 size_t initial_cwd_len;
25158 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
25159 this relatively expensive and invasive test if that's not true. */
25161 int bug_possible = PATH_MAX < getpagesize ();
25163 int bug_possible = 0;
25165 if (! bug_possible)
25168 cwd = getcwd (NULL, 0);
25172 initial_cwd_len = strlen (cwd);
25177 static char const dir_name[] = "confdir-14B---";
25178 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
25179 / sizeof dir_name);
25181 for (d = 0; d < desired_depth; d++)
25183 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
25185 if (! (errno == ERANGE || errno == ENAMETOOLONG
25186 || errno == ENOENT))
25187 fail = 3; /* Unable to construct deep hierarchy. */
25192 /* If libc has the bug in question, this invocation of getcwd
25193 results in a failed assertion. */
25194 cwd = getcwd (NULL, 0);
25196 fail = 4; /* getcwd didn't assert, but it failed for a long name
25197 where the answer could have been learned. */
25200 /* Call rmdir first, in case the above chdir failed. */
25204 if (chdir ("..") < 0)
25217 if ac_fn_c_try_run "$LINENO"; then :
25218 gl_cv_func_getcwd_abort_bug=no
25221 if test $ret -ge 128 || test $ret = 4; then
25222 gl_cv_func_getcwd_abort_bug=yes
25224 gl_cv_func_getcwd_abort_bug=no
25227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25228 conftest.$ac_objext conftest.beam conftest.$ac_ext
25233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
25234 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
25235 if test $gl_cv_func_getcwd_abort_bug = yes; then :
25243 case "$gl_cv_func_getcwd_path_max" in
25244 "no"|"no, it has the AIX bug") ;;
25247 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
25251 case "$gl_cv_func_getcwd_path_max" in
25252 "no, but it is partly working")
25254 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
25259 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
25260 || test $gl_cv_func_getcwd_posix_signature != yes \
25261 || test "$gl_cv_func_getcwd_path_max" != yes \
25262 || test $gl_abort_bug = yes; then
25266 if test $REPLACE_GETCWD = 1; then
25275 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
25285 cat >>confdefs.h <<_ACEOF
25286 #define GNULIB_GETCWD 1
25301 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
25310 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
25317 if test $REPLACE_GETCWD = 1; then
25326 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
25340 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
25364 if test $ac_cv_func_getdelim = yes; then
25366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
25367 $as_echo_n "checking for working getdelim function... " >&6; }
25368 if ${gl_cv_func_working_getdelim+:} false; then :
25369 $as_echo_n "(cached) " >&6
25371 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
25372 if test "$cross_compiling" = yes; then :
25373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25374 /* end confdefs.h. */
25376 #include <features.h>
25377 #ifdef __GNU_LIBRARY__
25378 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
25384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25385 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
25386 gl_cv_func_working_getdelim="guessing yes"
25388 gl_cv_func_working_getdelim="guessing no"
25394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25395 /* end confdefs.h. */
25397 # include <stdio.h>
25398 # include <stdlib.h>
25399 # include <string.h>
25402 FILE *in = fopen ("./conftest.data", "r");
25406 /* Test result for a NULL buffer and a zero size.
25407 Based on a test program from Karl Heuer. */
25410 int len = getdelim (&line, &siz, '\n', in);
25411 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
25415 /* Test result for a NULL buffer and a non-zero size.
25416 This crashes on FreeBSD 8.0. */
25418 size_t siz = (size_t)(~0) / 4;
25419 if (getdelim (&line, &siz, '\n', in) == -1)
25426 if ac_fn_c_try_run "$LINENO"; then :
25427 gl_cv_func_working_getdelim=yes
25429 gl_cv_func_working_getdelim=no
25431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25432 conftest.$ac_objext conftest.beam conftest.$ac_ext
25436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
25437 $as_echo "$gl_cv_func_working_getdelim" >&6; }
25438 case "$gl_cv_func_working_getdelim" in
25447 if test $ac_cv_have_decl_getdelim = no; then
25448 HAVE_DECL_GETDELIM=0
25451 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
25460 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
25463 for ac_func in flockfile funlockfile
25465 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25466 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25467 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25468 cat >>confdefs.h <<_ACEOF
25469 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25475 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
25476 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
25482 cat >>confdefs.h <<_ACEOF
25483 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
25499 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
25513 if test $ac_cv_func_getdtablesize = yes; then
25514 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
25515 # up to an unchangeable hard limit; all other platforms correctly
25516 # require setrlimit before getdtablesize() can report a larger value.
25517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
25518 $as_echo_n "checking whether getdtablesize works... " >&6; }
25519 if ${gl_cv_func_getdtablesize_works+:} false; then :
25520 $as_echo_n "(cached) " >&6
25522 if test "$cross_compiling" = yes; then :
25524 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
25525 gl_cv_func_getdtablesize_works="guessing no" ;;
25526 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
25529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25530 /* end confdefs.h. */
25532 #include <unistd.h>
25536 int size = getdtablesize();
25537 if (dup2 (0, getdtablesize()) != -1)
25539 if (size != getdtablesize())
25546 if ac_fn_c_try_run "$LINENO"; then :
25547 gl_cv_func_getdtablesize_works=yes
25549 gl_cv_func_getdtablesize_works=no
25551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25552 conftest.$ac_objext conftest.beam conftest.$ac_ext
25557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
25558 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
25559 case "$gl_cv_func_getdtablesize_works" in
25561 *) REPLACE_GETDTABLESIZE=1 ;;
25564 HAVE_GETDTABLESIZE=0
25567 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
25576 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
25585 GNULIB_GETDTABLESIZE=1
25591 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
25600 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
25601 if test "x$ac_cv_func_getgroups" = xyes; then :
25606 # If we don't yet have getgroups, see if it's in -lbsd.
25607 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
25609 if test $ac_cv_func_getgroups = no; then
25610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
25611 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
25612 if ${ac_cv_lib_bsd_getgroups+:} false; then :
25613 $as_echo_n "(cached) " >&6
25615 ac_check_lib_save_LIBS=$LIBS
25617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25618 /* end confdefs.h. */
25620 /* Override any GCC internal prototype to avoid an error.
25621 Use char because int might match the return type of a GCC
25622 builtin and then its argument prototype would still apply. */
25630 return getgroups ();
25635 if ac_fn_c_try_link "$LINENO"; then :
25636 ac_cv_lib_bsd_getgroups=yes
25638 ac_cv_lib_bsd_getgroups=no
25640 rm -f core conftest.err conftest.$ac_objext \
25641 conftest$ac_exeext conftest.$ac_ext
25642 LIBS=$ac_check_lib_save_LIBS
25644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
25645 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
25646 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
25647 GETGROUPS_LIB=-lbsd
25652 # Run the program to test the functionality of the system-supplied
25653 # getgroups function only if there is such a function.
25654 if test $ac_cv_func_getgroups = yes; then
25655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
25656 $as_echo_n "checking for working getgroups... " >&6; }
25657 if ${ac_cv_func_getgroups_works+:} false; then :
25658 $as_echo_n "(cached) " >&6
25660 if test "$cross_compiling" = yes; then :
25661 case "$host_os" in # ((
25662 # Guess yes on glibc systems.
25663 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
25664 # If we don't know, assume the worst.
25665 *) ac_cv_func_getgroups_works="guessing no" ;;
25669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25670 /* end confdefs.h. */
25671 $ac_includes_default
25675 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
25676 return getgroups (0, 0) == -1;
25682 if ac_fn_c_try_run "$LINENO"; then :
25683 ac_cv_func_getgroups_works=yes
25685 ac_cv_func_getgroups_works=no
25687 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25688 conftest.$ac_objext conftest.beam conftest.$ac_ext
25693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
25694 $as_echo "$ac_cv_func_getgroups_works" >&6; }
25696 ac_cv_func_getgroups_works=no
25698 case "$ac_cv_func_getgroups_works" in
25701 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
25707 if test $ac_cv_func_getgroups != yes; then
25710 if test "$ac_cv_type_getgroups" != gid_t \
25711 || { case "$ac_cv_func_getgroups_works" in
25716 REPLACE_GETGROUPS=1
25718 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
25721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
25722 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
25723 if ${gl_cv_func_getgroups_works+:} false; then :
25724 $as_echo_n "(cached) " >&6
25726 if test "$cross_compiling" = yes; then :
25728 # Guess yes on glibc systems.
25729 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
25730 # If we don't know, assume the worst.
25731 *) gl_cv_func_getgroups_works="guessing no" ;;
25735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25736 /* end confdefs.h. */
25737 $ac_includes_default
25741 int size = getgroups (0, 0);
25742 gid_t *list = malloc (size * sizeof *list);
25743 return getgroups (-1, list) != -1;
25748 if ac_fn_c_try_run "$LINENO"; then :
25749 gl_cv_func_getgroups_works=yes
25751 gl_cv_func_getgroups_works=no
25753 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25754 conftest.$ac_objext conftest.beam conftest.$ac_ext
25758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
25759 $as_echo "$gl_cv_func_getgroups_works" >&6; }
25760 case "$gl_cv_func_getgroups_works" in
25762 *) REPLACE_GETGROUPS=1 ;;
25766 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
25768 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
25777 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
25791 $as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
25807 if test $ac_cv_header_sys_socket_h != yes; then
25808 for ac_header in winsock2.h
25810 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
25811 if test "x$ac_cv_header_winsock2_h" = xyes; then :
25812 cat >>confdefs.h <<_ACEOF
25813 #define HAVE_WINSOCK2_H 1
25821 if test "$ac_cv_header_winsock2_h" = yes; then
25823 UNISTD_H_HAVE_WINSOCK2_H=1
25824 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
25832 for ac_func in gethostname
25834 ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
25835 if test "x$ac_cv_func_gethostname" = xyes; then :
25836 cat >>confdefs.h <<_ACEOF
25837 #define HAVE_GETHOSTNAME 1
25842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostname in winsock2.h and -lws2_32" >&5
25843 $as_echo_n "checking for gethostname in winsock2.h and -lws2_32... " >&6; }
25844 if ${gl_cv_w32_gethostname+:} false; then :
25845 $as_echo_n "(cached) " >&6
25847 gl_cv_w32_gethostname=no
25848 gl_save_LIBS="$LIBS"
25849 LIBS="$LIBS -lws2_32"
25850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25851 /* end confdefs.h. */
25853 #ifdef HAVE_WINSOCK2_H
25854 #include <winsock2.h>
25856 #include <stddef.h>
25861 gethostname(NULL, 0);
25866 if ac_fn_c_try_link "$LINENO"; then :
25867 gl_cv_w32_gethostname=yes
25869 rm -f core conftest.err conftest.$ac_objext \
25870 conftest$ac_exeext conftest.$ac_ext
25871 LIBS="$gl_save_LIBS"
25874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_w32_gethostname" >&5
25875 $as_echo "$gl_cv_w32_gethostname" >&6; }
25876 if test "$gl_cv_w32_gethostname" = "yes"; then
25877 GETHOSTNAME_LIB="-lws2_32"
25885 if test "$ac_cv_func_gethostname" = no; then
25911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HOST_NAME_MAX" >&5
25912 $as_echo_n "checking for HOST_NAME_MAX... " >&6; }
25913 if ${gl_cv_decl_HOST_NAME_MAX+:} false; then :
25914 $as_echo_n "(cached) " >&6
25917 gl_cv_decl_HOST_NAME_MAX=
25918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25919 /* end confdefs.h. */
25921 #include <limits.h>
25922 #ifdef HOST_NAME_MAX
25927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25928 $EGREP "lucky" >/dev/null 2>&1; then :
25929 gl_cv_decl_HOST_NAME_MAX=yes
25933 if test -z "$gl_cv_decl_HOST_NAME_MAX"; then
25934 if test "$gl_cv_w32_gethostname" = yes; then
25935 gl_cv_decl_HOST_NAME_MAX=256
25937 if ac_fn_c_compute_int "$LINENO" "MAXHOSTNAMELEN" "gl_cv_decl_HOST_NAME_MAX" "
25938 #include <sys/types.h>
25939 #if HAVE_SYS_PARAM_H
25940 # include <sys/param.h>
25942 #if HAVE_SYS_SOCKET_H
25943 # include <sys/socket.h>
25946 # include <netdb.h>
25951 gl_cv_decl_HOST_NAME_MAX=256
25960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_HOST_NAME_MAX" >&5
25961 $as_echo "$gl_cv_decl_HOST_NAME_MAX" >&6; }
25962 if test "$gl_cv_decl_HOST_NAME_MAX" != yes; then
25964 cat >>confdefs.h <<_ACEOF
25965 #define HOST_NAME_MAX $gl_cv_decl_HOST_NAME_MAX
25971 if test $HAVE_GETHOSTNAME = 0; then
25980 gl_LIBOBJS="$gl_LIBOBJS gethostname.$ac_objext"
25983 if test "$gl_cv_w32_gethostname" != "yes"; then
25984 for ac_func in uname
25986 ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
25987 if test "x$ac_cv_func_uname" = xyes; then :
25988 cat >>confdefs.h <<_ACEOF
25989 #define HAVE_UNAME 1
26003 GNULIB_GETHOSTNAME=1
26009 $as_echo "#define GNULIB_TEST_GETHOSTNAME 1" >>confdefs.h
26026 gl_getline_needs_run_time_check=no
26027 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
26028 if test "x$ac_cv_func_getline" = xyes; then :
26029 gl_getline_needs_run_time_check=yes
26031 am_cv_func_working_getline=no
26034 if test $gl_getline_needs_run_time_check = yes; then
26035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
26036 $as_echo_n "checking for working getline function... " >&6; }
26037 if ${am_cv_func_working_getline+:} false; then :
26038 $as_echo_n "(cached) " >&6
26040 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
26041 if test "$cross_compiling" = yes; then :
26042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26043 /* end confdefs.h. */
26045 #include <features.h>
26046 #ifdef __GNU_LIBRARY__
26047 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
26053 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26054 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
26055 am_cv_func_working_getline="guessing yes"
26057 am_cv_func_working_getline="guessing no"
26063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26064 /* end confdefs.h. */
26066 # include <stdio.h>
26067 # include <stdlib.h>
26068 # include <string.h>
26071 FILE *in = fopen ("./conftest.data", "r");
26075 /* Test result for a NULL buffer and a zero size.
26076 Based on a test program from Karl Heuer. */
26079 int len = getline (&line, &siz, in);
26080 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
26084 /* Test result for a NULL buffer and a non-zero size.
26085 This crashes on FreeBSD 8.0. */
26087 size_t siz = (size_t)(~0) / 4;
26088 if (getline (&line, &siz, in) == -1)
26095 if ac_fn_c_try_run "$LINENO"; then :
26096 am_cv_func_working_getline=yes
26098 am_cv_func_working_getline=no
26100 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26101 conftest.$ac_objext conftest.beam conftest.$ac_ext
26105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
26106 $as_echo "$am_cv_func_working_getline" >&6; }
26109 if test $ac_cv_have_decl_getline = no; then
26110 HAVE_DECL_GETLINE=0
26113 case "$am_cv_func_working_getline" in
26119 if test $REPLACE_GETLINE = 1; then
26128 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
26145 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
26154 if test $REPLACE_GETOPT = 1; then
26163 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
26173 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
26184 GNULIB_GL_UNISTD_H_GETOPT=1
26189 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
26198 if test -n "$gl_replace_getopt"; then
26202 if test $REPLACE_GETOPT = 1; then
26206 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
26212 if test $REPLACE_GETOPT = 1; then
26221 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
26231 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
26242 GNULIB_GL_UNISTD_H_GETOPT=1
26274 gl_gettimeofday_timezone=void
26275 if test $ac_cv_func_gettimeofday != yes; then
26276 HAVE_GETTIMEOFDAY=0
26281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
26282 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
26283 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
26284 $as_echo_n "(cached) " >&6
26286 if test "$cross_compiling" = yes; then :
26287 # When cross-compiling:
26289 # Guess all is fine on glibc systems.
26290 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
26291 # If we don't know, assume the worst.
26292 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
26296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26297 /* end confdefs.h. */
26298 #include <string.h>
26299 #include <sys/time.h>
26301 #include <stdlib.h>
26309 struct tm saved_lt;
26311 lt = localtime (&t);
26313 gettimeofday (&tv, NULL);
26314 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
26320 if ac_fn_c_try_run "$LINENO"; then :
26321 gl_cv_func_gettimeofday_clobber=no
26323 gl_cv_func_gettimeofday_clobber=yes
26325 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26326 conftest.$ac_objext conftest.beam conftest.$ac_ext
26330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
26331 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
26333 case "$gl_cv_func_gettimeofday_clobber" in
26335 REPLACE_GETTIMEOFDAY=1
26338 REPLACE_LOCALTIME=1
26341 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
26346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
26347 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
26348 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
26349 $as_echo_n "(cached) " >&6
26351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26352 /* end confdefs.h. */
26353 #include <sys/time.h>
26355 int gettimeofday (struct timeval *restrict, void *restrict);
26360 /* glibc uses struct timezone * rather than the POSIX void *
26361 if _GNU_SOURCE is defined. However, since the only portable
26362 use of gettimeofday uses NULL as the second parameter, and
26363 since the glibc definition is actually more typesafe, it is
26364 not worth wrapping this to get a compliant signature. */
26365 int (*f) (struct timeval *restrict, void *restrict)
26368 return !(x | c.tv_sec | c.tv_usec);
26374 if ac_fn_c_try_compile "$LINENO"; then :
26375 gl_cv_func_gettimeofday_posix_signature=yes
26377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26378 /* end confdefs.h. */
26379 #include <sys/time.h>
26380 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
26390 if ac_fn_c_try_compile "$LINENO"; then :
26391 gl_cv_func_gettimeofday_posix_signature=almost
26393 gl_cv_func_gettimeofday_posix_signature=no
26395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
26400 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
26401 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
26402 gl_gettimeofday_timezone='struct timezone'
26403 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
26404 REPLACE_GETTIMEOFDAY=1
26406 if test $REPLACE_STRUCT_TIMEVAL = 1; then
26407 REPLACE_GETTIMEOFDAY=1
26412 cat >>confdefs.h <<_ACEOF
26413 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
26417 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
26426 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
26429 for ac_header in sys/timeb.h
26431 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
26432 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
26433 cat >>confdefs.h <<_ACEOF
26434 #define HAVE_SYS_TIMEB_H 1
26441 for ac_func in _ftime
26443 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
26444 if test "x$ac_cv_func__ftime" = xyes; then :
26445 cat >>confdefs.h <<_ACEOF
26446 #define HAVE__FTIME 1
26459 GNULIB_GETTIMEOFDAY=1
26465 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
26469 # Autoconf 2.61a.99 and earlier don't support linking a file only
26470 # in VPATH builds. But since GNUmakefile is for maintainer use
26471 # only, it does not matter if we skip the link with older autoconf.
26472 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
26473 # builds, so use a shell variable to bypass this.
26474 GNUmakefile=GNUmakefile
26475 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
26482 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
26483 if test "x$ac_cv_func_group_member" = xyes; then :
26487 HAVE_GROUP_MEMBER=0
26492 if test $HAVE_GROUP_MEMBER = 0; then
26501 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
26512 GNULIB_GROUP_MEMBER=1
26518 $as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
26533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
26534 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
26535 if ${gl_cv_c_inline_effective+:} false; then :
26536 $as_echo_n "(cached) " >&6
26538 if test $ac_cv_c_inline = no; then
26539 gl_cv_c_inline_effective=no
26541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26542 /* end confdefs.h. */
26547 #ifdef __NO_INLINE__
26548 #error "inline is not effective"
26554 if ac_fn_c_try_compile "$LINENO"; then :
26555 gl_cv_c_inline_effective=yes
26557 gl_cv_c_inline_effective=no
26559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
26564 $as_echo "$gl_cv_c_inline_effective" >&6; }
26565 if test $gl_cv_c_inline_effective = yes; then
26567 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
26577 if test -n "$STDINT_H"; then
26578 PRIPTR_PREFIX='"l"'
26580 for glpfx in '' l ll I64; do
26582 '') gltype1='int';;
26583 l) gltype1='long int';;
26584 ll) gltype1='long long int';;
26585 I64) gltype1='__int64';;
26587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26588 /* end confdefs.h. */
26589 #include <stdint.h>
26590 extern intptr_t foo;
26591 extern $gltype1 foo;
26600 if ac_fn_c_try_compile "$LINENO"; then :
26601 PRIPTR_PREFIX='"'$glpfx'"'
26603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26604 test -n "$PRIPTR_PREFIX" && break
26610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
26611 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
26612 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
26613 $as_echo_n "(cached) " >&6
26615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26616 /* end confdefs.h. */
26617 /* Work also in C++ mode. */
26618 #define __STDC_LIMIT_MACROS 1
26620 /* Work if build is not clean. */
26621 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26623 #include <limits.h>
26625 #include <stdint.h>
26628 #if defined INT32_MAX && defined INTMAX_MAX
26629 #define CONDITION (INT32_MAX < INTMAX_MAX)
26630 #elif HAVE_LONG_LONG_INT
26631 #define CONDITION (sizeof (int) < sizeof (long long int))
26633 #define CONDITION 0
26635 int test[CONDITION ? 1 : -1];
26644 if ac_fn_c_try_compile "$LINENO"; then :
26645 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
26647 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
26649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
26652 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
26653 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
26654 INT32_MAX_LT_INTMAX_MAX=1;
26656 INT32_MAX_LT_INTMAX_MAX=0;
26660 if test $APPLE_UNIVERSAL_BUILD = 0; then
26662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
26663 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
26664 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
26665 $as_echo_n "(cached) " >&6
26667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26668 /* end confdefs.h. */
26669 /* Work also in C++ mode. */
26670 #define __STDC_LIMIT_MACROS 1
26672 /* Work if build is not clean. */
26673 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26675 #include <limits.h>
26677 #include <stdint.h>
26680 #if defined INT64_MAX
26681 #define CONDITION (INT64_MAX == LONG_MAX)
26682 #elif HAVE_LONG_LONG_INT
26683 #define CONDITION (sizeof (long long int) == sizeof (long int))
26685 #define CONDITION 0
26687 int test[CONDITION ? 1 : -1];
26696 if ac_fn_c_try_compile "$LINENO"; then :
26697 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
26699 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
26701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
26704 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
26705 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
26706 INT64_MAX_EQ_LONG_MAX=1;
26708 INT64_MAX_EQ_LONG_MAX=0;
26713 INT64_MAX_EQ_LONG_MAX=-1
26716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
26717 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
26718 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
26719 $as_echo_n "(cached) " >&6
26721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26722 /* end confdefs.h. */
26723 /* Work also in C++ mode. */
26724 #define __STDC_LIMIT_MACROS 1
26726 /* Work if build is not clean. */
26727 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26729 #include <limits.h>
26731 #include <stdint.h>
26734 #if defined UINT32_MAX && defined UINTMAX_MAX
26735 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
26736 #elif HAVE_LONG_LONG_INT
26737 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
26739 #define CONDITION 0
26741 int test[CONDITION ? 1 : -1];
26750 if ac_fn_c_try_compile "$LINENO"; then :
26751 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
26753 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
26755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
26758 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
26759 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
26760 UINT32_MAX_LT_UINTMAX_MAX=1;
26762 UINT32_MAX_LT_UINTMAX_MAX=0;
26766 if test $APPLE_UNIVERSAL_BUILD = 0; then
26768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
26769 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
26770 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
26771 $as_echo_n "(cached) " >&6
26773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26774 /* end confdefs.h. */
26775 /* Work also in C++ mode. */
26776 #define __STDC_LIMIT_MACROS 1
26778 /* Work if build is not clean. */
26779 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
26781 #include <limits.h>
26783 #include <stdint.h>
26786 #if defined UINT64_MAX
26787 #define CONDITION (UINT64_MAX == ULONG_MAX)
26788 #elif HAVE_LONG_LONG_INT
26789 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
26791 #define CONDITION 0
26793 int test[CONDITION ? 1 : -1];
26802 if ac_fn_c_try_compile "$LINENO"; then :
26803 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
26805 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
26807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
26810 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
26811 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
26812 UINT64_MAX_EQ_ULONG_MAX=1;
26814 UINT64_MAX_EQ_ULONG_MAX=0;
26819 UINT64_MAX_EQ_ULONG_MAX=-1
26835 if test $ac_cv_func_isblank = no; then
26839 if test $HAVE_ISBLANK = 0; then
26848 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext"
26864 ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
26866 if test "x$ac_cv_have_decl_isfinite" = xyes; then :
26872 cat >>confdefs.h <<_ACEOF
26873 #define HAVE_DECL_ISFINITE $ac_have_decl
26876 if test "$ac_cv_have_decl_isfinite" = yes; then
26879 ISFINITE_LIBM=missing
26880 for libm in "" "-lm"; do
26881 LIBS="$save_LIBS $libm"
26882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26883 /* end confdefs.h. */
26885 #ifndef __NO_MATH_INLINES
26886 # define __NO_MATH_INLINES 1 /* for glibc */
26894 x = isfinite (x) + isfinite ((float) x);
26899 if ac_fn_c_try_link "$LINENO"; then :
26900 ISFINITE_LIBM=$libm
26903 rm -f core conftest.err conftest.$ac_objext \
26904 conftest$ac_exeext conftest.$ac_ext
26908 if test "$ISFINITE_LIBM" != missing; then
26913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isfinite(long double) works" >&5
26914 $as_echo_n "checking whether isfinite(long double) works... " >&6; }
26915 if ${gl_cv_func_isfinitel_works+:} false; then :
26916 $as_echo_n "(cached) " >&6
26919 if test "$cross_compiling" = yes; then :
26920 case "$host_cpu" in
26921 # Guess no on ia64, x86_64, i386.
26922 ia64 | x86_64 | i*86) gl_cv_func_isfinitel_works="guessing no";;
26923 *) gl_cv_func_isfinitel_works="guessing yes";;
26927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26928 /* end confdefs.h. */
26931 #include <limits.h>
26934 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
26935 typedef union { unsigned int word[NWORDS]; long double value; }
26936 memory_long_double;
26937 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
26938 runtime type conversion. */
26940 static long double NaNl ()
26943 return zero / zero;
26946 # define NaNl() (0.0L / 0.0L)
26953 memory_long_double m;
26956 /* The isfinite macro should be immune against changes in the sign bit and
26957 in the mantissa bits. The xor operation twiddles a bit that can only be
26958 a sign bit or a mantissa bit (since the exponent never extends to
26961 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
26962 for (i = 0; i < NWORDS; i++)
26964 if (isfinite (m.value))
26968 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
26969 /* Representation of an 80-bit 'long double' as an initializer for a sequence
26970 of 'unsigned int' words. */
26971 # ifdef WORDS_BIGENDIAN
26972 # define LDBL80_WORDS(exponent,manthi,mantlo) \
26973 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
26974 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
26975 (unsigned int) (mantlo) << 16 \
26978 # define LDBL80_WORDS(exponent,manthi,mantlo) \
26979 { mantlo, manthi, exponent }
26982 static memory_long_double x =
26983 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
26984 if (isfinite (x.value))
26988 /* Signalling NaN. */
26989 static memory_long_double x =
26990 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
26991 if (isfinite (x.value))
26994 /* The isfinite macro should recognize Pseudo-NaNs, Pseudo-Infinities,
26995 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
26996 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
26997 Application Architecture.
26998 Table 5-2 "Floating-Point Register Encodings"
26999 Figure 5-6 "Memory to Floating-Point Register Data Translation"
27001 { /* Pseudo-NaN. */
27002 static memory_long_double x =
27003 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27004 if (isfinite (x.value))
27007 { /* Pseudo-Infinity. */
27008 static memory_long_double x =
27009 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27010 if (isfinite (x.value))
27013 { /* Pseudo-Zero. */
27014 static memory_long_double x =
27015 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27016 if (isfinite (x.value))
27019 { /* Unnormalized number. */
27020 static memory_long_double x =
27021 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27022 if (isfinite (x.value))
27025 { /* Pseudo-Denormal. */
27026 static memory_long_double x =
27027 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27028 if (isfinite (x.value))
27036 if ac_fn_c_try_run "$LINENO"; then :
27037 gl_cv_func_isfinitel_works=yes
27039 gl_cv_func_isfinitel_works=no
27041 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27042 conftest.$ac_objext conftest.beam conftest.$ac_ext
27047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isfinitel_works" >&5
27048 $as_echo "$gl_cv_func_isfinitel_works" >&6; }
27050 case "$gl_cv_func_isfinitel_works" in
27052 *) ISFINITE_LIBM=missing;;
27056 if test "$ac_cv_have_decl_isfinite" != yes ||
27057 test "$ISFINITE_LIBM" = missing; then
27063 if test $REPLACE_ISFINITE = 1; then
27072 gl_LIBOBJS="$gl_LIBOBJS isfinite.$ac_objext"
27086 $as_echo "#define GNULIB_TEST_ISFINITE 1" >>confdefs.h
27093 ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
27095 #error \"isinf must be a macro, not a function\"
27099 if test "x$ac_cv_have_decl_isinf" = xyes; then :
27105 cat >>confdefs.h <<_ACEOF
27106 #define HAVE_DECL_ISINF $ac_have_decl
27109 if test "$ac_cv_have_decl_isinf" = yes; then
27113 for libm in "" "-lm"; do
27114 LIBS="$save_LIBS $libm"
27115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27116 /* end confdefs.h. */
27118 #ifndef __NO_MATH_INLINES
27119 # define __NO_MATH_INLINES 1 /* for glibc */
27127 x = isinf (x) + isinf ((float) x);
27132 if ac_fn_c_try_link "$LINENO"; then :
27136 rm -f core conftest.err conftest.$ac_objext \
27137 conftest$ac_exeext conftest.$ac_ext
27141 if test "$ISINF_LIBM" != missing; then
27146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isinf(long double) works" >&5
27147 $as_echo_n "checking whether isinf(long double) works... " >&6; }
27148 if ${gl_cv_func_isinfl_works+:} false; then :
27149 $as_echo_n "(cached) " >&6
27152 if test "$cross_compiling" = yes; then :
27155 # Guess no on OpenBSD ia64, x86_64, i386.
27156 ia64-*-openbsd* | x86_64-*-openbsd* | i*86-*-openbsd*)
27157 gl_cv_func_isinfl_works="guessing no";;
27159 gl_cv_func_isinfl_works="guessing yes";;
27163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27164 /* end confdefs.h. */
27167 #include <limits.h>
27170 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27171 typedef union { unsigned int word[NWORDS]; long double value; }
27172 memory_long_double;
27173 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27174 runtime type conversion. */
27176 static long double NaNl ()
27179 return zero / zero;
27182 # define NaNl() (0.0L / 0.0L)
27188 if (isinf (LDBL_MAX))
27192 memory_long_double m;
27195 /* The isinf macro should be immune against changes in the sign bit and
27196 in the mantissa bits. The xor operation twiddles a bit that can only be
27197 a sign bit or a mantissa bit (since the exponent never extends to
27200 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27201 for (i = 0; i < NWORDS; i++)
27203 if (isinf (m.value))
27207 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
27208 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27209 of 'unsigned int' words. */
27210 # ifdef WORDS_BIGENDIAN
27211 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27212 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27213 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
27214 (unsigned int) (mantlo) << 16 \
27217 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27218 { mantlo, manthi, exponent }
27221 static memory_long_double x =
27222 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27223 if (isinf (x.value))
27227 /* Signalling NaN. */
27228 static memory_long_double x =
27229 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27230 if (isinf (x.value))
27233 /* The isinf macro should recognize Pseudo-NaNs, Pseudo-Infinities,
27234 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
27235 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
27236 Application Architecture.
27237 Table 5-2 "Floating-Point Register Encodings"
27238 Figure 5-6 "Memory to Floating-Point Register Data Translation"
27240 { /* Pseudo-NaN. */
27241 static memory_long_double x =
27242 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27243 if (isinf (x.value))
27246 { /* Pseudo-Infinity. */
27247 static memory_long_double x =
27248 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27249 if (isinf (x.value))
27252 { /* Pseudo-Zero. */
27253 static memory_long_double x =
27254 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27255 if (isinf (x.value))
27258 { /* Unnormalized number. */
27259 static memory_long_double x =
27260 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27261 if (isinf (x.value))
27264 { /* Pseudo-Denormal. */
27265 static memory_long_double x =
27266 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27267 if (isinf (x.value))
27275 if ac_fn_c_try_run "$LINENO"; then :
27276 gl_cv_func_isinfl_works=yes
27278 gl_cv_func_isinfl_works=no
27280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27281 conftest.$ac_objext conftest.beam conftest.$ac_ext
27286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isinfl_works" >&5
27287 $as_echo "$gl_cv_func_isinfl_works" >&6; }
27289 case "$gl_cv_func_isinfl_works" in
27291 *) ISINF_LIBM=missing;;
27295 if test "$ac_cv_have_decl_isinf" != yes ||
27296 test "$ISINF_LIBM" = missing; then
27302 if test $REPLACE_ISINF = 1; then
27311 gl_LIBOBJS="$gl_LIBOBJS isinf.$ac_objext"
27325 $as_echo "#define GNULIB_TEST_ISINF 1" >>confdefs.h
27331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
27332 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
27333 if ${gl_cv_func_isnand_no_libm+:} false; then :
27334 $as_echo_n "(cached) " >&6
27337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27338 /* end confdefs.h. */
27342 # define isnand(x) __builtin_isnan ((double)(x))
27345 # define isnand(x) isnan ((double)(x))
27356 if ac_fn_c_try_link "$LINENO"; then :
27357 gl_cv_func_isnand_no_libm=yes
27359 gl_cv_func_isnand_no_libm=no
27361 rm -f core conftest.err conftest.$ac_objext \
27362 conftest$ac_exeext conftest.$ac_ext
27365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
27366 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
27368 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm
27369 if test $gl_cv_func_isnand_no_libm = yes; then
27371 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
27375 if test $gl_func_isnand_no_libm != yes; then
27384 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext"
27392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
27393 $as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
27394 if ${gl_cv_func_isnanf_no_libm+:} false; then :
27395 $as_echo_n "(cached) " >&6
27398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27399 /* end confdefs.h. */
27403 # define isnanf(x) __builtin_isnanf ((float)(x))
27404 #elif defined isnan
27406 # define isnanf(x) isnan ((float)(x))
27417 if ac_fn_c_try_link "$LINENO"; then :
27418 gl_cv_func_isnanf_no_libm=yes
27420 gl_cv_func_isnanf_no_libm=no
27422 rm -f core conftest.err conftest.$ac_objext \
27423 conftest$ac_exeext conftest.$ac_ext
27426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
27427 $as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
27429 if test $gl_cv_func_isnanf_no_libm = yes; then
27433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
27434 $as_echo_n "checking whether isnan(float) works... " >&6; }
27435 if ${gl_cv_func_isnanf_works+:} false; then :
27436 $as_echo_n "(cached) " >&6
27439 if test "$cross_compiling" = yes; then :
27441 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
27442 *) gl_cv_func_isnanf_works="guessing yes";;
27446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27447 /* end confdefs.h. */
27452 # define isnanf(x) __builtin_isnanf ((float)(x))
27453 #elif defined isnan
27455 # define isnanf(x) isnan ((float)(x))
27457 /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
27462 static float zero = 0.0f;
27463 return zero / zero;
27466 # define NaN() (0.0f / 0.0f)
27469 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27470 typedef union { unsigned int word[NWORDS]; float value; } memory_float;
27475 if (isnanf (1.0f / 0.0f))
27478 if (!isnanf (NaN ()))
27481 #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
27482 /* The isnanf function should be immune against changes in the sign bit and
27483 in the mantissa bits. The xor operation twiddles a bit that can only be
27484 a sign bit or a mantissa bit. */
27485 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
27490 /* Set the bits below the exponent to 01111...111. */
27491 m.word[0] &= -1U << FLT_EXPBIT0_BIT;
27492 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
27493 if (!isnanf (m.value))
27501 if ac_fn_c_try_run "$LINENO"; then :
27502 gl_cv_func_isnanf_works=yes
27504 gl_cv_func_isnanf_works=no
27506 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27507 conftest.$ac_objext conftest.beam conftest.$ac_ext
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
27513 $as_echo "$gl_cv_func_isnanf_works" >&6; }
27516 if test $gl_cv_func_isnanf_no_libm = yes \
27517 && { case "$gl_cv_func_isnanf_works" in
27522 gl_func_isnanf_no_libm=yes
27524 $as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
27527 gl_func_isnanf_no_libm=no
27530 if test $gl_func_isnanf_no_libm != yes; then
27539 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext"
27543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
27544 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
27545 if ${gl_cv_cc_float_expbit0+:} false; then :
27546 $as_echo_n "(cached) " >&6
27549 if test "$cross_compiling" = yes; then :
27550 gl_cv_cc_float_expbit0="word 0 bit 23"
27552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27553 /* end confdefs.h. */
27556 #include <stddef.h>
27558 #include <string.h>
27560 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27561 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
27562 static unsigned int ored_words[NWORDS];
27563 static unsigned int anded_words[NWORDS];
27564 static void add_to_ored_words (float x)
27568 /* Clear it first, in case
27569 sizeof (float) < sizeof (memory_float). */
27570 memset (&m, 0, sizeof (memory_float));
27572 for (i = 0; i < NWORDS; i++)
27574 ored_words[i] |= m.word[i];
27575 anded_words[i] &= m.word[i];
27581 FILE *fp = fopen ("conftest.out", "w");
27584 for (j = 0; j < NWORDS; j++)
27585 anded_words[j] = ~ (unsigned int) 0;
27586 add_to_ored_words (0.25f);
27587 add_to_ored_words (0.5f);
27588 add_to_ored_words (1.0f);
27589 add_to_ored_words (2.0f);
27590 add_to_ored_words (4.0f);
27591 /* Remove bits that are common (e.g. if representation of the first mantissa
27592 bit is explicit). */
27593 for (j = 0; j < NWORDS; j++)
27594 ored_words[j] &= ~anded_words[j];
27595 /* Now find the nonzero word. */
27596 for (j = 0; j < NWORDS; j++)
27597 if (ored_words[j] != 0)
27602 for (i = j + 1; i < NWORDS; i++)
27603 if (ored_words[i] != 0)
27605 fprintf (fp, "unknown");
27606 return (fclose (fp) != 0);
27609 if ((ored_words[j] >> i) & 1)
27611 fprintf (fp, "word %d bit %d", (int) j, (int) i);
27612 return (fclose (fp) != 0);
27615 fprintf (fp, "unknown");
27616 return (fclose (fp) != 0);
27620 if ac_fn_c_try_run "$LINENO"; then :
27621 gl_cv_cc_float_expbit0=`cat conftest.out`
27623 gl_cv_cc_float_expbit0="unknown"
27625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27626 conftest.$ac_objext conftest.beam conftest.$ac_ext
27632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
27633 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
27634 case "$gl_cv_cc_float_expbit0" in
27636 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27637 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
27639 cat >>confdefs.h <<_ACEOF
27640 #define FLT_EXPBIT0_WORD $word
27644 cat >>confdefs.h <<_ACEOF
27645 #define FLT_EXPBIT0_BIT $bit
27655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
27656 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
27657 if ${gl_cv_func_isnanl_no_libm+:} false; then :
27658 $as_echo_n "(cached) " >&6
27661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27662 /* end confdefs.h. */
27666 # define isnanl(x) __builtin_isnanl ((long double)(x))
27667 #elif defined isnan
27669 # define isnanl(x) isnan ((long double)(x))
27680 if ac_fn_c_try_link "$LINENO"; then :
27681 gl_cv_func_isnanl_no_libm=yes
27683 gl_cv_func_isnanl_no_libm=no
27685 rm -f core conftest.err conftest.$ac_objext \
27686 conftest$ac_exeext conftest.$ac_ext
27689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
27690 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
27692 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
27693 if test $gl_func_isnanl_no_libm = yes; then
27698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
27699 $as_echo_n "checking whether isnanl works... " >&6; }
27700 if ${gl_cv_func_isnanl_works+:} false; then :
27701 $as_echo_n "(cached) " >&6
27704 if test "$cross_compiling" = yes; then :
27705 case "$host_cpu" in
27706 # Guess no on ia64, x86_64, i386.
27707 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
27710 netbsd*) gl_cv_func_isnanl_works="guessing no";;
27711 *) gl_cv_func_isnanl_works="guessing yes";;
27717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27718 /* end confdefs.h. */
27721 #include <limits.h>
27725 # define isnanl(x) __builtin_isnanl ((long double)(x))
27726 #elif defined isnan
27728 # define isnanl(x) isnan ((long double)(x))
27731 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27732 typedef union { unsigned int word[NWORDS]; long double value; }
27733 memory_long_double;
27734 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
27735 runtime type conversion. */
27737 static long double NaNl ()
27740 return zero / zero;
27743 # define NaNl() (0.0L / 0.0L)
27749 if (!isnanl (NaNl ()))
27753 memory_long_double m;
27756 /* The isnanl function should be immune against changes in the sign bit and
27757 in the mantissa bits. The xor operation twiddles a bit that can only be
27758 a sign bit or a mantissa bit (since the exponent never extends to
27761 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
27762 for (i = 0; i < NWORDS; i++)
27764 if (!isnanl (m.value))
27768 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
27769 /* Representation of an 80-bit 'long double' as an initializer for a sequence
27770 of 'unsigned int' words. */
27771 # ifdef WORDS_BIGENDIAN
27772 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27773 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
27774 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
27775 (unsigned int) (mantlo) << 16 \
27778 # define LDBL80_WORDS(exponent,manthi,mantlo) \
27779 { mantlo, manthi, exponent }
27782 static memory_long_double x =
27783 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
27784 if (!isnanl (x.value))
27788 /* Signalling NaN. */
27789 static memory_long_double x =
27790 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
27791 if (!isnanl (x.value))
27794 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
27795 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
27796 Intel IA-64 Architecture Software Developer's Manual, Volume 1:
27797 Application Architecture.
27798 Table 5-2 "Floating-Point Register Encodings"
27799 Figure 5-6 "Memory to Floating-Point Register Data Translation"
27801 { /* Pseudo-NaN. */
27802 static memory_long_double x =
27803 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
27804 if (!isnanl (x.value))
27807 { /* Pseudo-Infinity. */
27808 static memory_long_double x =
27809 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
27810 if (!isnanl (x.value))
27813 { /* Pseudo-Zero. */
27814 static memory_long_double x =
27815 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
27816 if (!isnanl (x.value))
27819 { /* Unnormalized number. */
27820 static memory_long_double x =
27821 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
27822 if (!isnanl (x.value))
27825 { /* Pseudo-Denormal. */
27826 static memory_long_double x =
27827 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
27828 if (!isnanl (x.value))
27836 if ac_fn_c_try_run "$LINENO"; then :
27837 gl_cv_func_isnanl_works=yes
27839 gl_cv_func_isnanl_works=no
27841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27842 conftest.$ac_objext conftest.beam conftest.$ac_ext
27847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
27848 $as_echo "$gl_cv_func_isnanl_works" >&6; }
27850 case "$gl_cv_func_isnanl_works" in
27852 *) gl_func_isnanl_no_libm=no ;;
27855 if test $gl_func_isnanl_no_libm = yes; then
27857 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
27861 if test $gl_func_isnanl_no_libm != yes; then
27870 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext"
27875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
27876 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
27877 if ${gl_cv_cc_long_double_expbit0+:} false; then :
27878 $as_echo_n "(cached) " >&6
27881 if test "$cross_compiling" = yes; then :
27883 gl_cv_cc_long_double_expbit0="unknown"
27886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27887 /* end confdefs.h. */
27890 #include <stddef.h>
27892 #include <string.h>
27894 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
27895 typedef union { long double value; unsigned int word[NWORDS]; }
27896 memory_long_double;
27897 static unsigned int ored_words[NWORDS];
27898 static unsigned int anded_words[NWORDS];
27899 static void add_to_ored_words (long double x)
27901 memory_long_double m;
27903 /* Clear it first, in case
27904 sizeof (long double) < sizeof (memory_long_double). */
27905 memset (&m, 0, sizeof (memory_long_double));
27907 for (i = 0; i < NWORDS; i++)
27909 ored_words[i] |= m.word[i];
27910 anded_words[i] &= m.word[i];
27916 FILE *fp = fopen ("conftest.out", "w");
27919 for (j = 0; j < NWORDS; j++)
27920 anded_words[j] = ~ (unsigned int) 0;
27921 add_to_ored_words (0.25L);
27922 add_to_ored_words (0.5L);
27923 add_to_ored_words (1.0L);
27924 add_to_ored_words (2.0L);
27925 add_to_ored_words (4.0L);
27926 /* Remove bits that are common (e.g. if representation of the first mantissa
27927 bit is explicit). */
27928 for (j = 0; j < NWORDS; j++)
27929 ored_words[j] &= ~anded_words[j];
27930 /* Now find the nonzero word. */
27931 for (j = 0; j < NWORDS; j++)
27932 if (ored_words[j] != 0)
27937 for (i = j + 1; i < NWORDS; i++)
27938 if (ored_words[i] != 0)
27940 fprintf (fp, "unknown");
27941 return (fclose (fp) != 0);
27944 if ((ored_words[j] >> i) & 1)
27946 fprintf (fp, "word %d bit %d", (int) j, (int) i);
27947 return (fclose (fp) != 0);
27950 fprintf (fp, "unknown");
27951 return (fclose (fp) != 0);
27955 if ac_fn_c_try_run "$LINENO"; then :
27956 gl_cv_cc_long_double_expbit0=`cat conftest.out`
27958 gl_cv_cc_long_double_expbit0="unknown"
27960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27961 conftest.$ac_objext conftest.beam conftest.$ac_ext
27967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
27968 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
27969 case "$gl_cv_cc_long_double_expbit0" in
27971 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
27972 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
27974 cat >>confdefs.h <<_ACEOF
27975 #define LDBL_EXPBIT0_WORD $word
27979 cat >>confdefs.h <<_ACEOF
27980 #define LDBL_EXPBIT0_BIT $bit
28000 ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
28001 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
28003 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
28004 before <wchar.h>. */
28005 #include <stddef.h>
28009 #include <wctype.h>
28012 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
28018 cat >>confdefs.h <<_ACEOF
28019 #define HAVE_DECL_ISWBLANK $ac_have_decl
28022 if test $ac_cv_func_iswblank = no; then
28024 if test $ac_cv_have_decl_iswblank = yes; then
28028 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28031 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28037 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
28040 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
28049 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
28064 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
28088 if test $gl_cv_have_include_next = yes; then
28089 gl_cv_next_langinfo_h='<'langinfo.h'>'
28091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
28092 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
28093 if ${gl_cv_next_langinfo_h+:} false; then :
28094 $as_echo_n "(cached) " >&6
28097 if test $ac_cv_header_langinfo_h = yes; then
28102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28103 /* end confdefs.h. */
28104 #include <langinfo.h>
28107 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28108 *) gl_absname_cpp="$ac_cpp" ;;
28113 gl_dirsep_regex='[/\\]'
28116 gl_dirsep_regex='\/'
28119 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28120 gl_header_literal_regex=`echo 'langinfo.h' \
28121 | sed -e "$gl_make_literal_regex_sed"`
28122 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28123 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28129 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28130 sed -n "$gl_absolute_header_sed"`
28132 gl_header=$gl_cv_absolute_langinfo_h
28133 gl_cv_next_langinfo_h='"'$gl_header'"'
28135 gl_cv_next_langinfo_h='<'langinfo.h'>'
28140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
28141 $as_echo "$gl_cv_next_langinfo_h" >&6; }
28143 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
28145 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28146 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28147 gl_next_as_first_directive='<'langinfo.h'>'
28149 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28150 gl_next_as_first_directive=$gl_cv_next_langinfo_h
28152 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
28158 HAVE_LANGINFO_CODESET=0
28159 HAVE_LANGINFO_T_FMT_AMPM=0
28160 HAVE_LANGINFO_ERA=0
28161 HAVE_LANGINFO_YESEXPR=0
28169 if test $ac_cv_header_langinfo_h = yes; then
28171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
28172 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
28173 if ${gl_cv_header_langinfo_codeset+:} false; then :
28174 $as_echo_n "(cached) " >&6
28176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28177 /* end confdefs.h. */
28178 #include <langinfo.h>
28189 if ac_fn_c_try_compile "$LINENO"; then :
28190 gl_cv_header_langinfo_codeset=yes
28192 gl_cv_header_langinfo_codeset=no
28194 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
28198 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
28199 if test $gl_cv_header_langinfo_codeset = yes; then
28200 HAVE_LANGINFO_CODESET=1
28202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
28203 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
28204 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
28205 $as_echo_n "(cached) " >&6
28207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28208 /* end confdefs.h. */
28209 #include <langinfo.h>
28210 int a = T_FMT_AMPM;
28220 if ac_fn_c_try_compile "$LINENO"; then :
28221 gl_cv_header_langinfo_t_fmt_ampm=yes
28223 gl_cv_header_langinfo_t_fmt_ampm=no
28225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
28229 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
28230 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
28231 HAVE_LANGINFO_T_FMT_AMPM=1
28233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
28234 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
28235 if ${gl_cv_header_langinfo_era+:} false; then :
28236 $as_echo_n "(cached) " >&6
28238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28239 /* end confdefs.h. */
28240 #include <langinfo.h>
28251 if ac_fn_c_try_compile "$LINENO"; then :
28252 gl_cv_header_langinfo_era=yes
28254 gl_cv_header_langinfo_era=no
28256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
28260 $as_echo "$gl_cv_header_langinfo_era" >&6; }
28261 if test $gl_cv_header_langinfo_era = yes; then
28262 HAVE_LANGINFO_ERA=1
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
28265 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
28266 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
28267 $as_echo_n "(cached) " >&6
28269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28270 /* end confdefs.h. */
28271 #include <langinfo.h>
28282 if ac_fn_c_try_compile "$LINENO"; then :
28283 gl_cv_header_langinfo_yesexpr=yes
28285 gl_cv_header_langinfo_yesexpr=no
28287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
28291 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
28292 if test $gl_cv_header_langinfo_yesexpr = yes; then
28293 HAVE_LANGINFO_YESEXPR=1
28305 for gl_func in nl_langinfo; do
28306 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28308 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28309 if eval \${$as_gl_Symbol+:} false; then :
28310 $as_echo_n "(cached) " >&6
28312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28313 /* end confdefs.h. */
28314 #include <langinfo.h>
28325 if ac_fn_c_try_compile "$LINENO"; then :
28326 eval "$as_gl_Symbol=yes"
28328 eval "$as_gl_Symbol=no"
28330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28332 eval ac_res=\$$as_gl_Symbol
28333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28334 $as_echo "$ac_res" >&6; }
28335 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28336 cat >>confdefs.h <<_ACEOF
28337 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28340 eval ac_cv_have_decl_$gl_func=yes
28360 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
28373 $as_echo "#define _LCONV_C99 1" >>confdefs.h
28378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
28379 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
28380 if ${gl_cv_header_locale_h_posix2001+:} false; then :
28381 $as_echo_n "(cached) " >&6
28383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28384 /* end confdefs.h. */
28385 #include <locale.h>
28386 int x = LC_MESSAGES;
28387 int y = sizeof (((struct lconv *) 0)->decimal_point);
28396 if ac_fn_c_try_compile "$LINENO"; then :
28397 gl_cv_header_locale_h_posix2001=yes
28399 gl_cv_header_locale_h_posix2001=no
28401 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
28404 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
28413 if test $ac_cv_header_xlocale_h = yes; then
28415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
28416 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
28417 if ${gl_cv_header_locale_has_locale_t+:} false; then :
28418 $as_echo_n "(cached) " >&6
28420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28421 /* end confdefs.h. */
28422 #include <locale.h>
28432 if ac_fn_c_try_compile "$LINENO"; then :
28433 gl_cv_header_locale_has_locale_t=yes
28435 gl_cv_header_locale_has_locale_t=no
28437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
28441 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
28442 if test $gl_cv_header_locale_has_locale_t = yes; then
28443 gl_cv_header_locale_h_needs_xlocale_h=no
28445 gl_cv_header_locale_h_needs_xlocale_h=yes
28449 gl_cv_header_locale_h_needs_xlocale_h=no
28453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
28454 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
28455 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
28456 $as_echo_n "(cached) " >&6
28458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28459 /* end confdefs.h. */
28460 #include <locale.h>
28462 int x = sizeof (l.decimal_point);
28463 int y = sizeof (l.int_p_cs_precedes);
28472 if ac_fn_c_try_compile "$LINENO"; then :
28473 gl_cv_sys_struct_lconv_ok=yes
28475 gl_cv_sys_struct_lconv_ok=no
28477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
28481 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
28482 if test $gl_cv_sys_struct_lconv_ok = no; then
28483 REPLACE_STRUCT_LCONV=1
28494 if test $gl_cv_have_include_next = yes; then
28495 gl_cv_next_locale_h='<'locale.h'>'
28497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
28498 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
28499 if ${gl_cv_next_locale_h+:} false; then :
28500 $as_echo_n "(cached) " >&6
28505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28506 /* end confdefs.h. */
28507 #include <locale.h>
28510 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28511 *) gl_absname_cpp="$ac_cpp" ;;
28516 gl_dirsep_regex='[/\\]'
28519 gl_dirsep_regex='\/'
28522 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28523 gl_header_literal_regex=`echo 'locale.h' \
28524 | sed -e "$gl_make_literal_regex_sed"`
28525 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28526 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28532 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28533 sed -n "$gl_absolute_header_sed"`
28535 gl_header=$gl_cv_absolute_locale_h
28536 gl_cv_next_locale_h='"'$gl_header'"'
28540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
28541 $as_echo "$gl_cv_next_locale_h" >&6; }
28543 NEXT_LOCALE_H=$gl_cv_next_locale_h
28545 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28547 gl_next_as_first_directive='<'locale.h'>'
28549 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28550 gl_next_as_first_directive=$gl_cv_next_locale_h
28552 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
28559 for gl_func in setlocale duplocale; do
28560 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28562 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28563 if eval \${$as_gl_Symbol+:} false; then :
28564 $as_echo_n "(cached) " >&6
28566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28567 /* end confdefs.h. */
28568 #include <locale.h>
28569 /* Some systems provide declarations in a non-standard header. */
28571 # include <xlocale.h>
28583 if ac_fn_c_try_compile "$LINENO"; then :
28584 eval "$as_gl_Symbol=yes"
28586 eval "$as_gl_Symbol=no"
28588 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28590 eval ac_res=\$$as_gl_Symbol
28591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28592 $as_echo "$ac_res" >&6; }
28593 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28594 cat >>confdefs.h <<_ACEOF
28595 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28598 eval ac_cv_have_decl_$gl_func=yes
28607 if test $REPLACE_STRUCT_LCONV = 1; then
28608 REPLACE_LOCALECONV=1
28611 if test $REPLACE_LOCALECONV = 1; then
28620 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
28623 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
28625 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
28627 cat >>confdefs.h <<_ACEOF
28628 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
28641 GNULIB_LOCALECONV=1
28647 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
28653 if test "$gl_threads_api" = posix; then
28654 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
28655 # pthread_rwlock_* functions.
28656 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
28658 if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then :
28660 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
28664 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
28665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28666 /* end confdefs.h. */
28668 #include <pthread.h>
28673 #if __FreeBSD__ == 4
28674 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
28675 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
28676 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
28677 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
28679 int x = (int)PTHREAD_MUTEX_RECURSIVE;
28687 if ac_fn_c_try_compile "$LINENO"; then :
28689 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
28692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28698 cat >>confdefs.h <<_ACEOF
28699 #define GNULIB_LOCK 1
28715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
28716 $as_echo_n "checking whether lseek detects pipes... " >&6; }
28717 if ${gl_cv_func_lseek_pipe+:} false; then :
28718 $as_echo_n "(cached) " >&6
28722 gl_cv_func_lseek_pipe=no
28725 if test $cross_compiling = no; then
28726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28727 /* end confdefs.h. */
28729 #include <sys/types.h> /* for off_t */
28730 #include <stdio.h> /* for SEEK_CUR */
28732 # include <unistd.h>
28733 #else /* on Windows with MSVC */
28741 /* Exit with success only if stdin is seekable. */
28742 return lseek (0, (off_t)0, SEEK_CUR) < 0;
28748 if ac_fn_c_try_link "$LINENO"; then :
28749 if test -s conftest$ac_exeext \
28750 && ./conftest$ac_exeext < conftest.$ac_ext \
28751 && test 1 = "`echo hi \
28752 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
28753 gl_cv_func_lseek_pipe=yes
28755 gl_cv_func_lseek_pipe=no
28759 gl_cv_func_lseek_pipe=no
28761 rm -f core conftest.err conftest.$ac_objext \
28762 conftest$ac_exeext conftest.$ac_ext
28764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28765 /* end confdefs.h. */
28767 #if defined __BEOS__
28768 /* BeOS mistakenly return 0 when trying to seek on pipes. */
28772 if ac_fn_c_try_compile "$LINENO"; then :
28773 gl_cv_func_lseek_pipe=yes
28775 gl_cv_func_lseek_pipe=no
28777 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
28784 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
28785 if test $gl_cv_func_lseek_pipe = no; then
28788 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
28793 if test $WINDOWS_64_BIT_OFF_T = 1; then
28797 if test $REPLACE_LSEEK = 1; then
28806 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
28820 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
28833 if test $ac_cv_func_lstat = yes; then
28835 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
28844 if test $REPLACE_LSTAT = 1; then
28853 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
28868 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
28877 for ac_header in stdlib.h
28879 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
28880 if test "x$ac_cv_header_stdlib_h" = xyes; then :
28881 cat >>confdefs.h <<_ACEOF
28882 #define HAVE_STDLIB_H 1
28889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
28890 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
28891 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
28892 $as_echo_n "(cached) " >&6
28894 if test "$cross_compiling" = yes; then :
28896 # Guess yes on platforms where we know the result.
28897 *-gnu* | freebsd* | netbsd* | openbsd* \
28898 | hpux* | solaris* | cygwin* | mingw*)
28899 ac_cv_func_malloc_0_nonnull=yes ;;
28900 # If we don't know, assume the worst.
28901 *) ac_cv_func_malloc_0_nonnull=no ;;
28905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28906 /* end confdefs.h. */
28907 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
28908 # include <stdlib.h>
28916 return ! malloc (0);
28922 if ac_fn_c_try_run "$LINENO"; then :
28923 ac_cv_func_malloc_0_nonnull=yes
28925 ac_cv_func_malloc_0_nonnull=no
28927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28928 conftest.$ac_objext conftest.beam conftest.$ac_ext
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
28934 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
28935 if test $ac_cv_func_malloc_0_nonnull = yes; then :
28937 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
28940 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
28947 if test $REPLACE_MALLOC = 1; then
28956 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28961 cat >>confdefs.h <<_ACEOF
28962 #define GNULIB_MALLOC_GNU 1
28969 if test $gl_cv_func_malloc_posix = yes; then
28971 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
28977 if test $REPLACE_MALLOC = 1; then
28986 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
28994 GNULIB_MALLOC_POSIX=1
29000 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
29025 if test $gl_cv_have_include_next = yes; then
29026 gl_cv_next_math_h='<'math.h'>'
29028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
29029 $as_echo_n "checking absolute name of <math.h>... " >&6; }
29030 if ${gl_cv_next_math_h+:} false; then :
29031 $as_echo_n "(cached) " >&6
29034 if test $ac_cv_header_math_h = yes; then
29039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29040 /* end confdefs.h. */
29044 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29045 *) gl_absname_cpp="$ac_cpp" ;;
29050 gl_dirsep_regex='[/\\]'
29053 gl_dirsep_regex='\/'
29056 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29057 gl_header_literal_regex=`echo 'math.h' \
29058 | sed -e "$gl_make_literal_regex_sed"`
29059 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29060 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29066 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29067 sed -n "$gl_absolute_header_sed"`
29069 gl_header=$gl_cv_absolute_math_h
29070 gl_cv_next_math_h='"'$gl_header'"'
29072 gl_cv_next_math_h='<'math.h'>'
29077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
29078 $as_echo "$gl_cv_next_math_h" >&6; }
29080 NEXT_MATH_H=$gl_cv_next_math_h
29082 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29083 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29084 gl_next_as_first_directive='<'math.h'>'
29086 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29087 gl_next_as_first_directive=$gl_cv_next_math_h
29089 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
29095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
29096 $as_echo_n "checking whether NAN macro works... " >&6; }
29097 if ${gl_cv_header_math_nan_works+:} false; then :
29098 $as_echo_n "(cached) " >&6
29100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29101 /* end confdefs.h. */
29106 /* Solaris 10 has a broken definition of NAN. Other platforms
29107 fail to provide NAN, or provide it only in C99 mode; this
29108 test only needs to fail when NAN is provided but wrong. */
29118 if ac_fn_c_try_compile "$LINENO"; then :
29119 gl_cv_header_math_nan_works=yes
29121 gl_cv_header_math_nan_works=no
29123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
29126 $as_echo "$gl_cv_header_math_nan_works" >&6; }
29127 if test $gl_cv_header_math_nan_works = no; then
29130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
29131 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
29132 if ${gl_cv_header_math_huge_val_works+:} false; then :
29133 $as_echo_n "(cached) " >&6
29135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29136 /* end confdefs.h. */
29141 /* Solaris 10 has a broken definition of HUGE_VAL. */
29142 double d = HUGE_VAL;
29148 if ac_fn_c_try_compile "$LINENO"; then :
29149 gl_cv_header_math_huge_val_works=yes
29151 gl_cv_header_math_huge_val_works=no
29153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
29156 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
29157 if test $gl_cv_header_math_huge_val_works = no; then
29162 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do
29163 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29165 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29166 if eval \${$as_gl_Symbol+:} false; then :
29167 $as_echo_n "(cached) " >&6
29169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29170 /* end confdefs.h. */
29181 if ac_fn_c_try_compile "$LINENO"; then :
29182 eval "$as_gl_Symbol=yes"
29184 eval "$as_gl_Symbol=no"
29186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29188 eval ac_res=\$$as_gl_Symbol
29189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29190 $as_echo "$ac_res" >&6; }
29191 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29192 cat >>confdefs.h <<_ACEOF
29193 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29196 eval ac_cv_have_decl_$gl_func=yes
29226 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29231 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29232 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29233 $as_echo_n "(cached) " >&6
29237 # Guess no on AIX and OSF/1.
29238 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29239 # Guess yes otherwise.
29240 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29242 if test $LOCALE_JA != none; then
29243 if test "$cross_compiling" = yes; then :
29246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29247 /* end confdefs.h. */
29249 #include <locale.h>
29250 #include <string.h>
29251 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29253 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29254 included before <wchar.h>. */
29255 #include <stddef.h>
29261 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29263 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29267 memset (&state, '\0', sizeof (mbstate_t));
29268 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29269 if (mbsinit (&state))
29275 if ac_fn_c_try_run "$LINENO"; then :
29276 gl_cv_func_mbrtowc_incomplete_state=yes
29278 gl_cv_func_mbrtowc_incomplete_state=no
29280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29281 conftest.$ac_objext conftest.beam conftest.$ac_ext
29287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29288 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29294 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29295 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29296 $as_echo_n "(cached) " >&6
29300 # Guess no on Solaris 8.
29301 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29302 # Guess yes otherwise.
29303 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29305 if test $LOCALE_ZH_CN != none; then
29306 if test "$cross_compiling" = yes; then :
29309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29310 /* end confdefs.h. */
29312 #include <locale.h>
29313 #include <stdlib.h>
29314 #include <string.h>
29315 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29317 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29318 included before <wchar.h>. */
29319 #include <stddef.h>
29325 /* This fails on Solaris 8:
29326 mbrtowc returns 2, and sets wc to 0x00F0.
29327 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29328 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29330 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29334 memset (&state, '\0', sizeof (mbstate_t));
29335 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29336 && mbtowc (&wc, input + 3, 6) == 4)
29342 if ac_fn_c_try_run "$LINENO"; then :
29343 gl_cv_func_mbrtowc_sanitycheck=yes
29345 gl_cv_func_mbrtowc_sanitycheck=no
29347 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29348 conftest.$ac_objext conftest.beam conftest.$ac_ext
29354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29355 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29357 REPLACE_MBSTATE_T=0
29358 case "$gl_cv_func_mbrtowc_incomplete_state" in
29360 *) REPLACE_MBSTATE_T=1 ;;
29362 case "$gl_cv_func_mbrtowc_sanitycheck" in
29364 *) REPLACE_MBSTATE_T=1 ;;
29367 REPLACE_MBSTATE_T=1
29378 if test $ac_cv_func_mbrtowc = no; then
29380 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
29381 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29383 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29384 included before <wchar.h>. */
29385 #include <stddef.h>
29391 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
29397 cat >>confdefs.h <<_ACEOF
29398 #define HAVE_DECL_MBRTOWC $ac_have_decl
29401 if test $ac_cv_have_decl_mbrtowc = yes; then
29405 if test $REPLACE_MBSTATE_T = 1; then
29411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
29412 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
29413 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
29414 $as_echo_n "(cached) " >&6
29418 # Guess no on Solaris.
29419 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
29420 # Guess yes otherwise.
29421 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
29423 if test $LOCALE_FR_UTF8 != none; then
29424 if test "$cross_compiling" = yes; then :
29427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29428 /* end confdefs.h. */
29430 #include <locale.h>
29431 #include <stdlib.h>
29432 #include <string.h>
29433 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29435 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29436 included before <wchar.h>. */
29437 #include <stddef.h>
29445 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29447 char input[] = "\303\237er";
29452 memset (&state, '\0', sizeof (mbstate_t));
29453 wc = (wchar_t) 0xBADFACE;
29454 ret = mbrtowc (&wc, input, 5, &state);
29457 if (!mbsinit (&state))
29460 memset (&state, '\0', sizeof (mbstate_t));
29461 ret = mbrtowc (NULL, input, 5, &state);
29462 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
29464 if (!mbsinit (&state))
29470 if ac_fn_c_try_run "$LINENO"; then :
29471 gl_cv_func_mbrtowc_null_arg1=yes
29473 gl_cv_func_mbrtowc_null_arg1=no
29475 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29476 conftest.$ac_objext conftest.beam conftest.$ac_ext
29482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
29483 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
29488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
29489 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
29490 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
29491 $as_echo_n "(cached) " >&6
29495 # Guess no on OSF/1.
29496 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
29497 # Guess yes otherwise.
29498 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
29500 if test $LOCALE_FR_UTF8 != none; then
29501 if test "$cross_compiling" = yes; then :
29504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29505 /* end confdefs.h. */
29507 #include <locale.h>
29508 #include <string.h>
29509 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29511 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29512 included before <wchar.h>. */
29513 #include <stddef.h>
29519 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29525 memset (&state, '\0', sizeof (mbstate_t));
29526 wc = (wchar_t) 0xBADFACE;
29527 mbrtowc (&wc, NULL, 5, &state);
29528 /* Check that wc was not modified. */
29529 if (wc != (wchar_t) 0xBADFACE)
29535 if ac_fn_c_try_run "$LINENO"; then :
29536 gl_cv_func_mbrtowc_null_arg2=yes
29538 gl_cv_func_mbrtowc_null_arg2=no
29540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29541 conftest.$ac_objext conftest.beam conftest.$ac_ext
29547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
29548 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
29555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
29556 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
29557 if ${gl_cv_func_mbrtowc_retval+:} false; then :
29558 $as_echo_n "(cached) " >&6
29562 # Guess no on HP-UX, Solaris, native Windows.
29563 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
29564 # Guess yes otherwise.
29565 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
29567 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
29568 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
29569 if test "$cross_compiling" = yes; then :
29572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29573 /* end confdefs.h. */
29575 #include <locale.h>
29576 #include <string.h>
29577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29579 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29580 included before <wchar.h>. */
29581 #include <stddef.h>
29588 int found_some_locale = 0;
29589 /* This fails on Solaris. */
29590 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
29592 char input[] = "B\303\274\303\237er"; /* "Büßer" */
29596 memset (&state, '\0', sizeof (mbstate_t));
29597 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29600 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
29603 found_some_locale = 1;
29605 /* This fails on HP-UX 11.11. */
29606 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29608 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29612 memset (&state, '\0', sizeof (mbstate_t));
29613 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29616 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
29619 found_some_locale = 1;
29621 /* This fails on native Windows. */
29622 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
29624 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
29628 memset (&state, '\0', sizeof (mbstate_t));
29629 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29632 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29635 found_some_locale = 1;
29637 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
29639 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
29643 memset (&state, '\0', sizeof (mbstate_t));
29644 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29647 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29650 found_some_locale = 1;
29652 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
29654 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
29658 memset (&state, '\0', sizeof (mbstate_t));
29659 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
29662 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
29665 found_some_locale = 1;
29667 return (found_some_locale ? result : 77);
29670 if ac_fn_c_try_run "$LINENO"; then :
29671 gl_cv_func_mbrtowc_retval=yes
29673 if test $? != 77; then
29674 gl_cv_func_mbrtowc_retval=no
29678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29679 conftest.$ac_objext conftest.beam conftest.$ac_ext
29685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
29686 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
29691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
29692 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
29693 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
29694 $as_echo_n "(cached) " >&6
29698 # Guess no on Solaris 8 and 9.
29699 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
29700 # Guess yes otherwise.
29701 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
29703 if test $LOCALE_ZH_CN != none; then
29704 if test "$cross_compiling" = yes; then :
29707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29708 /* end confdefs.h. */
29710 #include <locale.h>
29711 #include <string.h>
29712 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29714 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29715 included before <wchar.h>. */
29716 #include <stddef.h>
29722 /* This fails on Solaris 8 and 9. */
29723 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29728 memset (&state, '\0', sizeof (mbstate_t));
29729 if (mbrtowc (&wc, "", 1, &state) != 0)
29735 if ac_fn_c_try_run "$LINENO"; then :
29736 gl_cv_func_mbrtowc_nul_retval=yes
29738 gl_cv_func_mbrtowc_nul_retval=no
29740 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29741 conftest.$ac_objext conftest.beam conftest.$ac_ext
29747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
29748 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
29750 case "$gl_cv_func_mbrtowc_null_arg1" in
29753 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
29758 case "$gl_cv_func_mbrtowc_null_arg2" in
29761 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
29766 case "$gl_cv_func_mbrtowc_retval" in
29769 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
29774 case "$gl_cv_func_mbrtowc_nul_retval" in
29777 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
29785 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
29794 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
29811 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
29820 GNULIB_MBSCASESTR=1
29826 $as_echo "#define GNULIB_TEST_MBSCASESTR 1" >>confdefs.h
29853 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
29857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
29858 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
29859 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
29860 $as_echo_n "(cached) " >&6
29864 # Guess no on AIX and OSF/1.
29865 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
29866 # Guess yes otherwise.
29867 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
29869 if test $LOCALE_JA != none; then
29870 if test "$cross_compiling" = yes; then :
29873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29874 /* end confdefs.h. */
29876 #include <locale.h>
29877 #include <string.h>
29878 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29880 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29881 included before <wchar.h>. */
29882 #include <stddef.h>
29888 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
29890 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
29894 memset (&state, '\0', sizeof (mbstate_t));
29895 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
29896 if (mbsinit (&state))
29902 if ac_fn_c_try_run "$LINENO"; then :
29903 gl_cv_func_mbrtowc_incomplete_state=yes
29905 gl_cv_func_mbrtowc_incomplete_state=no
29907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29908 conftest.$ac_objext conftest.beam conftest.$ac_ext
29914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
29915 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
29920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
29921 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
29922 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
29923 $as_echo_n "(cached) " >&6
29927 # Guess no on Solaris 8.
29928 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
29929 # Guess yes otherwise.
29930 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
29932 if test $LOCALE_ZH_CN != none; then
29933 if test "$cross_compiling" = yes; then :
29936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29937 /* end confdefs.h. */
29939 #include <locale.h>
29940 #include <stdlib.h>
29941 #include <string.h>
29942 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
29944 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
29945 included before <wchar.h>. */
29946 #include <stddef.h>
29952 /* This fails on Solaris 8:
29953 mbrtowc returns 2, and sets wc to 0x00F0.
29954 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
29955 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
29957 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
29961 memset (&state, '\0', sizeof (mbstate_t));
29962 if (mbrtowc (&wc, input + 3, 6, &state) != 4
29963 && mbtowc (&wc, input + 3, 6) == 4)
29969 if ac_fn_c_try_run "$LINENO"; then :
29970 gl_cv_func_mbrtowc_sanitycheck=yes
29972 gl_cv_func_mbrtowc_sanitycheck=no
29974 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29975 conftest.$ac_objext conftest.beam conftest.$ac_ext
29981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
29982 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
29984 REPLACE_MBSTATE_T=0
29985 case "$gl_cv_func_mbrtowc_incomplete_state" in
29987 *) REPLACE_MBSTATE_T=1 ;;
29989 case "$gl_cv_func_mbrtowc_sanitycheck" in
29991 *) REPLACE_MBSTATE_T=1 ;;
29994 REPLACE_MBSTATE_T=1
30005 if test $ac_cv_func_mbsinit = no; then
30007 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
30008 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30010 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30011 included before <wchar.h>. */
30012 #include <stddef.h>
30018 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
30024 cat >>confdefs.h <<_ACEOF
30025 #define HAVE_DECL_MBSINIT $ac_have_decl
30028 if test $ac_cv_have_decl_mbsinit = yes; then
30032 if test $REPLACE_MBSTATE_T = 1; then
30036 mingw*) REPLACE_MBSINIT=1 ;;
30041 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
30050 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
30067 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
30080 if test $ac_cv_func_mbslen = yes; then
30097 $as_echo "#define GNULIB_TEST_MBSLEN 1" >>confdefs.h
30123 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
30127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
30128 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
30129 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
30130 $as_echo_n "(cached) " >&6
30134 # Guess no on AIX and OSF/1.
30135 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
30136 # Guess yes otherwise.
30137 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
30139 if test $LOCALE_JA != none; then
30140 if test "$cross_compiling" = yes; then :
30143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30144 /* end confdefs.h. */
30146 #include <locale.h>
30147 #include <string.h>
30148 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30150 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30151 included before <wchar.h>. */
30152 #include <stddef.h>
30158 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30160 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
30164 memset (&state, '\0', sizeof (mbstate_t));
30165 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
30166 if (mbsinit (&state))
30172 if ac_fn_c_try_run "$LINENO"; then :
30173 gl_cv_func_mbrtowc_incomplete_state=yes
30175 gl_cv_func_mbrtowc_incomplete_state=no
30177 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30178 conftest.$ac_objext conftest.beam conftest.$ac_ext
30184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
30185 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
30190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
30191 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
30192 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
30193 $as_echo_n "(cached) " >&6
30197 # Guess no on Solaris 8.
30198 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
30199 # Guess yes otherwise.
30200 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
30202 if test $LOCALE_ZH_CN != none; then
30203 if test "$cross_compiling" = yes; then :
30206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30207 /* end confdefs.h. */
30209 #include <locale.h>
30210 #include <stdlib.h>
30211 #include <string.h>
30212 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30214 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30215 included before <wchar.h>. */
30216 #include <stddef.h>
30222 /* This fails on Solaris 8:
30223 mbrtowc returns 2, and sets wc to 0x00F0.
30224 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
30225 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30227 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
30231 memset (&state, '\0', sizeof (mbstate_t));
30232 if (mbrtowc (&wc, input + 3, 6, &state) != 4
30233 && mbtowc (&wc, input + 3, 6) == 4)
30239 if ac_fn_c_try_run "$LINENO"; then :
30240 gl_cv_func_mbrtowc_sanitycheck=yes
30242 gl_cv_func_mbrtowc_sanitycheck=no
30244 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30245 conftest.$ac_objext conftest.beam conftest.$ac_ext
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
30252 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
30254 REPLACE_MBSTATE_T=0
30255 case "$gl_cv_func_mbrtowc_incomplete_state" in
30257 *) REPLACE_MBSTATE_T=1 ;;
30259 case "$gl_cv_func_mbrtowc_sanitycheck" in
30261 *) REPLACE_MBSTATE_T=1 ;;
30264 REPLACE_MBSTATE_T=1
30275 if test $ac_cv_func_mbsrtowcs = no; then
30277 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
30278 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30280 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30281 included before <wchar.h>. */
30282 #include <stddef.h>
30288 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
30294 cat >>confdefs.h <<_ACEOF
30295 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
30298 if test $ac_cv_have_decl_mbsrtowcs = yes; then
30299 REPLACE_MBSRTOWCS=1
30302 if test $REPLACE_MBSTATE_T = 1; then
30303 REPLACE_MBSRTOWCS=1
30311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
30312 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
30313 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
30314 $as_echo_n "(cached) " >&6
30318 # Guess no on HP-UX, Solaris, mingw.
30319 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
30320 # Guess yes otherwise.
30321 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
30323 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
30324 if test "$cross_compiling" = yes; then :
30327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30328 /* end confdefs.h. */
30330 #include <locale.h>
30331 #include <string.h>
30332 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
30334 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
30335 included before <wchar.h>. */
30336 #include <stddef.h>
30343 /* Test whether the function supports a NULL destination argument.
30344 This fails on native Windows. */
30345 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
30347 const char input[] = "\337er";
30348 const char *src = input;
30351 memset (&state, '\0', sizeof (mbstate_t));
30352 if (mbsrtowcs (NULL, &src, 1, &state) != 3
30356 /* Test whether the function works when started with a conversion state
30357 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
30358 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
30360 const char input[] = "B\303\274\303\237er";
30363 memset (&state, '\0', sizeof (mbstate_t));
30364 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30365 if (!mbsinit (&state))
30367 const char *src = input + 2;
30368 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30372 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
30374 const char input[] = "<\306\374\313\334\270\354>";
30377 memset (&state, '\0', sizeof (mbstate_t));
30378 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
30379 if (!mbsinit (&state))
30381 const char *src = input + 4;
30382 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
30386 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
30388 const char input[] = "B\250\271\201\060\211\070er";
30391 memset (&state, '\0', sizeof (mbstate_t));
30392 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
30393 if (!mbsinit (&state))
30395 const char *src = input + 2;
30396 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
30403 if ac_fn_c_try_run "$LINENO"; then :
30404 gl_cv_func_mbsrtowcs_works=yes
30406 gl_cv_func_mbsrtowcs_works=no
30408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30409 conftest.$ac_objext conftest.beam conftest.$ac_ext
30415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
30416 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
30418 case "$gl_cv_func_mbsrtowcs_works" in
30420 *) REPLACE_MBSRTOWCS=1 ;;
30425 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
30434 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
30444 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
30461 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
30476 $as_echo "#define GNULIB_TEST_MBSSTR 1" >>confdefs.h
30487 if test $REPLACE_MBTOWC = 1; then
30496 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
30513 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
30522 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
30531 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
30534 for ac_header in bp-sym.h
30536 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
30537 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
30538 cat >>confdefs.h <<_ACEOF
30539 #define HAVE_BP_SYM_H 1
30559 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
30569 for ac_func in mempcpy
30571 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
30572 if test "x$ac_cv_func_mempcpy" = xyes; then :
30573 cat >>confdefs.h <<_ACEOF
30574 #define HAVE_MEMPCPY 1
30580 if test $ac_cv_func_mempcpy = no; then
30584 if test $HAVE_MEMPCPY = 0; then
30593 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
30610 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
30625 if test $ac_cv_have_decl_memrchr = no; then
30626 HAVE_DECL_MEMRCHR=0
30629 for ac_func in memrchr
30631 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
30632 if test "x$ac_cv_func_memrchr" = xyes; then :
30633 cat >>confdefs.h <<_ACEOF
30634 #define HAVE_MEMRCHR 1
30641 if test $ac_cv_func_memrchr = no; then
30650 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
30665 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
30687 if test $APPLE_UNIVERSAL_BUILD = 1; then
30688 # A universal build on Apple Mac OS X platforms.
30689 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
30690 # But we need a configuration result that is valid in both modes.
30691 gl_cv_func_working_mktime=no
30693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
30694 $as_echo_n "checking for working mktime... " >&6; }
30695 if ${gl_cv_func_working_mktime+:} false; then :
30696 $as_echo_n "(cached) " >&6
30698 if test "$cross_compiling" = yes; then :
30699 gl_cv_func_working_mktime=no
30701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30702 /* end confdefs.h. */
30703 /* Test program from Paul Eggert and Tony Leneis. */
30704 #include <limits.h>
30705 #include <stdlib.h>
30708 #ifdef HAVE_UNISTD_H
30709 # include <unistd.h>
30712 #if HAVE_DECL_ALARM
30713 # include <signal.h>
30716 /* Work around redefinition to rpl_putenv by other config tests. */
30719 static time_t time_t_max;
30720 static time_t time_t_min;
30722 /* Values we'll use to set the TZ environment variable. */
30723 static char *tz_strings[] = {
30724 (char *) 0, "TZ=GMT0", "TZ=JST-9",
30725 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
30727 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
30729 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
30730 Based on a problem report from Andreas Jaeger. */
30732 spring_forward_gap ()
30734 /* glibc (up to about 1998-10-07) failed this test. */
30737 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30738 instead of "TZ=America/Vancouver" in order to detect the bug even
30739 on systems that don't support the Olson extension, or don't have the
30740 full zoneinfo tables installed. */
30741 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30750 return mktime (&tm) != (time_t) -1;
30754 mktime_test1 (time_t now)
30757 return ! (lt = localtime (&now)) || mktime (lt) == now;
30761 mktime_test (time_t now)
30763 return (mktime_test1 (now)
30764 && mktime_test1 ((time_t) (time_t_max - now))
30765 && mktime_test1 ((time_t) (time_t_min + now)));
30771 /* Based on code from Ariel Faigon. */
30781 return tm.tm_mon == 2 && tm.tm_mday == 31;
30785 bigtime_test (int j)
30789 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
30790 now = mktime (&tm);
30791 if (now != (time_t) -1)
30793 struct tm *lt = localtime (&now);
30795 && lt->tm_year == tm.tm_year
30796 && lt->tm_mon == tm.tm_mon
30797 && lt->tm_mday == tm.tm_mday
30798 && lt->tm_hour == tm.tm_hour
30799 && lt->tm_min == tm.tm_min
30800 && lt->tm_sec == tm.tm_sec
30801 && lt->tm_yday == tm.tm_yday
30802 && lt->tm_wday == tm.tm_wday
30803 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
30804 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
30813 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
30814 ignoring leap seconds. */
30815 unsigned long int answer = 2527315200UL;
30819 tm.tm_year = 2050 - 1900;
30822 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
30825 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
30826 instead of "TZ=America/Vancouver" in order to detect the bug even
30827 on systems that don't support the Olson extension, or don't have the
30828 full zoneinfo tables installed. */
30829 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
30833 /* Check that the result is either a failure, or close enough
30834 to the correct answer that we can assume the discrepancy is
30835 due to leap seconds. */
30836 return (t == (time_t) -1
30837 || (0 < t && answer - 120 <= t && t <= answer + 120));
30846 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
30847 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
30849 #if HAVE_DECL_ALARM
30850 /* This test makes some buggy mktime implementations loop.
30851 Give up after 60 seconds; a mktime slower than that
30852 isn't worth using anyway. */
30853 signal (SIGALRM, SIG_DFL);
30857 time_t_max = (! time_t_signed
30859 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
30861 time_t_min = (! time_t_signed
30863 : time_t_signed_magnitude
30867 delta = time_t_max / 997; /* a suitable prime number */
30868 for (i = 0; i < N_STRINGS; i++)
30871 putenv (tz_strings[i]);
30873 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
30874 if (! mktime_test (t))
30876 if ((result & 2) == 0
30877 && ! (mktime_test ((time_t) 1)
30878 && mktime_test ((time_t) (60 * 60))
30879 && mktime_test ((time_t) (60 * 60 * 24))))
30882 for (j = 1; (result & 4) == 0; j <<= 1)
30884 if (! bigtime_test (j))
30886 if (INT_MAX / 2 < j)
30889 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
30892 if (! irix_6_4_bug ())
30894 if (! spring_forward_gap ())
30896 if (! year_2050_test ())
30901 if ac_fn_c_try_run "$LINENO"; then :
30902 gl_cv_func_working_mktime=yes
30904 gl_cv_func_working_mktime=no
30906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30907 conftest.$ac_objext conftest.beam conftest.$ac_ext
30912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
30913 $as_echo "$gl_cv_func_working_mktime" >&6; }
30915 if test $gl_cv_func_working_mktime = no; then
30921 if test $REPLACE_MKTIME = 1; then
30930 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
30945 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
30961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used without linking with libm" >&5
30962 $as_echo_n "checking whether modf can be used without linking with libm... " >&6; }
30963 if ${gl_cv_func_modf_no_libm+:} false; then :
30964 $as_echo_n "(cached) " >&6
30967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30968 /* end confdefs.h. */
30969 #ifndef __NO_MATH_INLINES
30970 # define __NO_MATH_INLINES 1 /* for glibc */
30974 double (*funcptr) (double, double *) = modf;
30982 double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret);
30984 return y < 0.3 || y > 1.7;
30990 if ac_fn_c_try_link "$LINENO"; then :
30991 gl_cv_func_modf_no_libm=yes
30993 gl_cv_func_modf_no_libm=no
30995 rm -f core conftest.err conftest.$ac_objext \
30996 conftest$ac_exeext conftest.$ac_ext
30999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_no_libm" >&5
31000 $as_echo "$gl_cv_func_modf_no_libm" >&6; }
31001 if test $gl_cv_func_modf_no_libm = no; then
31002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modf can be used with libm" >&5
31003 $as_echo_n "checking whether modf can be used with libm... " >&6; }
31004 if ${gl_cv_func_modf_in_libm+:} false; then :
31005 $as_echo_n "(cached) " >&6
31010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31011 /* end confdefs.h. */
31012 #ifndef __NO_MATH_INLINES
31013 # define __NO_MATH_INLINES 1 /* for glibc */
31017 double (*funcptr) (double, double *) = modf;
31025 double y = funcptr (1.6180339887, &d_ret) + modf (1.6180339887, &d_ret);
31027 return y < 0.3 || y > 1.7;
31033 if ac_fn_c_try_link "$LINENO"; then :
31034 gl_cv_func_modf_in_libm=yes
31036 gl_cv_func_modf_in_libm=no
31038 rm -f core conftest.err conftest.$ac_objext \
31039 conftest$ac_exeext conftest.$ac_ext
31043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_modf_in_libm" >&5
31044 $as_echo "$gl_cv_func_modf_in_libm" >&6; }
31045 if test $gl_cv_func_modf_in_libm = yes; then
31056 if test $REPLACE_MODF = 1; then
31058 MODF_LIBM="$TRUNC_LIBM"
31061 if test $REPLACE_MODF = 1; then
31070 gl_LIBOBJS="$gl_LIBOBJS modf.$ac_objext"
31084 $as_echo "#define GNULIB_TEST_MODF 1" >>confdefs.h
31090 for ac_func in listmntent getmntinfo
31092 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31093 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31094 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31095 cat >>confdefs.h <<_ACEOF
31096 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31113 # We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses
31114 # NGROUPS (as the array dimension for a struct member) without a definition.
31115 for ac_header in sys/ucred.h
31117 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "#include <grp.h>
31119 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
31120 cat >>confdefs.h <<_ACEOF
31121 #define HAVE_SYS_UCRED_H 1
31129 for ac_header in sys/mount.h
31131 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "$ac_includes_default
31132 #if HAVE_SYS_PARAM_H
31133 #include <sys/param.h>
31136 if test "x$ac_cv_header_sys_mount_h" = xyes; then :
31137 cat >>confdefs.h <<_ACEOF
31138 #define HAVE_SYS_MOUNT_H 1
31146 for ac_header in mntent.h sys/fs_types.h
31148 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
31149 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
31150 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
31151 cat >>confdefs.h <<_ACEOF
31152 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
31159 getfsstat_includes="\
31160 $ac_includes_default
31161 #if HAVE_SYS_PARAM_H
31162 # include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */
31164 #if HAVE_SYS_UCRED_H
31165 # include <grp.h> /* needed for definition of NGROUPS */
31166 # include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */
31168 #if HAVE_SYS_MOUNT_H
31169 # include <sys/mount.h>
31171 #if HAVE_SYS_FS_TYPES_H
31172 # include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */
31175 ac_fn_c_check_member "$LINENO" "struct fsstat" "f_fstypename" "ac_cv_member_struct_fsstat_f_fstypename" "$getfsstat_includes
31177 if test "x$ac_cv_member_struct_fsstat_f_fstypename" = xyes; then :
31179 cat >>confdefs.h <<_ACEOF
31180 #define HAVE_STRUCT_FSSTAT_F_FSTYPENAME 1
31187 # Determine how to get the list of mounted file systems.
31188 ac_list_mounted_fs=
31190 # If the getmntent function is available but not in the standard library,
31191 # make sure LIBS contains the appropriate -l option.
31192 # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
31193 # -lseq on Dynix/PTX, -lgen on Unixware.
31194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
31195 $as_echo_n "checking for library containing getmntent... " >&6; }
31196 if ${ac_cv_search_getmntent+:} false; then :
31197 $as_echo_n "(cached) " >&6
31199 ac_func_search_save_LIBS=$LIBS
31200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31201 /* end confdefs.h. */
31203 /* Override any GCC internal prototype to avoid an error.
31204 Use char because int might match the return type of a GCC
31205 builtin and then its argument prototype would still apply. */
31213 return getmntent ();
31218 for ac_lib in '' sun seq gen; do
31219 if test -z "$ac_lib"; then
31220 ac_res="none required"
31223 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
31225 if ac_fn_c_try_link "$LINENO"; then :
31226 ac_cv_search_getmntent=$ac_res
31228 rm -f core conftest.err conftest.$ac_objext \
31230 if ${ac_cv_search_getmntent+:} false; then :
31234 if ${ac_cv_search_getmntent+:} false; then :
31237 ac_cv_search_getmntent=no
31239 rm conftest.$ac_ext
31240 LIBS=$ac_func_search_save_LIBS
31242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
31243 $as_echo "$ac_cv_search_getmntent" >&6; }
31244 ac_res=$ac_cv_search_getmntent
31245 if test "$ac_res" != no; then :
31246 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
31250 for ac_func in getmntent
31252 ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
31253 if test "x$ac_cv_func_getmntent" = xyes; then :
31254 cat >>confdefs.h <<_ACEOF
31255 #define HAVE_GETMNTENT 1
31263 # This test must precede the ones for getmntent because Unicos-9 is
31264 # reported to have the getmntent function, but its support is incompatible
31265 # with other getmntent implementations.
31267 # NOTE: Normally, I wouldn't use a check for system type as I've done for
31268 # 'CRAY' below since that goes against the whole autoconf philosophy. But
31269 # I think there is too great a chance that some non-Cray system has a
31270 # function named listmntent to risk the false positive.
31272 if test -z "$ac_list_mounted_fs"; then
31274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for listmntent of Cray/Unicos-9" >&5
31275 $as_echo_n "checking for listmntent of Cray/Unicos-9... " >&6; }
31276 if ${fu_cv_sys_mounted_cray_listmntent+:} false; then :
31277 $as_echo_n "(cached) " >&6
31279 fu_cv_sys_mounted_cray_listmntent=no
31280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31281 /* end confdefs.h. */
31287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31288 $EGREP "yes" >/dev/null 2>&1; then :
31289 test $ac_cv_func_listmntent = yes \
31290 && fu_cv_sys_mounted_cray_listmntent=yes
31299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_cray_listmntent" >&5
31300 $as_echo "$fu_cv_sys_mounted_cray_listmntent" >&6; }
31301 if test $fu_cv_sys_mounted_cray_listmntent = yes; then
31302 ac_list_mounted_fs=found
31304 $as_echo "#define MOUNTED_LISTMNTENT 1" >>confdefs.h
31309 if test -z "$ac_list_mounted_fs"; then
31311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mntctl function and struct vmount" >&5
31312 $as_echo_n "checking for mntctl function and struct vmount... " >&6; }
31313 if ${fu_cv_sys_mounted_vmount+:} false; then :
31314 $as_echo_n "(cached) " >&6
31316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31317 /* end confdefs.h. */
31318 #include <fshelp.h>
31320 if ac_fn_c_try_cpp "$LINENO"; then :
31321 fu_cv_sys_mounted_vmount=yes
31323 fu_cv_sys_mounted_vmount=no
31325 rm -f conftest.err conftest.i conftest.$ac_ext
31328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_vmount" >&5
31329 $as_echo "$fu_cv_sys_mounted_vmount" >&6; }
31330 if test $fu_cv_sys_mounted_vmount = yes; then
31331 ac_list_mounted_fs=found
31333 $as_echo "#define MOUNTED_VMOUNT 1" >>confdefs.h
31338 if test $ac_cv_func_getmntent = yes; then
31340 # This system has the getmntent function.
31341 # Determine whether it's the one-argument variant or the two-argument one.
31343 if test -z "$ac_list_mounted_fs"; then
31344 # 4.3BSD, SunOS, HP-UX, Dynix, Irix
31345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for one-argument getmntent function" >&5
31346 $as_echo_n "checking for one-argument getmntent function... " >&6; }
31347 if ${fu_cv_sys_mounted_getmntent1+:} false; then :
31348 $as_echo_n "(cached) " >&6
31350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31351 /* end confdefs.h. */
31353 /* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */
31356 #include <mntent.h>
31357 #if !defined MOUNTED
31358 # if defined _PATH_MOUNTED /* GNU libc */
31359 # define MOUNTED _PATH_MOUNTED
31361 # if defined MNT_MNTTAB /* HP-UX. */
31362 # define MOUNTED MNT_MNTTAB
31364 # if defined MNTTABNAME /* Dynix. */
31365 # define MOUNTED MNTTABNAME
31372 struct mntent *mnt = 0; char *table = MOUNTED;
31373 if (sizeof mnt && sizeof table) return 0;
31378 if ac_fn_c_try_compile "$LINENO"; then :
31379 fu_cv_sys_mounted_getmntent1=yes
31381 fu_cv_sys_mounted_getmntent1=no
31383 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent1" >&5
31387 $as_echo "$fu_cv_sys_mounted_getmntent1" >&6; }
31388 if test $fu_cv_sys_mounted_getmntent1 = yes; then
31389 ac_list_mounted_fs=found
31391 $as_echo "#define MOUNTED_GETMNTENT1 1" >>confdefs.h
31396 if test -z "$ac_list_mounted_fs"; then
31398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for two-argument getmntent function" >&5
31399 $as_echo_n "checking for two-argument getmntent function... " >&6; }
31400 if ${fu_cv_sys_mounted_getmntent2+:} false; then :
31401 $as_echo_n "(cached) " >&6
31403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31404 /* end confdefs.h. */
31405 #include <sys/mnttab.h>
31408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31409 $EGREP "getmntent" >/dev/null 2>&1; then :
31410 fu_cv_sys_mounted_getmntent2=yes
31412 fu_cv_sys_mounted_getmntent2=no
31418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntent2" >&5
31419 $as_echo "$fu_cv_sys_mounted_getmntent2" >&6; }
31420 if test $fu_cv_sys_mounted_getmntent2 = yes; then
31421 ac_list_mounted_fs=found
31423 $as_echo "#define MOUNTED_GETMNTENT2 1" >>confdefs.h
31425 for ac_func in hasmntopt
31427 ac_fn_c_check_func "$LINENO" "hasmntopt" "ac_cv_func_hasmntopt"
31428 if test "x$ac_cv_func_hasmntopt" = xyes; then :
31429 cat >>confdefs.h <<_ACEOF
31430 #define HAVE_HASMNTOPT 1
31441 if test -z "$ac_list_mounted_fs"; then
31442 # DEC Alpha running OSF/1, and Apple Darwin 1.3.
31443 # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
31445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getfsstat function" >&5
31446 $as_echo_n "checking for getfsstat function... " >&6; }
31447 if ${fu_cv_sys_mounted_getfsstat+:} false; then :
31448 $as_echo_n "(cached) " >&6
31450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31451 /* end confdefs.h. */
31453 #include <sys/types.h>
31454 #if HAVE_STRUCT_FSSTAT_F_FSTYPENAME
31455 # define FS_TYPE(Ent) ((Ent).f_fstypename)
31457 # define FS_TYPE(Ent) mnt_names[(Ent).f_type]
31459 $getfsstat_includes
31464 struct statfs *stats;
31465 int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT);
31466 char *t = FS_TYPE (*stats);
31471 if ac_fn_c_try_link "$LINENO"; then :
31472 fu_cv_sys_mounted_getfsstat=yes
31474 fu_cv_sys_mounted_getfsstat=no
31476 rm -f core conftest.err conftest.$ac_objext \
31477 conftest$ac_exeext conftest.$ac_ext
31480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getfsstat" >&5
31481 $as_echo "$fu_cv_sys_mounted_getfsstat" >&6; }
31482 if test $fu_cv_sys_mounted_getfsstat = yes; then
31483 ac_list_mounted_fs=found
31485 $as_echo "#define MOUNTED_GETFSSTAT 1" >>confdefs.h
31490 if test -z "$ac_list_mounted_fs"; then
31492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIXME existence of three headers" >&5
31493 $as_echo_n "checking for FIXME existence of three headers... " >&6; }
31494 if ${fu_cv_sys_mounted_fread_fstyp+:} false; then :
31495 $as_echo_n "(cached) " >&6
31497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31498 /* end confdefs.h. */
31500 #include <sys/statfs.h>
31501 #include <sys/fstyp.h>
31502 #include <mnttab.h>
31504 if ac_fn_c_try_cpp "$LINENO"; then :
31505 fu_cv_sys_mounted_fread_fstyp=yes
31507 fu_cv_sys_mounted_fread_fstyp=no
31509 rm -f conftest.err conftest.i conftest.$ac_ext
31512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread_fstyp" >&5
31513 $as_echo "$fu_cv_sys_mounted_fread_fstyp" >&6; }
31514 if test $fu_cv_sys_mounted_fread_fstyp = yes; then
31515 ac_list_mounted_fs=found
31517 $as_echo "#define MOUNTED_FREAD_FSTYP 1" >>confdefs.h
31522 if test -z "$ac_list_mounted_fs"; then
31523 # 4.4BSD and DEC OSF/1.
31524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmntinfo function" >&5
31525 $as_echo_n "checking for getmntinfo function... " >&6; }
31526 if ${fu_cv_sys_mounted_getmntinfo+:} false; then :
31527 $as_echo_n "(cached) " >&6
31530 test "$ac_cv_func_getmntinfo" = yes \
31531 && fu_cv_sys_mounted_getmntinfo=yes \
31532 || fu_cv_sys_mounted_getmntinfo=no
31536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo" >&5
31537 $as_echo "$fu_cv_sys_mounted_getmntinfo" >&6; }
31538 if test $fu_cv_sys_mounted_getmntinfo = yes; then
31539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getmntinfo returns statvfs structures" >&5
31540 $as_echo_n "checking whether getmntinfo returns statvfs structures... " >&6; }
31541 if ${fu_cv_sys_mounted_getmntinfo2+:} false; then :
31542 $as_echo_n "(cached) " >&6
31545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31546 /* end confdefs.h. */
31548 #if HAVE_SYS_PARAM_H
31549 # include <sys/param.h>
31551 #include <sys/types.h>
31552 #if HAVE_SYS_MOUNT_H
31553 # include <sys/mount.h>
31555 #if HAVE_SYS_STATVFS_H
31556 # include <sys/statvfs.h>
31562 int getmntinfo (struct statfs **, int);
31572 if ac_fn_c_try_compile "$LINENO"; then :
31573 fu_cv_sys_mounted_getmntinfo2=no
31575 fu_cv_sys_mounted_getmntinfo2=yes
31577 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmntinfo2" >&5
31582 $as_echo "$fu_cv_sys_mounted_getmntinfo2" >&6; }
31583 if test $fu_cv_sys_mounted_getmntinfo2 = no; then
31584 ac_list_mounted_fs=found
31586 $as_echo "#define MOUNTED_GETMNTINFO 1" >>confdefs.h
31589 ac_list_mounted_fs=found
31591 $as_echo "#define MOUNTED_GETMNTINFO2 1" >>confdefs.h
31597 if test -z "$ac_list_mounted_fs"; then
31599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmnt function" >&5
31600 $as_echo_n "checking for getmnt function... " >&6; }
31601 if ${fu_cv_sys_mounted_getmnt+:} false; then :
31602 $as_echo_n "(cached) " >&6
31604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31605 /* end confdefs.h. */
31607 #include <sys/fs_types.h>
31608 #include <sys/mount.h>
31610 if ac_fn_c_try_cpp "$LINENO"; then :
31611 fu_cv_sys_mounted_getmnt=yes
31613 fu_cv_sys_mounted_getmnt=no
31615 rm -f conftest.err conftest.i conftest.$ac_ext
31618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_getmnt" >&5
31619 $as_echo "$fu_cv_sys_mounted_getmnt" >&6; }
31620 if test $fu_cv_sys_mounted_getmnt = yes; then
31621 ac_list_mounted_fs=found
31623 $as_echo "#define MOUNTED_GETMNT 1" >>confdefs.h
31628 if test -z "$ac_list_mounted_fs"; then
31630 for ac_func in next_dev fs_stat_dev
31632 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
31633 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
31634 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
31635 cat >>confdefs.h <<_ACEOF
31636 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
31642 for ac_header in fs_info.h
31644 ac_fn_c_check_header_mongrel "$LINENO" "fs_info.h" "ac_cv_header_fs_info_h" "$ac_includes_default"
31645 if test "x$ac_cv_header_fs_info_h" = xyes; then :
31646 cat >>confdefs.h <<_ACEOF
31647 #define HAVE_FS_INFO_H 1
31654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BEOS mounted file system support functions" >&5
31655 $as_echo_n "checking for BEOS mounted file system support functions... " >&6; }
31656 if test $ac_cv_header_fs_info_h = yes \
31657 && test $ac_cv_func_next_dev = yes \
31658 && test $ac_cv_func_fs_stat_dev = yes; then
31663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_result" >&5
31664 $as_echo "$fu_result" >&6; }
31665 if test $fu_result = yes; then
31666 ac_list_mounted_fs=found
31668 $as_echo "#define MOUNTED_FS_STAT_DEV 1" >>confdefs.h
31673 if test -z "$ac_list_mounted_fs"; then
31675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to resort to fread on /etc/mnttab" >&5
31676 $as_echo_n "checking whether it is possible to resort to fread on /etc/mnttab... " >&6; }
31677 if ${fu_cv_sys_mounted_fread+:} false; then :
31678 $as_echo_n "(cached) " >&6
31680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31681 /* end confdefs.h. */
31682 #include <mnttab.h>
31684 if ac_fn_c_try_cpp "$LINENO"; then :
31685 fu_cv_sys_mounted_fread=yes
31687 fu_cv_sys_mounted_fread=no
31689 rm -f conftest.err conftest.i conftest.$ac_ext
31692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fu_cv_sys_mounted_fread" >&5
31693 $as_echo "$fu_cv_sys_mounted_fread" >&6; }
31694 if test $fu_cv_sys_mounted_fread = yes; then
31695 ac_list_mounted_fs=found
31697 $as_echo "#define MOUNTED_FREAD 1" >>confdefs.h
31702 if test -z "$ac_list_mounted_fs"; then
31703 # Interix / BSD alike statvfs
31704 # the code is really interix specific, so make sure, we're on it.
31707 for ac_func in statvfs
31709 ac_fn_c_check_func "$LINENO" "statvfs" "ac_cv_func_statvfs"
31710 if test "x$ac_cv_func_statvfs" = xyes; then :
31711 cat >>confdefs.h <<_ACEOF
31712 #define HAVE_STATVFS 1
31718 if test $ac_cv_func_statvfs = yes; then
31719 ac_list_mounted_fs=found
31721 $as_echo "#define MOUNTED_INTERIX_STATVFS 1" >>confdefs.h
31728 if test -z "$ac_list_mounted_fs"; then
31729 as_fn_error $? "could not determine how to read list of mounted file systems" "$LINENO" 5
31730 # FIXME -- no need to abort building the whole package
31731 # Can't build mountlist.c or anything that needs its functions
31734 if test $ac_list_mounted_fs = found; then :
31735 gl_cv_list_mounted_fs=yes
31737 gl_cv_list_mounted_fs=no
31742 if test $gl_cv_list_mounted_fs = yes; then
31751 gl_LIBOBJS="$gl_LIBOBJS mountlist.$ac_objext"
31754 for ac_header in sys/mntent.h
31756 ac_fn_c_check_header_mongrel "$LINENO" "sys/mntent.h" "ac_cv_header_sys_mntent_h" "$ac_includes_default"
31757 if test "x$ac_cv_header_sys_mntent_h" = xyes; then :
31758 cat >>confdefs.h <<_ACEOF
31759 #define HAVE_SYS_MNTENT_H 1
31767 ac_fn_c_check_member "$LINENO" "struct statfs" "f_fstypename" "ac_cv_member_struct_statfs_f_fstypename" "
31768 #include <sys/types.h>
31769 #include <sys/param.h>
31770 #include <sys/mount.h>
31773 if test "x$ac_cv_member_struct_statfs_f_fstypename" = xyes; then :
31775 cat >>confdefs.h <<_ACEOF
31776 #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1
31793 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
31794 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
31796 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
31799 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
31803 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31812 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
31818 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
31827 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
31841 if test $ac_cv_func_nl_langinfo = yes; then
31842 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
31843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
31844 $as_echo_n "checking whether YESEXPR works... " >&6; }
31845 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
31846 $as_echo_n "(cached) " >&6
31848 if test "$cross_compiling" = yes; then :
31851 # Guess no on irix systems.
31852 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
31853 # Guess yes elsewhere.
31854 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
31858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31859 /* end confdefs.h. */
31860 #include <langinfo.h>
31865 return !*nl_langinfo(YESEXPR);
31871 if ac_fn_c_try_run "$LINENO"; then :
31872 gl_cv_func_nl_langinfo_yesexpr_works=yes
31874 gl_cv_func_nl_langinfo_yesexpr_works=no
31876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31877 conftest.$ac_objext conftest.beam conftest.$ac_ext
31882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
31883 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
31884 case $gl_cv_func_nl_langinfo_yesexpr_works in
31885 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
31886 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
31889 cat >>confdefs.h <<_ACEOF
31890 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
31893 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
31894 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
31897 REPLACE_NL_LANGINFO=1
31899 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
31906 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
31915 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
31923 GNULIB_NL_LANGINFO=1
31929 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
31947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
31948 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
31949 if ${gl_cv_func_open_slash+:} false; then :
31950 $as_echo_n "(cached) " >&6
31952 # Assume that if we have lstat, we can also check symlinks.
31953 if test $ac_cv_func_lstat = yes; then
31955 ln -s conftest.tmp conftest.lnk
31957 if test "$cross_compiling" = yes; then :
31960 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
31961 gl_cv_func_open_slash="guessing no" ;;
31963 gl_cv_func_open_slash="guessing yes" ;;
31967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31968 /* end confdefs.h. */
31972 # include <unistd.h>
31978 if (open ("conftest.lnk/", O_RDONLY) != -1)
31981 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
31986 if ac_fn_c_try_run "$LINENO"; then :
31987 gl_cv_func_open_slash=yes
31989 gl_cv_func_open_slash=no
31991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31992 conftest.$ac_objext conftest.beam conftest.$ac_ext
31995 rm -f conftest.sl conftest.tmp conftest.lnk
31998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
31999 $as_echo "$gl_cv_func_open_slash" >&6; }
32000 case "$gl_cv_func_open_slash" in
32003 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
32011 if test $REPLACE_OPEN = 0; then
32021 if test $ac_cv_func_fchdir = no; then
32025 if test $HAVE_FCHDIR = 0; then
32032 if test $REPLACE_OPEN = 1; then
32041 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
32059 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
32074 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
32078 # Solaris 9 has *at functions, but uniformly mishandles trailing
32079 # slash in all of them.
32087 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
32096 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
32105 cat >>confdefs.h <<_ACEOF
32106 #define GNULIB_OPENAT 1
32120 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
32129 cat >>confdefs.h <<_ACEOF
32130 #define GNULIB_OPENAT_SAFER 1
32137 for ac_func in opendir
32139 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
32140 if test "x$ac_cv_func_opendir" = xyes; then :
32141 cat >>confdefs.h <<_ACEOF
32142 #define HAVE_OPENDIR 1
32148 if test $ac_cv_func_opendir = no; then
32161 if test $ac_cv_func_fchdir = no; then
32165 if test $HAVE_FCHDIR = 0; then
32166 if test $HAVE_OPENDIR = 1; then
32172 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
32181 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
32195 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
32205 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
32206 #include <$ac_cv_struct_tm>
32209 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
32211 cat >>confdefs.h <<_ACEOF
32212 #define HAVE_STRUCT_TM_TM_ZONE 1
32218 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
32220 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
32223 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
32225 if test "x$ac_cv_have_decl_tzname" = xyes; then :
32231 cat >>confdefs.h <<_ACEOF
32232 #define HAVE_DECL_TZNAME $ac_have_decl
32235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
32236 $as_echo_n "checking for tzname... " >&6; }
32237 if ${ac_cv_var_tzname+:} false; then :
32238 $as_echo_n "(cached) " >&6
32240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32241 /* end confdefs.h. */
32243 #if !HAVE_DECL_TZNAME
32244 extern char *tzname[];
32250 return tzname[0][0];
32255 if ac_fn_c_try_link "$LINENO"; then :
32256 ac_cv_var_tzname=yes
32258 ac_cv_var_tzname=no
32260 rm -f core conftest.err conftest.$ac_objext \
32261 conftest$ac_exeext conftest.$ac_ext
32263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
32264 $as_echo "$ac_cv_var_tzname" >&6; }
32265 if test $ac_cv_var_tzname = yes; then
32267 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
32274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32275 /* end confdefs.h. */
32277 #include <time.h> /* for time_t */
32278 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
32279 #define TYPE_MINIMUM(t) \
32280 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
32281 #define TYPE_MAXIMUM(t) \
32282 ((t) ((t) 0 < (t) -1 \
32284 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
32285 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
32286 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
32289 if ac_fn_c_try_compile "$LINENO"; then :
32291 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
32295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32311 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then
32314 case ${gl_cv_func_strerror_r_works-unset} in
32316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5
32317 $as_echo_n "checking whether perror matches strerror... " >&6; }
32318 if ${gl_cv_func_perror_works+:} false; then :
32319 $as_echo_n "(cached) " >&6
32321 if test "$cross_compiling" = yes; then :
32322 gl_cv_func_perror_works="guessing no"
32325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32326 /* end confdefs.h. */
32329 #include <stdlib.h>
32330 #include <string.h>
32335 char *str = strerror (-1);
32336 if (!getenv("CONFTEST_OUTPUT")) return 0;
32337 if (!str) str = "";
32347 if ac_fn_c_try_run "$LINENO"; then :
32348 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \
32349 && cmp conftest.txt1 conftest.txt2 >/dev/null; then
32350 gl_cv_func_perror_works=yes
32352 gl_cv_func_perror_works=no
32354 rm -rf conftest.txt1 conftest.txt2
32356 gl_cv_func_perror_works=no
32358 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32359 conftest.$ac_objext conftest.beam conftest.$ac_ext
32364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5
32365 $as_echo "$gl_cv_func_perror_works" >&6; }
32366 if test "$gl_cv_func_perror_works" != yes; then
32375 if test $REPLACE_PERROR = 1; then
32384 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext"
32398 $as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h
32402 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
32404 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
32410 cat >>confdefs.h <<_ACEOF
32411 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
32414 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
32416 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
32422 cat >>confdefs.h <<_ACEOF
32423 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
32435 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32440 if test $REPLACE_READ = 1; then
32449 gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
32464 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
32471 for ac_func in readdir
32473 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
32474 if test "x$ac_cv_func_readdir" = xyes; then :
32475 cat >>confdefs.h <<_ACEOF
32476 #define HAVE_READDIR 1
32482 if test $ac_cv_func_readdir = no; then
32486 if test $HAVE_READDIR = 0; then
32495 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
32509 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
32522 if test $ac_cv_func_readlink = no; then
32525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
32526 $as_echo_n "checking whether readlink signature is correct... " >&6; }
32527 if ${gl_cv_decl_readlink_works+:} false; then :
32528 $as_echo_n "(cached) " >&6
32530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32531 /* end confdefs.h. */
32532 #include <unistd.h>
32533 /* Cause compilation failure if original declaration has wrong type. */
32534 ssize_t readlink (const char *, char *, size_t);
32543 if ac_fn_c_try_compile "$LINENO"; then :
32544 gl_cv_decl_readlink_works=yes
32546 gl_cv_decl_readlink_works=no
32548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
32551 $as_echo "$gl_cv_decl_readlink_works" >&6; }
32552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
32553 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
32554 if ${gl_cv_func_readlink_works+:} false; then :
32555 $as_echo_n "(cached) " >&6
32557 # We have readlink, so assume ln -s works.
32558 ln -s conftest.no-such conftest.link
32559 ln -s conftest.link conftest.lnk2
32560 if test "$cross_compiling" = yes; then :
32562 # Guess yes on glibc systems.
32563 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
32564 # If we don't know, assume the worst.
32565 *) gl_cv_func_readlink_works="guessing no" ;;
32569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32570 /* end confdefs.h. */
32571 #include <unistd.h>
32577 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
32582 if ac_fn_c_try_run "$LINENO"; then :
32583 gl_cv_func_readlink_works=yes
32585 gl_cv_func_readlink_works=no
32587 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32588 conftest.$ac_objext conftest.beam conftest.$ac_ext
32591 rm -f conftest.link conftest.lnk2
32593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
32594 $as_echo "$gl_cv_func_readlink_works" >&6; }
32595 case "$gl_cv_func_readlink_works" in
32597 if test "$gl_cv_decl_readlink_works" != yes; then
32603 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
32610 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
32619 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
32636 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
32650 if test $ac_cv_func_readlinkat = no; then
32654 if test $HAVE_READLINKAT = 0; then
32663 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
32671 GNULIB_READLINKAT=1
32677 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
32684 for ac_header in stdlib.h
32686 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
32687 if test "x$ac_cv_header_stdlib_h" = xyes; then :
32688 cat >>confdefs.h <<_ACEOF
32689 #define HAVE_STDLIB_H 1
32696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
32697 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
32698 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
32699 $as_echo_n "(cached) " >&6
32701 if test "$cross_compiling" = yes; then :
32703 # Guess yes on platforms where we know the result.
32704 *-gnu* | freebsd* | netbsd* | openbsd* \
32705 | hpux* | solaris* | cygwin* | mingw*)
32706 ac_cv_func_realloc_0_nonnull=yes ;;
32707 # If we don't know, assume the worst.
32708 *) ac_cv_func_realloc_0_nonnull=no ;;
32712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32713 /* end confdefs.h. */
32714 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
32715 # include <stdlib.h>
32723 return ! realloc (0, 0);
32729 if ac_fn_c_try_run "$LINENO"; then :
32730 ac_cv_func_realloc_0_nonnull=yes
32732 ac_cv_func_realloc_0_nonnull=no
32734 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32735 conftest.$ac_objext conftest.beam conftest.$ac_ext
32740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
32741 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
32742 if test $ac_cv_func_realloc_0_nonnull = yes; then :
32744 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
32747 $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
32754 if test $REPLACE_REALLOC = 1; then
32763 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32768 cat >>confdefs.h <<_ACEOF
32769 #define GNULIB_REALLOC_GNU 1
32776 if test $gl_cv_func_malloc_posix = yes; then
32778 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
32784 if test $REPLACE_REALLOC = 1; then
32793 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
32801 GNULIB_REALLOC_POSIX=1
32807 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
32813 # Check whether --with-included-regex was given.
32814 if test "${with_included_regex+set}" = set; then :
32815 withval=$with_included_regex;
32819 case $with_included_regex in #(
32820 yes|no) ac_use_included_regex=$with_included_regex
32823 # If the system regex support is good enough that it passes the
32824 # following run test, then default to *not* using the included regex.c.
32825 # If cross compiling, assume the test would fail and use the included
32841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
32842 $as_echo_n "checking for working re_compile_pattern... " >&6; }
32843 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
32844 $as_echo_n "(cached) " >&6
32846 if test "$cross_compiling" = yes; then :
32847 gl_cv_func_re_compile_pattern_working=no
32849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32850 /* end confdefs.h. */
32853 #include <locale.h>
32854 #include <limits.h>
32855 #include <string.h>
32857 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
32858 # include <signal.h>
32859 # include <unistd.h>
32863 # include <malloc.h>
32866 #ifdef M_CHECK_ACTION
32867 /* Exit with distinguishable exit code. */
32868 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
32875 static struct re_pattern_buffer regex;
32876 unsigned char folded_chars[UCHAR_MAX + 1];
32879 struct re_registers regs;
32881 /* Some builds of glibc go into an infinite loop on this
32882 test. Use alarm to force death, and mallopt to avoid
32883 malloc recursion in diagnosing the corrupted heap. */
32884 #if HAVE_DECL_ALARM
32885 signal (SIGALRM, SIG_DFL);
32888 #ifdef M_CHECK_ACTION
32889 signal (SIGABRT, sigabrt_no_core);
32890 mallopt (M_CHECK_ACTION, 2);
32893 if (setlocale (LC_ALL, "en_US.UTF-8"))
32896 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
32897 This test needs valgrind to catch the bug on Debian
32898 GNU/Linux 3.1 x86, but it might catch the bug better
32899 on other platforms and it shouldn't hurt to try the
32901 static char const pat[] = "insert into";
32902 static char const data[] =
32903 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
32904 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
32906 memset (®ex, 0, sizeof regex);
32907 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
32910 else if (re_search (®ex, data, sizeof data - 1,
32911 0, sizeof data - 1, ®s)
32917 /* This test is from glibc bug 15078.
32918 The test case is from Andreas Schwab in
32919 <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
32921 static char const pat[] = "[^x]x";
32922 static char const data[] =
32923 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
32934 memset (®ex, 0, sizeof regex);
32935 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
32940 i = re_search (®ex, data, sizeof data - 1,
32941 0, sizeof data - 1, 0);
32942 if (i != 0 && i != 21)
32947 if (! setlocale (LC_ALL, "C"))
32951 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
32952 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
32953 memset (®ex, 0, sizeof regex);
32954 s = re_compile_pattern ("a[^x]b", 6, ®ex);
32957 /* This should fail, but succeeds for glibc-2.5. */
32958 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
32961 /* This regular expression is from Spencer ere test number 75
32963 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
32964 memset (®ex, 0, sizeof regex);
32965 for (i = 0; i <= UCHAR_MAX; i++)
32966 folded_chars[i] = i;
32967 regex.translate = folded_chars;
32968 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
32969 /* This should fail with _Invalid character class name_ error. */
32973 /* Ensure that [b-a] is diagnosed as invalid, when
32974 using RE_NO_EMPTY_RANGES. */
32975 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
32976 memset (®ex, 0, sizeof regex);
32977 s = re_compile_pattern ("a[b-a]", 6, ®ex);
32981 /* This should succeed, but does not for glibc-2.1.3. */
32982 memset (®ex, 0, sizeof regex);
32983 s = re_compile_pattern ("{1", 2, ®ex);
32987 /* The following example is derived from a problem report
32988 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
32989 memset (®ex, 0, sizeof regex);
32990 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
32993 /* This should match, but does not for glibc-2.2.1. */
32994 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
32997 memset (®ex, 0, sizeof regex);
32998 s = re_compile_pattern ("x", 1, ®ex);
33001 /* glibc-2.2.93 does not work with a negative RANGE argument. */
33002 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
33005 /* The version of regex.c in older versions of gnulib
33006 ignored RE_ICASE. Detect that problem too. */
33007 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
33008 memset (®ex, 0, sizeof regex);
33009 s = re_compile_pattern ("x", 1, ®ex);
33012 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
33015 /* Catch a bug reported by Vin Shelton in
33016 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
33018 re_set_syntax (RE_SYNTAX_POSIX_BASIC
33019 & ~RE_CONTEXT_INVALID_DUP
33020 & ~RE_NO_EMPTY_RANGES);
33021 memset (®ex, 0, sizeof regex);
33022 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
33026 /* REG_STARTEND was added to glibc on 2004-01-15.
33027 Reject older versions. */
33028 if (! REG_STARTEND)
33032 /* It would be nice to reject hosts whose regoff_t values are too
33033 narrow (including glibc on hosts with 64-bit ptrdiff_t and
33034 32-bit int), but we should wait until glibc implements this
33035 feature. Otherwise, support for equivalence classes and
33036 multibyte collation symbols would always be broken except
33037 when compiling --without-included-regex. */
33038 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
33039 || sizeof (regoff_t) < sizeof (ssize_t))
33049 if ac_fn_c_try_run "$LINENO"; then :
33050 gl_cv_func_re_compile_pattern_working=yes
33052 gl_cv_func_re_compile_pattern_working=no
33054 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33055 conftest.$ac_objext conftest.beam conftest.$ac_ext
33059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
33060 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
33061 case $gl_cv_func_re_compile_pattern_working in #(
33062 yes) ac_use_included_regex=no;; #(
33063 no) ac_use_included_regex=yes;;
33066 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
33070 if test $ac_use_included_regex = yes; then
33072 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
33075 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
33078 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
33081 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
33084 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
33087 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
33090 $as_echo "#define re_search rpl_re_search" >>confdefs.h
33093 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
33096 $as_echo "#define re_match rpl_re_match" >>confdefs.h
33099 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
33102 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
33105 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
33108 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
33111 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
33114 $as_echo "#define regexec rpl_regexec" >>confdefs.h
33117 $as_echo "#define regerror rpl_regerror" >>confdefs.h
33120 $as_echo "#define regfree rpl_regfree" >>confdefs.h
33124 if test $ac_use_included_regex = yes; then
33133 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
33142 for ac_header in libintl.h
33144 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
33145 if test "x$ac_cv_header_libintl_h" = xyes; then :
33146 cat >>confdefs.h <<_ACEOF
33147 #define HAVE_LIBINTL_H 1
33164 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
33166 if test "x$ac_cv_have_decl_isblank" = xyes; then :
33172 cat >>confdefs.h <<_ACEOF
33173 #define HAVE_DECL_ISBLANK $ac_have_decl
33181 for ac_func in rewinddir
33183 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
33184 if test "x$ac_cv_func_rewinddir" = xyes; then :
33185 cat >>confdefs.h <<_ACEOF
33186 #define HAVE_REWINDDIR 1
33192 if test $ac_cv_func_rewinddir = no; then
33196 if test $HAVE_REWINDDIR = 0; then
33205 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
33219 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
33232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
33233 $as_echo_n "checking whether rmdir works... " >&6; }
33234 if ${gl_cv_func_rmdir_works+:} false; then :
33235 $as_echo_n "(cached) " >&6
33238 touch conftest.file
33239 if test "$cross_compiling" = yes; then :
33241 # Guess yes on glibc systems.
33242 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
33243 # If we don't know, assume the worst.
33244 *) gl_cv_func_rmdir_works="guessing no" ;;
33248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33249 /* end confdefs.h. */
33253 # include <unistd.h>
33254 #else /* on Windows with MSVC */
33255 # include <direct.h>
33262 if (!rmdir ("conftest.file/"))
33264 else if (errno != ENOTDIR)
33266 if (!rmdir ("conftest.dir/./"))
33274 if ac_fn_c_try_run "$LINENO"; then :
33275 gl_cv_func_rmdir_works=yes
33277 gl_cv_func_rmdir_works=no
33279 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33280 conftest.$ac_objext conftest.beam conftest.$ac_ext
33283 rm -rf conftest.dir conftest.file
33285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
33286 $as_echo "$gl_cv_func_rmdir_works" >&6; }
33287 case "$gl_cv_func_rmdir_works" in
33294 if test $REPLACE_RMDIR = 1; then
33303 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
33317 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
33325 for ac_func in rpmatch
33327 ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
33328 if test "x$ac_cv_func_rpmatch" = xyes; then :
33329 cat >>confdefs.h <<_ACEOF
33330 #define HAVE_RPMATCH 1
33336 if test $ac_cv_func_rpmatch = no; then
33340 if test $HAVE_RPMATCH = 0; then
33349 gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
33352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
33353 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
33354 if ${gl_cv_langinfo_yesexpr+:} false; then :
33355 $as_echo_n "(cached) " >&6
33357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33358 /* end confdefs.h. */
33359 #include <langinfo.h>
33363 char* cs = nl_langinfo(YESEXPR); return !cs;
33368 if ac_fn_c_try_link "$LINENO"; then :
33369 gl_cv_langinfo_yesexpr=yes
33371 gl_cv_langinfo_yesexpr=no
33373 rm -f core conftest.err conftest.$ac_objext \
33374 conftest$ac_exeext conftest.$ac_ext
33377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
33378 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
33379 if test $gl_cv_langinfo_yesexpr = yes; then
33381 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
33397 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
33426 for ac_header in selinux/flask.h
33428 ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
33429 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
33430 cat >>confdefs.h <<_ACEOF
33431 #define HAVE_SELINUX_FLASK_H 1
33446 gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
33450 if test "$with_selinux" != no; then
33451 for ac_header in selinux/selinux.h
33453 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
33454 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
33455 cat >>confdefs.h <<_ACEOF
33456 #define HAVE_SELINUX_SELINUX_H 1
33464 if test "$ac_cv_header_selinux_selinux_h" = yes; then
33465 # We do have <selinux/selinux.h>, so do compile getfilecon.c
33466 # and arrange to use its wrappers.
33482 if test $gl_cv_have_include_next = yes; then
33483 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
33485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
33486 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
33487 if ${gl_cv_next_selinux_selinux_h+:} false; then :
33488 $as_echo_n "(cached) " >&6
33491 if test $ac_cv_header_selinux_selinux_h = yes; then
33496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33497 /* end confdefs.h. */
33498 #include <selinux/selinux.h>
33501 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33502 *) gl_absname_cpp="$ac_cpp" ;;
33507 gl_dirsep_regex='[/\\]'
33510 gl_dirsep_regex='\/'
33513 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33514 gl_header_literal_regex=`echo 'selinux/selinux.h' \
33515 | sed -e "$gl_make_literal_regex_sed"`
33516 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33517 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33523 gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33524 sed -n "$gl_absolute_header_sed"`
33526 gl_header=$gl_cv_absolute_selinux_selinux_h
33527 gl_cv_next_selinux_selinux_h='"'$gl_header'"'
33529 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
33534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
33535 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
33537 NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
33539 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33540 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33541 gl_next_as_first_directive='<'selinux/selinux.h'>'
33543 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33544 gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
33546 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
33552 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
33555 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
33558 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
33562 case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
33563 no:*) # already warned
33566 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
33567 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
33568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU findutils will be compiled without SELinux support." >&5
33569 $as_echo "$as_me: WARNING: GNU findutils will be compiled without SELinux support." >&2;}
33572 # Do as if <selinux/selinux.h> does not exist, even if
33573 # AC_CHECK_HEADERS_ONCE has already determined that it exists.
33574 $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
33580 if test "$with_selinux" != no; then
33581 for ac_header in selinux/context.h
33583 ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
33584 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
33585 cat >>confdefs.h <<_ACEOF
33586 #define HAVE_SELINUX_CONTEXT_H 1
33590 SELINUX_CONTEXT_H=selinux/context.h
33596 SELINUX_CONTEXT_H=selinux/context.h
33599 if test -n "$SELINUX_CONTEXT_H"; then
33600 GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
33601 GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
33603 GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
33604 GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
33608 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
33617 gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
33622 if test $ac_cv_func_setenv = no; then
33625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
33626 $as_echo_n "checking whether setenv validates arguments... " >&6; }
33627 if ${gl_cv_func_setenv_works+:} false; then :
33628 $as_echo_n "(cached) " >&6
33630 if test "$cross_compiling" = yes; then :
33632 # Guess yes on glibc systems.
33633 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
33634 # If we don't know, assume the worst.
33635 *) gl_cv_func_setenv_works="guessing no" ;;
33639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33640 /* end confdefs.h. */
33642 #include <stdlib.h>
33644 #include <string.h>
33652 if (setenv ("", "", 0) != -1)
33654 else if (errno != EINVAL)
33658 if (setenv ("a", "=", 1) != 0)
33660 else if (strcmp (getenv ("a"), "=") != 0)
33669 if ac_fn_c_try_run "$LINENO"; then :
33670 gl_cv_func_setenv_works=yes
33672 gl_cv_func_setenv_works=no
33674 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33675 conftest.$ac_objext conftest.beam conftest.$ac_ext
33679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
33680 $as_echo "$gl_cv_func_setenv_works" >&6; }
33681 case "$gl_cv_func_setenv_works" in
33689 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
33698 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
33712 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
33717 for ac_header in stdint.h
33719 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33720 if test "x$ac_cv_header_stdint_h" = xyes; then :
33721 cat >>confdefs.h <<_ACEOF
33722 #define HAVE_STDINT_H 1
33729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
33730 $as_echo_n "checking for SIZE_MAX... " >&6; }
33731 if ${gl_cv_size_max+:} false; then :
33732 $as_echo_n "(cached) " >&6
33736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33737 /* end confdefs.h. */
33739 #include <limits.h>
33741 #include <stdint.h>
33748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33749 $EGREP "Found it" >/dev/null 2>&1; then :
33754 if test -z "$gl_cv_size_max"; then
33755 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
33756 #include <limits.h>"; then :
33759 size_t_bits_minus_1=
33762 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
33768 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
33769 if test $fits_in_uint = 1; then
33770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33771 /* end confdefs.h. */
33772 #include <stddef.h>
33774 extern unsigned long foo;
33784 if ac_fn_c_try_compile "$LINENO"; then :
33787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33789 if test $fits_in_uint = 1; then
33790 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
33792 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
33795 gl_cv_size_max='((size_t)~(size_t)0)'
33800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
33801 $as_echo "$gl_cv_size_max" >&6; }
33802 if test "$gl_cv_size_max" != yes; then
33804 cat >>confdefs.h <<_ACEOF
33805 #define SIZE_MAX $gl_cv_size_max
33813 gl_cv_func_snprintf_usable=no
33814 for ac_func in snprintf
33816 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
33817 if test "x$ac_cv_func_snprintf" = xyes; then :
33818 cat >>confdefs.h <<_ACEOF
33819 #define HAVE_SNPRINTF 1
33825 if test $ac_cv_func_snprintf = yes; then
33829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
33830 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
33831 if ${gl_cv_func_snprintf_size1+:} false; then :
33832 $as_echo_n "(cached) " >&6
33835 if test "$cross_compiling" = yes; then :
33836 gl_cv_func_snprintf_size1="guessing yes"
33838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33839 /* end confdefs.h. */
33843 # define my_snprintf snprintf
33845 # include <stdarg.h>
33846 static int my_snprintf (char *buf, int size, const char *format, ...)
33850 va_start (args, format);
33851 ret = vsnprintf (buf, size, format, args);
33858 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
33859 my_snprintf (buf, 1, "%d", 12345);
33860 return buf[1] != 'E';
33863 if ac_fn_c_try_run "$LINENO"; then :
33864 gl_cv_func_snprintf_size1=yes
33866 gl_cv_func_snprintf_size1=no
33868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33869 conftest.$ac_objext conftest.beam conftest.$ac_ext
33874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
33875 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
33877 case "$gl_cv_func_snprintf_size1" in
33880 case "$gl_cv_func_snprintf_retval_c99" in
33884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
33885 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
33886 if ${gl_cv_func_printf_positions+:} false; then :
33887 $as_echo_n "(cached) " >&6
33890 if test "$cross_compiling" = yes; then :
33893 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
33894 gl_cv_func_printf_positions="guessing no";;
33895 beos*) gl_cv_func_printf_positions="guessing no";;
33896 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
33897 *) gl_cv_func_printf_positions="guessing yes";;
33901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33902 /* end confdefs.h. */
33905 #include <string.h>
33906 /* The string "%2$d %1$d", with dollar characters protected from the shell's
33907 dollar expansion (possibly an autoconf bug). */
33908 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
33909 static char buf[100];
33912 sprintf (buf, format, 33, 55);
33913 return (strcmp (buf, "55 33") != 0);
33916 if ac_fn_c_try_run "$LINENO"; then :
33917 gl_cv_func_printf_positions=yes
33919 gl_cv_func_printf_positions=no
33921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33922 conftest.$ac_objext conftest.beam conftest.$ac_ext
33927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
33928 $as_echo "$gl_cv_func_printf_positions" >&6; }
33930 case "$gl_cv_func_printf_positions" in
33932 gl_cv_func_snprintf_usable=yes
33940 if test $gl_cv_func_snprintf_usable = no; then
33951 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
33953 if test $ac_cv_func_snprintf = yes; then
33966 if test $ac_cv_have_decl_snprintf = no; then
33967 HAVE_DECL_SNPRINTF=0
33981 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
33987 cat >>confdefs.h <<_ACEOF
33988 #define GNULIB_SNPRINTF 1
34003 if test $ac_cv_header_sys_socket_h != yes; then
34004 for ac_header in winsock2.h
34006 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
34007 if test "x$ac_cv_header_winsock2_h" = xyes; then :
34008 cat >>confdefs.h <<_ACEOF
34009 #define HAVE_WINSOCK2_H 1
34017 if test "$ac_cv_header_winsock2_h" = yes; then
34019 UNISTD_H_HAVE_WINSOCK2_H=1
34020 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
34026 if test $HAVE_WINSOCK2_H = 1; then
34027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to call WSAStartup in winsock2.h and -lws2_32" >&5
34028 $as_echo_n "checking if we need to call WSAStartup in winsock2.h and -lws2_32... " >&6; }
34029 if ${gl_cv_func_wsastartup+:} false; then :
34030 $as_echo_n "(cached) " >&6
34033 gl_save_LIBS="$LIBS"
34034 LIBS="$LIBS -lws2_32"
34035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036 /* end confdefs.h. */
34038 #ifdef HAVE_WINSOCK2_H
34039 # include <winsock2.h>
34045 WORD wVersionRequested = MAKEWORD(1, 1);
34047 int err = WSAStartup(wVersionRequested, &wsaData);
34053 if ac_fn_c_try_link "$LINENO"; then :
34054 gl_cv_func_wsastartup=yes
34056 gl_cv_func_wsastartup=no
34058 rm -f core conftest.err conftest.$ac_objext \
34059 conftest$ac_exeext conftest.$ac_ext
34060 LIBS="$gl_save_LIBS"
34063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wsastartup" >&5
34064 $as_echo "$gl_cv_func_wsastartup" >&6; }
34065 if test "$gl_cv_func_wsastartup" = "yes"; then
34067 $as_echo "#define WINDOWS_SOCKETS 1" >>confdefs.h
34069 LIBSOCKET='-lws2_32'
34072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
34073 $as_echo_n "checking for library containing setsockopt... " >&6; }
34074 if ${gl_cv_lib_socket+:} false; then :
34075 $as_echo_n "(cached) " >&6
34079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34080 /* end confdefs.h. */
34094 if ac_fn_c_try_link "$LINENO"; then :
34097 gl_save_LIBS="$LIBS"
34098 LIBS="$gl_save_LIBS -lsocket"
34099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34100 /* end confdefs.h. */
34114 if ac_fn_c_try_link "$LINENO"; then :
34115 gl_cv_lib_socket="-lsocket"
34117 rm -f core conftest.err conftest.$ac_objext \
34118 conftest$ac_exeext conftest.$ac_ext
34119 if test -z "$gl_cv_lib_socket"; then
34120 LIBS="$gl_save_LIBS -lnetwork"
34121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34122 /* end confdefs.h. */
34136 if ac_fn_c_try_link "$LINENO"; then :
34137 gl_cv_lib_socket="-lnetwork"
34139 rm -f core conftest.err conftest.$ac_objext \
34140 conftest$ac_exeext conftest.$ac_ext
34141 if test -z "$gl_cv_lib_socket"; then
34142 LIBS="$gl_save_LIBS -lnet"
34143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34144 /* end confdefs.h. */
34158 if ac_fn_c_try_link "$LINENO"; then :
34159 gl_cv_lib_socket="-lnet"
34161 rm -f core conftest.err conftest.$ac_objext \
34162 conftest$ac_exeext conftest.$ac_ext
34165 LIBS="$gl_save_LIBS"
34168 rm -f core conftest.err conftest.$ac_objext \
34169 conftest$ac_exeext conftest.$ac_ext
34170 if test -z "$gl_cv_lib_socket"; then
34171 gl_cv_lib_socket="none needed"
34175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_socket" >&5
34176 $as_echo "$gl_cv_lib_socket" >&6; }
34177 if test "$gl_cv_lib_socket" != "none needed"; then
34178 LIBSOCKET="$gl_cv_lib_socket"
34190 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
34191 /* <sys/types.h> is not needed according to POSIX, but the
34192 <sys/socket.h> in i386-unknown-freebsd4.10 and
34193 powerpc-apple-darwin5.5 required it. */
34194 #include <sys/types.h>
34195 #if HAVE_SYS_SOCKET_H
34196 # include <sys/socket.h>
34197 #elif HAVE_WS2TCPIP_H
34198 # include <ws2tcpip.h>
34202 if test "x$ac_cv_type_socklen_t" = xyes; then :
34205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
34206 $as_echo_n "checking for socklen_t equivalent... " >&6; }
34207 if ${gl_cv_socklen_t_equiv+:} false; then :
34208 $as_echo_n "(cached) " >&6
34210 # Systems have either "struct sockaddr *" or
34211 # "void *" as the second argument to getpeername
34212 gl_cv_socklen_t_equiv=
34213 for arg2 in "struct sockaddr" void; do
34214 for t in int size_t "unsigned int" "long int" "unsigned long int"; do
34215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34216 /* end confdefs.h. */
34217 #include <sys/types.h>
34218 #include <sys/socket.h>
34220 int getpeername (int, $arg2 *, $t *);
34225 getpeername (0, 0, &len);
34230 if ac_fn_c_try_compile "$LINENO"; then :
34231 gl_cv_socklen_t_equiv="$t"
34233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34234 test "$gl_cv_socklen_t_equiv" != "" && break
34236 test "$gl_cv_socklen_t_equiv" != "" && break
34241 if test "$gl_cv_socklen_t_equiv" = ""; then
34242 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
34244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
34245 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
34247 cat >>confdefs.h <<_ACEOF
34248 #define socklen_t $gl_cv_socklen_t_equiv
34254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
34255 $as_echo_n "checking for ssize_t... " >&6; }
34256 if ${gt_cv_ssize_t+:} false; then :
34257 $as_echo_n "(cached) " >&6
34259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34260 /* end confdefs.h. */
34261 #include <sys/types.h>
34265 int x = sizeof (ssize_t *) + sizeof (ssize_t);
34271 if ac_fn_c_try_compile "$LINENO"; then :
34276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
34279 $as_echo "$gt_cv_ssize_t" >&6; }
34280 if test $gt_cv_ssize_t = no; then
34282 $as_echo "#define ssize_t int" >>confdefs.h
34295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
34296 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
34297 if ${gl_cv_func_stat_dir_slash+:} false; then :
34298 $as_echo_n "(cached) " >&6
34300 if test "$cross_compiling" = yes; then :
34302 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
34303 *) gl_cv_func_stat_dir_slash="guessing yes";;
34306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34307 /* end confdefs.h. */
34308 #include <sys/stat.h>
34313 struct stat st; return stat (".", &st) != stat ("./", &st);
34318 if ac_fn_c_try_run "$LINENO"; then :
34319 gl_cv_func_stat_dir_slash=yes
34321 gl_cv_func_stat_dir_slash=no
34323 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34324 conftest.$ac_objext conftest.beam conftest.$ac_ext
34328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
34329 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
34330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
34331 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
34332 if ${gl_cv_func_stat_file_slash+:} false; then :
34333 $as_echo_n "(cached) " >&6
34336 # Assume that if we have lstat, we can also check symlinks.
34337 if test $ac_cv_func_lstat = yes; then
34338 ln -s conftest.tmp conftest.lnk
34340 if test "$cross_compiling" = yes; then :
34342 # Guess yes on glibc systems.
34343 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
34344 # If we don't know, assume the worst.
34345 *) gl_cv_func_stat_file_slash="guessing no" ;;
34349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34350 /* end confdefs.h. */
34351 #include <sys/stat.h>
34358 if (!stat ("conftest.tmp/", &st))
34361 if (!stat ("conftest.lnk/", &st))
34370 if ac_fn_c_try_run "$LINENO"; then :
34371 gl_cv_func_stat_file_slash=yes
34373 gl_cv_func_stat_file_slash=no
34375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34376 conftest.$ac_objext conftest.beam conftest.$ac_ext
34379 rm -f conftest.tmp conftest.lnk
34381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
34382 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
34383 case $gl_cv_func_stat_dir_slash in
34384 *no) REPLACE_STAT=1
34386 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
34389 case $gl_cv_func_stat_file_slash in
34390 *no) REPLACE_STAT=1
34392 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
34396 if test $REPLACE_STAT = 1; then
34405 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
34420 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
34425 # Don't call AC_STRUCT_ST_BLOCKS because it causes bugs. Details at
34426 # http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00051.html
34445 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>
34446 #include <sys/stat.h>
34448 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
34450 cat >>confdefs.h <<_ACEOF
34451 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
34454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
34455 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
34456 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
34457 $as_echo_n "(cached) " >&6
34459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34460 /* end confdefs.h. */
34462 #include <sys/types.h>
34463 #include <sys/stat.h>
34464 #if HAVE_SYS_TIME_H
34465 # include <sys/time.h>
34468 struct timespec ts;
34481 if ac_fn_c_try_compile "$LINENO"; then :
34482 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
34484 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
34486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
34489 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
34490 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
34492 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
34496 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>
34497 #include <sys/stat.h>
34499 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
34501 cat >>confdefs.h <<_ACEOF
34502 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
34507 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
34508 #include <sys/stat.h>
34510 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
34512 cat >>confdefs.h <<_ACEOF
34513 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
34518 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>
34519 #include <sys/stat.h>
34521 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
34523 cat >>confdefs.h <<_ACEOF
34524 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
34546 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>
34547 #include <sys/stat.h>
34549 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
34551 cat >>confdefs.h <<_ACEOF
34552 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
34557 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
34558 #include <sys/stat.h>
34560 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
34562 cat >>confdefs.h <<_ACEOF
34563 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
34568 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>
34569 #include <sys/stat.h>
34571 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
34573 cat >>confdefs.h <<_ACEOF
34574 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
34587 cat >>confdefs.h <<_ACEOF
34588 #define GNULIB_STATAT 1
34592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
34593 $as_echo_n "checking for working stdalign.h... " >&6; }
34594 if ${gl_cv_header_working_stdalign_h+:} false; then :
34595 $as_echo_n "(cached) " >&6
34597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34598 /* end confdefs.h. */
34599 #include <stdalign.h>
34600 #include <stddef.h>
34602 /* Test that alignof yields a result consistent with offsetof.
34603 This catches GCC bug 52023
34604 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
34606 template <class t> struct alignof_helper { char a; t b; };
34607 # define ao(type) offsetof (alignof_helper<type>, b)
34609 # define ao(type) offsetof (struct { char a; type b; }, b)
34611 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
34612 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
34613 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
34615 /* Test _Alignas only on platforms where gnulib can help. */
34617 ((defined __cplusplus && 201103 <= __cplusplus) \
34618 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
34619 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
34620 struct alignas_test { char c; char alignas (8) alignas_8; };
34621 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
34633 if ac_fn_c_try_compile "$LINENO"; then :
34634 gl_cv_header_working_stdalign_h=yes
34636 gl_cv_header_working_stdalign_h=no
34638 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
34641 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
34643 if test $gl_cv_header_working_stdalign_h = yes; then
34646 STDALIGN_H='stdalign.h'
34650 if test -n "$STDALIGN_H"; then
34651 GL_GENERATE_STDALIGN_H_TRUE=
34652 GL_GENERATE_STDALIGN_H_FALSE='#'
34654 GL_GENERATE_STDALIGN_H_TRUE='#'
34655 GL_GENERATE_STDALIGN_H_FALSE=
34661 NEXT_STDARG_H='<stdarg.h>'
34662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
34663 $as_echo_n "checking for va_copy... " >&6; }
34664 if ${gl_cv_func_va_copy+:} false; then :
34665 $as_echo_n "(cached) " >&6
34668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34669 /* end confdefs.h. */
34670 #include <stdarg.h>
34676 void (*func) (va_list, va_list) = va_copy;
34683 if ac_fn_c_try_compile "$LINENO"; then :
34684 gl_cv_func_va_copy=yes
34686 gl_cv_func_va_copy=no
34688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
34692 $as_echo "$gl_cv_func_va_copy" >&6; }
34693 if test $gl_cv_func_va_copy = no; then
34694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34695 /* end confdefs.h. */
34696 #if defined _AIX && !defined __GNUC__
34701 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34702 $EGREP "vaccine" >/dev/null 2>&1; then :
34709 if test $gl_aixcc = yes; then
34719 if test $gl_cv_have_include_next = yes; then
34720 gl_cv_next_stdarg_h='<'stdarg.h'>'
34722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
34723 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
34724 if ${gl_cv_next_stdarg_h+:} false; then :
34725 $as_echo_n "(cached) " >&6
34730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34731 /* end confdefs.h. */
34732 #include <stdarg.h>
34735 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34736 *) gl_absname_cpp="$ac_cpp" ;;
34741 gl_dirsep_regex='[/\\]'
34744 gl_dirsep_regex='\/'
34747 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34748 gl_header_literal_regex=`echo 'stdarg.h' \
34749 | sed -e "$gl_make_literal_regex_sed"`
34750 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34751 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34757 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34758 sed -n "$gl_absolute_header_sed"`
34760 gl_header=$gl_cv_absolute_stdarg_h
34761 gl_cv_next_stdarg_h='"'$gl_header'"'
34765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
34766 $as_echo "$gl_cv_next_stdarg_h" >&6; }
34768 NEXT_STDARG_H=$gl_cv_next_stdarg_h
34770 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34771 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34772 gl_next_as_first_directive='<'stdarg.h'>'
34774 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34775 gl_next_as_first_directive=$gl_cv_next_stdarg_h
34777 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
34782 if test "$gl_cv_next_stdarg_h" = '""'; then
34783 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
34784 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
34788 saved_as_echo_n="$as_echo_n"
34790 if ${gl_cv_func___va_copy+:} false; then :
34791 $as_echo_n "(cached) " >&6
34794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34795 /* end confdefs.h. */
34796 #include <stdarg.h>
34809 if ac_fn_c_try_compile "$LINENO"; then :
34810 gl_cv_func___va_copy=yes
34812 gl_cv_func___va_copy=no
34814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34817 as_echo_n="$saved_as_echo_n"
34819 if test $gl_cv_func___va_copy = yes; then
34821 $as_echo "#define va_copy __va_copy" >>confdefs.h
34826 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
34832 if test -n "$STDARG_H"; then
34833 GL_GENERATE_STDARG_H_TRUE=
34834 GL_GENERATE_STDARG_H_FALSE='#'
34836 GL_GENERATE_STDARG_H_TRUE='#'
34837 GL_GENERATE_STDARG_H_FALSE=
34845 # Define two additional variables used in the Makefile substitution.
34847 if test "$ac_cv_header_stdbool_h" = yes; then
34850 STDBOOL_H='stdbool.h'
34853 if test -n "$STDBOOL_H"; then
34854 GL_GENERATE_STDBOOL_H_TRUE=
34855 GL_GENERATE_STDBOOL_H_FALSE='#'
34857 GL_GENERATE_STDBOOL_H_TRUE='#'
34858 GL_GENERATE_STDBOOL_H_FALSE=
34862 if test "$ac_cv_type__Bool" = yes; then
34873 if test $gt_cv_c_wchar_t = no; then
34877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
34878 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
34879 if ${gl_cv_decl_null_works+:} false; then :
34880 $as_echo_n "(cached) " >&6
34882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34883 /* end confdefs.h. */
34884 #include <stddef.h>
34885 int test[2 * (sizeof NULL == sizeof (void *)) -1];
34895 if ac_fn_c_try_compile "$LINENO"; then :
34896 gl_cv_decl_null_works=yes
34898 gl_cv_decl_null_works=no
34900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
34903 $as_echo "$gl_cv_decl_null_works" >&6; }
34904 if test $gl_cv_decl_null_works = no; then
34909 if test -n "$STDDEF_H"; then
34910 GL_GENERATE_STDDEF_H_TRUE=
34911 GL_GENERATE_STDDEF_H_FALSE='#'
34913 GL_GENERATE_STDDEF_H_TRUE='#'
34914 GL_GENERATE_STDDEF_H_FALSE=
34917 if test -n "$STDDEF_H"; then
34926 if test $gl_cv_have_include_next = yes; then
34927 gl_cv_next_stddef_h='<'stddef.h'>'
34929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
34930 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
34931 if ${gl_cv_next_stddef_h+:} false; then :
34932 $as_echo_n "(cached) " >&6
34937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34938 /* end confdefs.h. */
34939 #include <stddef.h>
34942 aix*) gl_absname_cpp="$ac_cpp -C" ;;
34943 *) gl_absname_cpp="$ac_cpp" ;;
34948 gl_dirsep_regex='[/\\]'
34951 gl_dirsep_regex='\/'
34954 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
34955 gl_header_literal_regex=`echo 'stddef.h' \
34956 | sed -e "$gl_make_literal_regex_sed"`
34957 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
34958 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
34964 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
34965 sed -n "$gl_absolute_header_sed"`
34967 gl_header=$gl_cv_absolute_stddef_h
34968 gl_cv_next_stddef_h='"'$gl_header'"'
34972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
34973 $as_echo "$gl_cv_next_stddef_h" >&6; }
34975 NEXT_STDDEF_H=$gl_cv_next_stddef_h
34977 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
34978 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
34979 gl_next_as_first_directive='<'stddef.h'>'
34981 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
34982 gl_next_as_first_directive=$gl_cv_next_stddef_h
34984 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
35002 if test $gl_cv_have_include_next = yes; then
35003 gl_cv_next_stdio_h='<'stdio.h'>'
35005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
35006 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
35007 if ${gl_cv_next_stdio_h+:} false; then :
35008 $as_echo_n "(cached) " >&6
35013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35014 /* end confdefs.h. */
35018 aix*) gl_absname_cpp="$ac_cpp -C" ;;
35019 *) gl_absname_cpp="$ac_cpp" ;;
35024 gl_dirsep_regex='[/\\]'
35027 gl_dirsep_regex='\/'
35030 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35031 gl_header_literal_regex=`echo 'stdio.h' \
35032 | sed -e "$gl_make_literal_regex_sed"`
35033 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35034 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35040 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35041 sed -n "$gl_absolute_header_sed"`
35043 gl_header=$gl_cv_absolute_stdio_h
35044 gl_cv_next_stdio_h='"'$gl_header'"'
35048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
35049 $as_echo "$gl_cv_next_stdio_h" >&6; }
35051 NEXT_STDIO_H=$gl_cv_next_stdio_h
35053 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35054 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35055 gl_next_as_first_directive='<'stdio.h'>'
35057 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35058 gl_next_as_first_directive=$gl_cv_next_stdio_h
35060 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
35069 cat >>confdefs.h <<_ACEOF
35070 #define GNULIB_FSCANF 1
35077 cat >>confdefs.h <<_ACEOF
35078 #define GNULIB_SCANF 1
35103 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
35104 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
35105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
35106 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
35107 if eval \${$as_gl_Symbol+:} false; then :
35108 $as_echo_n "(cached) " >&6
35110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35111 /* end confdefs.h. */
35123 if ac_fn_c_try_compile "$LINENO"; then :
35124 eval "$as_gl_Symbol=yes"
35126 eval "$as_gl_Symbol=no"
35128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35130 eval ac_res=\$$as_gl_Symbol
35131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35132 $as_echo "$ac_res" >&6; }
35133 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
35134 cat >>confdefs.h <<_ACEOF
35135 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
35138 eval ac_cv_have_decl_$gl_func=yes
35153 if test $gl_cv_have_include_next = yes; then
35154 gl_cv_next_stdlib_h='<'stdlib.h'>'
35156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
35157 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
35158 if ${gl_cv_next_stdlib_h+:} false; then :
35159 $as_echo_n "(cached) " >&6
35164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35165 /* end confdefs.h. */
35166 #include <stdlib.h>
35169 aix*) gl_absname_cpp="$ac_cpp -C" ;;
35170 *) gl_absname_cpp="$ac_cpp" ;;
35175 gl_dirsep_regex='[/\\]'
35178 gl_dirsep_regex='\/'
35181 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
35182 gl_header_literal_regex=`echo 'stdlib.h' \
35183 | sed -e "$gl_make_literal_regex_sed"`
35184 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
35185 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
35191 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
35192 sed -n "$gl_absolute_header_sed"`
35194 gl_header=$gl_cv_absolute_stdlib_h
35195 gl_cv_next_stdlib_h='"'$gl_header'"'
35199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
35200 $as_echo "$gl_cv_next_stdlib_h" >&6; }
35202 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
35204 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
35205 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
35206 gl_next_as_first_directive='<'stdlib.h'>'
35208 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
35209 gl_next_as_first_directive=$gl_cv_next_stdlib_h
35211 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
35218 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
35219 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
35220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
35221 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
35222 if eval \${$as_gl_Symbol+:} false; then :
35223 $as_echo_n "(cached) " >&6
35225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35226 /* end confdefs.h. */
35227 #include <stdlib.h>
35228 #if HAVE_SYS_LOADAVG_H
35229 # include <sys/loadavg.h>
35232 # include <random.h>
35244 if ac_fn_c_try_compile "$LINENO"; then :
35245 eval "$as_gl_Symbol=yes"
35247 eval "$as_gl_Symbol=no"
35249 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35251 eval ac_res=\$$as_gl_Symbol
35252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35253 $as_echo "$ac_res" >&6; }
35254 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
35255 cat >>confdefs.h <<_ACEOF
35256 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
35259 eval ac_cv_have_decl_$gl_func=yes
35270 for ac_func in stpcpy
35272 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
35273 if test "x$ac_cv_func_stpcpy" = xyes; then :
35274 cat >>confdefs.h <<_ACEOF
35275 #define HAVE_STPCPY 1
35281 if test $ac_cv_func_stpcpy = no; then
35285 if test $HAVE_STPCPY = 0; then
35294 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
35311 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
35318 for ac_func in strcasecmp
35320 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
35321 if test "x$ac_cv_func_strcasecmp" = xyes; then :
35322 cat >>confdefs.h <<_ACEOF
35323 #define HAVE_STRCASECMP 1
35329 if test $ac_cv_func_strcasecmp = no; then
35335 for ac_func in strncasecmp
35337 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
35338 if test "x$ac_cv_func_strncasecmp" = xyes; then :
35339 cat >>confdefs.h <<_ACEOF
35340 #define HAVE_STRNCASECMP 1
35346 if test $ac_cv_func_strncasecmp = yes; then
35351 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
35352 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
35358 cat >>confdefs.h <<_ACEOF
35359 #define HAVE_DECL_STRNCASECMP $ac_have_decl
35362 if test $ac_cv_have_decl_strncasecmp = no; then
35363 HAVE_DECL_STRNCASECMP=0
35367 if test $HAVE_STRCASECMP = 0; then
35376 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
35382 if test $HAVE_STRNCASECMP = 0; then
35391 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
35399 if test $HAVE_STRCASESTR = 1 && test $REPLACE_STRCASESTR = 0; then
35400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works in linear time" >&5
35401 $as_echo_n "checking whether strcasestr works in linear time... " >&6; }
35402 if ${gl_cv_func_strcasestr_linear+:} false; then :
35403 $as_echo_n "(cached) " >&6
35405 if test "$cross_compiling" = yes; then :
35406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35407 /* end confdefs.h. */
35409 #include <features.h>
35410 #ifdef __GNU_LIBRARY__
35411 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
35412 && !defined __UCLIBC__
35417 #include <cygwin/version.h>
35418 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
35424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35425 $EGREP "Lucky user" >/dev/null 2>&1; then :
35426 gl_cv_func_strcasestr_linear="guessing yes"
35428 gl_cv_func_strcasestr_linear="guessing no"
35434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35435 /* end confdefs.h. */
35437 #include <signal.h> /* for signal */
35438 #include <string.h> /* for strcasestr */
35439 #include <stdlib.h> /* for malloc */
35440 #include <unistd.h> /* for alarm */
35441 static void quit (int sig) { exit (sig + 128); }
35448 size_t m = 1000000;
35449 char *haystack = (char *) malloc (2 * m + 2);
35450 char *needle = (char *) malloc (m + 2);
35451 /* Failure to compile this test due to missing alarm is okay,
35452 since all such platforms (mingw) also lack strcasestr. */
35453 signal (SIGALRM, quit);
35455 /* Check for quadratic performance. */
35456 if (haystack && needle)
35458 memset (haystack, 'A', 2 * m);
35459 haystack[2 * m] = 'B';
35460 haystack[2 * m + 1] = 0;
35461 memset (needle, 'A', m);
35464 if (!strcasestr (haystack, needle))
35473 if ac_fn_c_try_run "$LINENO"; then :
35474 gl_cv_func_strcasestr_linear=yes
35476 gl_cv_func_strcasestr_linear=no
35478 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35479 conftest.$ac_objext conftest.beam conftest.$ac_ext
35484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_linear" >&5
35485 $as_echo "$gl_cv_func_strcasestr_linear" >&6; }
35486 case "$gl_cv_func_strcasestr_linear" in
35489 REPLACE_STRCASESTR=1
35494 if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
35503 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
35515 for ac_func in strcasestr
35517 ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr"
35518 if test "x$ac_cv_func_strcasestr" = xyes; then :
35519 cat >>confdefs.h <<_ACEOF
35520 #define HAVE_STRCASESTR 1
35526 if test $ac_cv_func_strcasestr = no; then
35529 if test "$gl_cv_func_memchr_works" != yes; then
35530 REPLACE_STRCASESTR=1
35532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strcasestr works" >&5
35533 $as_echo_n "checking whether strcasestr works... " >&6; }
35534 if ${gl_cv_func_strcasestr_works_always+:} false; then :
35535 $as_echo_n "(cached) " >&6
35537 if test "$cross_compiling" = yes; then :
35538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35539 /* end confdefs.h. */
35541 #ifdef __GNU_LIBRARY__
35542 #include <features.h>
35543 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
35544 || defined __UCLIBC__
35547 #elif defined __CYGWIN__
35548 #include <cygwin/version.h>
35549 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
35557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35558 $EGREP "Lucky user" >/dev/null 2>&1; then :
35559 gl_cv_func_strcasestr_works_always="guessing yes"
35561 gl_cv_func_strcasestr_works_always="guessing no"
35567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35568 /* end confdefs.h. */
35570 #include <string.h> /* for strcasestr */
35571 #define P "_EF_BF_BD"
35572 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
35573 #define NEEDLE P P P P P
35578 return !!strcasestr (HAYSTACK, NEEDLE);
35584 if ac_fn_c_try_run "$LINENO"; then :
35585 gl_cv_func_strcasestr_works_always=yes
35587 gl_cv_func_strcasestr_works_always=no
35589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35590 conftest.$ac_objext conftest.beam conftest.$ac_ext
35595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strcasestr_works_always" >&5
35596 $as_echo "$gl_cv_func_strcasestr_works_always" >&6; }
35597 case "$gl_cv_func_strcasestr_works_always" in
35600 REPLACE_STRCASESTR=1
35606 if test $HAVE_STRCASESTR = 0 || test $REPLACE_STRCASESTR = 1; then
35615 gl_LIBOBJS="$gl_LIBOBJS strcasestr.$ac_objext"
35626 GNULIB_STRCASESTR=1
35632 $as_echo "#define GNULIB_TEST_STRCASESTR 1" >>confdefs.h
35646 if test $ac_cv_func_strdup = yes; then
35647 if test $gl_cv_func_malloc_posix != yes; then
35658 if test $ac_cv_have_decl_strdup = no; then
35662 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
35671 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
35686 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
35697 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
35699 $as_echo_n "checking for working strerror function... " >&6; }
35700 if ${gl_cv_func_working_strerror+:} false; then :
35701 $as_echo_n "(cached) " >&6
35703 if test "$cross_compiling" = yes; then :
35705 # Guess yes on glibc systems.
35706 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
35707 # If we don't know, assume the worst.
35708 *) gl_cv_func_working_strerror="guessing no" ;;
35712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35713 /* end confdefs.h. */
35714 #include <string.h>
35719 if (!*strerror (-2)) return 1;
35724 if ac_fn_c_try_run "$LINENO"; then :
35725 gl_cv_func_working_strerror=yes
35727 gl_cv_func_working_strerror=no
35729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35730 conftest.$ac_objext conftest.beam conftest.$ac_ext
35735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
35736 $as_echo "$gl_cv_func_working_strerror" >&6; }
35737 case "$gl_cv_func_working_strerror" in
35744 case "$gl_cv_func_strerror_r_works" in
35745 *no) REPLACE_STRERROR=1 ;;
35752 if test $REPLACE_STRERROR = 1; then
35761 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
35766 cat >>confdefs.h <<_ACEOF
35767 #define GNULIB_STRERROR 1
35782 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
35788 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
35797 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
35809 if test $ac_cv_header_sys_socket_h != yes; then
35810 for ac_header in winsock2.h
35812 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
35813 if test "x$ac_cv_header_winsock2_h" = xyes; then :
35814 cat >>confdefs.h <<_ACEOF
35815 #define HAVE_WINSOCK2_H 1
35823 if test "$ac_cv_header_winsock2_h" = yes; then
35825 UNISTD_H_HAVE_WINSOCK2_H=1
35826 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
35846 if test $ac_cv_have_decl_strerror_r = no; then
35847 HAVE_DECL_STRERROR_R=0
35850 if test $ac_cv_func_strerror_r = yes; then
35851 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
35852 if test $gl_cv_func_strerror_r_posix_signature = yes; then
35853 case "$gl_cv_func_strerror_r_works" in
35854 *no) REPLACE_STRERROR_R=1 ;;
35857 REPLACE_STRERROR_R=1
35860 REPLACE_STRERROR_R=1
35864 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then
35873 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext"
35904 GNULIB_STRERROR_R=1
35910 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
35916 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
35930 $as_echo "#define my_strftime nstrftime" >>confdefs.h
35958 if test $ac_cv_have_decl_strndup = no; then
35959 HAVE_DECL_STRNDUP=0
35962 if test $ac_cv_func_strndup = yes; then
35964 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
35965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
35966 $as_echo_n "checking for working strndup... " >&6; }
35967 if ${gl_cv_func_strndup_works+:} false; then :
35968 $as_echo_n "(cached) " >&6
35970 if test "$cross_compiling" = yes; then :
35973 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
35974 *) gl_cv_func_strndup_works="guessing yes";;
35978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35979 /* end confdefs.h. */
35981 #include <string.h>
35982 #include <stdlib.h>
35987 #if !HAVE_DECL_STRNDUP
35992 char *strndup (const char *, size_t);
35995 s = strndup ("some longer string", 15);
35997 s = strndup ("shorter string", 13);
35998 return s[13] != '\0';
36003 if ac_fn_c_try_run "$LINENO"; then :
36004 gl_cv_func_strndup_works=yes
36006 gl_cv_func_strndup_works=no
36008 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36009 conftest.$ac_objext conftest.beam conftest.$ac_ext
36013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
36014 $as_echo "$gl_cv_func_strndup_works" >&6; }
36015 case $gl_cv_func_strndup_works in
36016 *no) REPLACE_STRNDUP=1 ;;
36022 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
36031 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
36045 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
36061 if test $ac_cv_have_decl_strnlen = no; then
36062 HAVE_DECL_STRNLEN=0
36065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
36066 $as_echo_n "checking for working strnlen... " >&6; }
36067 if ${ac_cv_func_strnlen_working+:} false; then :
36068 $as_echo_n "(cached) " >&6
36070 if test "$cross_compiling" = yes; then :
36071 # Guess no on AIX systems, yes otherwise.
36073 aix*) ac_cv_func_strnlen_working=no;;
36074 *) ac_cv_func_strnlen_working=yes;;
36077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36078 /* end confdefs.h. */
36079 $ac_includes_default
36085 #define S_LEN (sizeof S - 1)
36087 /* At least one implementation is buggy: that of AIX 4.3 would
36088 give strnlen (S, 1) == 3. */
36091 for (i = 0; i < S_LEN + 1; ++i)
36093 int expected = i <= S_LEN ? i : S_LEN;
36094 if (strnlen (S, i) != expected)
36103 if ac_fn_c_try_run "$LINENO"; then :
36104 ac_cv_func_strnlen_working=yes
36106 ac_cv_func_strnlen_working=no
36108 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36109 conftest.$ac_objext conftest.beam conftest.$ac_ext
36113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
36114 $as_echo "$ac_cv_func_strnlen_working" >&6; }
36115 test $ac_cv_func_strnlen_working = no && :
36118 if test $ac_cv_func_strnlen_working = no; then
36123 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
36132 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
36147 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
36153 if test $REPLACE_STRSTR = 0; then
36154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
36155 $as_echo_n "checking whether strstr works in linear time... " >&6; }
36156 if ${gl_cv_func_strstr_linear+:} false; then :
36157 $as_echo_n "(cached) " >&6
36159 if test "$cross_compiling" = yes; then :
36160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36161 /* end confdefs.h. */
36163 #include <features.h>
36164 #ifdef __GNU_LIBRARY__
36165 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
36166 && !(defined __i386__ || defined __x86_64__) \
36167 && !defined __UCLIBC__
36172 #include <cygwin/version.h>
36173 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
36179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36180 $EGREP "Lucky user" >/dev/null 2>&1; then :
36181 gl_cv_func_strstr_linear="guessing yes"
36183 gl_cv_func_strstr_linear="guessing no"
36189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190 /* end confdefs.h. */
36192 #include <signal.h> /* for signal */
36193 #include <string.h> /* for strstr */
36194 #include <stdlib.h> /* for malloc */
36195 #include <unistd.h> /* for alarm */
36196 static void quit (int sig) { exit (sig + 128); }
36203 size_t m = 1000000;
36204 char *haystack = (char *) malloc (2 * m + 2);
36205 char *needle = (char *) malloc (m + 2);
36206 /* Failure to compile this test due to missing alarm is okay,
36207 since all such platforms (mingw) also have quadratic strstr. */
36208 signal (SIGALRM, quit);
36210 /* Check for quadratic performance. */
36211 if (haystack && needle)
36213 memset (haystack, 'A', 2 * m);
36214 haystack[2 * m] = 'B';
36215 haystack[2 * m + 1] = 0;
36216 memset (needle, 'A', m);
36219 if (!strstr (haystack, needle))
36228 if ac_fn_c_try_run "$LINENO"; then :
36229 gl_cv_func_strstr_linear=yes
36231 gl_cv_func_strstr_linear=no
36233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36234 conftest.$ac_objext conftest.beam conftest.$ac_ext
36239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
36240 $as_echo "$gl_cv_func_strstr_linear" >&6; }
36241 case "$gl_cv_func_strstr_linear" in
36249 if test $REPLACE_STRSTR = 1; then
36258 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
36264 if test "$gl_cv_func_memchr_works" != yes; then
36267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
36268 $as_echo_n "checking whether strstr works... " >&6; }
36269 if ${gl_cv_func_strstr_works_always+:} false; then :
36270 $as_echo_n "(cached) " >&6
36272 if test "$cross_compiling" = yes; then :
36273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36274 /* end confdefs.h. */
36276 #ifdef __GNU_LIBRARY__
36277 #include <features.h>
36278 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
36279 || defined __UCLIBC__
36282 #elif defined __CYGWIN__
36283 #include <cygwin/version.h>
36284 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
36292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
36293 $EGREP "Lucky user" >/dev/null 2>&1; then :
36294 gl_cv_func_strstr_works_always="guessing yes"
36296 gl_cv_func_strstr_works_always="guessing no"
36302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36303 /* end confdefs.h. */
36305 #include <string.h> /* for strstr */
36306 #define P "_EF_BF_BD"
36307 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
36308 #define NEEDLE P P P P P
36313 return !!strstr (HAYSTACK, NEEDLE);
36319 if ac_fn_c_try_run "$LINENO"; then :
36320 gl_cv_func_strstr_works_always=yes
36322 gl_cv_func_strstr_works_always=no
36324 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36325 conftest.$ac_objext conftest.beam conftest.$ac_ext
36330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
36331 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
36332 case "$gl_cv_func_strstr_works_always" in
36340 if test $REPLACE_STRSTR = 1; then
36349 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
36363 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
36368 for ac_func in strtol
36370 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
36371 if test "x$ac_cv_func_strtol" = xyes; then :
36372 cat >>confdefs.h <<_ACEOF
36373 #define HAVE_STRTOL 1
36380 if test $ac_cv_func_strtol = no; then
36389 gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
36393 for ac_func in strtoul
36395 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
36396 if test "x$ac_cv_func_strtoul" = xyes; then :
36397 cat >>confdefs.h <<_ACEOF
36398 #define HAVE_STRTOUL 1
36405 if test $ac_cv_func_strtoul = no; then
36414 gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
36420 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
36421 for ac_func in strtoull
36423 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
36424 if test "x$ac_cv_func_strtoull" = xyes; then :
36425 cat >>confdefs.h <<_ACEOF
36426 #define HAVE_STRTOULL 1
36432 if test $ac_cv_func_strtoull = no; then
36437 if test $HAVE_STRTOULL = 0; then
36446 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
36463 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
36484 if test "$ac_cv_have_decl_strtoumax" = yes; then
36485 if test "$ac_cv_func_strtoumax" != yes; then
36486 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
36487 REPLACE_STRTOUMAX=1
36490 HAVE_DECL_STRTOUMAX=0
36493 if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
36502 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
36505 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
36506 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
36512 cat >>confdefs.h <<_ACEOF
36513 #define HAVE_DECL_STRTOULL $ac_have_decl
36536 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
36541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
36542 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
36543 if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then :
36544 $as_echo_n "(cached) " >&6
36547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36548 /* end confdefs.h. */
36549 #include <sys/socket.h>
36558 if ac_fn_c_try_compile "$LINENO"; then :
36559 gl_cv_header_sys_socket_h_selfcontained=yes
36561 gl_cv_header_sys_socket_h_selfcontained=no
36563 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
36567 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
36568 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
36569 for ac_func in shutdown
36571 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown"
36572 if test "x$ac_cv_func_shutdown" = xyes; then :
36573 cat >>confdefs.h <<_ACEOF
36574 #define HAVE_SHUTDOWN 1
36580 if test $ac_cv_func_shutdown = yes; then
36581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
36582 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
36583 if ${gl_cv_header_sys_socket_h_shut+:} false; then :
36584 $as_echo_n "(cached) " >&6
36587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36588 /* end confdefs.h. */
36589 #include <sys/socket.h>
36593 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
36598 if ac_fn_c_try_compile "$LINENO"; then :
36599 gl_cv_header_sys_socket_h_shut=yes
36601 gl_cv_header_sys_socket_h_shut=no
36603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
36607 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
36608 if test $gl_cv_header_sys_socket_h_shut = no; then
36609 SYS_SOCKET_H='sys/socket.h'
36613 # We need to check for ws2tcpip.h now.
36631 if test $gl_cv_have_include_next = yes; then
36632 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
36634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
36635 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
36636 if ${gl_cv_next_sys_socket_h+:} false; then :
36637 $as_echo_n "(cached) " >&6
36640 if test $ac_cv_header_sys_socket_h = yes; then
36645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36646 /* end confdefs.h. */
36647 #include <sys/socket.h>
36650 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36651 *) gl_absname_cpp="$ac_cpp" ;;
36656 gl_dirsep_regex='[/\\]'
36659 gl_dirsep_regex='\/'
36662 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36663 gl_header_literal_regex=`echo 'sys/socket.h' \
36664 | sed -e "$gl_make_literal_regex_sed"`
36665 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36666 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36672 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36673 sed -n "$gl_absolute_header_sed"`
36675 gl_header=$gl_cv_absolute_sys_socket_h
36676 gl_cv_next_sys_socket_h='"'$gl_header'"'
36678 gl_cv_next_sys_socket_h='<'sys/socket.h'>'
36683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
36684 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
36686 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h
36688 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36689 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36690 gl_next_as_first_directive='<'sys/socket.h'>'
36692 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36693 gl_next_as_first_directive=$gl_cv_next_sys_socket_h
36695 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive
36700 if test $ac_cv_header_sys_socket_h = yes; then
36701 HAVE_SYS_SOCKET_H=1
36704 HAVE_SYS_SOCKET_H=0
36705 if test $ac_cv_header_ws2tcpip_h = yes; then
36714 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
36715 /* sys/types.h is not needed according to POSIX, but the
36716 sys/socket.h in i386-unknown-freebsd4.10 and
36717 powerpc-apple-darwin5.5 required it. */
36718 #include <sys/types.h>
36719 #ifdef HAVE_SYS_SOCKET_H
36720 #include <sys/socket.h>
36722 #ifdef HAVE_WS2TCPIP_H
36723 #include <ws2tcpip.h>
36727 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
36729 cat >>confdefs.h <<_ACEOF
36730 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
36735 ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
36736 /* sys/types.h is not needed according to POSIX, but the
36737 sys/socket.h in i386-unknown-freebsd4.10 and
36738 powerpc-apple-darwin5.5 required it. */
36739 #include <sys/types.h>
36740 #ifdef HAVE_SYS_SOCKET_H
36741 #include <sys/socket.h>
36743 #ifdef HAVE_WS2TCPIP_H
36744 #include <ws2tcpip.h>
36748 if test "x$ac_cv_type_sa_family_t" = xyes; then :
36750 cat >>confdefs.h <<_ACEOF
36751 #define HAVE_SA_FAMILY_T 1
36757 if test $ac_cv_type_struct_sockaddr_storage = no; then
36758 HAVE_STRUCT_SOCKADDR_STORAGE=0
36760 if test $ac_cv_type_sa_family_t = no; then
36763 if test $ac_cv_type_struct_sockaddr_storage != no; then
36764 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
36765 #ifdef HAVE_SYS_SOCKET_H
36766 #include <sys/socket.h>
36768 #ifdef HAVE_WS2TCPIP_H
36769 #include <ws2tcpip.h>
36773 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
36775 cat >>confdefs.h <<_ACEOF
36776 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
36781 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0
36785 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
36786 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
36787 SYS_SOCKET_H='sys/socket.h'
36799 if test $ac_cv_header_sys_socket_h != yes; then
36800 for ac_header in winsock2.h
36802 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
36803 if test "x$ac_cv_header_winsock2_h" = xyes; then :
36804 cat >>confdefs.h <<_ACEOF
36805 #define HAVE_WINSOCK2_H 1
36813 if test "$ac_cv_header_winsock2_h" = yes; then
36815 UNISTD_H_HAVE_WINSOCK2_H=1
36816 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
36824 for gl_func in socket connect accept bind getpeername getsockname getsockopt listen recv send recvfrom sendto setsockopt shutdown accept4; do
36825 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36827 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36828 if eval \${$as_gl_Symbol+:} false; then :
36829 $as_echo_n "(cached) " >&6
36831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36832 /* end confdefs.h. */
36834 /* Some systems require prerequisite headers. */
36835 #include <sys/types.h>
36836 #include <sys/socket.h>
36847 if ac_fn_c_try_compile "$LINENO"; then :
36848 eval "$as_gl_Symbol=yes"
36850 eval "$as_gl_Symbol=no"
36852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36854 eval ac_res=\$$as_gl_Symbol
36855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36856 $as_echo "$ac_res" >&6; }
36857 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
36858 cat >>confdefs.h <<_ACEOF
36859 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
36862 eval ac_cv_have_decl_$gl_func=yes
36888 if test $gl_cv_have_include_next = yes; then
36889 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
36891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
36892 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
36893 if ${gl_cv_next_sys_stat_h+:} false; then :
36894 $as_echo_n "(cached) " >&6
36897 if test $ac_cv_header_sys_stat_h = yes; then
36902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36903 /* end confdefs.h. */
36904 #include <sys/stat.h>
36907 aix*) gl_absname_cpp="$ac_cpp -C" ;;
36908 *) gl_absname_cpp="$ac_cpp" ;;
36913 gl_dirsep_regex='[/\\]'
36916 gl_dirsep_regex='\/'
36919 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
36920 gl_header_literal_regex=`echo 'sys/stat.h' \
36921 | sed -e "$gl_make_literal_regex_sed"`
36922 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
36923 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
36929 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
36930 sed -n "$gl_absolute_header_sed"`
36932 gl_header=$gl_cv_absolute_sys_stat_h
36933 gl_cv_next_sys_stat_h='"'$gl_header'"'
36935 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
36940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
36941 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
36943 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
36945 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
36946 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
36947 gl_next_as_first_directive='<'sys/stat.h'>'
36949 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
36950 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
36952 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
36964 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
36966 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
36970 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
36971 #include <sys/stat.h>
36973 if test "x$ac_cv_type_nlink_t" = xyes; then :
36977 $as_echo "#define nlink_t int" >>confdefs.h
36983 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
36984 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
36985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
36986 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
36987 if eval \${$as_gl_Symbol+:} false; then :
36988 $as_echo_n "(cached) " >&6
36990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36991 /* end confdefs.h. */
36992 #include <sys/stat.h>
37003 if ac_fn_c_try_compile "$LINENO"; then :
37004 eval "$as_gl_Symbol=yes"
37006 eval "$as_gl_Symbol=no"
37008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37010 eval ac_res=\$$as_gl_Symbol
37011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37012 $as_echo "$ac_res" >&6; }
37013 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37014 cat >>confdefs.h <<_ACEOF
37015 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37018 eval ac_cv_have_decl_$gl_func=yes
37047 if test $gl_cv_have_include_next = yes; then
37048 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
37050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
37051 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
37052 if ${gl_cv_next_sys_uio_h+:} false; then :
37053 $as_echo_n "(cached) " >&6
37056 if test $ac_cv_header_sys_uio_h = yes; then
37061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37062 /* end confdefs.h. */
37063 #include <sys/uio.h>
37066 aix*) gl_absname_cpp="$ac_cpp -C" ;;
37067 *) gl_absname_cpp="$ac_cpp" ;;
37072 gl_dirsep_regex='[/\\]'
37075 gl_dirsep_regex='\/'
37078 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37079 gl_header_literal_regex=`echo 'sys/uio.h' \
37080 | sed -e "$gl_make_literal_regex_sed"`
37081 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37082 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37088 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37089 sed -n "$gl_absolute_header_sed"`
37091 gl_header=$gl_cv_absolute_sys_uio_h
37092 gl_cv_next_sys_uio_h='"'$gl_header'"'
37094 gl_cv_next_sys_uio_h='<'sys/uio.h'>'
37099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
37100 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
37102 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h
37104 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37105 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37106 gl_next_as_first_directive='<'sys/uio.h'>'
37108 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37109 gl_next_as_first_directive=$gl_cv_next_sys_uio_h
37111 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive
37116 if test $ac_cv_header_sys_uio_h = yes; then
37142 if test $gl_cv_have_include_next = yes; then
37143 gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
37145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/utsname.h>" >&5
37146 $as_echo_n "checking absolute name of <sys/utsname.h>... " >&6; }
37147 if ${gl_cv_next_sys_utsname_h+:} false; then :
37148 $as_echo_n "(cached) " >&6
37151 if test $ac_cv_header_sys_utsname_h = yes; then
37156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37157 /* end confdefs.h. */
37158 #include <sys/utsname.h>
37161 aix*) gl_absname_cpp="$ac_cpp -C" ;;
37162 *) gl_absname_cpp="$ac_cpp" ;;
37167 gl_dirsep_regex='[/\\]'
37170 gl_dirsep_regex='\/'
37173 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37174 gl_header_literal_regex=`echo 'sys/utsname.h' \
37175 | sed -e "$gl_make_literal_regex_sed"`
37176 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37177 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37183 gl_cv_absolute_sys_utsname_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37184 sed -n "$gl_absolute_header_sed"`
37186 gl_header=$gl_cv_absolute_sys_utsname_h
37187 gl_cv_next_sys_utsname_h='"'$gl_header'"'
37189 gl_cv_next_sys_utsname_h='<'sys/utsname.h'>'
37194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_utsname_h" >&5
37195 $as_echo "$gl_cv_next_sys_utsname_h" >&6; }
37197 NEXT_SYS_UTSNAME_H=$gl_cv_next_sys_utsname_h
37199 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37200 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37201 gl_next_as_first_directive='<'sys/utsname.h'>'
37203 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37204 gl_next_as_first_directive=$gl_cv_next_sys_utsname_h
37206 NEXT_AS_FIRST_DIRECTIVE_SYS_UTSNAME_H=$gl_next_as_first_directive
37211 if test $ac_cv_header_sys_utsname_h != yes; then
37212 HAVE_SYS_UTSNAME_H=0
37213 HAVE_STRUCT_UTSNAME=0
37215 HAVE_SYS_UTSNAME_H=1
37216 ac_fn_c_check_type "$LINENO" "struct utsname" "ac_cv_type_struct_utsname" "
37217 /* Minix 3.1.8 has a bug: <stddef.h> must be included before
37218 <sys/utsname.h>. */
37219 #include <stddef.h>
37220 #include <sys/utsname.h>
37223 if test "x$ac_cv_type_struct_utsname" = xyes; then :
37225 cat >>confdefs.h <<_ACEOF
37226 #define HAVE_STRUCT_UTSNAME 1
37231 HAVE_STRUCT_UTSNAME=0
37238 for gl_func in uname; do
37239 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37241 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37242 if eval \${$as_gl_Symbol+:} false; then :
37243 $as_echo_n "(cached) " >&6
37245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37246 /* end confdefs.h. */
37248 /* Minix 3.1.8 has a bug: <stddef.h> must be included before
37249 <sys/utsname.h>. */
37250 #include <stddef.h>
37251 #include <sys/utsname.h>
37262 if ac_fn_c_try_compile "$LINENO"; then :
37263 eval "$as_gl_Symbol=yes"
37265 eval "$as_gl_Symbol=no"
37267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37269 eval ac_res=\$$as_gl_Symbol
37270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37271 $as_echo "$ac_res" >&6; }
37272 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37273 cat >>confdefs.h <<_ACEOF
37274 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37277 eval ac_cv_have_decl_$gl_func=yes
37301 if test $gl_cv_have_include_next = yes; then
37302 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
37304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
37305 $as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
37306 if ${gl_cv_next_sys_wait_h+:} false; then :
37307 $as_echo_n "(cached) " >&6
37310 if test $ac_cv_header_sys_wait_h = yes; then
37315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37316 /* end confdefs.h. */
37317 #include <sys/wait.h>
37320 aix*) gl_absname_cpp="$ac_cpp -C" ;;
37321 *) gl_absname_cpp="$ac_cpp" ;;
37326 gl_dirsep_regex='[/\\]'
37329 gl_dirsep_regex='\/'
37332 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37333 gl_header_literal_regex=`echo 'sys/wait.h' \
37334 | sed -e "$gl_make_literal_regex_sed"`
37335 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37336 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37342 gl_cv_absolute_sys_wait_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37343 sed -n "$gl_absolute_header_sed"`
37345 gl_header=$gl_cv_absolute_sys_wait_h
37346 gl_cv_next_sys_wait_h='"'$gl_header'"'
37348 gl_cv_next_sys_wait_h='<'sys/wait.h'>'
37353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
37354 $as_echo "$gl_cv_next_sys_wait_h" >&6; }
37356 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
37358 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37359 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37360 gl_next_as_first_directive='<'sys/wait.h'>'
37362 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37363 gl_next_as_first_directive=$gl_cv_next_sys_wait_h
37365 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
37374 for gl_func in waitpid; do
37375 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37377 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37378 if eval \${$as_gl_Symbol+:} false; then :
37379 $as_echo_n "(cached) " >&6
37381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37382 /* end confdefs.h. */
37383 #include <sys/wait.h>
37393 if ac_fn_c_try_compile "$LINENO"; then :
37394 eval "$as_gl_Symbol=yes"
37396 eval "$as_gl_Symbol=no"
37398 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37400 eval ac_res=\$$as_gl_Symbol
37401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37402 $as_echo "$ac_res" >&6; }
37403 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37404 cat >>confdefs.h <<_ACEOF
37405 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37408 eval ac_cv_have_decl_$gl_func=yes
37427 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
37429 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
37435 cat >>confdefs.h <<_ACEOF
37436 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
37439 if test $ac_cv_have_decl_localtime_r = no; then
37440 HAVE_DECL_LOCALTIME_R=0
37450 if test $ac_cv_func_localtime_r = yes; then
37452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
37453 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
37454 if ${gl_cv_time_r_posix+:} false; then :
37455 $as_echo_n "(cached) " >&6
37457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37458 /* end confdefs.h. */
37463 /* We don't need to append 'restrict's to the argument types,
37464 even though the POSIX signature has the 'restrict's,
37465 since C99 says they can't affect type compatibility. */
37466 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
37468 /* Check the return type is a pointer.
37469 On HP-UX 10 it is 'int'. */
37470 *localtime_r (0, 0);
37476 if ac_fn_c_try_compile "$LINENO"; then :
37477 gl_cv_time_r_posix=yes
37479 gl_cv_time_r_posix=no
37481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
37485 $as_echo "$gl_cv_time_r_posix" >&6; }
37486 if test $gl_cv_time_r_posix = yes; then
37487 REPLACE_LOCALTIME_R=0
37489 REPLACE_LOCALTIME_R=1
37495 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
37504 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
37521 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
37530 ac_fn_c_check_decl "$LINENO" "trunc" "ac_cv_have_decl_trunc" "#include <math.h>
37532 if test "x$ac_cv_have_decl_trunc" = xyes; then :
37538 cat >>confdefs.h <<_ACEOF
37539 #define HAVE_DECL_TRUNC $ac_have_decl
37542 if test "$ac_cv_have_decl_trunc" = yes; then
37544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37545 /* end confdefs.h. */
37546 #ifndef __NO_MATH_INLINES
37547 # define __NO_MATH_INLINES 1 /* for glibc */
37559 if ac_fn_c_try_link "$LINENO"; then :
37562 rm -f core conftest.err conftest.$ac_objext \
37563 conftest$ac_exeext conftest.$ac_ext
37564 if test "$TRUNC_LIBM" = "?"; then
37567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37568 /* end confdefs.h. */
37569 #ifndef __NO_MATH_INLINES
37570 # define __NO_MATH_INLINES 1 /* for glibc */
37582 if ac_fn_c_try_link "$LINENO"; then :
37585 rm -f core conftest.err conftest.$ac_objext \
37586 conftest$ac_exeext conftest.$ac_ext
37589 if test "$TRUNC_LIBM" = "?"; then
37596 if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
37601 if test $HAVE_DECL_TRUNC = 0 || test $REPLACE_TRUNC = 1; then
37610 gl_LIBOBJS="$gl_LIBOBJS trunc.$ac_objext"
37624 $as_echo "#define GNULIB_TEST_TRUNC 1" >>confdefs.h
37630 for ac_func in uname
37632 ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
37633 if test "x$ac_cv_func_uname" = xyes; then :
37634 cat >>confdefs.h <<_ACEOF
37635 #define HAVE_UNAME 1
37641 if test $ac_cv_func_uname = no; then
37645 if test $HAVE_UNAME = 0; then
37654 gl_LIBOBJS="$gl_LIBOBJS uname.$ac_objext"
37688 if test $gl_cv_have_include_next = yes; then
37689 gl_cv_next_unistd_h='<'unistd.h'>'
37691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
37692 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
37693 if ${gl_cv_next_unistd_h+:} false; then :
37694 $as_echo_n "(cached) " >&6
37697 if test $ac_cv_header_unistd_h = yes; then
37702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37703 /* end confdefs.h. */
37704 #include <unistd.h>
37707 aix*) gl_absname_cpp="$ac_cpp -C" ;;
37708 *) gl_absname_cpp="$ac_cpp" ;;
37713 gl_dirsep_regex='[/\\]'
37716 gl_dirsep_regex='\/'
37719 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
37720 gl_header_literal_regex=`echo 'unistd.h' \
37721 | sed -e "$gl_make_literal_regex_sed"`
37722 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
37723 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
37729 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
37730 sed -n "$gl_absolute_header_sed"`
37732 gl_header=$gl_cv_absolute_unistd_h
37733 gl_cv_next_unistd_h='"'$gl_header'"'
37735 gl_cv_next_unistd_h='<'unistd.h'>'
37740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
37741 $as_echo "$gl_cv_next_unistd_h" >&6; }
37743 NEXT_UNISTD_H=$gl_cv_next_unistd_h
37745 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
37746 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
37747 gl_next_as_first_directive='<'unistd.h'>'
37749 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
37750 gl_next_as_first_directive=$gl_cv_next_unistd_h
37752 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
37757 if test $ac_cv_header_unistd_h = yes; then
37769 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do
37770 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
37771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
37772 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
37773 if eval \${$as_gl_Symbol+:} false; then :
37774 $as_echo_n "(cached) " >&6
37776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37777 /* end confdefs.h. */
37780 # include <unistd.h>
37782 /* Some systems declare various items in the wrong headers. */
37783 #if !(defined __GLIBC__ && !defined __UCLIBC__)
37784 # include <fcntl.h>
37785 # include <stdio.h>
37786 # include <stdlib.h>
37787 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
37801 if ac_fn_c_try_compile "$LINENO"; then :
37802 eval "$as_gl_Symbol=yes"
37804 eval "$as_gl_Symbol=no"
37806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
37808 eval ac_res=\$$as_gl_Symbol
37809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37810 $as_echo "$ac_res" >&6; }
37811 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
37812 cat >>confdefs.h <<_ACEOF
37813 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
37816 eval ac_cv_have_decl_$gl_func=yes
37832 if { test "$HAVE_LIBUNISTRING" != yes \
37837 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37838 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37839 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37840 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37841 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
37851 LIBUNISTRING_UNITYPES_H='unitypes.h'
37853 LIBUNISTRING_UNITYPES_H=
37859 if { test "$HAVE_LIBUNISTRING" != yes \
37864 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37865 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37866 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37867 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37868 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
37878 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
37880 LIBUNISTRING_UNIWIDTH_H=
37886 if { test "$HAVE_LIBUNISTRING" != yes \
37891 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
37892 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
37893 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
37894 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
37895 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
37905 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
37906 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
37908 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
37909 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
37924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
37925 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
37926 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
37927 $as_echo_n "(cached) " >&6
37929 touch conftest.file
37930 # Assume that if we have lstat, we can also check symlinks.
37931 if test $ac_cv_func_lstat = yes; then
37932 ln -s conftest.file conftest.lnk
37934 if test "$cross_compiling" = yes; then :
37936 # Guess yes on glibc systems.
37937 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
37938 # If we don't know, assume the worst.
37939 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
37943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37944 /* end confdefs.h. */
37946 # include <unistd.h>
37947 #else /* on Windows with MSVC */
37956 if (!unlink ("conftest.file/"))
37958 else if (errno != ENOTDIR)
37961 if (!unlink ("conftest.lnk/"))
37963 else if (errno != ENOTDIR)
37972 if ac_fn_c_try_run "$LINENO"; then :
37973 gl_cv_func_unlink_honors_slashes=yes
37975 gl_cv_func_unlink_honors_slashes=no
37977 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37978 conftest.$ac_objext conftest.beam conftest.$ac_ext
37981 rm -f conftest.file conftest.lnk
37983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
37984 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
37985 case "$gl_cv_func_unlink_honors_slashes" in
37991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
37992 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
37993 if ${gl_cv_func_unlink_parent_fails+:} false; then :
37994 $as_echo_n "(cached) " >&6
37999 # Use the mktemp program if available. If not available, hide the error
38001 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
38002 test -n "$tmp" && test -d "$tmp"
38005 # Use a simple mkdir command. It is guaranteed to fail if the directory
38006 # already exists. $RANDOM is bash specific and expands to empty in shells
38007 # other than bash, ksh and zsh. Its use does not increase security;
38008 # rather, it minimizes the probability of failure in a very cluttered /tmp
38010 tmp=/tmp/gt$$-$RANDOM
38011 (umask 077 && mkdir "$tmp")
38013 mkdir "$tmp/subdir"
38014 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
38015 export GL_SUBDIR_FOR_UNLINK
38016 if test "$cross_compiling" = yes; then :
38017 # If we don't know, assume the worst.
38018 gl_cv_func_unlink_parent_fails="guessing no"
38021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38022 /* end confdefs.h. */
38024 #include <stdlib.h>
38026 # include <unistd.h>
38027 #else /* on Windows with MSVC */
38028 # include <direct.h>
38034 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
38036 else if (unlink ("..") == 0)
38042 if ac_fn_c_try_run "$LINENO"; then :
38043 gl_cv_func_unlink_parent_fails=yes
38045 gl_cv_func_unlink_parent_fails=no
38047 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38048 conftest.$ac_objext conftest.beam conftest.$ac_ext
38051 unset GL_SUBDIR_FOR_UNLINK
38054 gl_cv_func_unlink_parent_fails="guessing no"
38058 gl_cv_func_unlink_parent_fails="guessing yes"
38063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
38064 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
38065 case "$gl_cv_func_unlink_parent_fails" in
38069 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
38074 if test $REPLACE_UNLINK = 1; then
38083 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
38097 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
38113 if test $ac_cv_func_unlinkat = no; then
38116 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
38118 # Solaris 9 has *at functions, but uniformly mishandles trailing
38119 # slash in all of them.
38123 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
38124 if test $REPLACE_UNLINK = 1; then
38131 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
38140 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
38154 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
38167 if test $ac_cv_have_decl_unsetenv = no; then
38168 HAVE_DECL_UNSETENV=0
38170 for ac_func in unsetenv
38172 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
38173 if test "x$ac_cv_func_unsetenv" = xyes; then :
38174 cat >>confdefs.h <<_ACEOF
38175 #define HAVE_UNSETENV 1
38181 if test $ac_cv_func_unsetenv = no; then
38185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
38186 $as_echo_n "checking for unsetenv() return type... " >&6; }
38187 if ${gt_cv_func_unsetenv_ret+:} false; then :
38188 $as_echo_n "(cached) " >&6
38190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38191 /* end confdefs.h. */
38194 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
38195 #include <stdlib.h>
38200 int unsetenv (const char *name);
38210 if ac_fn_c_try_compile "$LINENO"; then :
38211 gt_cv_func_unsetenv_ret='int'
38213 gt_cv_func_unsetenv_ret='void'
38215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
38218 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
38219 if test $gt_cv_func_unsetenv_ret = 'void'; then
38221 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
38226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
38227 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
38228 if ${gl_cv_func_unsetenv_works+:} false; then :
38229 $as_echo_n "(cached) " >&6
38231 if test "$cross_compiling" = yes; then :
38233 # Guess yes on glibc systems.
38234 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
38235 # If we don't know, assume the worst.
38236 *) gl_cv_func_unsetenv_works="guessing no" ;;
38240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38241 /* end confdefs.h. */
38243 #include <stdlib.h>
38245 extern char **environ;
38251 char entry1[] = "a=1";
38252 char entry2[] = "b=2";
38253 char *env[] = { entry1, entry2, NULL };
38254 if (putenv ((char *) "a=1")) return 1;
38255 if (putenv (entry2)) return 2;
38258 if (getenv ("a")) return 3;
38259 if (!unsetenv ("") || errno != EINVAL) return 4;
38262 if (!getenv ("a")) return 5;
38265 if (getenv ("a")) return 6;
38271 if ac_fn_c_try_run "$LINENO"; then :
38272 gl_cv_func_unsetenv_works=yes
38274 gl_cv_func_unsetenv_works=no
38276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38277 conftest.$ac_objext conftest.beam conftest.$ac_ext
38281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
38282 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
38283 case "$gl_cv_func_unsetenv_works" in
38291 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
38300 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
38324 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
38336 if test $ac_cv_func_vasnprintf = no; then
38353 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
38363 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
38373 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
38383 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
38385 if test $ac_cv_func_vasnprintf = yes; then
38387 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
38401 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
38402 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
38406 $as_echo "#define ptrdiff_t long" >>confdefs.h
38420 # Check whether --with-packager was given.
38421 if test "${with_packager+set}" = set; then :
38422 withval=$with_packager; case $withval in
38425 cat >>confdefs.h <<_ACEOF
38426 #define PACKAGE_PACKAGER "$withval"
38435 # Check whether --with-packager-version was given.
38436 if test "${with_packager_version+set}" = set; then :
38437 withval=$with_packager_version; case $withval in
38440 cat >>confdefs.h <<_ACEOF
38441 #define PACKAGE_PACKAGER_VERSION "$withval"
38450 # Check whether --with-packager-bug-reports was given.
38451 if test "${with_packager_bug_reports+set}" = set; then :
38452 withval=$with_packager_bug_reports; case $withval in
38455 cat >>confdefs.h <<_ACEOF
38456 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
38464 if test "X$with_packager" = "X" && \
38465 test "X$with_packager_version$with_packager_bug_reports" != "X"
38467 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
38488 if test $gl_cv_have_include_next = yes; then
38489 gl_cv_next_wchar_h='<'wchar.h'>'
38491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
38492 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
38493 if ${gl_cv_next_wchar_h+:} false; then :
38494 $as_echo_n "(cached) " >&6
38497 if test $ac_cv_header_wchar_h = yes; then
38502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38503 /* end confdefs.h. */
38507 aix*) gl_absname_cpp="$ac_cpp -C" ;;
38508 *) gl_absname_cpp="$ac_cpp" ;;
38513 gl_dirsep_regex='[/\\]'
38516 gl_dirsep_regex='\/'
38519 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
38520 gl_header_literal_regex=`echo 'wchar.h' \
38521 | sed -e "$gl_make_literal_regex_sed"`
38522 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
38523 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
38529 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
38530 sed -n "$gl_absolute_header_sed"`
38532 gl_header=$gl_cv_absolute_wchar_h
38533 gl_cv_next_wchar_h='"'$gl_header'"'
38535 gl_cv_next_wchar_h='<'wchar.h'>'
38540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
38541 $as_echo "$gl_cv_next_wchar_h" >&6; }
38543 NEXT_WCHAR_H=$gl_cv_next_wchar_h
38545 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
38546 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
38547 gl_next_as_first_directive='<'wchar.h'>'
38549 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
38550 gl_next_as_first_directive=$gl_cv_next_wchar_h
38552 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
38557 if test $ac_cv_header_wchar_h = yes; then
38567 if test $gt_cv_c_wint_t = yes; then
38575 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do
38576 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
38577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
38578 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
38579 if eval \${$as_gl_Symbol+:} false; then :
38580 $as_echo_n "(cached) " >&6
38582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38583 /* end confdefs.h. */
38585 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38587 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38588 included before <wchar.h>. */
38589 #if !(defined __GLIBC__ && !defined __UCLIBC__)
38590 # include <stddef.h>
38591 # include <stdio.h>
38605 if ac_fn_c_try_compile "$LINENO"; then :
38606 eval "$as_gl_Symbol=yes"
38608 eval "$as_gl_Symbol=no"
38610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
38612 eval ac_res=\$$as_gl_Symbol
38613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
38614 $as_echo "$ac_res" >&6; }
38615 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
38616 cat >>confdefs.h <<_ACEOF
38617 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
38620 eval ac_cv_have_decl_$gl_func=yes
38647 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
38651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
38652 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
38653 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
38654 $as_echo_n "(cached) " >&6
38658 # Guess no on AIX and OSF/1.
38659 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
38660 # Guess yes otherwise.
38661 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
38663 if test $LOCALE_JA != none; then
38664 if test "$cross_compiling" = yes; then :
38667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38668 /* end confdefs.h. */
38670 #include <locale.h>
38671 #include <string.h>
38672 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38674 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38675 included before <wchar.h>. */
38676 #include <stddef.h>
38682 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38684 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
38688 memset (&state, '\0', sizeof (mbstate_t));
38689 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
38690 if (mbsinit (&state))
38696 if ac_fn_c_try_run "$LINENO"; then :
38697 gl_cv_func_mbrtowc_incomplete_state=yes
38699 gl_cv_func_mbrtowc_incomplete_state=no
38701 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38702 conftest.$ac_objext conftest.beam conftest.$ac_ext
38708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
38709 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
38714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
38715 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
38716 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
38717 $as_echo_n "(cached) " >&6
38721 # Guess no on Solaris 8.
38722 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
38723 # Guess yes otherwise.
38724 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
38726 if test $LOCALE_ZH_CN != none; then
38727 if test "$cross_compiling" = yes; then :
38730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38731 /* end confdefs.h. */
38733 #include <locale.h>
38734 #include <stdlib.h>
38735 #include <string.h>
38736 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38738 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38739 included before <wchar.h>. */
38740 #include <stddef.h>
38746 /* This fails on Solaris 8:
38747 mbrtowc returns 2, and sets wc to 0x00F0.
38748 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
38749 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38751 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
38755 memset (&state, '\0', sizeof (mbstate_t));
38756 if (mbrtowc (&wc, input + 3, 6, &state) != 4
38757 && mbtowc (&wc, input + 3, 6) == 4)
38763 if ac_fn_c_try_run "$LINENO"; then :
38764 gl_cv_func_mbrtowc_sanitycheck=yes
38766 gl_cv_func_mbrtowc_sanitycheck=no
38768 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38769 conftest.$ac_objext conftest.beam conftest.$ac_ext
38775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
38776 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
38778 REPLACE_MBSTATE_T=0
38779 case "$gl_cv_func_mbrtowc_incomplete_state" in
38781 *) REPLACE_MBSTATE_T=1 ;;
38783 case "$gl_cv_func_mbrtowc_sanitycheck" in
38785 *) REPLACE_MBSTATE_T=1 ;;
38788 REPLACE_MBSTATE_T=1
38799 if test $ac_cv_func_wcrtomb = no; then
38801 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
38802 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38804 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38805 included before <wchar.h>. */
38806 #include <stddef.h>
38812 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
38818 cat >>confdefs.h <<_ACEOF
38819 #define HAVE_DECL_WCRTOMB $ac_have_decl
38822 if test $ac_cv_have_decl_wcrtomb = yes; then
38826 if test $REPLACE_MBSTATE_T = 1; then
38834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
38835 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
38836 if ${gl_cv_func_wcrtomb_retval+:} false; then :
38837 $as_echo_n "(cached) " >&6
38841 # Guess no on AIX 4, OSF/1 and Solaris.
38842 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
38843 # Guess yes otherwise.
38844 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
38846 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
38847 if test "$cross_compiling" = yes; then :
38850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38851 /* end confdefs.h. */
38853 #include <locale.h>
38854 #include <string.h>
38855 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
38857 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
38858 included before <wchar.h>. */
38859 #include <stddef.h>
38866 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
38868 if (wcrtomb (NULL, 0, NULL) != 1)
38871 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
38873 if (wcrtomb (NULL, 0, NULL) != 1)
38876 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
38878 if (wcrtomb (NULL, 0, NULL) != 1)
38881 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
38883 if (wcrtomb (NULL, 0, NULL) != 1)
38889 if ac_fn_c_try_run "$LINENO"; then :
38890 gl_cv_func_wcrtomb_retval=yes
38892 gl_cv_func_wcrtomb_retval=no
38894 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
38895 conftest.$ac_objext conftest.beam conftest.$ac_ext
38901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
38902 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
38903 case "$gl_cv_func_wcrtomb_retval" in
38905 *) REPLACE_WCRTOMB=1 ;;
38910 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
38919 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
38936 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
38951 if test $ac_cv_func_iswcntrl = yes; then
38959 if test $gt_cv_c_wint_t = yes; then
38981 if test $gl_cv_have_include_next = yes; then
38982 gl_cv_next_wctype_h='<'wctype.h'>'
38984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
38985 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
38986 if ${gl_cv_next_wctype_h+:} false; then :
38987 $as_echo_n "(cached) " >&6
38990 if test $ac_cv_header_wctype_h = yes; then
38995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
38996 /* end confdefs.h. */
38997 #include <wctype.h>
39000 aix*) gl_absname_cpp="$ac_cpp -C" ;;
39001 *) gl_absname_cpp="$ac_cpp" ;;
39006 gl_dirsep_regex='[/\\]'
39009 gl_dirsep_regex='\/'
39012 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
39013 gl_header_literal_regex=`echo 'wctype.h' \
39014 | sed -e "$gl_make_literal_regex_sed"`
39015 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
39016 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
39022 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39023 sed -n "$gl_absolute_header_sed"`
39025 gl_header=$gl_cv_absolute_wctype_h
39026 gl_cv_next_wctype_h='"'$gl_header'"'
39028 gl_cv_next_wctype_h='<'wctype.h'>'
39033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
39034 $as_echo "$gl_cv_next_wctype_h" >&6; }
39036 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
39038 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39039 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39040 gl_next_as_first_directive='<'wctype.h'>'
39042 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39043 gl_next_as_first_directive=$gl_cv_next_wctype_h
39045 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
39050 if test $ac_cv_header_wctype_h = yes; then
39051 if test $ac_cv_func_iswcntrl = yes; then
39052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
39053 $as_echo_n "checking whether iswcntrl works... " >&6; }
39054 if ${gl_cv_func_iswcntrl_works+:} false; then :
39055 $as_echo_n "(cached) " >&6
39058 if test "$cross_compiling" = yes; then :
39059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39060 /* end confdefs.h. */
39061 #include <stdlib.h>
39062 #if __GNU_LIBRARY__ == 1
39063 Linux libc5 i18n is broken.
39073 if ac_fn_c_try_compile "$LINENO"; then :
39074 gl_cv_func_iswcntrl_works="guessing yes"
39076 gl_cv_func_iswcntrl_works="guessing no"
39078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39082 /* end confdefs.h. */
39084 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39085 included before <wchar.h>.
39086 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39087 must be included before <wchar.h>. */
39088 #include <stddef.h>
39092 #include <wctype.h>
39093 int main () { return iswprint ('x') == 0; }
39096 if ac_fn_c_try_run "$LINENO"; then :
39097 gl_cv_func_iswcntrl_works=yes
39099 gl_cv_func_iswcntrl_works=no
39101 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39102 conftest.$ac_objext conftest.beam conftest.$ac_ext
39107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
39108 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
39116 case "$gl_cv_func_iswcntrl_works" in
39117 *yes) REPLACE_ISWCNTRL=0 ;;
39118 *) REPLACE_ISWCNTRL=1 ;;
39122 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
39126 if test $REPLACE_ISWCNTRL = 1; then
39129 for ac_func in towlower
39131 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
39132 if test "x$ac_cv_func_towlower" = xyes; then :
39133 cat >>confdefs.h <<_ACEOF
39134 #define HAVE_TOWLOWER 1
39140 if test $ac_cv_func_towlower = yes; then
39143 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39144 included before <wchar.h>.
39145 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39146 must be included before <wchar.h>. */
39147 #include <stddef.h>
39152 # include <wctype.h>
39156 if test "x$ac_cv_have_decl_towlower" = xyes; then :
39162 cat >>confdefs.h <<_ACEOF
39163 #define HAVE_DECL_TOWLOWER $ac_have_decl
39166 if test $ac_cv_have_decl_towlower = yes; then
39175 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
39179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
39180 $as_echo_n "checking for wctype_t... " >&6; }
39181 if ${gl_cv_type_wctype_t+:} false; then :
39182 $as_echo_n "(cached) " >&6
39184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39185 /* end confdefs.h. */
39186 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39187 included before <wchar.h>.
39188 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39189 must be included before <wchar.h>. */
39190 #include <stddef.h>
39195 # include <wctype.h>
39207 if ac_fn_c_try_compile "$LINENO"; then :
39208 gl_cv_type_wctype_t=yes
39210 gl_cv_type_wctype_t=no
39212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
39216 $as_echo "$gl_cv_type_wctype_t" >&6; }
39217 if test $gl_cv_type_wctype_t = no; then
39221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
39222 $as_echo_n "checking for wctrans_t... " >&6; }
39223 if ${gl_cv_type_wctrans_t+:} false; then :
39224 $as_echo_n "(cached) " >&6
39226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39227 /* end confdefs.h. */
39228 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
39229 included before <wchar.h>.
39230 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
39231 must be included before <wchar.h>. */
39232 #include <stddef.h>
39236 #include <wctype.h>
39247 if ac_fn_c_try_compile "$LINENO"; then :
39248 gl_cv_type_wctrans_t=yes
39250 gl_cv_type_wctrans_t=no
39252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
39256 $as_echo "$gl_cv_type_wctrans_t" >&6; }
39257 if test $gl_cv_type_wctrans_t = no; then
39262 for gl_func in wctype iswctype wctrans towctrans ; do
39263 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
39264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
39265 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
39266 if eval \${$as_gl_Symbol+:} false; then :
39267 $as_echo_n "(cached) " >&6
39269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39270 /* end confdefs.h. */
39272 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39274 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
39275 included before <wchar.h>. */
39276 #if !(defined __GLIBC__ && !defined __UCLIBC__)
39277 # include <stddef.h>
39278 # include <stdio.h>
39280 # include <wchar.h>
39282 #include <wctype.h>
39293 if ac_fn_c_try_compile "$LINENO"; then :
39294 eval "$as_gl_Symbol=yes"
39296 eval "$as_gl_Symbol=no"
39298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39300 eval ac_res=\$$as_gl_Symbol
39301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39302 $as_echo "$ac_res" >&6; }
39303 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
39304 cat >>confdefs.h <<_ACEOF
39305 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
39308 eval ac_cv_have_decl_$gl_func=yes
39336 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
39337 /* AIX 3.2.5 declares wcwidth in <string.h>. */
39338 #include <string.h>
39339 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39341 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39342 before <wchar.h>. */
39343 #include <stddef.h>
39349 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
39355 cat >>confdefs.h <<_ACEOF
39356 #define HAVE_DECL_WCWIDTH $ac_have_decl
39359 if test $ac_cv_have_decl_wcwidth != yes; then
39360 HAVE_DECL_WCWIDTH=0
39363 if test $ac_cv_func_wcwidth = yes; then
39365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
39366 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
39367 if ${gl_cv_func_wcwidth_works+:} false; then :
39368 $as_echo_n "(cached) " >&6
39371 if test "$cross_compiling" = yes; then :
39374 # Guess yes on glibc and AIX 7 systems.
39375 *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
39376 *) gl_cv_func_wcwidth_works="guessing no";;
39380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39381 /* end confdefs.h. */
39383 #include <locale.h>
39384 /* AIX 3.2.5 declares wcwidth in <string.h>. */
39385 #include <string.h>
39386 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
39388 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
39389 before <wchar.h>. */
39390 #include <stddef.h>
39394 #if !HAVE_DECL_WCWIDTH
39396 # ifdef __cplusplus
39404 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
39406 if (wcwidth (0x0301) > 0)
39408 if (wcwidth (0x05B0) > 0)
39410 if (wcwidth (0x200B) > 0)
39416 if ac_fn_c_try_run "$LINENO"; then :
39417 gl_cv_func_wcwidth_works=yes
39419 gl_cv_func_wcwidth_works=no
39421 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
39422 conftest.$ac_objext conftest.beam conftest.$ac_ext
39427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
39428 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
39429 case "$gl_cv_func_wcwidth_works" in
39431 *no) REPLACE_WCWIDTH=1 ;;
39437 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
39446 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
39460 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
39470 for ac_header in stdint.h
39472 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
39473 if test "x$ac_cv_header_stdint_h" = xyes; then :
39474 cat >>confdefs.h <<_ACEOF
39475 #define HAVE_STDINT_H 1
39497 # End of code from modules
39518 gl_source_base='tests'
39519 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
39521 gl_module_indicator_condition=$gltests_WITNESS
39524 if test "$ac_cv_header_winsock2_h" = yes; then
39533 gltests_LIBOBJS="$gltests_LIBOBJS accept.$ac_objext"
39541 if test "$GNULIB_ACCEPT" != 1; then
39542 if test "$GNULIB_ACCEPT" = 0; then
39543 GNULIB_ACCEPT=$gl_module_indicator_condition
39545 GNULIB_ACCEPT="($GNULIB_ACCEPT || $gl_module_indicator_condition)"
39553 $as_echo "#define GNULIB_TEST_ACCEPT 1" >>confdefs.h
39567 if test $ac_cv_header_arpa_inet_h = yes; then
39588 if test $gl_cv_have_include_next = yes; then
39589 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
39591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
39592 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
39593 if ${gl_cv_next_arpa_inet_h+:} false; then :
39594 $as_echo_n "(cached) " >&6
39597 if test $ac_cv_header_arpa_inet_h = yes; then
39602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39603 /* end confdefs.h. */
39604 #include <arpa/inet.h>
39607 aix*) gl_absname_cpp="$ac_cpp -C" ;;
39608 *) gl_absname_cpp="$ac_cpp" ;;
39613 gl_dirsep_regex='[/\\]'
39616 gl_dirsep_regex='\/'
39619 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
39620 gl_header_literal_regex=`echo 'arpa/inet.h' \
39621 | sed -e "$gl_make_literal_regex_sed"`
39622 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
39623 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
39629 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
39630 sed -n "$gl_absolute_header_sed"`
39632 gl_header=$gl_cv_absolute_arpa_inet_h
39633 gl_cv_next_arpa_inet_h='"'$gl_header'"'
39635 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>'
39640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
39641 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
39643 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h
39645 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
39646 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
39647 gl_next_as_first_directive='<'arpa/inet.h'>'
39649 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
39650 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h
39652 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive
39661 for gl_func in inet_ntop inet_pton; do
39662 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
39663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
39664 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
39665 if eval \${$as_gl_Symbol+:} false; then :
39666 $as_echo_n "(cached) " >&6
39668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39669 /* end confdefs.h. */
39671 /* On some systems, this header is not self-consistent. */
39672 #if !(defined __GLIBC__ || defined __UCLIBC__)
39673 # include <sys/socket.h>
39676 # include <netdb.h>
39678 #include <arpa/inet.h>
39689 if ac_fn_c_try_compile "$LINENO"; then :
39690 eval "$as_gl_Symbol=yes"
39692 eval "$as_gl_Symbol=no"
39694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
39696 eval ac_res=\$$as_gl_Symbol
39697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
39698 $as_echo "$ac_res" >&6; }
39699 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
39700 cat >>confdefs.h <<_ACEOF
39701 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
39704 eval ac_cv_have_decl_$gl_func=yes
39711 if test "$ac_cv_header_winsock2_h" = yes; then
39720 gltests_LIBOBJS="$gltests_LIBOBJS bind.$ac_objext"
39728 if test "$GNULIB_BIND" != 1; then
39729 if test "$GNULIB_BIND" = 0; then
39730 GNULIB_BIND=$gl_module_indicator_condition
39732 GNULIB_BIND="($GNULIB_BIND || $gl_module_indicator_condition)"
39740 $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
39747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
39748 $as_echo_n "checking for a traditional french locale... " >&6; }
39749 if ${gt_cv_locale_fr+:} false; then :
39750 $as_echo_n "(cached) " >&6
39753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39754 /* end confdefs.h. */
39756 #include <locale.h>
39758 #if HAVE_LANGINFO_CODESET
39759 # include <langinfo.h>
39761 #include <stdlib.h>
39762 #include <string.h>
39766 /* Check whether the given locale name is recognized by the system. */
39767 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
39768 /* On native Windows, setlocale(category, "") looks at the system settings,
39769 not at the environment variables. Also, when an encoding suffix such
39770 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39771 category of the locale to "C". */
39772 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39773 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39776 if (setlocale (LC_ALL, "") == NULL) return 1;
39778 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39779 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39780 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39781 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39782 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39783 some unit tests fail.
39784 On MirBSD 10, when an unsupported locale is specified, setlocale()
39785 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
39786 #if HAVE_LANGINFO_CODESET
39788 const char *cs = nl_langinfo (CODESET);
39789 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
39790 || strcmp (cs, "UTF-8") == 0)
39795 /* On Cygwin, avoid locale names without encoding suffix, because the
39796 locale_charset() function relies on the encoding suffix. Note that
39797 LC_ALL is set on the command line. */
39798 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39800 /* Check whether in the abbreviation of the second month, the second
39801 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
39802 one byte long. This excludes the UTF-8 encoding. */
39803 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39804 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
39805 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39806 /* Check whether the decimal separator is a comma.
39807 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39808 are nl_langinfo(RADIXCHAR) are both ".". */
39809 if (localeconv () ->decimal_point[0] != ',') return 1;
39815 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39816 (eval $ac_link) 2>&5
39818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39819 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39821 # Handle native Windows specially, because there setlocale() interprets
39822 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39823 # "fr" or "fra" as "French" or "French_France.1252",
39824 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39825 # "ja" as "Japanese" or "Japanese_Japan.932",
39828 # Test for the native Windows locale name.
39829 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39830 gt_cv_locale_fr=French_France.1252
39833 gt_cv_locale_fr=none
39837 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39838 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39839 # configure script would override the LC_ALL setting. Likewise for
39840 # LC_CTYPE, which is also set at the beginning of the configure script.
39841 # Test for the usual locale name.
39842 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39843 gt_cv_locale_fr=fr_FR
39845 # Test for the locale name with explicit encoding suffix.
39846 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39847 gt_cv_locale_fr=fr_FR.ISO-8859-1
39849 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
39850 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39851 gt_cv_locale_fr=fr_FR.ISO8859-1
39853 # Test for the HP-UX locale name.
39854 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39855 gt_cv_locale_fr=fr_FR.iso88591
39857 # Test for the Solaris 7 locale name.
39858 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39862 gt_cv_locale_fr=none
39874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
39875 $as_echo "$gt_cv_locale_fr" >&6; }
39876 LOCALE_FR=$gt_cv_locale_fr
39881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
39882 $as_echo_n "checking for a french Unicode locale... " >&6; }
39883 if ${gt_cv_locale_fr_utf8+:} false; then :
39884 $as_echo_n "(cached) " >&6
39887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
39888 /* end confdefs.h. */
39890 #include <locale.h>
39892 #if HAVE_LANGINFO_CODESET
39893 # include <langinfo.h>
39895 #include <stdlib.h>
39896 #include <string.h>
39900 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
39901 imitates locale dependent behaviour by looking at the environment
39902 variables, and all locales use the UTF-8 encoding. */
39903 #if !(defined __BEOS__ || defined __HAIKU__)
39904 /* Check whether the given locale name is recognized by the system. */
39905 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
39906 /* On native Windows, setlocale(category, "") looks at the system settings,
39907 not at the environment variables. Also, when an encoding suffix such
39908 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
39909 category of the locale to "C". */
39910 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
39911 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
39914 if (setlocale (LC_ALL, "") == NULL) return 1;
39916 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
39917 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
39918 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
39919 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
39920 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
39921 some unit tests fail. */
39922 # if HAVE_LANGINFO_CODESET
39924 const char *cs = nl_langinfo (CODESET);
39925 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
39930 /* On Cygwin, avoid locale names without encoding suffix, because the
39931 locale_charset() function relies on the encoding suffix. Note that
39932 LC_ALL is set on the command line. */
39933 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
39935 /* Check whether in the abbreviation of the second month, the second
39936 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
39937 two bytes long, with UTF-8 encoding. */
39938 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
39939 if (strftime (buf, sizeof (buf), "%b", &t) < 4
39940 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
39943 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
39944 /* Check whether the decimal separator is a comma.
39945 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
39946 are nl_langinfo(RADIXCHAR) are both ".". */
39947 if (localeconv () ->decimal_point[0] != ',') return 1;
39953 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
39954 (eval $ac_link) 2>&5
39956 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
39957 test $ac_status = 0; } && test -s conftest$ac_exeext; then
39959 # Handle native Windows specially, because there setlocale() interprets
39960 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
39961 # "fr" or "fra" as "French" or "French_France.1252",
39962 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
39963 # "ja" as "Japanese" or "Japanese_Japan.932",
39966 # Test for the hypothetical native Windows locale name.
39967 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39968 gt_cv_locale_fr_utf8=French_France.65001
39971 gt_cv_locale_fr_utf8=none
39975 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
39976 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
39977 # configure script would override the LC_ALL setting. Likewise for
39978 # LC_CTYPE, which is also set at the beginning of the configure script.
39979 # Test for the usual locale name.
39980 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39981 gt_cv_locale_fr_utf8=fr_FR
39983 # Test for the locale name with explicit encoding suffix.
39984 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39985 gt_cv_locale_fr_utf8=fr_FR.UTF-8
39987 # Test for the Solaris 7 locale name.
39988 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
39989 gt_cv_locale_fr_utf8=fr.UTF-8
39992 gt_cv_locale_fr_utf8=none
40002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
40003 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
40004 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
40010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
40011 $as_echo_n "checking for a traditional french locale... " >&6; }
40012 if ${gt_cv_locale_fr+:} false; then :
40013 $as_echo_n "(cached) " >&6
40016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40017 /* end confdefs.h. */
40019 #include <locale.h>
40021 #if HAVE_LANGINFO_CODESET
40022 # include <langinfo.h>
40024 #include <stdlib.h>
40025 #include <string.h>
40029 /* Check whether the given locale name is recognized by the system. */
40030 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
40031 /* On native Windows, setlocale(category, "") looks at the system settings,
40032 not at the environment variables. Also, when an encoding suffix such
40033 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40034 category of the locale to "C". */
40035 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40036 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40039 if (setlocale (LC_ALL, "") == NULL) return 1;
40041 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40042 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
40043 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40044 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40045 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40046 some unit tests fail.
40047 On MirBSD 10, when an unsupported locale is specified, setlocale()
40048 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
40049 #if HAVE_LANGINFO_CODESET
40051 const char *cs = nl_langinfo (CODESET);
40052 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
40053 || strcmp (cs, "UTF-8") == 0)
40058 /* On Cygwin, avoid locale names without encoding suffix, because the
40059 locale_charset() function relies on the encoding suffix. Note that
40060 LC_ALL is set on the command line. */
40061 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40063 /* Check whether in the abbreviation of the second month, the second
40064 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
40065 one byte long. This excludes the UTF-8 encoding. */
40066 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
40067 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
40068 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
40069 /* Check whether the decimal separator is a comma.
40070 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
40071 are nl_langinfo(RADIXCHAR) are both ".". */
40072 if (localeconv () ->decimal_point[0] != ',') return 1;
40078 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40079 (eval $ac_link) 2>&5
40081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40082 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40084 # Handle native Windows specially, because there setlocale() interprets
40085 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40086 # "fr" or "fra" as "French" or "French_France.1252",
40087 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40088 # "ja" as "Japanese" or "Japanese_Japan.932",
40091 # Test for the native Windows locale name.
40092 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40093 gt_cv_locale_fr=French_France.1252
40096 gt_cv_locale_fr=none
40100 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40101 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40102 # configure script would override the LC_ALL setting. Likewise for
40103 # LC_CTYPE, which is also set at the beginning of the configure script.
40104 # Test for the usual locale name.
40105 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40106 gt_cv_locale_fr=fr_FR
40108 # Test for the locale name with explicit encoding suffix.
40109 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40110 gt_cv_locale_fr=fr_FR.ISO-8859-1
40112 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
40113 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40114 gt_cv_locale_fr=fr_FR.ISO8859-1
40116 # Test for the HP-UX locale name.
40117 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40118 gt_cv_locale_fr=fr_FR.iso88591
40120 # Test for the Solaris 7 locale name.
40121 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40125 gt_cv_locale_fr=none
40137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
40138 $as_echo "$gt_cv_locale_fr" >&6; }
40139 LOCALE_FR=$gt_cv_locale_fr
40145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
40146 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
40147 if ${gt_cv_locale_tr_utf8+:} false; then :
40148 $as_echo_n "(cached) " >&6
40151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40152 /* end confdefs.h. */
40154 #include <locale.h>
40156 #if HAVE_LANGINFO_CODESET
40157 # include <langinfo.h>
40159 #include <stdlib.h>
40160 #include <string.h>
40164 /* On BeOS, locales are not implemented in libc. Rather, libintl
40165 imitates locale dependent behaviour by looking at the environment
40166 variables, and all locales use the UTF-8 encoding. But BeOS does not
40167 implement the Turkish upper-/lowercase mappings. Therefore, let this
40168 program return 1 on BeOS. */
40169 /* Check whether the given locale name is recognized by the system. */
40170 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
40171 /* On native Windows, setlocale(category, "") looks at the system settings,
40172 not at the environment variables. Also, when an encoding suffix such
40173 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
40174 category of the locale to "C". */
40175 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
40176 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
40179 if (setlocale (LC_ALL, "") == NULL) return 1;
40181 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
40182 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
40183 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
40184 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
40185 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
40186 some unit tests fail. */
40187 #if HAVE_LANGINFO_CODESET
40189 const char *cs = nl_langinfo (CODESET);
40190 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
40195 /* On Cygwin, avoid locale names without encoding suffix, because the
40196 locale_charset() function relies on the encoding suffix. Note that
40197 LC_ALL is set on the command line. */
40198 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
40200 /* Check whether in the abbreviation of the eighth month, the second
40201 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
40202 two bytes long, with UTF-8 encoding. */
40203 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
40204 if (strftime (buf, sizeof (buf), "%b", &t) < 4
40205 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
40207 /* Check whether the upper-/lowercase mappings are as expected for
40209 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
40210 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
40216 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
40217 (eval $ac_link) 2>&5
40219 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
40220 test $ac_status = 0; } && test -s conftest$ac_exeext; then
40222 # Handle native Windows specially, because there setlocale() interprets
40223 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
40224 # "fr" or "fra" as "French" or "French_France.1252",
40225 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
40226 # "ja" as "Japanese" or "Japanese_Japan.932",
40229 # Test for the hypothetical native Windows locale name.
40230 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40231 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
40234 gt_cv_locale_tr_utf8=none
40238 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
40239 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
40240 # configure script would override the LC_ALL setting. Likewise for
40241 # LC_CTYPE, which is also set at the beginning of the configure script.
40242 # Test for the usual locale name.
40243 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40244 gt_cv_locale_tr_utf8=tr_TR
40246 # Test for the locale name with explicit encoding suffix.
40247 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40248 gt_cv_locale_tr_utf8=tr_TR.UTF-8
40250 # Test for the Solaris 7 locale name.
40251 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
40252 gt_cv_locale_tr_utf8=tr.UTF-8
40255 gt_cv_locale_tr_utf8=none
40262 gt_cv_locale_tr_utf8=none
40267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
40268 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
40269 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
40273 if test "$ac_cv_header_winsock2_h" = yes; then
40282 gltests_LIBOBJS="$gltests_LIBOBJS connect.$ac_objext"
40290 if test "$GNULIB_CONNECT" != 1; then
40291 if test "$GNULIB_CONNECT" = 0; then
40292 GNULIB_CONNECT=$gl_module_indicator_condition
40294 GNULIB_CONNECT="($GNULIB_CONNECT || $gl_module_indicator_condition)"
40302 $as_echo "#define GNULIB_TEST_CONNECT 1" >>confdefs.h
40308 cat >>confdefs.h <<_ACEOF
40309 #define GNULIB_FD_SAFER_FLAG $gl_module_indicator_condition
40316 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
40319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopen sets errno" >&5
40320 $as_echo_n "checking whether fdopen sets errno... " >&6; }
40321 if ${gl_cv_func_fdopen_works+:} false; then :
40322 $as_echo_n "(cached) " >&6
40325 if test "$cross_compiling" = yes; then :
40327 mingw*) gl_cv_func_fdopen_works="guessing no" ;;
40328 *) gl_cv_func_fdopen_works="guessing yes" ;;
40332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40333 /* end confdefs.h. */
40342 fp = fdopen (-1, "r");
40343 if (fp == NULL && errno == 0)
40348 if ac_fn_c_try_run "$LINENO"; then :
40349 gl_cv_func_fdopen_works=yes
40351 gl_cv_func_fdopen_works=no
40353 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40354 conftest.$ac_objext conftest.beam conftest.$ac_ext
40359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopen_works" >&5
40360 $as_echo "$gl_cv_func_fdopen_works" >&6; }
40361 case "$gl_cv_func_fdopen_works" in
40362 *no) REPLACE_FDOPEN=1 ;;
40366 if test $REPLACE_FDOPEN = 1; then
40375 gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext"
40384 if test "$GNULIB_FDOPEN" != 1; then
40385 if test "$GNULIB_FDOPEN" = 0; then
40386 GNULIB_FDOPEN=$gl_module_indicator_condition
40388 GNULIB_FDOPEN="($GNULIB_FDOPEN || $gl_module_indicator_condition)"
40396 $as_echo "#define GNULIB_TEST_FDOPEN 1" >>confdefs.h
40413 if test $ac_cv_func_ftruncate = yes; then
40418 REPLACE_FTRUNCATE=1
40426 if test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1; then
40435 gltests_LIBOBJS="$gltests_LIBOBJS ftruncate.$ac_objext"
40438 for ac_func in chsize
40440 ac_fn_c_check_func "$LINENO" "chsize" "ac_cv_func_chsize"
40441 if test "x$ac_cv_func_chsize" = xyes; then :
40442 cat >>confdefs.h <<_ACEOF
40443 #define HAVE_CHSIZE 1
40456 if test "$GNULIB_FTRUNCATE" != 1; then
40457 if test "$GNULIB_FTRUNCATE" = 0; then
40458 GNULIB_FTRUNCATE=$gl_module_indicator_condition
40460 GNULIB_FTRUNCATE="($GNULIB_FTRUNCATE || $gl_module_indicator_condition)"
40468 $as_echo "#define GNULIB_TEST_FTRUNCATE 1" >>confdefs.h
40475 for ac_func in getpagesize
40477 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
40478 if test "x$ac_cv_func_getpagesize" = xyes; then :
40479 cat >>confdefs.h <<_ACEOF
40480 #define HAVE_GETPAGESIZE 1
40486 if test $ac_cv_func_getpagesize = no; then
40488 for ac_header in OS.h
40490 ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
40491 if test "x$ac_cv_header_OS_h" = xyes; then :
40492 cat >>confdefs.h <<_ACEOF
40493 #define HAVE_OS_H 1
40500 if test $ac_cv_header_OS_h = yes; then
40503 for ac_header in sys/param.h
40505 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
40506 if test "x$ac_cv_header_sys_param_h" = xyes; then :
40507 cat >>confdefs.h <<_ACEOF
40508 #define HAVE_SYS_PARAM_H 1
40515 if test $ac_cv_header_sys_param_h = yes; then
40521 REPLACE_GETPAGESIZE=1
40524 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
40525 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
40528 HAVE_DECL_GETPAGESIZE=0
40532 if test $REPLACE_GETPAGESIZE = 1; then
40541 gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext"
40549 if test "$GNULIB_GETPAGESIZE" != 1; then
40550 if test "$GNULIB_GETPAGESIZE" = 0; then
40551 GNULIB_GETPAGESIZE=$gl_module_indicator_condition
40553 GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)"
40561 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
40584 if test $ac_cv_header_sys_socket_h != yes; then
40585 for ac_header in winsock2.h
40587 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
40588 if test "x$ac_cv_header_winsock2_h" = xyes; then :
40589 cat >>confdefs.h <<_ACEOF
40590 #define HAVE_WINSOCK2_H 1
40598 if test "$ac_cv_header_winsock2_h" = yes; then
40600 UNISTD_H_HAVE_WINSOCK2_H=1
40601 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
40607 if test $HAVE_WINSOCK2_H = 1; then
40608 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <ws2tcpip.h>
40610 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
40616 cat >>confdefs.h <<_ACEOF
40617 #define HAVE_DECL_INET_PTON $ac_have_decl
40620 if test $ac_cv_have_decl_inet_pton = yes; then
40621 REPLACE_INET_PTON=1
40622 INET_PTON_LIB="-lws2_32"
40624 HAVE_DECL_INET_PTON=0
40629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
40630 $as_echo_n "checking for library containing inet_pton... " >&6; }
40631 if ${ac_cv_search_inet_pton+:} false; then :
40632 $as_echo_n "(cached) " >&6
40634 ac_func_search_save_LIBS=$LIBS
40635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40636 /* end confdefs.h. */
40638 /* Override any GCC internal prototype to avoid an error.
40639 Use char because int might match the return type of a GCC
40640 builtin and then its argument prototype would still apply. */
40648 return inet_pton ();
40653 for ac_lib in '' nsl resolv; do
40654 if test -z "$ac_lib"; then
40655 ac_res="none required"
40658 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
40660 if ac_fn_c_try_link "$LINENO"; then :
40661 ac_cv_search_inet_pton=$ac_res
40663 rm -f core conftest.err conftest.$ac_objext \
40665 if ${ac_cv_search_inet_pton+:} false; then :
40669 if ${ac_cv_search_inet_pton+:} false; then :
40672 ac_cv_search_inet_pton=no
40674 rm conftest.$ac_ext
40675 LIBS=$ac_func_search_save_LIBS
40677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
40678 $as_echo "$ac_cv_search_inet_pton" >&6; }
40679 ac_res=$ac_cv_search_inet_pton
40680 if test "$ac_res" != no; then :
40681 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
40684 for ac_func in inet_pton
40686 ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
40687 if test "x$ac_cv_func_inet_pton" = xyes; then :
40688 cat >>confdefs.h <<_ACEOF
40689 #define HAVE_INET_PTON 1
40695 if test $ac_cv_func_inet_pton = no; then
40703 if test "$ac_cv_search_inet_pton" != "no" \
40704 && test "$ac_cv_search_inet_pton" != "none required"; then
40705 INET_PTON_LIB="$ac_cv_search_inet_pton"
40715 ac_fn_c_check_decl "$LINENO" "inet_pton" "ac_cv_have_decl_inet_pton" "#include <arpa/inet.h>
40717 # include <netdb.h>
40721 if test "x$ac_cv_have_decl_inet_pton" = xyes; then :
40727 cat >>confdefs.h <<_ACEOF
40728 #define HAVE_DECL_INET_PTON $ac_have_decl
40731 if test $ac_cv_have_decl_inet_pton = no; then
40732 HAVE_DECL_INET_PTON=0
40737 if test $HAVE_INET_PTON = 0 || test $REPLACE_INET_NTOP = 1; then
40746 gltests_LIBOBJS="$gltests_LIBOBJS inet_pton.$ac_objext"
40757 if test "$GNULIB_INET_PTON" != 1; then
40758 if test "$GNULIB_INET_PTON" = 0; then
40759 GNULIB_INET_PTON=$gl_module_indicator_condition
40761 GNULIB_INET_PTON="($GNULIB_INET_PTON || $gl_module_indicator_condition)"
40768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40769 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40770 if ${ac_cv_c_bigendian+:} false; then :
40771 $as_echo_n "(cached) " >&6
40773 ac_cv_c_bigendian=unknown
40774 # See if we're dealing with a universal compiler.
40775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40776 /* end confdefs.h. */
40777 #ifndef __APPLE_CC__
40778 not a universal capable compiler
40783 if ac_fn_c_try_compile "$LINENO"; then :
40785 # Check for potential -arch flags. It is not universal unless
40786 # there are at least two -arch flags with different values.
40789 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40790 if test -n "$ac_prev"; then
40792 i?86 | x86_64 | ppc | ppc64)
40793 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40796 ac_cv_c_bigendian=universal
40802 elif test "x$ac_word" = "x-arch"; then
40807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40808 if test $ac_cv_c_bigendian = unknown; then
40809 # See if sys/param.h defines the BYTE_ORDER macro.
40810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40811 /* end confdefs.h. */
40812 #include <sys/types.h>
40813 #include <sys/param.h>
40818 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
40819 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
40821 bogus endian macros
40828 if ac_fn_c_try_compile "$LINENO"; then :
40829 # It does; now see whether it defined to BIG_ENDIAN or not.
40830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40831 /* end confdefs.h. */
40832 #include <sys/types.h>
40833 #include <sys/param.h>
40838 #if BYTE_ORDER != BIG_ENDIAN
40846 if ac_fn_c_try_compile "$LINENO"; then :
40847 ac_cv_c_bigendian=yes
40849 ac_cv_c_bigendian=no
40851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40855 if test $ac_cv_c_bigendian = unknown; then
40856 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
40857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40858 /* end confdefs.h. */
40859 #include <limits.h>
40864 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
40865 bogus endian macros
40872 if ac_fn_c_try_compile "$LINENO"; then :
40873 # It does; now see whether it defined to _BIG_ENDIAN or not.
40874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40875 /* end confdefs.h. */
40876 #include <limits.h>
40881 #ifndef _BIG_ENDIAN
40889 if ac_fn_c_try_compile "$LINENO"; then :
40890 ac_cv_c_bigendian=yes
40892 ac_cv_c_bigendian=no
40894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40896 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40898 if test $ac_cv_c_bigendian = unknown; then
40899 # Compile a test program.
40900 if test "$cross_compiling" = yes; then :
40901 # Try to guess by grepping values from an object file.
40902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40903 /* end confdefs.h. */
40904 short int ascii_mm[] =
40905 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
40906 short int ascii_ii[] =
40907 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
40908 int use_ascii (int i) {
40909 return ascii_mm[i] + ascii_ii[i];
40911 short int ebcdic_ii[] =
40912 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
40913 short int ebcdic_mm[] =
40914 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
40915 int use_ebcdic (int i) {
40916 return ebcdic_mm[i] + ebcdic_ii[i];
40923 return use_ascii (foo) == use_ebcdic (foo);
40928 if ac_fn_c_try_compile "$LINENO"; then :
40929 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
40930 ac_cv_c_bigendian=yes
40932 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
40933 if test "$ac_cv_c_bigendian" = unknown; then
40934 ac_cv_c_bigendian=no
40936 # finding both strings is unlikely to happen, but who knows?
40937 ac_cv_c_bigendian=unknown
40941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40944 /* end confdefs.h. */
40945 $ac_includes_default
40950 /* Are we little or big endian? From Harbison&Steele. */
40954 char c[sizeof (long int)];
40957 return u.c[sizeof (long int) - 1] == 1;
40963 if ac_fn_c_try_run "$LINENO"; then :
40964 ac_cv_c_bigendian=no
40966 ac_cv_c_bigendian=yes
40968 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40969 conftest.$ac_objext conftest.beam conftest.$ac_ext
40974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
40975 $as_echo "$ac_cv_c_bigendian" >&6; }
40976 case $ac_cv_c_bigendian in #(
40978 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
40984 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
40988 as_fn_error $? "unknown endianness
40989 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
41006 if test "$ac_cv_header_winsock2_h" = yes; then
41009 for ac_func in ioctl
41011 ac_fn_c_check_func "$LINENO" "ioctl" "ac_cv_func_ioctl"
41012 if test "x$ac_cv_func_ioctl" = xyes; then :
41013 cat >>confdefs.h <<_ACEOF
41014 #define HAVE_IOCTL 1
41020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ioctl with POSIX signature" >&5
41021 $as_echo_n "checking for ioctl with POSIX signature... " >&6; }
41022 if ${gl_cv_func_ioctl_posix_signature+:} false; then :
41023 $as_echo_n "(cached) " >&6
41025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41026 /* end confdefs.h. */
41027 #include <sys/ioctl.h>
41035 int ioctl (int, int, ...);
41042 if ac_fn_c_try_compile "$LINENO"; then :
41043 gl_cv_func_ioctl_posix_signature=yes
41045 gl_cv_func_ioctl_posix_signature=no
41047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ioctl_posix_signature" >&5
41051 $as_echo "$gl_cv_func_ioctl_posix_signature" >&6; }
41052 if test $gl_cv_func_ioctl_posix_signature != yes; then
41057 if test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1; then
41066 gltests_LIBOBJS="$gltests_LIBOBJS ioctl.$ac_objext"
41074 if test "$GNULIB_IOCTL" != 1; then
41075 if test "$GNULIB_IOCTL" = 0; then
41076 GNULIB_IOCTL=$gl_module_indicator_condition
41078 GNULIB_IOCTL="($GNULIB_IOCTL || $gl_module_indicator_condition)"
41086 $as_echo "#define GNULIB_TEST_IOCTL 1" >>confdefs.h
41091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
41092 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
41093 if ${gl_cv_cc_float_expbit0+:} false; then :
41094 $as_echo_n "(cached) " >&6
41097 if test "$cross_compiling" = yes; then :
41098 gl_cv_cc_float_expbit0="word 0 bit 23"
41100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41101 /* end confdefs.h. */
41104 #include <stddef.h>
41106 #include <string.h>
41108 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41109 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
41110 static unsigned int ored_words[NWORDS];
41111 static unsigned int anded_words[NWORDS];
41112 static void add_to_ored_words (float x)
41116 /* Clear it first, in case
41117 sizeof (float) < sizeof (memory_float). */
41118 memset (&m, 0, sizeof (memory_float));
41120 for (i = 0; i < NWORDS; i++)
41122 ored_words[i] |= m.word[i];
41123 anded_words[i] &= m.word[i];
41129 FILE *fp = fopen ("conftest.out", "w");
41132 for (j = 0; j < NWORDS; j++)
41133 anded_words[j] = ~ (unsigned int) 0;
41134 add_to_ored_words (0.25f);
41135 add_to_ored_words (0.5f);
41136 add_to_ored_words (1.0f);
41137 add_to_ored_words (2.0f);
41138 add_to_ored_words (4.0f);
41139 /* Remove bits that are common (e.g. if representation of the first mantissa
41140 bit is explicit). */
41141 for (j = 0; j < NWORDS; j++)
41142 ored_words[j] &= ~anded_words[j];
41143 /* Now find the nonzero word. */
41144 for (j = 0; j < NWORDS; j++)
41145 if (ored_words[j] != 0)
41150 for (i = j + 1; i < NWORDS; i++)
41151 if (ored_words[i] != 0)
41153 fprintf (fp, "unknown");
41154 return (fclose (fp) != 0);
41157 if ((ored_words[j] >> i) & 1)
41159 fprintf (fp, "word %d bit %d", (int) j, (int) i);
41160 return (fclose (fp) != 0);
41163 fprintf (fp, "unknown");
41164 return (fclose (fp) != 0);
41168 if ac_fn_c_try_run "$LINENO"; then :
41169 gl_cv_cc_float_expbit0=`cat conftest.out`
41171 gl_cv_cc_float_expbit0="unknown"
41173 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41174 conftest.$ac_objext conftest.beam conftest.$ac_ext
41180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
41181 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
41182 case "$gl_cv_cc_float_expbit0" in
41184 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41185 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
41187 cat >>confdefs.h <<_ACEOF
41188 #define FLT_EXPBIT0_WORD $word
41192 cat >>confdefs.h <<_ACEOF
41193 #define FLT_EXPBIT0_BIT $bit
41200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
41201 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
41202 if ${gl_cv_cc_double_expbit0+:} false; then :
41203 $as_echo_n "(cached) " >&6
41206 if test "$cross_compiling" = yes; then :
41208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41209 /* end confdefs.h. */
41211 #if defined arm || defined __arm || defined __arm__
41216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41217 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
41218 gl_cv_cc_double_expbit0="unknown"
41222 if ${ac_cv_c_bigendian+:} false; then :
41223 $as_echo_n "(cached) " >&6
41225 ac_cv_c_bigendian=unknown
41226 # See if we're dealing with a universal compiler.
41227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41228 /* end confdefs.h. */
41229 #ifndef __APPLE_CC__
41230 not a universal capable compiler
41235 if ac_fn_c_try_compile "$LINENO"; then :
41237 # Check for potential -arch flags. It is not universal unless
41238 # there are at least two -arch flags with different values.
41241 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41242 if test -n "$ac_prev"; then
41244 i?86 | x86_64 | ppc | ppc64)
41245 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41248 ac_cv_c_bigendian=universal
41254 elif test "x$ac_word" = "x-arch"; then
41259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41260 if test $ac_cv_c_bigendian = unknown; then
41261 # See if sys/param.h defines the BYTE_ORDER macro.
41262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41263 /* end confdefs.h. */
41264 #include <sys/types.h>
41265 #include <sys/param.h>
41270 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41271 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41273 bogus endian macros
41280 if ac_fn_c_try_compile "$LINENO"; then :
41281 # It does; now see whether it defined to BIG_ENDIAN or not.
41282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41283 /* end confdefs.h. */
41284 #include <sys/types.h>
41285 #include <sys/param.h>
41290 #if BYTE_ORDER != BIG_ENDIAN
41298 if ac_fn_c_try_compile "$LINENO"; then :
41299 ac_cv_c_bigendian=yes
41301 ac_cv_c_bigendian=no
41303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41307 if test $ac_cv_c_bigendian = unknown; then
41308 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41310 /* end confdefs.h. */
41311 #include <limits.h>
41316 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41317 bogus endian macros
41324 if ac_fn_c_try_compile "$LINENO"; then :
41325 # It does; now see whether it defined to _BIG_ENDIAN or not.
41326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41327 /* end confdefs.h. */
41328 #include <limits.h>
41333 #ifndef _BIG_ENDIAN
41341 if ac_fn_c_try_compile "$LINENO"; then :
41342 ac_cv_c_bigendian=yes
41344 ac_cv_c_bigendian=no
41346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41350 if test $ac_cv_c_bigendian = unknown; then
41351 # Compile a test program.
41352 if test "$cross_compiling" = yes; then :
41353 # Try to guess by grepping values from an object file.
41354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41355 /* end confdefs.h. */
41356 short int ascii_mm[] =
41357 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41358 short int ascii_ii[] =
41359 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41360 int use_ascii (int i) {
41361 return ascii_mm[i] + ascii_ii[i];
41363 short int ebcdic_ii[] =
41364 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41365 short int ebcdic_mm[] =
41366 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41367 int use_ebcdic (int i) {
41368 return ebcdic_mm[i] + ebcdic_ii[i];
41375 return use_ascii (foo) == use_ebcdic (foo);
41380 if ac_fn_c_try_compile "$LINENO"; then :
41381 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41382 ac_cv_c_bigendian=yes
41384 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41385 if test "$ac_cv_c_bigendian" = unknown; then
41386 ac_cv_c_bigendian=no
41388 # finding both strings is unlikely to happen, but who knows?
41389 ac_cv_c_bigendian=unknown
41393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41396 /* end confdefs.h. */
41397 $ac_includes_default
41402 /* Are we little or big endian? From Harbison&Steele. */
41406 char c[sizeof (long int)];
41409 return u.c[sizeof (long int) - 1] == 1;
41415 if ac_fn_c_try_run "$LINENO"; then :
41416 ac_cv_c_bigendian=no
41418 ac_cv_c_bigendian=yes
41420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41421 conftest.$ac_objext conftest.beam conftest.$ac_ext
41427 case $ac_cv_c_bigendian in #(
41429 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
41431 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
41434 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
41438 gl_cv_cc_double_expbit0="unknown" ;;
41447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41448 /* end confdefs.h. */
41451 #include <stddef.h>
41453 #include <string.h>
41455 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41456 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
41457 static unsigned int ored_words[NWORDS];
41458 static unsigned int anded_words[NWORDS];
41459 static void add_to_ored_words (double x)
41463 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
41464 memset (&m, 0, sizeof (memory_double));
41466 for (i = 0; i < NWORDS; i++)
41468 ored_words[i] |= m.word[i];
41469 anded_words[i] &= m.word[i];
41475 FILE *fp = fopen ("conftest.out", "w");
41478 for (j = 0; j < NWORDS; j++)
41479 anded_words[j] = ~ (unsigned int) 0;
41480 add_to_ored_words (0.25);
41481 add_to_ored_words (0.5);
41482 add_to_ored_words (1.0);
41483 add_to_ored_words (2.0);
41484 add_to_ored_words (4.0);
41485 /* Remove bits that are common (e.g. if representation of the first mantissa
41486 bit is explicit). */
41487 for (j = 0; j < NWORDS; j++)
41488 ored_words[j] &= ~anded_words[j];
41489 /* Now find the nonzero word. */
41490 for (j = 0; j < NWORDS; j++)
41491 if (ored_words[j] != 0)
41496 for (i = j + 1; i < NWORDS; i++)
41497 if (ored_words[i] != 0)
41499 fprintf (fp, "unknown");
41500 return (fclose (fp) != 0);
41503 if ((ored_words[j] >> i) & 1)
41505 fprintf (fp, "word %d bit %d", (int) j, (int) i);
41506 return (fclose (fp) != 0);
41509 fprintf (fp, "unknown");
41510 return (fclose (fp) != 0);
41514 if ac_fn_c_try_run "$LINENO"; then :
41515 gl_cv_cc_double_expbit0=`cat conftest.out`
41517 gl_cv_cc_double_expbit0="unknown"
41519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41520 conftest.$ac_objext conftest.beam conftest.$ac_ext
41526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
41527 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
41528 case "$gl_cv_cc_double_expbit0" in
41530 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41531 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
41533 cat >>confdefs.h <<_ACEOF
41534 #define DBL_EXPBIT0_WORD $word
41538 cat >>confdefs.h <<_ACEOF
41539 #define DBL_EXPBIT0_BIT $bit
41547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
41548 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
41549 if ${gl_cv_cc_long_double_expbit0+:} false; then :
41550 $as_echo_n "(cached) " >&6
41553 if test "$cross_compiling" = yes; then :
41555 gl_cv_cc_long_double_expbit0="unknown"
41558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41559 /* end confdefs.h. */
41562 #include <stddef.h>
41564 #include <string.h>
41566 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41567 typedef union { long double value; unsigned int word[NWORDS]; }
41568 memory_long_double;
41569 static unsigned int ored_words[NWORDS];
41570 static unsigned int anded_words[NWORDS];
41571 static void add_to_ored_words (long double x)
41573 memory_long_double m;
41575 /* Clear it first, in case
41576 sizeof (long double) < sizeof (memory_long_double). */
41577 memset (&m, 0, sizeof (memory_long_double));
41579 for (i = 0; i < NWORDS; i++)
41581 ored_words[i] |= m.word[i];
41582 anded_words[i] &= m.word[i];
41588 FILE *fp = fopen ("conftest.out", "w");
41591 for (j = 0; j < NWORDS; j++)
41592 anded_words[j] = ~ (unsigned int) 0;
41593 add_to_ored_words (0.25L);
41594 add_to_ored_words (0.5L);
41595 add_to_ored_words (1.0L);
41596 add_to_ored_words (2.0L);
41597 add_to_ored_words (4.0L);
41598 /* Remove bits that are common (e.g. if representation of the first mantissa
41599 bit is explicit). */
41600 for (j = 0; j < NWORDS; j++)
41601 ored_words[j] &= ~anded_words[j];
41602 /* Now find the nonzero word. */
41603 for (j = 0; j < NWORDS; j++)
41604 if (ored_words[j] != 0)
41609 for (i = j + 1; i < NWORDS; i++)
41610 if (ored_words[i] != 0)
41612 fprintf (fp, "unknown");
41613 return (fclose (fp) != 0);
41616 if ((ored_words[j] >> i) & 1)
41618 fprintf (fp, "word %d bit %d", (int) j, (int) i);
41619 return (fclose (fp) != 0);
41622 fprintf (fp, "unknown");
41623 return (fclose (fp) != 0);
41627 if ac_fn_c_try_run "$LINENO"; then :
41628 gl_cv_cc_long_double_expbit0=`cat conftest.out`
41630 gl_cv_cc_long_double_expbit0="unknown"
41632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41633 conftest.$ac_objext conftest.beam conftest.$ac_ext
41639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
41640 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
41641 case "$gl_cv_cc_long_double_expbit0" in
41643 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41644 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
41646 cat >>confdefs.h <<_ACEOF
41647 #define LDBL_EXPBIT0_WORD $word
41651 cat >>confdefs.h <<_ACEOF
41652 #define LDBL_EXPBIT0_BIT $bit
41660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
41661 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
41662 if ${gl_cv_cc_float_expbit0+:} false; then :
41663 $as_echo_n "(cached) " >&6
41666 if test "$cross_compiling" = yes; then :
41667 gl_cv_cc_float_expbit0="word 0 bit 23"
41669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41670 /* end confdefs.h. */
41673 #include <stddef.h>
41675 #include <string.h>
41677 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
41678 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
41679 static unsigned int ored_words[NWORDS];
41680 static unsigned int anded_words[NWORDS];
41681 static void add_to_ored_words (float x)
41685 /* Clear it first, in case
41686 sizeof (float) < sizeof (memory_float). */
41687 memset (&m, 0, sizeof (memory_float));
41689 for (i = 0; i < NWORDS; i++)
41691 ored_words[i] |= m.word[i];
41692 anded_words[i] &= m.word[i];
41698 FILE *fp = fopen ("conftest.out", "w");
41701 for (j = 0; j < NWORDS; j++)
41702 anded_words[j] = ~ (unsigned int) 0;
41703 add_to_ored_words (0.25f);
41704 add_to_ored_words (0.5f);
41705 add_to_ored_words (1.0f);
41706 add_to_ored_words (2.0f);
41707 add_to_ored_words (4.0f);
41708 /* Remove bits that are common (e.g. if representation of the first mantissa
41709 bit is explicit). */
41710 for (j = 0; j < NWORDS; j++)
41711 ored_words[j] &= ~anded_words[j];
41712 /* Now find the nonzero word. */
41713 for (j = 0; j < NWORDS; j++)
41714 if (ored_words[j] != 0)
41719 for (i = j + 1; i < NWORDS; i++)
41720 if (ored_words[i] != 0)
41722 fprintf (fp, "unknown");
41723 return (fclose (fp) != 0);
41726 if ((ored_words[j] >> i) & 1)
41728 fprintf (fp, "word %d bit %d", (int) j, (int) i);
41729 return (fclose (fp) != 0);
41732 fprintf (fp, "unknown");
41733 return (fclose (fp) != 0);
41737 if ac_fn_c_try_run "$LINENO"; then :
41738 gl_cv_cc_float_expbit0=`cat conftest.out`
41740 gl_cv_cc_float_expbit0="unknown"
41742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41743 conftest.$ac_objext conftest.beam conftest.$ac_ext
41749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
41750 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
41751 case "$gl_cv_cc_float_expbit0" in
41753 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
41754 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
41756 cat >>confdefs.h <<_ACEOF
41757 #define FLT_EXPBIT0_WORD $word
41761 cat >>confdefs.h <<_ACEOF
41762 #define FLT_EXPBIT0_BIT $bit
41769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
41770 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
41771 if ${gl_cv_cc_double_expbit0+:} false; then :
41772 $as_echo_n "(cached) " >&6
41775 if test "$cross_compiling" = yes; then :
41777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41778 /* end confdefs.h. */
41780 #if defined arm || defined __arm || defined __arm__
41785 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41786 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
41787 gl_cv_cc_double_expbit0="unknown"
41791 if ${ac_cv_c_bigendian+:} false; then :
41792 $as_echo_n "(cached) " >&6
41794 ac_cv_c_bigendian=unknown
41795 # See if we're dealing with a universal compiler.
41796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41797 /* end confdefs.h. */
41798 #ifndef __APPLE_CC__
41799 not a universal capable compiler
41804 if ac_fn_c_try_compile "$LINENO"; then :
41806 # Check for potential -arch flags. It is not universal unless
41807 # there are at least two -arch flags with different values.
41810 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41811 if test -n "$ac_prev"; then
41813 i?86 | x86_64 | ppc | ppc64)
41814 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41817 ac_cv_c_bigendian=universal
41823 elif test "x$ac_word" = "x-arch"; then
41828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41829 if test $ac_cv_c_bigendian = unknown; then
41830 # See if sys/param.h defines the BYTE_ORDER macro.
41831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41832 /* end confdefs.h. */
41833 #include <sys/types.h>
41834 #include <sys/param.h>
41839 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41840 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41842 bogus endian macros
41849 if ac_fn_c_try_compile "$LINENO"; then :
41850 # It does; now see whether it defined to BIG_ENDIAN or not.
41851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41852 /* end confdefs.h. */
41853 #include <sys/types.h>
41854 #include <sys/param.h>
41859 #if BYTE_ORDER != BIG_ENDIAN
41867 if ac_fn_c_try_compile "$LINENO"; then :
41868 ac_cv_c_bigendian=yes
41870 ac_cv_c_bigendian=no
41872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41876 if test $ac_cv_c_bigendian = unknown; then
41877 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41879 /* end confdefs.h. */
41880 #include <limits.h>
41885 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41886 bogus endian macros
41893 if ac_fn_c_try_compile "$LINENO"; then :
41894 # It does; now see whether it defined to _BIG_ENDIAN or not.
41895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41896 /* end confdefs.h. */
41897 #include <limits.h>
41902 #ifndef _BIG_ENDIAN
41910 if ac_fn_c_try_compile "$LINENO"; then :
41911 ac_cv_c_bigendian=yes
41913 ac_cv_c_bigendian=no
41915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41917 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41919 if test $ac_cv_c_bigendian = unknown; then
41920 # Compile a test program.
41921 if test "$cross_compiling" = yes; then :
41922 # Try to guess by grepping values from an object file.
41923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41924 /* end confdefs.h. */
41925 short int ascii_mm[] =
41926 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41927 short int ascii_ii[] =
41928 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41929 int use_ascii (int i) {
41930 return ascii_mm[i] + ascii_ii[i];
41932 short int ebcdic_ii[] =
41933 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41934 short int ebcdic_mm[] =
41935 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41936 int use_ebcdic (int i) {
41937 return ebcdic_mm[i] + ebcdic_ii[i];
41944 return use_ascii (foo) == use_ebcdic (foo);
41949 if ac_fn_c_try_compile "$LINENO"; then :
41950 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41951 ac_cv_c_bigendian=yes
41953 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41954 if test "$ac_cv_c_bigendian" = unknown; then
41955 ac_cv_c_bigendian=no
41957 # finding both strings is unlikely to happen, but who knows?
41958 ac_cv_c_bigendian=unknown
41962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41965 /* end confdefs.h. */
41966 $ac_includes_default
41971 /* Are we little or big endian? From Harbison&Steele. */
41975 char c[sizeof (long int)];
41978 return u.c[sizeof (long int) - 1] == 1;
41984 if ac_fn_c_try_run "$LINENO"; then :
41985 ac_cv_c_bigendian=no
41987 ac_cv_c_bigendian=yes
41989 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41990 conftest.$ac_objext conftest.beam conftest.$ac_ext
41996 case $ac_cv_c_bigendian in #(
41998 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
42000 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
42003 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
42007 gl_cv_cc_double_expbit0="unknown" ;;
42016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42017 /* end confdefs.h. */
42020 #include <stddef.h>
42022 #include <string.h>
42024 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42025 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
42026 static unsigned int ored_words[NWORDS];
42027 static unsigned int anded_words[NWORDS];
42028 static void add_to_ored_words (double x)
42032 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
42033 memset (&m, 0, sizeof (memory_double));
42035 for (i = 0; i < NWORDS; i++)
42037 ored_words[i] |= m.word[i];
42038 anded_words[i] &= m.word[i];
42044 FILE *fp = fopen ("conftest.out", "w");
42047 for (j = 0; j < NWORDS; j++)
42048 anded_words[j] = ~ (unsigned int) 0;
42049 add_to_ored_words (0.25);
42050 add_to_ored_words (0.5);
42051 add_to_ored_words (1.0);
42052 add_to_ored_words (2.0);
42053 add_to_ored_words (4.0);
42054 /* Remove bits that are common (e.g. if representation of the first mantissa
42055 bit is explicit). */
42056 for (j = 0; j < NWORDS; j++)
42057 ored_words[j] &= ~anded_words[j];
42058 /* Now find the nonzero word. */
42059 for (j = 0; j < NWORDS; j++)
42060 if (ored_words[j] != 0)
42065 for (i = j + 1; i < NWORDS; i++)
42066 if (ored_words[i] != 0)
42068 fprintf (fp, "unknown");
42069 return (fclose (fp) != 0);
42072 if ((ored_words[j] >> i) & 1)
42074 fprintf (fp, "word %d bit %d", (int) j, (int) i);
42075 return (fclose (fp) != 0);
42078 fprintf (fp, "unknown");
42079 return (fclose (fp) != 0);
42083 if ac_fn_c_try_run "$LINENO"; then :
42084 gl_cv_cc_double_expbit0=`cat conftest.out`
42086 gl_cv_cc_double_expbit0="unknown"
42088 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42089 conftest.$ac_objext conftest.beam conftest.$ac_ext
42095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
42096 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
42097 case "$gl_cv_cc_double_expbit0" in
42099 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42100 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
42102 cat >>confdefs.h <<_ACEOF
42103 #define DBL_EXPBIT0_WORD $word
42107 cat >>confdefs.h <<_ACEOF
42108 #define DBL_EXPBIT0_BIT $bit
42116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
42117 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
42118 if ${gl_cv_cc_long_double_expbit0+:} false; then :
42119 $as_echo_n "(cached) " >&6
42122 if test "$cross_compiling" = yes; then :
42124 gl_cv_cc_long_double_expbit0="unknown"
42127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42128 /* end confdefs.h. */
42131 #include <stddef.h>
42133 #include <string.h>
42135 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42136 typedef union { long double value; unsigned int word[NWORDS]; }
42137 memory_long_double;
42138 static unsigned int ored_words[NWORDS];
42139 static unsigned int anded_words[NWORDS];
42140 static void add_to_ored_words (long double x)
42142 memory_long_double m;
42144 /* Clear it first, in case
42145 sizeof (long double) < sizeof (memory_long_double). */
42146 memset (&m, 0, sizeof (memory_long_double));
42148 for (i = 0; i < NWORDS; i++)
42150 ored_words[i] |= m.word[i];
42151 anded_words[i] &= m.word[i];
42157 FILE *fp = fopen ("conftest.out", "w");
42160 for (j = 0; j < NWORDS; j++)
42161 anded_words[j] = ~ (unsigned int) 0;
42162 add_to_ored_words (0.25L);
42163 add_to_ored_words (0.5L);
42164 add_to_ored_words (1.0L);
42165 add_to_ored_words (2.0L);
42166 add_to_ored_words (4.0L);
42167 /* Remove bits that are common (e.g. if representation of the first mantissa
42168 bit is explicit). */
42169 for (j = 0; j < NWORDS; j++)
42170 ored_words[j] &= ~anded_words[j];
42171 /* Now find the nonzero word. */
42172 for (j = 0; j < NWORDS; j++)
42173 if (ored_words[j] != 0)
42178 for (i = j + 1; i < NWORDS; i++)
42179 if (ored_words[i] != 0)
42181 fprintf (fp, "unknown");
42182 return (fclose (fp) != 0);
42185 if ((ored_words[j] >> i) & 1)
42187 fprintf (fp, "word %d bit %d", (int) j, (int) i);
42188 return (fclose (fp) != 0);
42191 fprintf (fp, "unknown");
42192 return (fclose (fp) != 0);
42196 if ac_fn_c_try_run "$LINENO"; then :
42197 gl_cv_cc_long_double_expbit0=`cat conftest.out`
42199 gl_cv_cc_long_double_expbit0="unknown"
42201 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42202 conftest.$ac_objext conftest.beam conftest.$ac_ext
42208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
42209 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
42210 case "$gl_cv_cc_long_double_expbit0" in
42212 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42213 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
42215 cat >>confdefs.h <<_ACEOF
42216 #define LDBL_EXPBIT0_WORD $word
42220 cat >>confdefs.h <<_ACEOF
42221 #define LDBL_EXPBIT0_BIT $bit
42229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
42230 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
42231 if ${gl_cv_cc_double_expbit0+:} false; then :
42232 $as_echo_n "(cached) " >&6
42235 if test "$cross_compiling" = yes; then :
42237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42238 /* end confdefs.h. */
42240 #if defined arm || defined __arm || defined __arm__
42245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
42246 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
42247 gl_cv_cc_double_expbit0="unknown"
42251 if ${ac_cv_c_bigendian+:} false; then :
42252 $as_echo_n "(cached) " >&6
42254 ac_cv_c_bigendian=unknown
42255 # See if we're dealing with a universal compiler.
42256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42257 /* end confdefs.h. */
42258 #ifndef __APPLE_CC__
42259 not a universal capable compiler
42264 if ac_fn_c_try_compile "$LINENO"; then :
42266 # Check for potential -arch flags. It is not universal unless
42267 # there are at least two -arch flags with different values.
42270 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
42271 if test -n "$ac_prev"; then
42273 i?86 | x86_64 | ppc | ppc64)
42274 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
42277 ac_cv_c_bigendian=universal
42283 elif test "x$ac_word" = "x-arch"; then
42288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42289 if test $ac_cv_c_bigendian = unknown; then
42290 # See if sys/param.h defines the BYTE_ORDER macro.
42291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42292 /* end confdefs.h. */
42293 #include <sys/types.h>
42294 #include <sys/param.h>
42299 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
42300 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
42302 bogus endian macros
42309 if ac_fn_c_try_compile "$LINENO"; then :
42310 # It does; now see whether it defined to BIG_ENDIAN or not.
42311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42312 /* end confdefs.h. */
42313 #include <sys/types.h>
42314 #include <sys/param.h>
42319 #if BYTE_ORDER != BIG_ENDIAN
42327 if ac_fn_c_try_compile "$LINENO"; then :
42328 ac_cv_c_bigendian=yes
42330 ac_cv_c_bigendian=no
42332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42336 if test $ac_cv_c_bigendian = unknown; then
42337 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
42338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42339 /* end confdefs.h. */
42340 #include <limits.h>
42345 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
42346 bogus endian macros
42353 if ac_fn_c_try_compile "$LINENO"; then :
42354 # It does; now see whether it defined to _BIG_ENDIAN or not.
42355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42356 /* end confdefs.h. */
42357 #include <limits.h>
42362 #ifndef _BIG_ENDIAN
42370 if ac_fn_c_try_compile "$LINENO"; then :
42371 ac_cv_c_bigendian=yes
42373 ac_cv_c_bigendian=no
42375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42379 if test $ac_cv_c_bigendian = unknown; then
42380 # Compile a test program.
42381 if test "$cross_compiling" = yes; then :
42382 # Try to guess by grepping values from an object file.
42383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42384 /* end confdefs.h. */
42385 short int ascii_mm[] =
42386 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
42387 short int ascii_ii[] =
42388 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42389 int use_ascii (int i) {
42390 return ascii_mm[i] + ascii_ii[i];
42392 short int ebcdic_ii[] =
42393 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42394 short int ebcdic_mm[] =
42395 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42396 int use_ebcdic (int i) {
42397 return ebcdic_mm[i] + ebcdic_ii[i];
42404 return use_ascii (foo) == use_ebcdic (foo);
42409 if ac_fn_c_try_compile "$LINENO"; then :
42410 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42411 ac_cv_c_bigendian=yes
42413 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42414 if test "$ac_cv_c_bigendian" = unknown; then
42415 ac_cv_c_bigendian=no
42417 # finding both strings is unlikely to happen, but who knows?
42418 ac_cv_c_bigendian=unknown
42422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42425 /* end confdefs.h. */
42426 $ac_includes_default
42431 /* Are we little or big endian? From Harbison&Steele. */
42435 char c[sizeof (long int)];
42438 return u.c[sizeof (long int) - 1] == 1;
42444 if ac_fn_c_try_run "$LINENO"; then :
42445 ac_cv_c_bigendian=no
42447 ac_cv_c_bigendian=yes
42449 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42450 conftest.$ac_objext conftest.beam conftest.$ac_ext
42456 case $ac_cv_c_bigendian in #(
42458 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
42460 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
42463 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
42467 gl_cv_cc_double_expbit0="unknown" ;;
42476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42477 /* end confdefs.h. */
42480 #include <stddef.h>
42482 #include <string.h>
42484 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42485 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
42486 static unsigned int ored_words[NWORDS];
42487 static unsigned int anded_words[NWORDS];
42488 static void add_to_ored_words (double x)
42492 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
42493 memset (&m, 0, sizeof (memory_double));
42495 for (i = 0; i < NWORDS; i++)
42497 ored_words[i] |= m.word[i];
42498 anded_words[i] &= m.word[i];
42504 FILE *fp = fopen ("conftest.out", "w");
42507 for (j = 0; j < NWORDS; j++)
42508 anded_words[j] = ~ (unsigned int) 0;
42509 add_to_ored_words (0.25);
42510 add_to_ored_words (0.5);
42511 add_to_ored_words (1.0);
42512 add_to_ored_words (2.0);
42513 add_to_ored_words (4.0);
42514 /* Remove bits that are common (e.g. if representation of the first mantissa
42515 bit is explicit). */
42516 for (j = 0; j < NWORDS; j++)
42517 ored_words[j] &= ~anded_words[j];
42518 /* Now find the nonzero word. */
42519 for (j = 0; j < NWORDS; j++)
42520 if (ored_words[j] != 0)
42525 for (i = j + 1; i < NWORDS; i++)
42526 if (ored_words[i] != 0)
42528 fprintf (fp, "unknown");
42529 return (fclose (fp) != 0);
42532 if ((ored_words[j] >> i) & 1)
42534 fprintf (fp, "word %d bit %d", (int) j, (int) i);
42535 return (fclose (fp) != 0);
42538 fprintf (fp, "unknown");
42539 return (fclose (fp) != 0);
42543 if ac_fn_c_try_run "$LINENO"; then :
42544 gl_cv_cc_double_expbit0=`cat conftest.out`
42546 gl_cv_cc_double_expbit0="unknown"
42548 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42549 conftest.$ac_objext conftest.beam conftest.$ac_ext
42555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
42556 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
42557 case "$gl_cv_cc_double_expbit0" in
42559 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42560 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
42562 cat >>confdefs.h <<_ACEOF
42563 #define DBL_EXPBIT0_WORD $word
42567 cat >>confdefs.h <<_ACEOF
42568 #define DBL_EXPBIT0_BIT $bit
42575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
42576 $as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
42577 if ${gl_cv_cc_float_expbit0+:} false; then :
42578 $as_echo_n "(cached) " >&6
42581 if test "$cross_compiling" = yes; then :
42582 gl_cv_cc_float_expbit0="word 0 bit 23"
42584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42585 /* end confdefs.h. */
42588 #include <stddef.h>
42590 #include <string.h>
42592 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42593 typedef union { float value; unsigned int word[NWORDS]; } memory_float;
42594 static unsigned int ored_words[NWORDS];
42595 static unsigned int anded_words[NWORDS];
42596 static void add_to_ored_words (float x)
42600 /* Clear it first, in case
42601 sizeof (float) < sizeof (memory_float). */
42602 memset (&m, 0, sizeof (memory_float));
42604 for (i = 0; i < NWORDS; i++)
42606 ored_words[i] |= m.word[i];
42607 anded_words[i] &= m.word[i];
42613 FILE *fp = fopen ("conftest.out", "w");
42616 for (j = 0; j < NWORDS; j++)
42617 anded_words[j] = ~ (unsigned int) 0;
42618 add_to_ored_words (0.25f);
42619 add_to_ored_words (0.5f);
42620 add_to_ored_words (1.0f);
42621 add_to_ored_words (2.0f);
42622 add_to_ored_words (4.0f);
42623 /* Remove bits that are common (e.g. if representation of the first mantissa
42624 bit is explicit). */
42625 for (j = 0; j < NWORDS; j++)
42626 ored_words[j] &= ~anded_words[j];
42627 /* Now find the nonzero word. */
42628 for (j = 0; j < NWORDS; j++)
42629 if (ored_words[j] != 0)
42634 for (i = j + 1; i < NWORDS; i++)
42635 if (ored_words[i] != 0)
42637 fprintf (fp, "unknown");
42638 return (fclose (fp) != 0);
42641 if ((ored_words[j] >> i) & 1)
42643 fprintf (fp, "word %d bit %d", (int) j, (int) i);
42644 return (fclose (fp) != 0);
42647 fprintf (fp, "unknown");
42648 return (fclose (fp) != 0);
42652 if ac_fn_c_try_run "$LINENO"; then :
42653 gl_cv_cc_float_expbit0=`cat conftest.out`
42655 gl_cv_cc_float_expbit0="unknown"
42657 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42658 conftest.$ac_objext conftest.beam conftest.$ac_ext
42664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
42665 $as_echo "$gl_cv_cc_float_expbit0" >&6; }
42666 case "$gl_cv_cc_float_expbit0" in
42668 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42669 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
42671 cat >>confdefs.h <<_ACEOF
42672 #define FLT_EXPBIT0_WORD $word
42676 cat >>confdefs.h <<_ACEOF
42677 #define FLT_EXPBIT0_BIT $bit
42685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
42686 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
42687 if ${gl_cv_cc_long_double_expbit0+:} false; then :
42688 $as_echo_n "(cached) " >&6
42691 if test "$cross_compiling" = yes; then :
42693 gl_cv_cc_long_double_expbit0="unknown"
42696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42697 /* end confdefs.h. */
42700 #include <stddef.h>
42702 #include <string.h>
42704 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
42705 typedef union { long double value; unsigned int word[NWORDS]; }
42706 memory_long_double;
42707 static unsigned int ored_words[NWORDS];
42708 static unsigned int anded_words[NWORDS];
42709 static void add_to_ored_words (long double x)
42711 memory_long_double m;
42713 /* Clear it first, in case
42714 sizeof (long double) < sizeof (memory_long_double). */
42715 memset (&m, 0, sizeof (memory_long_double));
42717 for (i = 0; i < NWORDS; i++)
42719 ored_words[i] |= m.word[i];
42720 anded_words[i] &= m.word[i];
42726 FILE *fp = fopen ("conftest.out", "w");
42729 for (j = 0; j < NWORDS; j++)
42730 anded_words[j] = ~ (unsigned int) 0;
42731 add_to_ored_words (0.25L);
42732 add_to_ored_words (0.5L);
42733 add_to_ored_words (1.0L);
42734 add_to_ored_words (2.0L);
42735 add_to_ored_words (4.0L);
42736 /* Remove bits that are common (e.g. if representation of the first mantissa
42737 bit is explicit). */
42738 for (j = 0; j < NWORDS; j++)
42739 ored_words[j] &= ~anded_words[j];
42740 /* Now find the nonzero word. */
42741 for (j = 0; j < NWORDS; j++)
42742 if (ored_words[j] != 0)
42747 for (i = j + 1; i < NWORDS; i++)
42748 if (ored_words[i] != 0)
42750 fprintf (fp, "unknown");
42751 return (fclose (fp) != 0);
42754 if ((ored_words[j] >> i) & 1)
42756 fprintf (fp, "word %d bit %d", (int) j, (int) i);
42757 return (fclose (fp) != 0);
42760 fprintf (fp, "unknown");
42761 return (fclose (fp) != 0);
42765 if ac_fn_c_try_run "$LINENO"; then :
42766 gl_cv_cc_long_double_expbit0=`cat conftest.out`
42768 gl_cv_cc_long_double_expbit0="unknown"
42770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42771 conftest.$ac_objext conftest.beam conftest.$ac_ext
42777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
42778 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
42779 case "$gl_cv_cc_long_double_expbit0" in
42781 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
42782 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
42784 cat >>confdefs.h <<_ACEOF
42785 #define LDBL_EXPBIT0_WORD $word
42789 cat >>confdefs.h <<_ACEOF
42790 #define LDBL_EXPBIT0_BIT $bit
42798 if test "$ac_cv_header_winsock2_h" = yes; then
42807 gltests_LIBOBJS="$gltests_LIBOBJS listen.$ac_objext"
42815 if test "$GNULIB_LISTEN" != 1; then
42816 if test "$GNULIB_LISTEN" = 0; then
42817 GNULIB_LISTEN=$gl_module_indicator_condition
42819 GNULIB_LISTEN="($GNULIB_LISTEN || $gl_module_indicator_condition)"
42827 $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
42841 for ac_func in setlocale uselocale
42843 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
42844 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
42845 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
42846 cat >>confdefs.h <<_ACEOF
42847 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
42864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
42865 $as_echo_n "checking for a traditional french locale... " >&6; }
42866 if ${gt_cv_locale_fr+:} false; then :
42867 $as_echo_n "(cached) " >&6
42870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42871 /* end confdefs.h. */
42873 #include <locale.h>
42875 #if HAVE_LANGINFO_CODESET
42876 # include <langinfo.h>
42878 #include <stdlib.h>
42879 #include <string.h>
42883 /* Check whether the given locale name is recognized by the system. */
42884 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
42885 /* On native Windows, setlocale(category, "") looks at the system settings,
42886 not at the environment variables. Also, when an encoding suffix such
42887 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
42888 category of the locale to "C". */
42889 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
42890 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
42893 if (setlocale (LC_ALL, "") == NULL) return 1;
42895 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
42896 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
42897 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
42898 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
42899 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
42900 some unit tests fail.
42901 On MirBSD 10, when an unsupported locale is specified, setlocale()
42902 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
42903 #if HAVE_LANGINFO_CODESET
42905 const char *cs = nl_langinfo (CODESET);
42906 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
42907 || strcmp (cs, "UTF-8") == 0)
42912 /* On Cygwin, avoid locale names without encoding suffix, because the
42913 locale_charset() function relies on the encoding suffix. Note that
42914 LC_ALL is set on the command line. */
42915 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
42917 /* Check whether in the abbreviation of the second month, the second
42918 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
42919 one byte long. This excludes the UTF-8 encoding. */
42920 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
42921 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
42922 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
42923 /* Check whether the decimal separator is a comma.
42924 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
42925 are nl_langinfo(RADIXCHAR) are both ".". */
42926 if (localeconv () ->decimal_point[0] != ',') return 1;
42932 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
42933 (eval $ac_link) 2>&5
42935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42936 test $ac_status = 0; } && test -s conftest$ac_exeext; then
42938 # Handle native Windows specially, because there setlocale() interprets
42939 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
42940 # "fr" or "fra" as "French" or "French_France.1252",
42941 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
42942 # "ja" as "Japanese" or "Japanese_Japan.932",
42945 # Test for the native Windows locale name.
42946 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42947 gt_cv_locale_fr=French_France.1252
42950 gt_cv_locale_fr=none
42954 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
42955 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
42956 # configure script would override the LC_ALL setting. Likewise for
42957 # LC_CTYPE, which is also set at the beginning of the configure script.
42958 # Test for the usual locale name.
42959 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42960 gt_cv_locale_fr=fr_FR
42962 # Test for the locale name with explicit encoding suffix.
42963 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42964 gt_cv_locale_fr=fr_FR.ISO-8859-1
42966 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
42967 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42968 gt_cv_locale_fr=fr_FR.ISO8859-1
42970 # Test for the HP-UX locale name.
42971 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42972 gt_cv_locale_fr=fr_FR.iso88591
42974 # Test for the Solaris 7 locale name.
42975 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
42979 gt_cv_locale_fr=none
42991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
42992 $as_echo "$gt_cv_locale_fr" >&6; }
42993 LOCALE_FR=$gt_cv_locale_fr
42998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
42999 $as_echo_n "checking for a french Unicode locale... " >&6; }
43000 if ${gt_cv_locale_fr_utf8+:} false; then :
43001 $as_echo_n "(cached) " >&6
43004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43005 /* end confdefs.h. */
43007 #include <locale.h>
43009 #if HAVE_LANGINFO_CODESET
43010 # include <langinfo.h>
43012 #include <stdlib.h>
43013 #include <string.h>
43017 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
43018 imitates locale dependent behaviour by looking at the environment
43019 variables, and all locales use the UTF-8 encoding. */
43020 #if !(defined __BEOS__ || defined __HAIKU__)
43021 /* Check whether the given locale name is recognized by the system. */
43022 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43023 /* On native Windows, setlocale(category, "") looks at the system settings,
43024 not at the environment variables. Also, when an encoding suffix such
43025 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43026 category of the locale to "C". */
43027 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43028 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43031 if (setlocale (LC_ALL, "") == NULL) return 1;
43033 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43034 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43035 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43036 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43037 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43038 some unit tests fail. */
43039 # if HAVE_LANGINFO_CODESET
43041 const char *cs = nl_langinfo (CODESET);
43042 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43047 /* On Cygwin, avoid locale names without encoding suffix, because the
43048 locale_charset() function relies on the encoding suffix. Note that
43049 LC_ALL is set on the command line. */
43050 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43052 /* Check whether in the abbreviation of the second month, the second
43053 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43054 two bytes long, with UTF-8 encoding. */
43055 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43056 if (strftime (buf, sizeof (buf), "%b", &t) < 4
43057 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43060 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
43061 /* Check whether the decimal separator is a comma.
43062 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43063 are nl_langinfo(RADIXCHAR) are both ".". */
43064 if (localeconv () ->decimal_point[0] != ',') return 1;
43070 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43071 (eval $ac_link) 2>&5
43073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43074 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43076 # Handle native Windows specially, because there setlocale() interprets
43077 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43078 # "fr" or "fra" as "French" or "French_France.1252",
43079 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43080 # "ja" as "Japanese" or "Japanese_Japan.932",
43083 # Test for the hypothetical native Windows locale name.
43084 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43085 gt_cv_locale_fr_utf8=French_France.65001
43088 gt_cv_locale_fr_utf8=none
43092 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43093 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43094 # configure script would override the LC_ALL setting. Likewise for
43095 # LC_CTYPE, which is also set at the beginning of the configure script.
43096 # Test for the usual locale name.
43097 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43098 gt_cv_locale_fr_utf8=fr_FR
43100 # Test for the locale name with explicit encoding suffix.
43101 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43102 gt_cv_locale_fr_utf8=fr_FR.UTF-8
43104 # Test for the Solaris 7 locale name.
43105 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43106 gt_cv_locale_fr_utf8=fr.UTF-8
43109 gt_cv_locale_fr_utf8=none
43119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43120 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43121 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
43128 $as_echo_n "checking for a traditional japanese locale... " >&6; }
43129 if ${gt_cv_locale_ja+:} false; then :
43130 $as_echo_n "(cached) " >&6
43133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43134 /* end confdefs.h. */
43136 #include <locale.h>
43138 #if HAVE_LANGINFO_CODESET
43139 # include <langinfo.h>
43141 #include <stdlib.h>
43142 #include <string.h>
43148 /* Check whether the given locale name is recognized by the system. */
43149 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43150 /* On native Windows, setlocale(category, "") looks at the system settings,
43151 not at the environment variables. Also, when an encoding suffix such
43152 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43153 category of the locale to "C". */
43154 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43155 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43158 if (setlocale (LC_ALL, "") == NULL) return 1;
43160 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43161 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43162 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43163 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43164 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43165 some unit tests fail.
43166 On MirBSD 10, when an unsupported locale is specified, setlocale()
43167 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
43168 #if HAVE_LANGINFO_CODESET
43170 const char *cs = nl_langinfo (CODESET);
43171 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43172 || strcmp (cs, "UTF-8") == 0)
43177 /* On Cygwin, avoid locale names without encoding suffix, because the
43178 locale_charset() function relies on the encoding suffix. Note that
43179 LC_ALL is set on the command line. */
43180 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43182 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
43183 on Cygwin 1.5.x. */
43184 if (MB_CUR_MAX == 1)
43186 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43187 This excludes the UTF-8 encoding (except on MirBSD). */
43188 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43189 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43190 for (p = buf; *p != '\0'; p++)
43191 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43197 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43198 (eval $ac_link) 2>&5
43200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43201 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43203 # Handle native Windows specially, because there setlocale() interprets
43204 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43205 # "fr" or "fra" as "French" or "French_France.1252",
43206 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43207 # "ja" as "Japanese" or "Japanese_Japan.932",
43210 # Note that on native Windows, the Japanese locale is
43211 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
43212 # cannot use it here.
43213 gt_cv_locale_ja=none
43216 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43217 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43218 # configure script would override the LC_ALL setting. Likewise for
43219 # LC_CTYPE, which is also set at the beginning of the configure script.
43220 # Test for the AIX locale name.
43221 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43222 gt_cv_locale_ja=ja_JP
43224 # Test for the locale name with explicit encoding suffix.
43225 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43226 gt_cv_locale_ja=ja_JP.EUC-JP
43228 # Test for the HP-UX, OSF/1, NetBSD locale name.
43229 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43230 gt_cv_locale_ja=ja_JP.eucJP
43232 # Test for the IRIX, FreeBSD locale name.
43233 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43234 gt_cv_locale_ja=ja_JP.EUC
43236 # Test for the Solaris 7 locale name.
43237 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43240 # Special test for NetBSD 1.6.
43241 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
43242 gt_cv_locale_ja=ja_JP.eucJP
43245 gt_cv_locale_ja=none
43258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
43259 $as_echo "$gt_cv_locale_ja" >&6; }
43260 LOCALE_JA=$gt_cv_locale_ja
43266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
43267 $as_echo_n "checking for a transitional chinese locale... " >&6; }
43268 if ${gt_cv_locale_zh_CN+:} false; then :
43269 $as_echo_n "(cached) " >&6
43272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43273 /* end confdefs.h. */
43275 #include <locale.h>
43276 #include <stdlib.h>
43278 #if HAVE_LANGINFO_CODESET
43279 # include <langinfo.h>
43281 #include <stdlib.h>
43282 #include <string.h>
43288 /* Check whether the given locale name is recognized by the system. */
43289 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43290 /* On native Windows, setlocale(category, "") looks at the system settings,
43291 not at the environment variables. Also, when an encoding suffix such
43292 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43293 category of the locale to "C". */
43294 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43295 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43298 if (setlocale (LC_ALL, "") == NULL) return 1;
43300 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43301 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43302 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43303 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43304 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43305 some unit tests fail.
43306 On MirBSD 10, when an unsupported locale is specified, setlocale()
43307 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
43308 #if HAVE_LANGINFO_CODESET
43310 const char *cs = nl_langinfo (CODESET);
43311 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43312 || strcmp (cs, "UTF-8") == 0)
43317 /* On Cygwin, avoid locale names without encoding suffix, because the
43318 locale_charset() function relies on the encoding suffix. Note that
43319 LC_ALL is set on the command line. */
43320 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43322 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43323 This excludes the UTF-8 encoding (except on MirBSD). */
43324 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43325 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43326 for (p = buf; *p != '\0'; p++)
43327 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43329 /* Check whether a typical GB18030 multibyte sequence is recognized as a
43330 single wide character. This excludes the GB2312 and GBK encodings. */
43331 if (mblen ("\203\062\332\066", 5) != 4)
43337 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43338 (eval $ac_link) 2>&5
43340 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43341 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43343 # Handle native Windows specially, because there setlocale() interprets
43344 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43345 # "fr" or "fra" as "French" or "French_France.1252",
43346 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43347 # "ja" as "Japanese" or "Japanese_Japan.932",
43350 # Test for the hypothetical native Windows locale name.
43351 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43352 gt_cv_locale_zh_CN=Chinese_China.54936
43355 gt_cv_locale_zh_CN=none
43359 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
43360 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
43361 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
43362 gt_cv_locale_zh_CN=none
43365 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43366 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43367 # configure script would override the LC_ALL setting. Likewise for
43368 # LC_CTYPE, which is also set at the beginning of the configure script.
43369 # Test for the locale name without encoding suffix.
43370 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43371 gt_cv_locale_zh_CN=zh_CN
43373 # Test for the locale name with explicit encoding suffix.
43374 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43375 gt_cv_locale_zh_CN=zh_CN.GB18030
43378 gt_cv_locale_zh_CN=none
43384 # If there was a link error, due to mblen(), the system is so old that
43385 # it certainly doesn't have a chinese locale.
43386 gt_cv_locale_zh_CN=none
43391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
43392 $as_echo "$gt_cv_locale_zh_CN" >&6; }
43393 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
43398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
43399 $as_echo_n "checking for a french Unicode locale... " >&6; }
43400 if ${gt_cv_locale_fr_utf8+:} false; then :
43401 $as_echo_n "(cached) " >&6
43404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43405 /* end confdefs.h. */
43407 #include <locale.h>
43409 #if HAVE_LANGINFO_CODESET
43410 # include <langinfo.h>
43412 #include <stdlib.h>
43413 #include <string.h>
43417 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
43418 imitates locale dependent behaviour by looking at the environment
43419 variables, and all locales use the UTF-8 encoding. */
43420 #if !(defined __BEOS__ || defined __HAIKU__)
43421 /* Check whether the given locale name is recognized by the system. */
43422 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43423 /* On native Windows, setlocale(category, "") looks at the system settings,
43424 not at the environment variables. Also, when an encoding suffix such
43425 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43426 category of the locale to "C". */
43427 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43428 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43431 if (setlocale (LC_ALL, "") == NULL) return 1;
43433 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43434 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43435 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43436 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43437 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43438 some unit tests fail. */
43439 # if HAVE_LANGINFO_CODESET
43441 const char *cs = nl_langinfo (CODESET);
43442 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43447 /* On Cygwin, avoid locale names without encoding suffix, because the
43448 locale_charset() function relies on the encoding suffix. Note that
43449 LC_ALL is set on the command line. */
43450 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43452 /* Check whether in the abbreviation of the second month, the second
43453 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43454 two bytes long, with UTF-8 encoding. */
43455 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43456 if (strftime (buf, sizeof (buf), "%b", &t) < 4
43457 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43460 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
43461 /* Check whether the decimal separator is a comma.
43462 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43463 are nl_langinfo(RADIXCHAR) are both ".". */
43464 if (localeconv () ->decimal_point[0] != ',') return 1;
43470 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43471 (eval $ac_link) 2>&5
43473 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43474 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43476 # Handle native Windows specially, because there setlocale() interprets
43477 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43478 # "fr" or "fra" as "French" or "French_France.1252",
43479 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43480 # "ja" as "Japanese" or "Japanese_Japan.932",
43483 # Test for the hypothetical native Windows locale name.
43484 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43485 gt_cv_locale_fr_utf8=French_France.65001
43488 gt_cv_locale_fr_utf8=none
43492 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43493 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43494 # configure script would override the LC_ALL setting. Likewise for
43495 # LC_CTYPE, which is also set at the beginning of the configure script.
43496 # Test for the usual locale name.
43497 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43498 gt_cv_locale_fr_utf8=fr_FR
43500 # Test for the locale name with explicit encoding suffix.
43501 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43502 gt_cv_locale_fr_utf8=fr_FR.UTF-8
43504 # Test for the Solaris 7 locale name.
43505 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43506 gt_cv_locale_fr_utf8=fr.UTF-8
43509 gt_cv_locale_fr_utf8=none
43519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43520 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43521 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
43528 $as_echo_n "checking for a turkish Unicode locale... " >&6; }
43529 if ${gt_cv_locale_tr_utf8+:} false; then :
43530 $as_echo_n "(cached) " >&6
43533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43534 /* end confdefs.h. */
43536 #include <locale.h>
43538 #if HAVE_LANGINFO_CODESET
43539 # include <langinfo.h>
43541 #include <stdlib.h>
43542 #include <string.h>
43546 /* On BeOS, locales are not implemented in libc. Rather, libintl
43547 imitates locale dependent behaviour by looking at the environment
43548 variables, and all locales use the UTF-8 encoding. But BeOS does not
43549 implement the Turkish upper-/lowercase mappings. Therefore, let this
43550 program return 1 on BeOS. */
43551 /* Check whether the given locale name is recognized by the system. */
43552 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43553 /* On native Windows, setlocale(category, "") looks at the system settings,
43554 not at the environment variables. Also, when an encoding suffix such
43555 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43556 category of the locale to "C". */
43557 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43558 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43561 if (setlocale (LC_ALL, "") == NULL) return 1;
43563 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43564 On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
43565 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43566 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43567 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43568 some unit tests fail. */
43569 #if HAVE_LANGINFO_CODESET
43571 const char *cs = nl_langinfo (CODESET);
43572 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43577 /* On Cygwin, avoid locale names without encoding suffix, because the
43578 locale_charset() function relies on the encoding suffix. Note that
43579 LC_ALL is set on the command line. */
43580 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43582 /* Check whether in the abbreviation of the eighth month, the second
43583 character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
43584 two bytes long, with UTF-8 encoding. */
43585 t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
43586 if (strftime (buf, sizeof (buf), "%b", &t) < 4
43587 || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
43589 /* Check whether the upper-/lowercase mappings are as expected for
43591 if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
43592 || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
43598 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43599 (eval $ac_link) 2>&5
43601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43602 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43604 # Handle native Windows specially, because there setlocale() interprets
43605 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43606 # "fr" or "fra" as "French" or "French_France.1252",
43607 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43608 # "ja" as "Japanese" or "Japanese_Japan.932",
43611 # Test for the hypothetical native Windows locale name.
43612 if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43613 gt_cv_locale_tr_utf8=Turkish_Turkey.65001
43616 gt_cv_locale_tr_utf8=none
43620 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43621 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43622 # configure script would override the LC_ALL setting. Likewise for
43623 # LC_CTYPE, which is also set at the beginning of the configure script.
43624 # Test for the usual locale name.
43625 if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43626 gt_cv_locale_tr_utf8=tr_TR
43628 # Test for the locale name with explicit encoding suffix.
43629 if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43630 gt_cv_locale_tr_utf8=tr_TR.UTF-8
43632 # Test for the Solaris 7 locale name.
43633 if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43634 gt_cv_locale_tr_utf8=tr.UTF-8
43637 gt_cv_locale_tr_utf8=none
43644 gt_cv_locale_tr_utf8=none
43649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
43650 $as_echo "$gt_cv_locale_tr_utf8" >&6; }
43651 LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
43657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
43658 $as_echo_n "checking for a transitional chinese locale... " >&6; }
43659 if ${gt_cv_locale_zh_CN+:} false; then :
43660 $as_echo_n "(cached) " >&6
43663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43664 /* end confdefs.h. */
43666 #include <locale.h>
43667 #include <stdlib.h>
43669 #if HAVE_LANGINFO_CODESET
43670 # include <langinfo.h>
43672 #include <stdlib.h>
43673 #include <string.h>
43679 /* Check whether the given locale name is recognized by the system. */
43680 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43681 /* On native Windows, setlocale(category, "") looks at the system settings,
43682 not at the environment variables. Also, when an encoding suffix such
43683 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43684 category of the locale to "C". */
43685 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43686 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43689 if (setlocale (LC_ALL, "") == NULL) return 1;
43691 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43692 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43693 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43694 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43695 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43696 some unit tests fail.
43697 On MirBSD 10, when an unsupported locale is specified, setlocale()
43698 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
43699 #if HAVE_LANGINFO_CODESET
43701 const char *cs = nl_langinfo (CODESET);
43702 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43703 || strcmp (cs, "UTF-8") == 0)
43708 /* On Cygwin, avoid locale names without encoding suffix, because the
43709 locale_charset() function relies on the encoding suffix. Note that
43710 LC_ALL is set on the command line. */
43711 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43713 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
43714 This excludes the UTF-8 encoding (except on MirBSD). */
43715 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43716 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
43717 for (p = buf; *p != '\0'; p++)
43718 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
43720 /* Check whether a typical GB18030 multibyte sequence is recognized as a
43721 single wide character. This excludes the GB2312 and GBK encodings. */
43722 if (mblen ("\203\062\332\066", 5) != 4)
43728 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43729 (eval $ac_link) 2>&5
43731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43732 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43734 # Handle native Windows specially, because there setlocale() interprets
43735 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43736 # "fr" or "fra" as "French" or "French_France.1252",
43737 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43738 # "ja" as "Japanese" or "Japanese_Japan.932",
43741 # Test for the hypothetical native Windows locale name.
43742 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43743 gt_cv_locale_zh_CN=Chinese_China.54936
43746 gt_cv_locale_zh_CN=none
43750 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
43751 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
43752 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
43753 gt_cv_locale_zh_CN=none
43756 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43757 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43758 # configure script would override the LC_ALL setting. Likewise for
43759 # LC_CTYPE, which is also set at the beginning of the configure script.
43760 # Test for the locale name without encoding suffix.
43761 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43762 gt_cv_locale_zh_CN=zh_CN
43764 # Test for the locale name with explicit encoding suffix.
43765 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43766 gt_cv_locale_zh_CN=zh_CN.GB18030
43769 gt_cv_locale_zh_CN=none
43775 # If there was a link error, due to mblen(), the system is so old that
43776 # it certainly doesn't have a chinese locale.
43777 gt_cv_locale_zh_CN=none
43782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
43783 $as_echo "$gt_cv_locale_zh_CN" >&6; }
43784 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
43789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
43790 $as_echo_n "checking for a french Unicode locale... " >&6; }
43791 if ${gt_cv_locale_fr_utf8+:} false; then :
43792 $as_echo_n "(cached) " >&6
43795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43796 /* end confdefs.h. */
43798 #include <locale.h>
43800 #if HAVE_LANGINFO_CODESET
43801 # include <langinfo.h>
43803 #include <stdlib.h>
43804 #include <string.h>
43808 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
43809 imitates locale dependent behaviour by looking at the environment
43810 variables, and all locales use the UTF-8 encoding. */
43811 #if !(defined __BEOS__ || defined __HAIKU__)
43812 /* Check whether the given locale name is recognized by the system. */
43813 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43814 /* On native Windows, setlocale(category, "") looks at the system settings,
43815 not at the environment variables. Also, when an encoding suffix such
43816 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43817 category of the locale to "C". */
43818 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43819 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43822 if (setlocale (LC_ALL, "") == NULL) return 1;
43824 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43825 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43826 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43827 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43828 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43829 some unit tests fail. */
43830 # if HAVE_LANGINFO_CODESET
43832 const char *cs = nl_langinfo (CODESET);
43833 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
43838 /* On Cygwin, avoid locale names without encoding suffix, because the
43839 locale_charset() function relies on the encoding suffix. Note that
43840 LC_ALL is set on the command line. */
43841 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43843 /* Check whether in the abbreviation of the second month, the second
43844 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
43845 two bytes long, with UTF-8 encoding. */
43846 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43847 if (strftime (buf, sizeof (buf), "%b", &t) < 4
43848 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
43851 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
43852 /* Check whether the decimal separator is a comma.
43853 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43854 are nl_langinfo(RADIXCHAR) are both ".". */
43855 if (localeconv () ->decimal_point[0] != ',') return 1;
43861 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43862 (eval $ac_link) 2>&5
43864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43865 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43867 # Handle native Windows specially, because there setlocale() interprets
43868 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43869 # "fr" or "fra" as "French" or "French_France.1252",
43870 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43871 # "ja" as "Japanese" or "Japanese_Japan.932",
43874 # Test for the hypothetical native Windows locale name.
43875 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43876 gt_cv_locale_fr_utf8=French_France.65001
43879 gt_cv_locale_fr_utf8=none
43883 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
43884 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
43885 # configure script would override the LC_ALL setting. Likewise for
43886 # LC_CTYPE, which is also set at the beginning of the configure script.
43887 # Test for the usual locale name.
43888 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43889 gt_cv_locale_fr_utf8=fr_FR
43891 # Test for the locale name with explicit encoding suffix.
43892 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43893 gt_cv_locale_fr_utf8=fr_FR.UTF-8
43895 # Test for the Solaris 7 locale name.
43896 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
43897 gt_cv_locale_fr_utf8=fr.UTF-8
43900 gt_cv_locale_fr_utf8=none
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
43911 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
43912 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
43918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
43919 $as_echo_n "checking for a traditional french locale... " >&6; }
43920 if ${gt_cv_locale_fr+:} false; then :
43921 $as_echo_n "(cached) " >&6
43924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43925 /* end confdefs.h. */
43927 #include <locale.h>
43929 #if HAVE_LANGINFO_CODESET
43930 # include <langinfo.h>
43932 #include <stdlib.h>
43933 #include <string.h>
43937 /* Check whether the given locale name is recognized by the system. */
43938 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
43939 /* On native Windows, setlocale(category, "") looks at the system settings,
43940 not at the environment variables. Also, when an encoding suffix such
43941 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
43942 category of the locale to "C". */
43943 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
43944 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
43947 if (setlocale (LC_ALL, "") == NULL) return 1;
43949 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
43950 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
43951 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
43952 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
43953 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
43954 some unit tests fail.
43955 On MirBSD 10, when an unsupported locale is specified, setlocale()
43956 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
43957 #if HAVE_LANGINFO_CODESET
43959 const char *cs = nl_langinfo (CODESET);
43960 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
43961 || strcmp (cs, "UTF-8") == 0)
43966 /* On Cygwin, avoid locale names without encoding suffix, because the
43967 locale_charset() function relies on the encoding suffix. Note that
43968 LC_ALL is set on the command line. */
43969 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
43971 /* Check whether in the abbreviation of the second month, the second
43972 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
43973 one byte long. This excludes the UTF-8 encoding. */
43974 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
43975 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
43976 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
43977 /* Check whether the decimal separator is a comma.
43978 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
43979 are nl_langinfo(RADIXCHAR) are both ".". */
43980 if (localeconv () ->decimal_point[0] != ',') return 1;
43986 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
43987 (eval $ac_link) 2>&5
43989 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43990 test $ac_status = 0; } && test -s conftest$ac_exeext; then
43992 # Handle native Windows specially, because there setlocale() interprets
43993 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
43994 # "fr" or "fra" as "French" or "French_France.1252",
43995 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
43996 # "ja" as "Japanese" or "Japanese_Japan.932",
43999 # Test for the native Windows locale name.
44000 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44001 gt_cv_locale_fr=French_France.1252
44004 gt_cv_locale_fr=none
44008 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44009 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44010 # configure script would override the LC_ALL setting. Likewise for
44011 # LC_CTYPE, which is also set at the beginning of the configure script.
44012 # Test for the usual locale name.
44013 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44014 gt_cv_locale_fr=fr_FR
44016 # Test for the locale name with explicit encoding suffix.
44017 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44018 gt_cv_locale_fr=fr_FR.ISO-8859-1
44020 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
44021 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44022 gt_cv_locale_fr=fr_FR.ISO8859-1
44024 # Test for the HP-UX locale name.
44025 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44026 gt_cv_locale_fr=fr_FR.iso88591
44028 # Test for the Solaris 7 locale name.
44029 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44033 gt_cv_locale_fr=none
44045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
44046 $as_echo "$gt_cv_locale_fr" >&6; }
44047 LOCALE_FR=$gt_cv_locale_fr
44052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44053 $as_echo_n "checking for a french Unicode locale... " >&6; }
44054 if ${gt_cv_locale_fr_utf8+:} false; then :
44055 $as_echo_n "(cached) " >&6
44058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44059 /* end confdefs.h. */
44061 #include <locale.h>
44063 #if HAVE_LANGINFO_CODESET
44064 # include <langinfo.h>
44066 #include <stdlib.h>
44067 #include <string.h>
44071 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
44072 imitates locale dependent behaviour by looking at the environment
44073 variables, and all locales use the UTF-8 encoding. */
44074 #if !(defined __BEOS__ || defined __HAIKU__)
44075 /* Check whether the given locale name is recognized by the system. */
44076 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44077 /* On native Windows, setlocale(category, "") looks at the system settings,
44078 not at the environment variables. Also, when an encoding suffix such
44079 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44080 category of the locale to "C". */
44081 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44082 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44085 if (setlocale (LC_ALL, "") == NULL) return 1;
44087 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44088 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44089 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44090 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44091 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44092 some unit tests fail. */
44093 # if HAVE_LANGINFO_CODESET
44095 const char *cs = nl_langinfo (CODESET);
44096 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44101 /* On Cygwin, avoid locale names without encoding suffix, because the
44102 locale_charset() function relies on the encoding suffix. Note that
44103 LC_ALL is set on the command line. */
44104 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44106 /* Check whether in the abbreviation of the second month, the second
44107 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44108 two bytes long, with UTF-8 encoding. */
44109 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44110 if (strftime (buf, sizeof (buf), "%b", &t) < 4
44111 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44114 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
44115 /* Check whether the decimal separator is a comma.
44116 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44117 are nl_langinfo(RADIXCHAR) are both ".". */
44118 if (localeconv () ->decimal_point[0] != ',') return 1;
44124 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44125 (eval $ac_link) 2>&5
44127 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44128 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44130 # Handle native Windows specially, because there setlocale() interprets
44131 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44132 # "fr" or "fra" as "French" or "French_France.1252",
44133 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44134 # "ja" as "Japanese" or "Japanese_Japan.932",
44137 # Test for the hypothetical native Windows locale name.
44138 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44139 gt_cv_locale_fr_utf8=French_France.65001
44142 gt_cv_locale_fr_utf8=none
44146 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44147 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44148 # configure script would override the LC_ALL setting. Likewise for
44149 # LC_CTYPE, which is also set at the beginning of the configure script.
44150 # Test for the usual locale name.
44151 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44152 gt_cv_locale_fr_utf8=fr_FR
44154 # Test for the locale name with explicit encoding suffix.
44155 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44156 gt_cv_locale_fr_utf8=fr_FR.UTF-8
44158 # Test for the Solaris 7 locale name.
44159 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44160 gt_cv_locale_fr_utf8=fr.UTF-8
44163 gt_cv_locale_fr_utf8=none
44173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44174 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
44175 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
44182 $as_echo_n "checking for a traditional japanese locale... " >&6; }
44183 if ${gt_cv_locale_ja+:} false; then :
44184 $as_echo_n "(cached) " >&6
44187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44188 /* end confdefs.h. */
44190 #include <locale.h>
44192 #if HAVE_LANGINFO_CODESET
44193 # include <langinfo.h>
44195 #include <stdlib.h>
44196 #include <string.h>
44202 /* Check whether the given locale name is recognized by the system. */
44203 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44204 /* On native Windows, setlocale(category, "") looks at the system settings,
44205 not at the environment variables. Also, when an encoding suffix such
44206 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44207 category of the locale to "C". */
44208 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44209 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44212 if (setlocale (LC_ALL, "") == NULL) return 1;
44214 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44215 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44216 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44217 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44218 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44219 some unit tests fail.
44220 On MirBSD 10, when an unsupported locale is specified, setlocale()
44221 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
44222 #if HAVE_LANGINFO_CODESET
44224 const char *cs = nl_langinfo (CODESET);
44225 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44226 || strcmp (cs, "UTF-8") == 0)
44231 /* On Cygwin, avoid locale names without encoding suffix, because the
44232 locale_charset() function relies on the encoding suffix. Note that
44233 LC_ALL is set on the command line. */
44234 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44236 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
44237 on Cygwin 1.5.x. */
44238 if (MB_CUR_MAX == 1)
44240 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44241 This excludes the UTF-8 encoding (except on MirBSD). */
44242 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44243 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44244 for (p = buf; *p != '\0'; p++)
44245 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44251 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44252 (eval $ac_link) 2>&5
44254 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44255 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44257 # Handle native Windows specially, because there setlocale() interprets
44258 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44259 # "fr" or "fra" as "French" or "French_France.1252",
44260 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44261 # "ja" as "Japanese" or "Japanese_Japan.932",
44264 # Note that on native Windows, the Japanese locale is
44265 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
44266 # cannot use it here.
44267 gt_cv_locale_ja=none
44270 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44271 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44272 # configure script would override the LC_ALL setting. Likewise for
44273 # LC_CTYPE, which is also set at the beginning of the configure script.
44274 # Test for the AIX locale name.
44275 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44276 gt_cv_locale_ja=ja_JP
44278 # Test for the locale name with explicit encoding suffix.
44279 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44280 gt_cv_locale_ja=ja_JP.EUC-JP
44282 # Test for the HP-UX, OSF/1, NetBSD locale name.
44283 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44284 gt_cv_locale_ja=ja_JP.eucJP
44286 # Test for the IRIX, FreeBSD locale name.
44287 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44288 gt_cv_locale_ja=ja_JP.EUC
44290 # Test for the Solaris 7 locale name.
44291 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44294 # Special test for NetBSD 1.6.
44295 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
44296 gt_cv_locale_ja=ja_JP.eucJP
44299 gt_cv_locale_ja=none
44312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
44313 $as_echo "$gt_cv_locale_ja" >&6; }
44314 LOCALE_JA=$gt_cv_locale_ja
44320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44321 $as_echo_n "checking for a transitional chinese locale... " >&6; }
44322 if ${gt_cv_locale_zh_CN+:} false; then :
44323 $as_echo_n "(cached) " >&6
44326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44327 /* end confdefs.h. */
44329 #include <locale.h>
44330 #include <stdlib.h>
44332 #if HAVE_LANGINFO_CODESET
44333 # include <langinfo.h>
44335 #include <stdlib.h>
44336 #include <string.h>
44342 /* Check whether the given locale name is recognized by the system. */
44343 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44344 /* On native Windows, setlocale(category, "") looks at the system settings,
44345 not at the environment variables. Also, when an encoding suffix such
44346 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44347 category of the locale to "C". */
44348 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44349 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44352 if (setlocale (LC_ALL, "") == NULL) return 1;
44354 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44355 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44356 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44357 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44358 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44359 some unit tests fail.
44360 On MirBSD 10, when an unsupported locale is specified, setlocale()
44361 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
44362 #if HAVE_LANGINFO_CODESET
44364 const char *cs = nl_langinfo (CODESET);
44365 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44366 || strcmp (cs, "UTF-8") == 0)
44371 /* On Cygwin, avoid locale names without encoding suffix, because the
44372 locale_charset() function relies on the encoding suffix. Note that
44373 LC_ALL is set on the command line. */
44374 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44376 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44377 This excludes the UTF-8 encoding (except on MirBSD). */
44378 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44379 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44380 for (p = buf; *p != '\0'; p++)
44381 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44383 /* Check whether a typical GB18030 multibyte sequence is recognized as a
44384 single wide character. This excludes the GB2312 and GBK encodings. */
44385 if (mblen ("\203\062\332\066", 5) != 4)
44391 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44392 (eval $ac_link) 2>&5
44394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44395 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44397 # Handle native Windows specially, because there setlocale() interprets
44398 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44399 # "fr" or "fra" as "French" or "French_France.1252",
44400 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44401 # "ja" as "Japanese" or "Japanese_Japan.932",
44404 # Test for the hypothetical native Windows locale name.
44405 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44406 gt_cv_locale_zh_CN=Chinese_China.54936
44409 gt_cv_locale_zh_CN=none
44413 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
44414 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
44415 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
44416 gt_cv_locale_zh_CN=none
44419 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44420 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44421 # configure script would override the LC_ALL setting. Likewise for
44422 # LC_CTYPE, which is also set at the beginning of the configure script.
44423 # Test for the locale name without encoding suffix.
44424 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44425 gt_cv_locale_zh_CN=zh_CN
44427 # Test for the locale name with explicit encoding suffix.
44428 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44429 gt_cv_locale_zh_CN=zh_CN.GB18030
44432 gt_cv_locale_zh_CN=none
44438 # If there was a link error, due to mblen(), the system is so old that
44439 # it certainly doesn't have a chinese locale.
44440 gt_cv_locale_zh_CN=none
44445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44446 $as_echo "$gt_cv_locale_zh_CN" >&6; }
44447 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
44453 $as_echo_n "checking for a french Unicode locale... " >&6; }
44454 if ${gt_cv_locale_fr_utf8+:} false; then :
44455 $as_echo_n "(cached) " >&6
44458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44459 /* end confdefs.h. */
44461 #include <locale.h>
44463 #if HAVE_LANGINFO_CODESET
44464 # include <langinfo.h>
44466 #include <stdlib.h>
44467 #include <string.h>
44471 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
44472 imitates locale dependent behaviour by looking at the environment
44473 variables, and all locales use the UTF-8 encoding. */
44474 #if !(defined __BEOS__ || defined __HAIKU__)
44475 /* Check whether the given locale name is recognized by the system. */
44476 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44477 /* On native Windows, setlocale(category, "") looks at the system settings,
44478 not at the environment variables. Also, when an encoding suffix such
44479 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44480 category of the locale to "C". */
44481 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44482 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44485 if (setlocale (LC_ALL, "") == NULL) return 1;
44487 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44488 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44489 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44490 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44491 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44492 some unit tests fail. */
44493 # if HAVE_LANGINFO_CODESET
44495 const char *cs = nl_langinfo (CODESET);
44496 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
44501 /* On Cygwin, avoid locale names without encoding suffix, because the
44502 locale_charset() function relies on the encoding suffix. Note that
44503 LC_ALL is set on the command line. */
44504 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44506 /* Check whether in the abbreviation of the second month, the second
44507 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
44508 two bytes long, with UTF-8 encoding. */
44509 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44510 if (strftime (buf, sizeof (buf), "%b", &t) < 4
44511 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
44514 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
44515 /* Check whether the decimal separator is a comma.
44516 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
44517 are nl_langinfo(RADIXCHAR) are both ".". */
44518 if (localeconv () ->decimal_point[0] != ',') return 1;
44524 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44525 (eval $ac_link) 2>&5
44527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44528 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44530 # Handle native Windows specially, because there setlocale() interprets
44531 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44532 # "fr" or "fra" as "French" or "French_France.1252",
44533 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44534 # "ja" as "Japanese" or "Japanese_Japan.932",
44537 # Test for the hypothetical native Windows locale name.
44538 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44539 gt_cv_locale_fr_utf8=French_France.65001
44542 gt_cv_locale_fr_utf8=none
44546 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44547 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44548 # configure script would override the LC_ALL setting. Likewise for
44549 # LC_CTYPE, which is also set at the beginning of the configure script.
44550 # Test for the usual locale name.
44551 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44552 gt_cv_locale_fr_utf8=fr_FR
44554 # Test for the locale name with explicit encoding suffix.
44555 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44556 gt_cv_locale_fr_utf8=fr_FR.UTF-8
44558 # Test for the Solaris 7 locale name.
44559 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44560 gt_cv_locale_fr_utf8=fr.UTF-8
44563 gt_cv_locale_fr_utf8=none
44573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
44574 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
44575 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
44581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
44582 $as_echo_n "checking for a transitional chinese locale... " >&6; }
44583 if ${gt_cv_locale_zh_CN+:} false; then :
44584 $as_echo_n "(cached) " >&6
44587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44588 /* end confdefs.h. */
44590 #include <locale.h>
44591 #include <stdlib.h>
44593 #if HAVE_LANGINFO_CODESET
44594 # include <langinfo.h>
44596 #include <stdlib.h>
44597 #include <string.h>
44603 /* Check whether the given locale name is recognized by the system. */
44604 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
44605 /* On native Windows, setlocale(category, "") looks at the system settings,
44606 not at the environment variables. Also, when an encoding suffix such
44607 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
44608 category of the locale to "C". */
44609 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
44610 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
44613 if (setlocale (LC_ALL, "") == NULL) return 1;
44615 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
44616 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
44617 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
44618 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
44619 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
44620 some unit tests fail.
44621 On MirBSD 10, when an unsupported locale is specified, setlocale()
44622 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
44623 #if HAVE_LANGINFO_CODESET
44625 const char *cs = nl_langinfo (CODESET);
44626 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
44627 || strcmp (cs, "UTF-8") == 0)
44632 /* On Cygwin, avoid locale names without encoding suffix, because the
44633 locale_charset() function relies on the encoding suffix. Note that
44634 LC_ALL is set on the command line. */
44635 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
44637 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
44638 This excludes the UTF-8 encoding (except on MirBSD). */
44639 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
44640 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
44641 for (p = buf; *p != '\0'; p++)
44642 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
44644 /* Check whether a typical GB18030 multibyte sequence is recognized as a
44645 single wide character. This excludes the GB2312 and GBK encodings. */
44646 if (mblen ("\203\062\332\066", 5) != 4)
44652 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
44653 (eval $ac_link) 2>&5
44655 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44656 test $ac_status = 0; } && test -s conftest$ac_exeext; then
44658 # Handle native Windows specially, because there setlocale() interprets
44659 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
44660 # "fr" or "fra" as "French" or "French_France.1252",
44661 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
44662 # "ja" as "Japanese" or "Japanese_Japan.932",
44665 # Test for the hypothetical native Windows locale name.
44666 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44667 gt_cv_locale_zh_CN=Chinese_China.54936
44670 gt_cv_locale_zh_CN=none
44674 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
44675 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
44676 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
44677 gt_cv_locale_zh_CN=none
44680 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
44681 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
44682 # configure script would override the LC_ALL setting. Likewise for
44683 # LC_CTYPE, which is also set at the beginning of the configure script.
44684 # Test for the locale name without encoding suffix.
44685 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44686 gt_cv_locale_zh_CN=zh_CN
44688 # Test for the locale name with explicit encoding suffix.
44689 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
44690 gt_cv_locale_zh_CN=zh_CN.GB18030
44693 gt_cv_locale_zh_CN=none
44699 # If there was a link error, due to mblen(), the system is so old that
44700 # it certainly doesn't have a chinese locale.
44701 gt_cv_locale_zh_CN=none
44706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
44707 $as_echo "$gt_cv_locale_zh_CN" >&6; }
44708 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
44714 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
44715 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
44716 # irrelevant for anonymous mappings.
44717 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
44718 if test "x$ac_cv_func_mmap" = xyes; then :
44725 # Try to allow MAP_ANONYMOUS.
44726 gl_have_mmap_anonymous=no
44727 if test $gl_have_mmap = yes; then
44728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
44729 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
44730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44731 /* end confdefs.h. */
44733 #include <sys/mman.h>
44734 #ifdef MAP_ANONYMOUS
44735 I cannot identify this map
44739 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44740 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44741 gl_have_mmap_anonymous=yes
44745 if test $gl_have_mmap_anonymous != yes; then
44746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44747 /* end confdefs.h. */
44749 #include <sys/mman.h>
44751 I cannot identify this map
44755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44756 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44758 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
44760 gl_have_mmap_anonymous=yes
44765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
44766 $as_echo "$gl_have_mmap_anonymous" >&6; }
44767 if test $gl_have_mmap_anonymous = yes; then
44769 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
44791 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
44792 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
44793 # irrelevant for anonymous mappings.
44794 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
44795 if test "x$ac_cv_func_mmap" = xyes; then :
44802 # Try to allow MAP_ANONYMOUS.
44803 gl_have_mmap_anonymous=no
44804 if test $gl_have_mmap = yes; then
44805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
44806 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
44807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44808 /* end confdefs.h. */
44810 #include <sys/mman.h>
44811 #ifdef MAP_ANONYMOUS
44812 I cannot identify this map
44816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44817 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44818 gl_have_mmap_anonymous=yes
44822 if test $gl_have_mmap_anonymous != yes; then
44823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44824 /* end confdefs.h. */
44826 #include <sys/mman.h>
44828 I cannot identify this map
44832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
44833 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
44835 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
44837 gl_have_mmap_anonymous=yes
44842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
44843 $as_echo "$gl_have_mmap_anonymous" >&6; }
44844 if test $gl_have_mmap_anonymous = yes; then
44846 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
44879 nanosleep_save_libs=$LIBS
44881 # Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
44882 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
44885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
44886 $as_echo_n "checking for library containing nanosleep... " >&6; }
44887 if ${ac_cv_search_nanosleep+:} false; then :
44888 $as_echo_n "(cached) " >&6
44890 ac_func_search_save_LIBS=$LIBS
44891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44892 /* end confdefs.h. */
44894 /* Override any GCC internal prototype to avoid an error.
44895 Use char because int might match the return type of a GCC
44896 builtin and then its argument prototype would still apply. */
44904 return nanosleep ();
44909 for ac_lib in '' rt posix4; do
44910 if test -z "$ac_lib"; then
44911 ac_res="none required"
44914 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
44916 if ac_fn_c_try_link "$LINENO"; then :
44917 ac_cv_search_nanosleep=$ac_res
44919 rm -f core conftest.err conftest.$ac_objext \
44921 if ${ac_cv_search_nanosleep+:} false; then :
44925 if ${ac_cv_search_nanosleep+:} false; then :
44928 ac_cv_search_nanosleep=no
44930 rm conftest.$ac_ext
44931 LIBS=$ac_func_search_save_LIBS
44933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
44934 $as_echo "$ac_cv_search_nanosleep" >&6; }
44935 ac_res=$ac_cv_search_nanosleep
44936 if test "$ac_res" != no; then :
44937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
44938 test "$ac_cv_search_nanosleep" = "none required" ||
44939 LIB_NANOSLEEP=$ac_cv_search_nanosleep
44942 if test "x$ac_cv_search_nanosleep" != xno; then
44945 if test $APPLE_UNIVERSAL_BUILD = 1; then
44946 # A universal build on Apple Mac OS X platforms.
44947 # The test result would be 'no (mishandles large arguments)' in 64-bit
44948 # mode but 'yes' in 32-bit mode. But we need a configuration result that
44949 # is valid in both modes.
44950 gl_cv_func_nanosleep='no (mishandles large arguments)'
44953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working nanosleep" >&5
44954 $as_echo_n "checking for working nanosleep... " >&6; }
44955 if ${gl_cv_func_nanosleep+:} false; then :
44956 $as_echo_n "(cached) " >&6
44959 if test "$cross_compiling" = yes; then :
44960 case "$host_os" in linux*) # Guess it halfway works when the kernel is Linux.
44961 gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
44962 *) # If we don't know, assume the worst.
44963 gl_cv_func_nanosleep='guessing no' ;;
44967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44968 /* end confdefs.h. */
44971 #include <limits.h>
44972 #include <signal.h>
44973 #if HAVE_SYS_TIME_H
44974 #include <sys/time.h>
44977 #include <unistd.h>
44978 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
44979 #define TYPE_MAXIMUM(t) \
44980 ((t) (! TYPE_SIGNED (t) \
44982 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
44985 check_for_SIGALRM (int sig)
44987 if (sig != SIGALRM)
44994 static struct timespec ts_sleep;
44995 static struct timespec ts_remaining;
44996 static struct sigaction act;
44997 /* Test for major problems first. */
45000 act.sa_handler = check_for_SIGALRM;
45001 sigemptyset (&act.sa_mask);
45002 sigaction (SIGALRM, &act, NULL);
45003 ts_sleep.tv_sec = 0;
45004 ts_sleep.tv_nsec = 1;
45006 if (nanosleep (&ts_sleep, NULL) != 0)
45008 /* Test for a minor problem: the handling of large arguments. */
45009 ts_sleep.tv_sec = TYPE_MAXIMUM (time_t);
45010 ts_sleep.tv_nsec = 999999999;
45012 if (nanosleep (&ts_sleep, &ts_remaining) != -1)
45014 if (errno != EINTR)
45016 if (ts_remaining.tv_sec <= TYPE_MAXIMUM (time_t) - 10)
45021 if ac_fn_c_try_run "$LINENO"; then :
45022 gl_cv_func_nanosleep=yes
45024 case $? in 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; *) gl_cv_func_nanosleep=no;;
45027 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45028 conftest.$ac_objext conftest.beam conftest.$ac_ext
45033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nanosleep" >&5
45034 $as_echo "$gl_cv_func_nanosleep" >&6; }
45035 case "$gl_cv_func_nanosleep" in
45037 REPLACE_NANOSLEEP=0
45040 REPLACE_NANOSLEEP=1
45041 case "$gl_cv_func_nanosleep" in
45042 *"mishandles large arguments"*)
45044 $as_echo "#define HAVE_BUG_BIG_NANOSLEEP 1" >>confdefs.h
45048 # The replacement uses select(). Add $LIBSOCKET to $LIB_NANOSLEEP.
45049 for ac_lib in $LIBSOCKET; do
45050 case " $LIB_NANOSLEEP " in
45052 *) LIB_NANOSLEEP="$LIB_NANOSLEEP $ac_lib";;
45062 LIBS=$nanosleep_save_libs
45064 if test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1; then
45073 gltests_LIBOBJS="$gltests_LIBOBJS nanosleep.$ac_objext"
45091 if test "$GNULIB_NANOSLEEP" != 1; then
45092 if test "$GNULIB_NANOSLEEP" = 0; then
45093 GNULIB_NANOSLEEP=$gl_module_indicator_condition
45095 GNULIB_NANOSLEEP="($GNULIB_NANOSLEEP || $gl_module_indicator_condition)"
45103 $as_echo "#define GNULIB_TEST_NANOSLEEP 1" >>confdefs.h
45115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
45116 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
45117 if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then :
45118 $as_echo_n "(cached) " >&6
45121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45122 /* end confdefs.h. */
45123 #include <netinet/in.h>
45132 if ac_fn_c_try_compile "$LINENO"; then :
45133 gl_cv_header_netinet_in_h_selfcontained=yes
45135 gl_cv_header_netinet_in_h_selfcontained=no
45137 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
45140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
45141 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
45142 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
45145 NETINET_IN_H='netinet/in.h'
45146 for ac_header in netinet/in.h
45148 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
45149 if test "x$ac_cv_header_netinet_in_h" = xyes; then :
45150 cat >>confdefs.h <<_ACEOF
45151 #define HAVE_NETINET_IN_H 1
45173 if test $gl_cv_have_include_next = yes; then
45174 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
45177 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
45178 if ${gl_cv_next_netinet_in_h+:} false; then :
45179 $as_echo_n "(cached) " >&6
45182 if test $ac_cv_header_netinet_in_h = yes; then
45187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45188 /* end confdefs.h. */
45189 #include <netinet/in.h>
45192 aix*) gl_absname_cpp="$ac_cpp -C" ;;
45193 *) gl_absname_cpp="$ac_cpp" ;;
45198 gl_dirsep_regex='[/\\]'
45201 gl_dirsep_regex='\/'
45204 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
45205 gl_header_literal_regex=`echo 'netinet/in.h' \
45206 | sed -e "$gl_make_literal_regex_sed"`
45207 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
45208 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
45214 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
45215 sed -n "$gl_absolute_header_sed"`
45217 gl_header=$gl_cv_absolute_netinet_in_h
45218 gl_cv_next_netinet_in_h='"'$gl_header'"'
45220 gl_cv_next_netinet_in_h='<'netinet/in.h'>'
45225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
45226 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
45228 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h
45230 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
45231 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
45232 gl_next_as_first_directive='<'netinet/in.h'>'
45234 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
45235 gl_next_as_first_directive=$gl_cv_next_netinet_in_h
45237 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive
45242 if test $ac_cv_header_netinet_in_h = yes; then
45243 HAVE_NETINET_IN_H=1
45245 HAVE_NETINET_IN_H=0
45250 if test -n "$NETINET_IN_H"; then
45251 GL_GENERATE_NETINET_IN_H_TRUE=
45252 GL_GENERATE_NETINET_IN_H_FALSE='#'
45254 GL_GENERATE_NETINET_IN_H_TRUE='#'
45255 GL_GENERATE_NETINET_IN_H_FALSE=
45263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
45264 $as_echo_n "checking for a traditional french locale... " >&6; }
45265 if ${gt_cv_locale_fr+:} false; then :
45266 $as_echo_n "(cached) " >&6
45269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45270 /* end confdefs.h. */
45272 #include <locale.h>
45274 #if HAVE_LANGINFO_CODESET
45275 # include <langinfo.h>
45277 #include <stdlib.h>
45278 #include <string.h>
45282 /* Check whether the given locale name is recognized by the system. */
45283 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
45284 /* On native Windows, setlocale(category, "") looks at the system settings,
45285 not at the environment variables. Also, when an encoding suffix such
45286 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45287 category of the locale to "C". */
45288 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45289 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45292 if (setlocale (LC_ALL, "") == NULL) return 1;
45294 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45295 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45296 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45297 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45298 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45299 some unit tests fail.
45300 On MirBSD 10, when an unsupported locale is specified, setlocale()
45301 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
45302 #if HAVE_LANGINFO_CODESET
45304 const char *cs = nl_langinfo (CODESET);
45305 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
45306 || strcmp (cs, "UTF-8") == 0)
45311 /* On Cygwin, avoid locale names without encoding suffix, because the
45312 locale_charset() function relies on the encoding suffix. Note that
45313 LC_ALL is set on the command line. */
45314 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45316 /* Check whether in the abbreviation of the second month, the second
45317 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
45318 one byte long. This excludes the UTF-8 encoding. */
45319 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45320 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
45321 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
45322 /* Check whether the decimal separator is a comma.
45323 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45324 are nl_langinfo(RADIXCHAR) are both ".". */
45325 if (localeconv () ->decimal_point[0] != ',') return 1;
45331 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45332 (eval $ac_link) 2>&5
45334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45335 test $ac_status = 0; } && test -s conftest$ac_exeext; then
45337 # Handle native Windows specially, because there setlocale() interprets
45338 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45339 # "fr" or "fra" as "French" or "French_France.1252",
45340 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45341 # "ja" as "Japanese" or "Japanese_Japan.932",
45344 # Test for the native Windows locale name.
45345 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45346 gt_cv_locale_fr=French_France.1252
45349 gt_cv_locale_fr=none
45353 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45354 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45355 # configure script would override the LC_ALL setting. Likewise for
45356 # LC_CTYPE, which is also set at the beginning of the configure script.
45357 # Test for the usual locale name.
45358 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45359 gt_cv_locale_fr=fr_FR
45361 # Test for the locale name with explicit encoding suffix.
45362 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45363 gt_cv_locale_fr=fr_FR.ISO-8859-1
45365 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
45366 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45367 gt_cv_locale_fr=fr_FR.ISO8859-1
45369 # Test for the HP-UX locale name.
45370 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45371 gt_cv_locale_fr=fr_FR.iso88591
45373 # Test for the Solaris 7 locale name.
45374 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45378 gt_cv_locale_fr=none
45390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
45391 $as_echo "$gt_cv_locale_fr" >&6; }
45392 LOCALE_FR=$gt_cv_locale_fr
45397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
45398 $as_echo_n "checking for a french Unicode locale... " >&6; }
45399 if ${gt_cv_locale_fr_utf8+:} false; then :
45400 $as_echo_n "(cached) " >&6
45403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45404 /* end confdefs.h. */
45406 #include <locale.h>
45408 #if HAVE_LANGINFO_CODESET
45409 # include <langinfo.h>
45411 #include <stdlib.h>
45412 #include <string.h>
45416 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
45417 imitates locale dependent behaviour by looking at the environment
45418 variables, and all locales use the UTF-8 encoding. */
45419 #if !(defined __BEOS__ || defined __HAIKU__)
45420 /* Check whether the given locale name is recognized by the system. */
45421 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
45422 /* On native Windows, setlocale(category, "") looks at the system settings,
45423 not at the environment variables. Also, when an encoding suffix such
45424 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
45425 category of the locale to "C". */
45426 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
45427 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
45430 if (setlocale (LC_ALL, "") == NULL) return 1;
45432 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
45433 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
45434 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
45435 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
45436 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
45437 some unit tests fail. */
45438 # if HAVE_LANGINFO_CODESET
45440 const char *cs = nl_langinfo (CODESET);
45441 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
45446 /* On Cygwin, avoid locale names without encoding suffix, because the
45447 locale_charset() function relies on the encoding suffix. Note that
45448 LC_ALL is set on the command line. */
45449 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
45451 /* Check whether in the abbreviation of the second month, the second
45452 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
45453 two bytes long, with UTF-8 encoding. */
45454 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
45455 if (strftime (buf, sizeof (buf), "%b", &t) < 4
45456 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
45459 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
45460 /* Check whether the decimal separator is a comma.
45461 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
45462 are nl_langinfo(RADIXCHAR) are both ".". */
45463 if (localeconv () ->decimal_point[0] != ',') return 1;
45469 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
45470 (eval $ac_link) 2>&5
45472 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45473 test $ac_status = 0; } && test -s conftest$ac_exeext; then
45475 # Handle native Windows specially, because there setlocale() interprets
45476 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
45477 # "fr" or "fra" as "French" or "French_France.1252",
45478 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
45479 # "ja" as "Japanese" or "Japanese_Japan.932",
45482 # Test for the hypothetical native Windows locale name.
45483 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45484 gt_cv_locale_fr_utf8=French_France.65001
45487 gt_cv_locale_fr_utf8=none
45491 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
45492 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
45493 # configure script would override the LC_ALL setting. Likewise for
45494 # LC_CTYPE, which is also set at the beginning of the configure script.
45495 # Test for the usual locale name.
45496 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45497 gt_cv_locale_fr_utf8=fr_FR
45499 # Test for the locale name with explicit encoding suffix.
45500 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45501 gt_cv_locale_fr_utf8=fr_FR.UTF-8
45503 # Test for the Solaris 7 locale name.
45504 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
45505 gt_cv_locale_fr_utf8=fr.UTF-8
45508 gt_cv_locale_fr_utf8=none
45518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
45519 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
45520 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
45533 if test $ac_cv_func_pipe != yes; then
45537 if test $HAVE_PIPE = 0; then
45546 gltests_LIBOBJS="$gltests_LIBOBJS pipe.$ac_objext"
45554 if test "$GNULIB_PIPE" != 1; then
45555 if test "$GNULIB_PIPE" = 0; then
45556 GNULIB_PIPE=$gl_module_indicator_condition
45558 GNULIB_PIPE="($GNULIB_PIPE || $gl_module_indicator_condition)"
45566 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
45571 for ac_func in getppriv
45573 ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
45574 if test "x$ac_cv_func_getppriv" = xyes; then :
45575 cat >>confdefs.h <<_ACEOF
45576 #define HAVE_GETPPRIV 1
45592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
45593 $as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
45594 if ${gl_cv_func_svid_putenv+:} false; then :
45595 $as_echo_n "(cached) " >&6
45597 if test "$cross_compiling" = yes; then :
45599 # Guess yes on glibc systems.
45600 *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
45601 # If we don't know, assume the worst.
45602 *) gl_cv_func_svid_putenv="guessing no" ;;
45606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45607 /* end confdefs.h. */
45608 $ac_includes_default
45613 /* Put it in env. */
45614 if (putenv ("CONFTEST_putenv=val"))
45617 /* Try to remove it. */
45618 if (putenv ("CONFTEST_putenv"))
45621 /* Make sure it was deleted. */
45622 if (getenv ("CONFTEST_putenv") != 0)
45631 if ac_fn_c_try_run "$LINENO"; then :
45632 gl_cv_func_svid_putenv=yes
45634 gl_cv_func_svid_putenv=no
45636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45637 conftest.$ac_objext conftest.beam conftest.$ac_ext
45642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
45643 $as_echo "$gl_cv_func_svid_putenv" >&6; }
45644 case "$gl_cv_func_svid_putenv" in
45651 if test $REPLACE_PUTENV = 1; then
45660 gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext"
45663 ac_fn_c_check_decl "$LINENO" "_putenv" "ac_cv_have_decl__putenv" "$ac_includes_default"
45664 if test "x$ac_cv_have_decl__putenv" = xyes; then :
45670 cat >>confdefs.h <<_ACEOF
45671 #define HAVE_DECL__PUTENV $ac_have_decl
45681 if test "$GNULIB_PUTENV" != 1; then
45682 if test "$GNULIB_PUTENV" = 0; then
45683 GNULIB_PUTENV=$gl_module_indicator_condition
45685 GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)"
45693 $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h
45700 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
45701 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
45702 # irrelevant for anonymous mappings.
45703 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
45704 if test "x$ac_cv_func_mmap" = xyes; then :
45711 # Try to allow MAP_ANONYMOUS.
45712 gl_have_mmap_anonymous=no
45713 if test $gl_have_mmap = yes; then
45714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
45715 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
45716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45717 /* end confdefs.h. */
45719 #include <sys/mman.h>
45720 #ifdef MAP_ANONYMOUS
45721 I cannot identify this map
45725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45726 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
45727 gl_have_mmap_anonymous=yes
45731 if test $gl_have_mmap_anonymous != yes; then
45732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45733 /* end confdefs.h. */
45735 #include <sys/mman.h>
45737 I cannot identify this map
45741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
45742 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
45744 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
45746 gl_have_mmap_anonymous=yes
45751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
45752 $as_echo "$gl_have_mmap_anonymous" >&6; }
45753 if test $gl_have_mmap_anonymous = yes; then
45755 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
45778 for ac_func in raise
45780 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
45781 if test "x$ac_cv_func_raise" = xyes; then :
45782 cat >>confdefs.h <<_ACEOF
45783 #define HAVE_RAISE 1
45789 if test $ac_cv_func_raise = no; then
45792 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
45799 if test $gl_cv_type_sigset_t = yes; then
45800 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
45801 if test "x$ac_cv_func_sigprocmask" = xyes; then :
45802 gl_cv_func_sigprocmask=1
45806 if test -z "$gl_cv_func_sigprocmask"; then
45807 HAVE_POSIX_SIGNALBLOCKING=0
45810 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
45816 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
45825 gltests_LIBOBJS="$gltests_LIBOBJS raise.$ac_objext"
45834 if test "$GNULIB_RAISE" != 1; then
45835 if test "$GNULIB_RAISE" = 0; then
45836 GNULIB_RAISE=$gl_module_indicator_condition
45838 GNULIB_RAISE="($GNULIB_RAISE || $gl_module_indicator_condition)"
45846 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
45853 if test "$ac_cv_header_winsock2_h" = yes; then
45863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select supports a 0 argument" >&5
45864 $as_echo_n "checking whether select supports a 0 argument... " >&6; }
45865 if ${gl_cv_func_select_supports0+:} false; then :
45866 $as_echo_n "(cached) " >&6
45869 if test "$cross_compiling" = yes; then :
45872 # Guess no on Interix.
45873 interix*) gl_cv_func_select_supports0="guessing no";;
45874 # Guess yes otherwise.
45875 *) gl_cv_func_select_supports0="guessing yes";;
45879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45880 /* end confdefs.h. */
45882 #include <sys/types.h>
45883 #include <sys/time.h>
45884 #if HAVE_SYS_SELECT_H
45885 #include <sys/select.h>
45889 struct timeval timeout;
45890 timeout.tv_sec = 0;
45891 timeout.tv_usec = 5;
45892 return select (0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &timeout) < 0;
45895 if ac_fn_c_try_run "$LINENO"; then :
45896 gl_cv_func_select_supports0=yes
45898 gl_cv_func_select_supports0=no
45900 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45901 conftest.$ac_objext conftest.beam conftest.$ac_ext
45906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_supports0" >&5
45907 $as_echo "$gl_cv_func_select_supports0" >&6; }
45908 case "$gl_cv_func_select_supports0" in
45910 *) REPLACE_SELECT=1 ;;
45913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether select detects invalid fds" >&5
45914 $as_echo_n "checking whether select detects invalid fds... " >&6; }
45915 if ${gl_cv_func_select_detects_ebadf+:} false; then :
45916 $as_echo_n "(cached) " >&6
45919 if test "$cross_compiling" = yes; then :
45922 # Guess yes on glibc systems.
45923 *-gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
45924 # If we don't know, assume the worst.
45925 *) gl_cv_func_select_detects_ebadf="guessing no" ;;
45929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45930 /* end confdefs.h. */
45932 #include <sys/types.h>
45933 #include <sys/time.h>
45934 #if HAVE_SYS_SELECT_H
45935 # include <sys/select.h>
45937 #include <unistd.h>
45949 struct timeval timeout;
45950 timeout.tv_sec = 0;
45951 timeout.tv_usec = 5;
45952 return select (17, &set, NULL, NULL, &timeout) != -1 || errno != EBADF;
45958 if ac_fn_c_try_run "$LINENO"; then :
45959 gl_cv_func_select_detects_ebadf=yes
45961 gl_cv_func_select_detects_ebadf=no
45963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
45964 conftest.$ac_objext conftest.beam conftest.$ac_ext
45969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_select_detects_ebadf" >&5
45970 $as_echo "$gl_cv_func_select_detects_ebadf" >&6; }
45971 case $gl_cv_func_select_detects_ebadf in
45973 *) REPLACE_SELECT=1 ;;
45977 LIB_SELECT="$LIBSOCKET"
45978 if test $REPLACE_SELECT = 1; then
45981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
45982 /* end confdefs.h. */
45984 #define WIN32_LEAN_AND_MEAN
45985 #include <windows.h>
45989 MsgWaitForMultipleObjects (0, NULL, 0, 0, 0);
45993 if ac_fn_c_try_link "$LINENO"; then :
45996 LIB_SELECT="$LIB_SELECT -luser32"
45998 rm -f core conftest.err conftest.$ac_objext \
45999 conftest$ac_exeext conftest.$ac_ext
46005 if test $REPLACE_SELECT = 1; then
46014 gltests_LIBOBJS="$gltests_LIBOBJS select.$ac_objext"
46022 if test "$GNULIB_SELECT" != 1; then
46023 if test "$GNULIB_SELECT" = 0; then
46024 GNULIB_SELECT=$gl_module_indicator_condition
46026 GNULIB_SELECT="($GNULIB_SELECT || $gl_module_indicator_condition)"
46034 $as_echo "#define GNULIB_TEST_SELECT 1" >>confdefs.h
46049 mingw*) REPLACE_SETLOCALE=1 ;;
46052 1.5.*) REPLACE_SETLOCALE=1 ;;
46057 if test $REPLACE_SETLOCALE = 1; then
46066 gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
46077 if test "$GNULIB_SETLOCALE" != 1; then
46078 if test "$GNULIB_SETLOCALE" = 0; then
46079 GNULIB_SETLOCALE=$gl_module_indicator_condition
46081 GNULIB_SETLOCALE="($GNULIB_SETLOCALE || $gl_module_indicator_condition)"
46089 $as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
46096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
46097 $as_echo_n "checking for a traditional french locale... " >&6; }
46098 if ${gt_cv_locale_fr+:} false; then :
46099 $as_echo_n "(cached) " >&6
46102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46103 /* end confdefs.h. */
46105 #include <locale.h>
46107 #if HAVE_LANGINFO_CODESET
46108 # include <langinfo.h>
46110 #include <stdlib.h>
46111 #include <string.h>
46115 /* Check whether the given locale name is recognized by the system. */
46116 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46117 /* On native Windows, setlocale(category, "") looks at the system settings,
46118 not at the environment variables. Also, when an encoding suffix such
46119 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46120 category of the locale to "C". */
46121 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46122 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46125 if (setlocale (LC_ALL, "") == NULL) return 1;
46127 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46128 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46129 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46130 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46131 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46132 some unit tests fail.
46133 On MirBSD 10, when an unsupported locale is specified, setlocale()
46134 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
46135 #if HAVE_LANGINFO_CODESET
46137 const char *cs = nl_langinfo (CODESET);
46138 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46139 || strcmp (cs, "UTF-8") == 0)
46144 /* On Cygwin, avoid locale names without encoding suffix, because the
46145 locale_charset() function relies on the encoding suffix. Note that
46146 LC_ALL is set on the command line. */
46147 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46149 /* Check whether in the abbreviation of the second month, the second
46150 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
46151 one byte long. This excludes the UTF-8 encoding. */
46152 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46153 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
46154 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
46155 /* Check whether the decimal separator is a comma.
46156 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46157 are nl_langinfo(RADIXCHAR) are both ".". */
46158 if (localeconv () ->decimal_point[0] != ',') return 1;
46164 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46165 (eval $ac_link) 2>&5
46167 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46168 test $ac_status = 0; } && test -s conftest$ac_exeext; then
46170 # Handle native Windows specially, because there setlocale() interprets
46171 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46172 # "fr" or "fra" as "French" or "French_France.1252",
46173 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46174 # "ja" as "Japanese" or "Japanese_Japan.932",
46177 # Test for the native Windows locale name.
46178 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46179 gt_cv_locale_fr=French_France.1252
46182 gt_cv_locale_fr=none
46186 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46187 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46188 # configure script would override the LC_ALL setting. Likewise for
46189 # LC_CTYPE, which is also set at the beginning of the configure script.
46190 # Test for the usual locale name.
46191 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46192 gt_cv_locale_fr=fr_FR
46194 # Test for the locale name with explicit encoding suffix.
46195 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46196 gt_cv_locale_fr=fr_FR.ISO-8859-1
46198 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
46199 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46200 gt_cv_locale_fr=fr_FR.ISO8859-1
46202 # Test for the HP-UX locale name.
46203 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46204 gt_cv_locale_fr=fr_FR.iso88591
46206 # Test for the Solaris 7 locale name.
46207 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46211 gt_cv_locale_fr=none
46223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
46224 $as_echo "$gt_cv_locale_fr" >&6; }
46225 LOCALE_FR=$gt_cv_locale_fr
46230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
46231 $as_echo_n "checking for a french Unicode locale... " >&6; }
46232 if ${gt_cv_locale_fr_utf8+:} false; then :
46233 $as_echo_n "(cached) " >&6
46236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46237 /* end confdefs.h. */
46239 #include <locale.h>
46241 #if HAVE_LANGINFO_CODESET
46242 # include <langinfo.h>
46244 #include <stdlib.h>
46245 #include <string.h>
46249 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
46250 imitates locale dependent behaviour by looking at the environment
46251 variables, and all locales use the UTF-8 encoding. */
46252 #if !(defined __BEOS__ || defined __HAIKU__)
46253 /* Check whether the given locale name is recognized by the system. */
46254 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46255 /* On native Windows, setlocale(category, "") looks at the system settings,
46256 not at the environment variables. Also, when an encoding suffix such
46257 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46258 category of the locale to "C". */
46259 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46260 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46263 if (setlocale (LC_ALL, "") == NULL) return 1;
46265 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46266 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46267 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46268 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46269 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46270 some unit tests fail. */
46271 # if HAVE_LANGINFO_CODESET
46273 const char *cs = nl_langinfo (CODESET);
46274 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
46279 /* On Cygwin, avoid locale names without encoding suffix, because the
46280 locale_charset() function relies on the encoding suffix. Note that
46281 LC_ALL is set on the command line. */
46282 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46284 /* Check whether in the abbreviation of the second month, the second
46285 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
46286 two bytes long, with UTF-8 encoding. */
46287 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46288 if (strftime (buf, sizeof (buf), "%b", &t) < 4
46289 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
46292 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
46293 /* Check whether the decimal separator is a comma.
46294 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
46295 are nl_langinfo(RADIXCHAR) are both ".". */
46296 if (localeconv () ->decimal_point[0] != ',') return 1;
46302 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46303 (eval $ac_link) 2>&5
46305 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46306 test $ac_status = 0; } && test -s conftest$ac_exeext; then
46308 # Handle native Windows specially, because there setlocale() interprets
46309 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46310 # "fr" or "fra" as "French" or "French_France.1252",
46311 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46312 # "ja" as "Japanese" or "Japanese_Japan.932",
46315 # Test for the hypothetical native Windows locale name.
46316 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46317 gt_cv_locale_fr_utf8=French_France.65001
46320 gt_cv_locale_fr_utf8=none
46324 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46325 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46326 # configure script would override the LC_ALL setting. Likewise for
46327 # LC_CTYPE, which is also set at the beginning of the configure script.
46328 # Test for the usual locale name.
46329 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46330 gt_cv_locale_fr_utf8=fr_FR
46332 # Test for the locale name with explicit encoding suffix.
46333 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46334 gt_cv_locale_fr_utf8=fr_FR.UTF-8
46336 # Test for the Solaris 7 locale name.
46337 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46338 gt_cv_locale_fr_utf8=fr.UTF-8
46341 gt_cv_locale_fr_utf8=none
46351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
46352 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
46353 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
46359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
46360 $as_echo_n "checking for a traditional japanese locale... " >&6; }
46361 if ${gt_cv_locale_ja+:} false; then :
46362 $as_echo_n "(cached) " >&6
46365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46366 /* end confdefs.h. */
46368 #include <locale.h>
46370 #if HAVE_LANGINFO_CODESET
46371 # include <langinfo.h>
46373 #include <stdlib.h>
46374 #include <string.h>
46380 /* Check whether the given locale name is recognized by the system. */
46381 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46382 /* On native Windows, setlocale(category, "") looks at the system settings,
46383 not at the environment variables. Also, when an encoding suffix such
46384 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46385 category of the locale to "C". */
46386 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46387 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46390 if (setlocale (LC_ALL, "") == NULL) return 1;
46392 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46393 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46394 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46395 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46396 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46397 some unit tests fail.
46398 On MirBSD 10, when an unsupported locale is specified, setlocale()
46399 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
46400 #if HAVE_LANGINFO_CODESET
46402 const char *cs = nl_langinfo (CODESET);
46403 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46404 || strcmp (cs, "UTF-8") == 0)
46409 /* On Cygwin, avoid locale names without encoding suffix, because the
46410 locale_charset() function relies on the encoding suffix. Note that
46411 LC_ALL is set on the command line. */
46412 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46414 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
46415 on Cygwin 1.5.x. */
46416 if (MB_CUR_MAX == 1)
46418 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46419 This excludes the UTF-8 encoding (except on MirBSD). */
46420 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46421 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46422 for (p = buf; *p != '\0'; p++)
46423 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46429 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46430 (eval $ac_link) 2>&5
46432 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46433 test $ac_status = 0; } && test -s conftest$ac_exeext; then
46435 # Handle native Windows specially, because there setlocale() interprets
46436 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46437 # "fr" or "fra" as "French" or "French_France.1252",
46438 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46439 # "ja" as "Japanese" or "Japanese_Japan.932",
46442 # Note that on native Windows, the Japanese locale is
46443 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
46444 # cannot use it here.
46445 gt_cv_locale_ja=none
46448 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46449 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46450 # configure script would override the LC_ALL setting. Likewise for
46451 # LC_CTYPE, which is also set at the beginning of the configure script.
46452 # Test for the AIX locale name.
46453 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46454 gt_cv_locale_ja=ja_JP
46456 # Test for the locale name with explicit encoding suffix.
46457 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46458 gt_cv_locale_ja=ja_JP.EUC-JP
46460 # Test for the HP-UX, OSF/1, NetBSD locale name.
46461 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46462 gt_cv_locale_ja=ja_JP.eucJP
46464 # Test for the IRIX, FreeBSD locale name.
46465 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46466 gt_cv_locale_ja=ja_JP.EUC
46468 # Test for the Solaris 7 locale name.
46469 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46472 # Special test for NetBSD 1.6.
46473 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
46474 gt_cv_locale_ja=ja_JP.eucJP
46477 gt_cv_locale_ja=none
46490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
46491 $as_echo "$gt_cv_locale_ja" >&6; }
46492 LOCALE_JA=$gt_cv_locale_ja
46498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
46499 $as_echo_n "checking for a transitional chinese locale... " >&6; }
46500 if ${gt_cv_locale_zh_CN+:} false; then :
46501 $as_echo_n "(cached) " >&6
46504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46505 /* end confdefs.h. */
46507 #include <locale.h>
46508 #include <stdlib.h>
46510 #if HAVE_LANGINFO_CODESET
46511 # include <langinfo.h>
46513 #include <stdlib.h>
46514 #include <string.h>
46520 /* Check whether the given locale name is recognized by the system. */
46521 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
46522 /* On native Windows, setlocale(category, "") looks at the system settings,
46523 not at the environment variables. Also, when an encoding suffix such
46524 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
46525 category of the locale to "C". */
46526 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
46527 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
46530 if (setlocale (LC_ALL, "") == NULL) return 1;
46532 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
46533 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
46534 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
46535 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
46536 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
46537 some unit tests fail.
46538 On MirBSD 10, when an unsupported locale is specified, setlocale()
46539 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
46540 #if HAVE_LANGINFO_CODESET
46542 const char *cs = nl_langinfo (CODESET);
46543 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
46544 || strcmp (cs, "UTF-8") == 0)
46549 /* On Cygwin, avoid locale names without encoding suffix, because the
46550 locale_charset() function relies on the encoding suffix. Note that
46551 LC_ALL is set on the command line. */
46552 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
46554 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
46555 This excludes the UTF-8 encoding (except on MirBSD). */
46556 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
46557 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
46558 for (p = buf; *p != '\0'; p++)
46559 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
46561 /* Check whether a typical GB18030 multibyte sequence is recognized as a
46562 single wide character. This excludes the GB2312 and GBK encodings. */
46563 if (mblen ("\203\062\332\066", 5) != 4)
46569 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
46570 (eval $ac_link) 2>&5
46572 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46573 test $ac_status = 0; } && test -s conftest$ac_exeext; then
46575 # Handle native Windows specially, because there setlocale() interprets
46576 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
46577 # "fr" or "fra" as "French" or "French_France.1252",
46578 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
46579 # "ja" as "Japanese" or "Japanese_Japan.932",
46582 # Test for the hypothetical native Windows locale name.
46583 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46584 gt_cv_locale_zh_CN=Chinese_China.54936
46587 gt_cv_locale_zh_CN=none
46591 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
46592 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
46593 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
46594 gt_cv_locale_zh_CN=none
46597 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
46598 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
46599 # configure script would override the LC_ALL setting. Likewise for
46600 # LC_CTYPE, which is also set at the beginning of the configure script.
46601 # Test for the locale name without encoding suffix.
46602 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46603 gt_cv_locale_zh_CN=zh_CN
46605 # Test for the locale name with explicit encoding suffix.
46606 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
46607 gt_cv_locale_zh_CN=zh_CN.GB18030
46610 gt_cv_locale_zh_CN=none
46616 # If there was a link error, due to mblen(), the system is so old that
46617 # it certainly doesn't have a chinese locale.
46618 gt_cv_locale_zh_CN=none
46623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
46624 $as_echo "$gt_cv_locale_zh_CN" >&6; }
46625 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
46629 if test "$ac_cv_header_winsock2_h" = yes; then
46638 gltests_LIBOBJS="$gltests_LIBOBJS setsockopt.$ac_objext"
46646 if test "$GNULIB_SETSOCKOPT" != 1; then
46647 if test "$GNULIB_SETSOCKOPT" = 0; then
46648 GNULIB_SETSOCKOPT=$gl_module_indicator_condition
46650 GNULIB_SETSOCKOPT="($GNULIB_SETSOCKOPT || $gl_module_indicator_condition)"
46658 $as_echo "#define GNULIB_TEST_SETSOCKOPT 1" >>confdefs.h
46671 if test $ac_cv_func_sigaction = yes; then
46672 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
46674 if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then :
46676 cat >>confdefs.h <<_ACEOF
46677 #define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
46683 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
46684 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
46690 if test $HAVE_SIGACTION = 0; then
46699 gltests_LIBOBJS="$gltests_LIBOBJS sigaction.$ac_objext"
46716 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
46717 #include <signal.h>
46720 if test "x$ac_cv_type_siginfo_t" = xyes; then :
46722 cat >>confdefs.h <<_ACEOF
46723 #define HAVE_SIGINFO_T 1
46729 if test $ac_cv_type_siginfo_t = no; then
46739 if test "$GNULIB_SIGACTION" != 1; then
46740 if test "$GNULIB_SIGACTION" = 0; then
46741 GNULIB_SIGACTION=$gl_module_indicator_condition
46743 GNULIB_SIGACTION="($GNULIB_SIGACTION || $gl_module_indicator_condition)"
46751 $as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h
46766 if test $gl_cv_have_include_next = yes; then
46767 gl_cv_next_signal_h='<'signal.h'>'
46769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
46770 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
46771 if ${gl_cv_next_signal_h+:} false; then :
46772 $as_echo_n "(cached) " >&6
46777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46778 /* end confdefs.h. */
46779 #include <signal.h>
46782 aix*) gl_absname_cpp="$ac_cpp -C" ;;
46783 *) gl_absname_cpp="$ac_cpp" ;;
46788 gl_dirsep_regex='[/\\]'
46791 gl_dirsep_regex='\/'
46794 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
46795 gl_header_literal_regex=`echo 'signal.h' \
46796 | sed -e "$gl_make_literal_regex_sed"`
46797 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
46798 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
46804 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
46805 sed -n "$gl_absolute_header_sed"`
46807 gl_header=$gl_cv_absolute_signal_h
46808 gl_cv_next_signal_h='"'$gl_header'"'
46812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
46813 $as_echo "$gl_cv_next_signal_h" >&6; }
46815 NEXT_SIGNAL_H=$gl_cv_next_signal_h
46817 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
46818 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
46819 gl_next_as_first_directive='<'signal.h'>'
46821 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
46822 gl_next_as_first_directive=$gl_cv_next_signal_h
46824 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
46830 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
46831 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
46832 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
46833 #include <signal.h>
46836 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
46839 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
46848 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
46849 #include <signal.h>
46852 if test "x$ac_cv_type_sighandler_t" = xyes; then :
46855 HAVE_SIGHANDLER_T=0
46860 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
46861 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
46862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
46863 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
46864 if eval \${$as_gl_Symbol+:} false; then :
46865 $as_echo_n "(cached) " >&6
46867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46868 /* end confdefs.h. */
46869 #include <signal.h>
46880 if ac_fn_c_try_compile "$LINENO"; then :
46881 eval "$as_gl_Symbol=yes"
46883 eval "$as_gl_Symbol=no"
46885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46887 eval ac_res=\$$as_gl_Symbol
46888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
46889 $as_echo "$ac_res" >&6; }
46890 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
46891 cat >>confdefs.h <<_ACEOF
46892 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
46895 eval ac_cv_have_decl_$gl_func=yes
46903 if test $gl_cv_type_sigset_t = yes; then
46904 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
46905 if test "x$ac_cv_func_sigprocmask" = xyes; then :
46906 gl_cv_func_sigprocmask=1
46910 if test -z "$gl_cv_func_sigprocmask"; then
46911 HAVE_POSIX_SIGNALBLOCKING=0
46914 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then
46923 gltests_LIBOBJS="$gltests_LIBOBJS sigprocmask.$ac_objext"
46932 if test "$GNULIB_SIGPROCMASK" != 1; then
46933 if test "$GNULIB_SIGPROCMASK" = 0; then
46934 GNULIB_SIGPROCMASK=$gl_module_indicator_condition
46936 GNULIB_SIGPROCMASK="($GNULIB_SIGPROCMASK || $gl_module_indicator_condition)"
46944 $as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h
46950 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
46952 if test "x$ac_cv_have_decl_sleep" = xyes; then :
46958 cat >>confdefs.h <<_ACEOF
46959 #define HAVE_DECL_SLEEP $ac_have_decl
46969 if test $ac_cv_have_decl_sleep != yes; then
46972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
46973 $as_echo_n "checking for working sleep... " >&6; }
46974 if ${gl_cv_func_sleep_works+:} false; then :
46975 $as_echo_n "(cached) " >&6
46977 if test "$cross_compiling" = yes; then :
46979 # Guess yes on glibc systems.
46980 *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
46981 # If we don't know, assume the worst.
46982 *) gl_cv_func_sleep_works="guessing no" ;;
46986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46987 /* end confdefs.h. */
46990 #include <unistd.h>
46991 #include <signal.h>
46993 handle_alarm (int sig)
46995 if (sig != SIGALRM)
47003 /* Failure to compile this test due to missing alarm is okay,
47004 since all such platforms (mingw) also lack sleep. */
47005 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
47006 unsigned int remaining;
47007 signal (SIGALRM, handle_alarm);
47009 remaining = sleep (pentecost);
47010 if (remaining > pentecost)
47012 if (remaining <= pentecost - 10)
47020 if ac_fn_c_try_run "$LINENO"; then :
47021 gl_cv_func_sleep_works=yes
47023 gl_cv_func_sleep_works=no
47025 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47026 conftest.$ac_objext conftest.beam conftest.$ac_ext
47030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
47031 $as_echo "$gl_cv_func_sleep_works" >&6; }
47032 case "$gl_cv_func_sleep_works" in
47040 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
47049 gltests_LIBOBJS="$gltests_LIBOBJS sleep.$ac_objext"
47057 if test "$GNULIB_SLEEP" != 1; then
47058 if test "$GNULIB_SLEEP" = 0; then
47059 GNULIB_SLEEP=$gl_module_indicator_condition
47061 GNULIB_SLEEP="($GNULIB_SLEEP || $gl_module_indicator_condition)"
47069 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
47081 if test "$ac_cv_header_winsock2_h" = yes; then
47090 gltests_LIBOBJS="$gltests_LIBOBJS socket.$ac_objext"
47093 # When this module is used, sockets may actually occur as file descriptors,
47094 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
47098 if test "$ac_cv_header_winsock2_h" = yes; then
47099 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
47100 SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
47107 if test "$GNULIB_SOCKET" != 1; then
47108 if test "$GNULIB_SOCKET" = 0; then
47109 GNULIB_SOCKET=$gl_module_indicator_condition
47111 GNULIB_SOCKET="($GNULIB_SOCKET || $gl_module_indicator_condition)"
47119 $as_echo "#define GNULIB_TEST_SOCKET 1" >>confdefs.h
47135 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
47136 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
47137 # irrelevant for anonymous mappings.
47138 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
47139 if test "x$ac_cv_func_mmap" = xyes; then :
47146 # Try to allow MAP_ANONYMOUS.
47147 gl_have_mmap_anonymous=no
47148 if test $gl_have_mmap = yes; then
47149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
47150 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
47151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47152 /* end confdefs.h. */
47154 #include <sys/mman.h>
47155 #ifdef MAP_ANONYMOUS
47156 I cannot identify this map
47160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47161 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47162 gl_have_mmap_anonymous=yes
47166 if test $gl_have_mmap_anonymous != yes; then
47167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47168 /* end confdefs.h. */
47170 #include <sys/mman.h>
47172 I cannot identify this map
47176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47177 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47179 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
47181 gl_have_mmap_anonymous=yes
47186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
47187 $as_echo "$gl_have_mmap_anonymous" >&6; }
47188 if test $gl_have_mmap_anonymous = yes; then
47190 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
47219 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
47220 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
47221 # irrelevant for anonymous mappings.
47222 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
47223 if test "x$ac_cv_func_mmap" = xyes; then :
47230 # Try to allow MAP_ANONYMOUS.
47231 gl_have_mmap_anonymous=no
47232 if test $gl_have_mmap = yes; then
47233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
47234 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
47235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47236 /* end confdefs.h. */
47238 #include <sys/mman.h>
47239 #ifdef MAP_ANONYMOUS
47240 I cannot identify this map
47244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47245 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47246 gl_have_mmap_anonymous=yes
47250 if test $gl_have_mmap_anonymous != yes; then
47251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47252 /* end confdefs.h. */
47254 #include <sys/mman.h>
47256 I cannot identify this map
47260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47261 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
47263 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
47265 gl_have_mmap_anonymous=yes
47270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
47271 $as_echo "$gl_have_mmap_anonymous" >&6; }
47272 if test $gl_have_mmap_anonymous = yes; then
47274 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
47302 if test $ac_cv_func_symlink = no; then
47305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
47306 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
47307 if ${gl_cv_func_symlink_works+:} false; then :
47308 $as_echo_n "(cached) " >&6
47310 if test "$cross_compiling" = yes; then :
47312 # Guess yes on glibc systems.
47313 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
47314 # If we don't know, assume the worst.
47315 *) gl_cv_func_symlink_works="guessing no" ;;
47319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47320 /* end confdefs.h. */
47321 #include <unistd.h>
47327 if (!symlink ("a", "conftest.link/"))
47329 if (symlink ("conftest.f", "conftest.lnk2"))
47331 else if (!symlink ("a", "conftest.lnk2/"))
47339 if ac_fn_c_try_run "$LINENO"; then :
47340 gl_cv_func_symlink_works=yes
47342 gl_cv_func_symlink_works=no
47344 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47345 conftest.$ac_objext conftest.beam conftest.$ac_ext
47348 rm -f conftest.f conftest.link conftest.lnk2
47350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
47351 $as_echo "$gl_cv_func_symlink_works" >&6; }
47352 case "$gl_cv_func_symlink_works" in
47360 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
47369 gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext"
47377 if test "$GNULIB_SYMLINK" != 1; then
47378 if test "$GNULIB_SYMLINK" = 0; then
47379 GNULIB_SYMLINK=$gl_module_indicator_condition
47381 GNULIB_SYMLINK="($GNULIB_SYMLINK || $gl_module_indicator_condition)"
47389 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
47404 if test $ac_cv_func_symlinkat = no; then
47408 if test $HAVE_SYMLINKAT = 0; then
47417 gltests_LIBOBJS="$gltests_LIBOBJS symlinkat.$ac_objext"
47425 if test "$GNULIB_SYMLINKAT" != 1; then
47426 if test "$GNULIB_SYMLINKAT" = 0; then
47427 GNULIB_SYMLINKAT=$gl_module_indicator_condition
47429 GNULIB_SYMLINKAT="($GNULIB_SYMLINKAT || $gl_module_indicator_condition)"
47437 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
47451 if test $ac_cv_header_sys_ioctl_h = yes; then
47453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/ioctl.h> declares ioctl" >&5
47454 $as_echo_n "checking whether <sys/ioctl.h> declares ioctl... " >&6; }
47455 if ${gl_cv_decl_ioctl_in_sys_ioctl_h+:} false; then :
47456 $as_echo_n "(cached) " >&6
47458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47459 /* end confdefs.h. */
47460 #include <sys/ioctl.h>
47470 if ac_fn_c_try_compile "$LINENO"; then :
47471 gl_cv_decl_ioctl_in_sys_ioctl_h=yes
47473 gl_cv_decl_ioctl_in_sys_ioctl_h=no
47475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_ioctl_in_sys_ioctl_h" >&5
47479 $as_echo "$gl_cv_decl_ioctl_in_sys_ioctl_h" >&6; }
47499 if test $gl_cv_have_include_next = yes; then
47500 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
47502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/ioctl.h>" >&5
47503 $as_echo_n "checking absolute name of <sys/ioctl.h>... " >&6; }
47504 if ${gl_cv_next_sys_ioctl_h+:} false; then :
47505 $as_echo_n "(cached) " >&6
47508 if test $ac_cv_header_sys_ioctl_h = yes; then
47513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47514 /* end confdefs.h. */
47515 #include <sys/ioctl.h>
47518 aix*) gl_absname_cpp="$ac_cpp -C" ;;
47519 *) gl_absname_cpp="$ac_cpp" ;;
47524 gl_dirsep_regex='[/\\]'
47527 gl_dirsep_regex='\/'
47530 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47531 gl_header_literal_regex=`echo 'sys/ioctl.h' \
47532 | sed -e "$gl_make_literal_regex_sed"`
47533 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47534 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47540 gl_cv_absolute_sys_ioctl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47541 sed -n "$gl_absolute_header_sed"`
47543 gl_header=$gl_cv_absolute_sys_ioctl_h
47544 gl_cv_next_sys_ioctl_h='"'$gl_header'"'
47546 gl_cv_next_sys_ioctl_h='<'sys/ioctl.h'>'
47551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_ioctl_h" >&5
47552 $as_echo "$gl_cv_next_sys_ioctl_h" >&6; }
47554 NEXT_SYS_IOCTL_H=$gl_cv_next_sys_ioctl_h
47556 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47557 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47558 gl_next_as_first_directive='<'sys/ioctl.h'>'
47560 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47561 gl_next_as_first_directive=$gl_cv_next_sys_ioctl_h
47563 NEXT_AS_FIRST_DIRECTIVE_SYS_IOCTL_H=$gl_next_as_first_directive
47570 for gl_func in ioctl; do
47571 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
47572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
47573 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
47574 if eval \${$as_gl_Symbol+:} false; then :
47575 $as_echo_n "(cached) " >&6
47577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47578 /* end confdefs.h. */
47579 #include <sys/ioctl.h>
47580 /* Some platforms declare ioctl in the wrong header. */
47581 #if !(defined __GLIBC__ && !defined __UCLIBC__)
47582 # include <unistd.h>
47594 if ac_fn_c_try_compile "$LINENO"; then :
47595 eval "$as_gl_Symbol=yes"
47597 eval "$as_gl_Symbol=no"
47599 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47601 eval ac_res=\$$as_gl_Symbol
47602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47603 $as_echo "$ac_res" >&6; }
47604 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
47605 cat >>confdefs.h <<_ACEOF
47606 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
47609 eval ac_cv_have_decl_$gl_func=yes
47618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/select.h> is self-contained" >&5
47619 $as_echo_n "checking whether <sys/select.h> is self-contained... " >&6; }
47620 if ${gl_cv_header_sys_select_h_selfcontained+:} false; then :
47621 $as_echo_n "(cached) " >&6
47624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47625 /* end confdefs.h. */
47626 #include <sys/select.h>
47635 if ac_fn_c_try_compile "$LINENO"; then :
47636 gl_cv_header_sys_select_h_selfcontained=yes
47638 gl_cv_header_sys_select_h_selfcontained=no
47640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47641 if test $gl_cv_header_sys_select_h_selfcontained = yes; then
47642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47643 /* end confdefs.h. */
47644 #include <sys/select.h>
47648 int memset; int bzero;
47654 if ac_fn_c_try_compile "$LINENO"; then :
47655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47656 /* end confdefs.h. */
47657 #include <sys/select.h>
47663 #define memset nonexistent_memset
47668 void *memset (void *, int, unsigned long);
47670 #define bzero nonexistent_bzero
47675 void bzero (void *, unsigned long);
47684 if ac_fn_c_try_link "$LINENO"; then :
47687 gl_cv_header_sys_select_h_selfcontained=no
47689 rm -f core conftest.err conftest.$ac_objext \
47690 conftest$ac_exeext conftest.$ac_ext
47693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_select_h_selfcontained" >&5
47698 $as_echo "$gl_cv_header_sys_select_h_selfcontained" >&6; }
47714 if test $gl_cv_have_include_next = yes; then
47715 gl_cv_next_sys_select_h='<'sys/select.h'>'
47717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/select.h>" >&5
47718 $as_echo_n "checking absolute name of <sys/select.h>... " >&6; }
47719 if ${gl_cv_next_sys_select_h+:} false; then :
47720 $as_echo_n "(cached) " >&6
47723 if test $ac_cv_header_sys_select_h = yes; then
47728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47729 /* end confdefs.h. */
47730 #include <sys/select.h>
47733 aix*) gl_absname_cpp="$ac_cpp -C" ;;
47734 *) gl_absname_cpp="$ac_cpp" ;;
47739 gl_dirsep_regex='[/\\]'
47742 gl_dirsep_regex='\/'
47745 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
47746 gl_header_literal_regex=`echo 'sys/select.h' \
47747 | sed -e "$gl_make_literal_regex_sed"`
47748 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
47749 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
47755 gl_cv_absolute_sys_select_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
47756 sed -n "$gl_absolute_header_sed"`
47758 gl_header=$gl_cv_absolute_sys_select_h
47759 gl_cv_next_sys_select_h='"'$gl_header'"'
47761 gl_cv_next_sys_select_h='<'sys/select.h'>'
47766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_select_h" >&5
47767 $as_echo "$gl_cv_next_sys_select_h" >&6; }
47769 NEXT_SYS_SELECT_H=$gl_cv_next_sys_select_h
47771 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
47772 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
47773 gl_next_as_first_directive='<'sys/select.h'>'
47775 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
47776 gl_next_as_first_directive=$gl_cv_next_sys_select_h
47778 NEXT_AS_FIRST_DIRECTIVE_SYS_SELECT_H=$gl_next_as_first_directive
47783 if test $ac_cv_header_sys_select_h = yes; then
47784 HAVE_SYS_SELECT_H=1
47786 HAVE_SYS_SELECT_H=0
47799 if test $ac_cv_header_sys_socket_h != yes; then
47800 for ac_header in winsock2.h
47802 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
47803 if test "x$ac_cv_header_winsock2_h" = xyes; then :
47804 cat >>confdefs.h <<_ACEOF
47805 #define HAVE_WINSOCK2_H 1
47813 if test "$ac_cv_header_winsock2_h" = yes; then
47815 UNISTD_H_HAVE_WINSOCK2_H=1
47816 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
47824 for gl_func in pselect select; do
47825 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
47826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
47827 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
47828 if eval \${$as_gl_Symbol+:} false; then :
47829 $as_echo_n "(cached) " >&6
47831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47832 /* end confdefs.h. */
47834 /* Some systems require prerequisite headers. */
47835 #include <sys/types.h>
47836 #if !(defined __GLIBC__ && !defined __UCLIBC__) && HAVE_SYS_TIME_H
47837 # include <sys/time.h>
47839 #include <sys/select.h>
47850 if ac_fn_c_try_compile "$LINENO"; then :
47851 eval "$as_gl_Symbol=yes"
47853 eval "$as_gl_Symbol=no"
47855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47857 eval ac_res=\$$as_gl_Symbol
47858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
47859 $as_echo "$ac_res" >&6; }
47860 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
47861 cat >>confdefs.h <<_ACEOF
47862 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
47865 eval ac_cv_have_decl_$gl_func=yes
47881 if test $gl_threads_api = posix; then
47882 gl_save_LIBS="$LIBS"
47883 LIBS="$LIBS $LIBMULTITHREAD"
47884 for ac_func in pthread_atfork
47886 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
47887 if test "x$ac_cv_func_pthread_atfork" = xyes; then :
47888 cat >>confdefs.h <<_ACEOF
47889 #define HAVE_PTHREAD_ATFORK 1
47895 LIBS="$gl_save_LIBS"
47908 # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
47909 # Cygwin, and mingw never let anyone (even root) unlink directories.
47910 # If anyone knows of another system for which unlink can never
47911 # remove a directory, please report it to <bug-coreutils@gnu.org>.
47912 # Unfortunately this is difficult to test for, since it requires root access
47913 # and might create garbage in the file system,
47914 # so the code below simply relies on the kernel name and version number.
47917 linux-* | linux | \
47918 freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
47922 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
47926 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
47928 abs_aux_dir=`cd "$ac_aux_dir"; pwd`
47933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
47934 $as_echo_n "checking for a traditional french locale... " >&6; }
47935 if ${gt_cv_locale_fr+:} false; then :
47936 $as_echo_n "(cached) " >&6
47939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47940 /* end confdefs.h. */
47942 #include <locale.h>
47944 #if HAVE_LANGINFO_CODESET
47945 # include <langinfo.h>
47947 #include <stdlib.h>
47948 #include <string.h>
47952 /* Check whether the given locale name is recognized by the system. */
47953 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
47954 /* On native Windows, setlocale(category, "") looks at the system settings,
47955 not at the environment variables. Also, when an encoding suffix such
47956 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
47957 category of the locale to "C". */
47958 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
47959 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
47962 if (setlocale (LC_ALL, "") == NULL) return 1;
47964 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
47965 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
47966 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
47967 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
47968 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
47969 some unit tests fail.
47970 On MirBSD 10, when an unsupported locale is specified, setlocale()
47971 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
47972 #if HAVE_LANGINFO_CODESET
47974 const char *cs = nl_langinfo (CODESET);
47975 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
47976 || strcmp (cs, "UTF-8") == 0)
47981 /* On Cygwin, avoid locale names without encoding suffix, because the
47982 locale_charset() function relies on the encoding suffix. Note that
47983 LC_ALL is set on the command line. */
47984 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
47986 /* Check whether in the abbreviation of the second month, the second
47987 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
47988 one byte long. This excludes the UTF-8 encoding. */
47989 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
47990 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
47991 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
47992 /* Check whether the decimal separator is a comma.
47993 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
47994 are nl_langinfo(RADIXCHAR) are both ".". */
47995 if (localeconv () ->decimal_point[0] != ',') return 1;
48001 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48002 (eval $ac_link) 2>&5
48004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48005 test $ac_status = 0; } && test -s conftest$ac_exeext; then
48007 # Handle native Windows specially, because there setlocale() interprets
48008 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48009 # "fr" or "fra" as "French" or "French_France.1252",
48010 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48011 # "ja" as "Japanese" or "Japanese_Japan.932",
48014 # Test for the native Windows locale name.
48015 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48016 gt_cv_locale_fr=French_France.1252
48019 gt_cv_locale_fr=none
48023 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48024 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48025 # configure script would override the LC_ALL setting. Likewise for
48026 # LC_CTYPE, which is also set at the beginning of the configure script.
48027 # Test for the usual locale name.
48028 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48029 gt_cv_locale_fr=fr_FR
48031 # Test for the locale name with explicit encoding suffix.
48032 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48033 gt_cv_locale_fr=fr_FR.ISO-8859-1
48035 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
48036 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48037 gt_cv_locale_fr=fr_FR.ISO8859-1
48039 # Test for the HP-UX locale name.
48040 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48041 gt_cv_locale_fr=fr_FR.iso88591
48043 # Test for the Solaris 7 locale name.
48044 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48048 gt_cv_locale_fr=none
48060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
48061 $as_echo "$gt_cv_locale_fr" >&6; }
48062 LOCALE_FR=$gt_cv_locale_fr
48067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
48068 $as_echo_n "checking for a french Unicode locale... " >&6; }
48069 if ${gt_cv_locale_fr_utf8+:} false; then :
48070 $as_echo_n "(cached) " >&6
48073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48074 /* end confdefs.h. */
48076 #include <locale.h>
48078 #if HAVE_LANGINFO_CODESET
48079 # include <langinfo.h>
48081 #include <stdlib.h>
48082 #include <string.h>
48086 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
48087 imitates locale dependent behaviour by looking at the environment
48088 variables, and all locales use the UTF-8 encoding. */
48089 #if !(defined __BEOS__ || defined __HAIKU__)
48090 /* Check whether the given locale name is recognized by the system. */
48091 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48092 /* On native Windows, setlocale(category, "") looks at the system settings,
48093 not at the environment variables. Also, when an encoding suffix such
48094 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48095 category of the locale to "C". */
48096 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48097 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48100 if (setlocale (LC_ALL, "") == NULL) return 1;
48102 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48103 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48104 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48105 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48106 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48107 some unit tests fail. */
48108 # if HAVE_LANGINFO_CODESET
48110 const char *cs = nl_langinfo (CODESET);
48111 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
48116 /* On Cygwin, avoid locale names without encoding suffix, because the
48117 locale_charset() function relies on the encoding suffix. Note that
48118 LC_ALL is set on the command line. */
48119 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48121 /* Check whether in the abbreviation of the second month, the second
48122 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
48123 two bytes long, with UTF-8 encoding. */
48124 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48125 if (strftime (buf, sizeof (buf), "%b", &t) < 4
48126 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
48129 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
48130 /* Check whether the decimal separator is a comma.
48131 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
48132 are nl_langinfo(RADIXCHAR) are both ".". */
48133 if (localeconv () ->decimal_point[0] != ',') return 1;
48139 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48140 (eval $ac_link) 2>&5
48142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48143 test $ac_status = 0; } && test -s conftest$ac_exeext; then
48145 # Handle native Windows specially, because there setlocale() interprets
48146 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48147 # "fr" or "fra" as "French" or "French_France.1252",
48148 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48149 # "ja" as "Japanese" or "Japanese_Japan.932",
48152 # Test for the hypothetical native Windows locale name.
48153 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48154 gt_cv_locale_fr_utf8=French_France.65001
48157 gt_cv_locale_fr_utf8=none
48161 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48162 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48163 # configure script would override the LC_ALL setting. Likewise for
48164 # LC_CTYPE, which is also set at the beginning of the configure script.
48165 # Test for the usual locale name.
48166 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48167 gt_cv_locale_fr_utf8=fr_FR
48169 # Test for the locale name with explicit encoding suffix.
48170 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48171 gt_cv_locale_fr_utf8=fr_FR.UTF-8
48173 # Test for the Solaris 7 locale name.
48174 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48175 gt_cv_locale_fr_utf8=fr.UTF-8
48178 gt_cv_locale_fr_utf8=none
48188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
48189 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
48190 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
48196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
48197 $as_echo_n "checking for a traditional japanese locale... " >&6; }
48198 if ${gt_cv_locale_ja+:} false; then :
48199 $as_echo_n "(cached) " >&6
48202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48203 /* end confdefs.h. */
48205 #include <locale.h>
48207 #if HAVE_LANGINFO_CODESET
48208 # include <langinfo.h>
48210 #include <stdlib.h>
48211 #include <string.h>
48217 /* Check whether the given locale name is recognized by the system. */
48218 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48219 /* On native Windows, setlocale(category, "") looks at the system settings,
48220 not at the environment variables. Also, when an encoding suffix such
48221 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48222 category of the locale to "C". */
48223 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48224 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48227 if (setlocale (LC_ALL, "") == NULL) return 1;
48229 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48230 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48231 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48232 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48233 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48234 some unit tests fail.
48235 On MirBSD 10, when an unsupported locale is specified, setlocale()
48236 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
48237 #if HAVE_LANGINFO_CODESET
48239 const char *cs = nl_langinfo (CODESET);
48240 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
48241 || strcmp (cs, "UTF-8") == 0)
48246 /* On Cygwin, avoid locale names without encoding suffix, because the
48247 locale_charset() function relies on the encoding suffix. Note that
48248 LC_ALL is set on the command line. */
48249 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48251 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
48252 on Cygwin 1.5.x. */
48253 if (MB_CUR_MAX == 1)
48255 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
48256 This excludes the UTF-8 encoding (except on MirBSD). */
48257 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48258 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
48259 for (p = buf; *p != '\0'; p++)
48260 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
48266 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48267 (eval $ac_link) 2>&5
48269 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48270 test $ac_status = 0; } && test -s conftest$ac_exeext; then
48272 # Handle native Windows specially, because there setlocale() interprets
48273 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48274 # "fr" or "fra" as "French" or "French_France.1252",
48275 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48276 # "ja" as "Japanese" or "Japanese_Japan.932",
48279 # Note that on native Windows, the Japanese locale is
48280 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
48281 # cannot use it here.
48282 gt_cv_locale_ja=none
48285 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48286 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48287 # configure script would override the LC_ALL setting. Likewise for
48288 # LC_CTYPE, which is also set at the beginning of the configure script.
48289 # Test for the AIX locale name.
48290 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48291 gt_cv_locale_ja=ja_JP
48293 # Test for the locale name with explicit encoding suffix.
48294 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48295 gt_cv_locale_ja=ja_JP.EUC-JP
48297 # Test for the HP-UX, OSF/1, NetBSD locale name.
48298 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48299 gt_cv_locale_ja=ja_JP.eucJP
48301 # Test for the IRIX, FreeBSD locale name.
48302 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48303 gt_cv_locale_ja=ja_JP.EUC
48305 # Test for the Solaris 7 locale name.
48306 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48309 # Special test for NetBSD 1.6.
48310 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
48311 gt_cv_locale_ja=ja_JP.eucJP
48314 gt_cv_locale_ja=none
48327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
48328 $as_echo "$gt_cv_locale_ja" >&6; }
48329 LOCALE_JA=$gt_cv_locale_ja
48335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
48336 $as_echo_n "checking for a transitional chinese locale... " >&6; }
48337 if ${gt_cv_locale_zh_CN+:} false; then :
48338 $as_echo_n "(cached) " >&6
48341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48342 /* end confdefs.h. */
48344 #include <locale.h>
48345 #include <stdlib.h>
48347 #if HAVE_LANGINFO_CODESET
48348 # include <langinfo.h>
48350 #include <stdlib.h>
48351 #include <string.h>
48357 /* Check whether the given locale name is recognized by the system. */
48358 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
48359 /* On native Windows, setlocale(category, "") looks at the system settings,
48360 not at the environment variables. Also, when an encoding suffix such
48361 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
48362 category of the locale to "C". */
48363 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
48364 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
48367 if (setlocale (LC_ALL, "") == NULL) return 1;
48369 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
48370 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
48371 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
48372 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
48373 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
48374 some unit tests fail.
48375 On MirBSD 10, when an unsupported locale is specified, setlocale()
48376 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
48377 #if HAVE_LANGINFO_CODESET
48379 const char *cs = nl_langinfo (CODESET);
48380 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
48381 || strcmp (cs, "UTF-8") == 0)
48386 /* On Cygwin, avoid locale names without encoding suffix, because the
48387 locale_charset() function relies on the encoding suffix. Note that
48388 LC_ALL is set on the command line. */
48389 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
48391 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
48392 This excludes the UTF-8 encoding (except on MirBSD). */
48393 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
48394 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
48395 for (p = buf; *p != '\0'; p++)
48396 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
48398 /* Check whether a typical GB18030 multibyte sequence is recognized as a
48399 single wide character. This excludes the GB2312 and GBK encodings. */
48400 if (mblen ("\203\062\332\066", 5) != 4)
48406 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
48407 (eval $ac_link) 2>&5
48409 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48410 test $ac_status = 0; } && test -s conftest$ac_exeext; then
48412 # Handle native Windows specially, because there setlocale() interprets
48413 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
48414 # "fr" or "fra" as "French" or "French_France.1252",
48415 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
48416 # "ja" as "Japanese" or "Japanese_Japan.932",
48419 # Test for the hypothetical native Windows locale name.
48420 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48421 gt_cv_locale_zh_CN=Chinese_China.54936
48424 gt_cv_locale_zh_CN=none
48428 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
48429 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
48430 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
48431 gt_cv_locale_zh_CN=none
48434 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
48435 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
48436 # configure script would override the LC_ALL setting. Likewise for
48437 # LC_CTYPE, which is also set at the beginning of the configure script.
48438 # Test for the locale name without encoding suffix.
48439 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48440 gt_cv_locale_zh_CN=zh_CN
48442 # Test for the locale name with explicit encoding suffix.
48443 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
48444 gt_cv_locale_zh_CN=zh_CN.GB18030
48447 gt_cv_locale_zh_CN=none
48453 # If there was a link error, due to mblen(), the system is so old that
48454 # it certainly doesn't have a chinese locale.
48455 gt_cv_locale_zh_CN=none
48460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
48461 $as_echo "$gt_cv_locale_zh_CN" >&6; }
48462 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
48475 if test $ac_cv_func_wctob = no; then
48483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
48484 $as_echo_n "checking whether wctob works... " >&6; }
48485 if ${gl_cv_func_wctob_works+:} false; then :
48486 $as_echo_n "(cached) " >&6
48490 # Guess no on Solaris <= 9 and Cygwin.
48491 solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
48492 gl_cv_func_wctob_works="guessing no" ;;
48493 # Guess yes otherwise.
48494 *) gl_cv_func_wctob_works="guessing yes" ;;
48498 if test "$cross_compiling" = yes; then :
48501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48502 /* end confdefs.h. */
48504 #include <locale.h>
48505 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48507 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48508 included before <wchar.h>. */
48509 #include <stddef.h>
48514 register long global __asm__ ("%ebx");
48518 setlocale (LC_ALL, "en_US.UTF-8");
48520 global = 0x12345678;
48521 if (wctob (0x00FC) != -1)
48523 if (global != 0x12345678)
48528 if ac_fn_c_try_run "$LINENO"; then :
48531 gl_cv_func_wctob_works=no
48533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48534 conftest.$ac_objext conftest.beam conftest.$ac_ext
48539 if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then
48540 if test "$cross_compiling" = yes; then :
48543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48544 /* end confdefs.h. */
48546 #include <locale.h>
48547 #include <string.h>
48548 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48550 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
48551 included before <wchar.h>. */
48552 #include <stddef.h>
48558 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
48562 if (mbtowc (&wc, "\374", 1) == 1)
48563 if (wctob (wc) != (unsigned char) '\374')
48569 if ac_fn_c_try_run "$LINENO"; then :
48570 gl_cv_func_wctob_works=yes
48572 gl_cv_func_wctob_works=no
48574 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48575 conftest.$ac_objext conftest.beam conftest.$ac_ext
48581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
48582 $as_echo "$gl_cv_func_wctob_works" >&6; }
48583 case "$gl_cv_func_wctob_works" in
48585 *) REPLACE_WCTOB=1 ;;
48587 if test $REPLACE_WCTOB = 0; then
48589 ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
48590 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
48592 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
48593 before <wchar.h>. */
48594 #include <stddef.h>
48600 if test "x$ac_cv_have_decl_wctob" = xyes; then :
48606 cat >>confdefs.h <<_ACEOF
48607 #define HAVE_DECL_WCTOB $ac_have_decl
48610 if test $ac_cv_have_decl_wctob != yes; then
48616 if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then
48625 gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext"
48636 if test "$GNULIB_WCTOB" != 1; then
48637 if test "$GNULIB_WCTOB" = 0; then
48638 GNULIB_WCTOB=$gl_module_indicator_condition
48640 GNULIB_WCTOB="($GNULIB_WCTOB || $gl_module_indicator_condition)"
48648 $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h
48659 if test $REPLACE_WCTOMB = 1; then
48668 gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext"
48679 if test "$GNULIB_WCTOMB" != 1; then
48680 if test "$GNULIB_WCTOMB" = 0; then
48681 GNULIB_WCTOMB=$gl_module_indicator_condition
48683 GNULIB_WCTOMB="($GNULIB_WCTOMB || $gl_module_indicator_condition)"
48691 $as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h
48698 if test $gl_threads_api = posix; then
48699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
48700 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
48701 if ${ac_cv_lib_rt_sched_yield+:} false; then :
48702 $as_echo_n "(cached) " >&6
48704 ac_check_lib_save_LIBS=$LIBS
48706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48707 /* end confdefs.h. */
48709 /* Override any GCC internal prototype to avoid an error.
48710 Use char because int might match the return type of a GCC
48711 builtin and then its argument prototype would still apply. */
48715 char sched_yield ();
48719 return sched_yield ();
48724 if ac_fn_c_try_link "$LINENO"; then :
48725 ac_cv_lib_rt_sched_yield=yes
48727 ac_cv_lib_rt_sched_yield=no
48729 rm -f core conftest.err conftest.$ac_objext \
48730 conftest$ac_exeext conftest.$ac_ext
48731 LIBS=$ac_check_lib_save_LIBS
48733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
48734 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
48735 if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
48738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
48739 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
48740 if ${ac_cv_lib_posix4_sched_yield+:} false; then :
48741 $as_echo_n "(cached) " >&6
48743 ac_check_lib_save_LIBS=$LIBS
48744 LIBS="-lposix4 $LIBS"
48745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48746 /* end confdefs.h. */
48748 /* Override any GCC internal prototype to avoid an error.
48749 Use char because int might match the return type of a GCC
48750 builtin and then its argument prototype would still apply. */
48754 char sched_yield ();
48758 return sched_yield ();
48763 if ac_fn_c_try_link "$LINENO"; then :
48764 ac_cv_lib_posix4_sched_yield=yes
48766 ac_cv_lib_posix4_sched_yield=no
48768 rm -f core conftest.err conftest.$ac_objext \
48769 conftest$ac_exeext conftest.$ac_ext
48770 LIBS=$ac_check_lib_save_LIBS
48772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
48773 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
48774 if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then :
48793 LIBGNULIB_LIBDEPS="$gl_libdeps"
48795 LIBGNULIB_LTLIBDEPS="$gl_ltlibdeps"
48797 LIBTESTS_LIBDEPS="$gltests_libdeps"
48803 if test -n "$GCC"; then
48805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
48806 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
48807 if ${gl_cv_cc_nomfi_supported+:} false; then :
48808 $as_echo_n "(cached) " >&6
48811 gl_save_CFLAGS="$CFLAGS"
48812 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
48813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48814 /* end confdefs.h. */
48824 if ac_fn_c_try_compile "$LINENO"; then :
48825 gl_cv_cc_nomfi_supported=yes
48827 gl_cv_cc_nomfi_supported=no
48829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48830 CFLAGS="$gl_save_CFLAGS"
48833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
48834 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
48836 if test "$gl_cv_cc_nomfi_supported" = yes; then
48837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
48838 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
48839 if ${gl_cv_cc_nomfi_needed+:} false; then :
48840 $as_echo_n "(cached) " >&6
48843 gl_save_CFLAGS="$CFLAGS"
48844 CFLAGS="$CFLAGS -W -Werror"
48845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48846 /* end confdefs.h. */
48849 typedef struct { int a; int b; } s_t;
48861 if ac_fn_c_try_compile "$LINENO"; then :
48862 gl_cv_cc_nomfi_needed=no
48864 gl_cv_cc_nomfi_needed=yes
48866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48867 CFLAGS="$gl_save_CFLAGS"
48871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
48872 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
48875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
48876 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
48877 if ${gl_cv_cc_uninitialized_supported+:} false; then :
48878 $as_echo_n "(cached) " >&6
48881 gl_save_CFLAGS="$CFLAGS"
48882 CFLAGS="$CFLAGS -Werror -Wuninitialized"
48883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48884 /* end confdefs.h. */
48894 if ac_fn_c_try_compile "$LINENO"; then :
48895 gl_cv_cc_uninitialized_supported=yes
48897 gl_cv_cc_uninitialized_supported=no
48899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48900 CFLAGS="$gl_save_CFLAGS"
48903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
48904 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
48908 # List all gcc warning categories.
48910 for gl_manywarn_item in \
48914 -Waggressive-loop-optimizations \
48918 -Wbad-function-cast \
48919 -Wbuiltin-macro-redefined \
48921 -Wchar-subscripts \
48925 -Wcoverage-mismatch \
48928 -Wdeprecated-declarations \
48929 -Wdisabled-optimization \
48931 -Wdouble-promotion \
48936 -Wformat-contains-nul \
48937 -Wformat-extra-args \
48938 -Wformat-nonliteral \
48939 -Wformat-security \
48941 -Wformat-zero-length \
48942 -Wfree-nonheap-object \
48943 -Wignored-qualifiers \
48945 -Wimplicit-function-declaration \
48949 -Wint-to-pointer-cast \
48950 -Winvalid-memory-model \
48952 -Wjump-misses-init \
48955 -Wmaybe-uninitialized \
48957 -Wmissing-declarations \
48958 -Wmissing-field-initializers \
48959 -Wmissing-include-dirs \
48960 -Wmissing-parameter-type \
48961 -Wmissing-prototypes \
48967 -Wold-style-declaration \
48968 -Wold-style-definition \
48970 -Woverlength-strings \
48973 -Wpacked-bitfield-compat \
48977 -Wpointer-to-int-cast \
48979 -Wreturn-local-addr \
48983 -Wsizeof-pointer-memaccess \
48984 -Wstack-protector \
48985 -Wstrict-aliasing \
48986 -Wstrict-overflow \
48987 -Wstrict-prototypes \
48988 -Wsuggest-attribute=const \
48989 -Wsuggest-attribute=format \
48990 -Wsuggest-attribute=noreturn \
48991 -Wsuggest-attribute=pure \
49000 -Wunknown-pragmas \
49001 -Wunsafe-loop-optimizations \
49003 -Wunused-but-set-parameter \
49004 -Wunused-but-set-variable \
49005 -Wunused-function \
49007 -Wunused-local-typedefs \
49009 -Wunused-parameter \
49012 -Wunused-variable \
49014 -Wvariadic-macros \
49015 -Wvector-operation-performance \
49017 -Wvolatile-register-var \
49019 -fdiagnostics-show-option \
49023 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
49026 # Disable specific options as needed.
49027 if test "$gl_cv_cc_nomfi_needed" = yes; then
49028 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
49031 if test "$gl_cv_cc_uninitialized_supported" = no; then
49032 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
49035 warnings=$gl_manywarn_set
49037 # Set up the list of the pointless, undesired warnings.
49039 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
49040 nw="$nw -Wundef" # All compiler preprocessors support #if UNDEF
49041 nw="$nw -Wtraditional" # All compilers nowadays support ANSI C
49042 nw="$nw -Wconversion" # These warnings usually don't point to mistakes.
49043 nw="$nw -Wsign-conversion" # Likewise.
49044 nw="$nw -Wc++-compat" # malloc returns void* and a cast would be ugly.
49045 # Warnings we might enable in the future, but not yet (because they generate a
49048 marginal="$marginal -Wtraditional-conversion"
49049 marginal="$marginal -Wpadded"
49050 marginal="$marginal -Wformat-nonliteral"
49051 marginal="$marginal -Wunreachable-code"
49052 marginal="$marginal -Wunused-parameter"
49053 excluded_warnings="$nw $marginal"
49055 # Enable all GCC warnings not in this list.
49058 set x $warnings; shift
49061 case " $excluded_warnings " in
49062 *" $gl_warn_item "*)
49065 gl_warn_set="$gl_warn_set $gl_warn_item"
49069 warnings=$gl_warn_set
49072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
49073 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
49074 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
49075 $as_echo_n "(cached) " >&6
49078 gl_save_compiler_FLAGS="$CFLAGS"
49079 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
49080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49081 /* end confdefs.h. */
49091 if ac_fn_c_try_link "$LINENO"; then :
49092 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
49094 gl_cv_warn_c__Werror__Wunknown_warning_option=no
49096 rm -f core conftest.err conftest.$ac_objext \
49097 conftest$ac_exeext conftest.$ac_ext
49098 CFLAGS="$gl_save_compiler_FLAGS"
49101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
49102 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
49103 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
49104 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
49106 gl_unknown_warnings_are_errors=
49109 # Check whether --enable-compiler-warnings was given.
49110 if test "${enable_compiler_warnings+set}" = set; then :
49111 enableval=$enable_compiler_warnings;
49115 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
49117 case $gl_positive in
49118 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
49120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
49121 $as_echo_n "checking whether C compiler handles $w... " >&6; }
49122 if eval \${$as_gl_Warn+:} false; then :
49123 $as_echo_n "(cached) " >&6
49126 gl_save_compiler_FLAGS="$CFLAGS"
49127 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
49128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49129 /* end confdefs.h. */
49139 if ac_fn_c_try_link "$LINENO"; then :
49140 eval "$as_gl_Warn=yes"
49142 eval "$as_gl_Warn=no"
49144 rm -f core conftest.err conftest.$ac_objext \
49145 conftest$ac_exeext conftest.$ac_ext
49146 CFLAGS="$gl_save_compiler_FLAGS"
49149 eval ac_res=\$$as_gl_Warn
49150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49151 $as_echo "$ac_res" >&6; }
49152 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
49153 as_fn_append WARN_CFLAGS " $w"
49166 if test -n "$ac_aux_dir"; then
49167 case "$ac_aux_dir" in
49168 /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
49169 *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
49172 if test -z "$MKINSTALLDIRS"; then
49173 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
49178 if test "x$cross_compiling" = xyes; then
49179 CROSS_COMPILING_TRUE=
49180 CROSS_COMPILING_FALSE='#'
49182 CROSS_COMPILING_TRUE='#'
49183 CROSS_COMPILING_FALSE=
49188 ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam"
49189 if test "x$ac_cv_func_getpwnam" = xyes; then :
49192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpwnam in -lsun" >&5
49193 $as_echo_n "checking for getpwnam in -lsun... " >&6; }
49194 if ${ac_cv_lib_sun_getpwnam+:} false; then :
49195 $as_echo_n "(cached) " >&6
49197 ac_check_lib_save_LIBS=$LIBS
49199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49200 /* end confdefs.h. */
49202 /* Override any GCC internal prototype to avoid an error.
49203 Use char because int might match the return type of a GCC
49204 builtin and then its argument prototype would still apply. */
49212 return getpwnam ();
49217 if ac_fn_c_try_link "$LINENO"; then :
49218 ac_cv_lib_sun_getpwnam=yes
49220 ac_cv_lib_sun_getpwnam=no
49222 rm -f core conftest.err conftest.$ac_objext \
49223 conftest$ac_exeext conftest.$ac_ext
49224 LIBS=$ac_check_lib_save_LIBS
49226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwnam" >&5
49227 $as_echo "$ac_cv_lib_sun_getpwnam" >&6; }
49228 if test "x$ac_cv_lib_sun_getpwnam" = xyes; then :
49229 cat >>confdefs.h <<_ACEOF
49230 #define HAVE_LIBSUN 1
49240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modf in -lm" >&5
49241 $as_echo_n "checking for modf in -lm... " >&6; }
49242 if ${ac_cv_lib_m_modf+:} false; then :
49243 $as_echo_n "(cached) " >&6
49245 ac_check_lib_save_LIBS=$LIBS
49247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49248 /* end confdefs.h. */
49250 /* Override any GCC internal prototype to avoid an error.
49251 Use char because int might match the return type of a GCC
49252 builtin and then its argument prototype would still apply. */
49265 if ac_fn_c_try_link "$LINENO"; then :
49266 ac_cv_lib_m_modf=yes
49268 ac_cv_lib_m_modf=no
49270 rm -f core conftest.err conftest.$ac_objext \
49271 conftest$ac_exeext conftest.$ac_ext
49272 LIBS=$ac_check_lib_save_LIBS
49274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_modf" >&5
49275 $as_echo "$ac_cv_lib_m_modf" >&6; }
49276 if test "x$ac_cv_lib_m_modf" = xyes; then :
49277 FINDLIBS="-lm $FINDLIBS"
49279 cat >>confdefs.h <<_ACEOF
49280 #define HAVE_MODF_IN_LIBM 1
49285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabs in -lm" >&5
49286 $as_echo_n "checking for fabs in -lm... " >&6; }
49287 if ${ac_cv_lib_m_fabs+:} false; then :
49288 $as_echo_n "(cached) " >&6
49290 ac_check_lib_save_LIBS=$LIBS
49292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49293 /* end confdefs.h. */
49295 /* Override any GCC internal prototype to avoid an error.
49296 Use char because int might match the return type of a GCC
49297 builtin and then its argument prototype would still apply. */
49310 if ac_fn_c_try_link "$LINENO"; then :
49311 ac_cv_lib_m_fabs=yes
49313 ac_cv_lib_m_fabs=no
49315 rm -f core conftest.err conftest.$ac_objext \
49316 conftest$ac_exeext conftest.$ac_ext
49317 LIBS=$ac_check_lib_save_LIBS
49319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_fabs" >&5
49320 $as_echo "$ac_cv_lib_m_fabs" >&6; }
49321 if test "x$ac_cv_lib_m_fabs" = xyes; then :
49322 FINDLIBS="-lm $FINDLIBS"
49324 cat >>confdefs.h <<_ACEOF
49325 #define HAVE_FABS_IN_LIBM 1
49332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49333 $as_echo_n "checking for ANSI C header files... " >&6; }
49334 if ${ac_cv_header_stdc+:} false; then :
49335 $as_echo_n "(cached) " >&6
49337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49338 /* end confdefs.h. */
49339 #include <stdlib.h>
49340 #include <stdarg.h>
49341 #include <string.h>
49352 if ac_fn_c_try_compile "$LINENO"; then :
49353 ac_cv_header_stdc=yes
49355 ac_cv_header_stdc=no
49357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49359 if test $ac_cv_header_stdc = yes; then
49360 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49362 /* end confdefs.h. */
49363 #include <string.h>
49366 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49367 $EGREP "memchr" >/dev/null 2>&1; then :
49370 ac_cv_header_stdc=no
49376 if test $ac_cv_header_stdc = yes; then
49377 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49379 /* end confdefs.h. */
49380 #include <stdlib.h>
49383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49384 $EGREP "free" >/dev/null 2>&1; then :
49387 ac_cv_header_stdc=no
49393 if test $ac_cv_header_stdc = yes; then
49394 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49395 if test "$cross_compiling" = yes; then :
49398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49399 /* end confdefs.h. */
49401 #include <stdlib.h>
49402 #if ((' ' & 0x0FF) == 0x020)
49403 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49404 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49406 # define ISLOWER(c) \
49407 (('a' <= (c) && (c) <= 'i') \
49408 || ('j' <= (c) && (c) <= 'r') \
49409 || ('s' <= (c) && (c) <= 'z'))
49410 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49413 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49418 for (i = 0; i < 256; i++)
49419 if (XOR (islower (i), ISLOWER (i))
49420 || toupper (i) != TOUPPER (i))
49425 if ac_fn_c_try_run "$LINENO"; then :
49428 ac_cv_header_stdc=no
49430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49431 conftest.$ac_objext conftest.beam conftest.$ac_ext
49436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49437 $as_echo "$ac_cv_header_stdc" >&6; }
49438 if test $ac_cv_header_stdc = yes; then
49440 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49444 for ac_header in sys/param.h mntent.h sys/mnttab.h sys/mntio.h sys/mkdev.h
49446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49447 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49448 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49449 cat >>confdefs.h <<_ACEOF
49450 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49457 for ac_header in sys/resource.h
49459 ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
49460 if test "x$ac_cv_header_sys_resource_h" = xyes; then :
49461 cat >>confdefs.h <<_ACEOF
49462 #define HAVE_SYS_RESOURCE_H 1
49469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
49470 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
49471 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
49472 $as_echo_n "(cached) " >&6
49474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49475 /* end confdefs.h. */
49476 #include <sys/types.h>
49480 return makedev(0, 0);
49485 if ac_fn_c_try_link "$LINENO"; then :
49486 ac_cv_header_sys_types_h_makedev=yes
49488 ac_cv_header_sys_types_h_makedev=no
49490 rm -f core conftest.err conftest.$ac_objext \
49491 conftest$ac_exeext conftest.$ac_ext
49494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
49495 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
49497 if test $ac_cv_header_sys_types_h_makedev = no; then
49498 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
49499 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
49501 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
49507 if test $ac_cv_header_sys_mkdev_h = no; then
49508 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
49509 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
49511 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
49519 ac_header_dirent=no
49520 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
49521 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
49522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
49523 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
49524 if eval \${$as_ac_Header+:} false; then :
49525 $as_echo_n "(cached) " >&6
49527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49528 /* end confdefs.h. */
49529 #include <sys/types.h>
49541 if ac_fn_c_try_compile "$LINENO"; then :
49542 eval "$as_ac_Header=yes"
49544 eval "$as_ac_Header=no"
49546 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49548 eval ac_res=\$$as_ac_Header
49549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
49550 $as_echo "$ac_res" >&6; }
49551 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49552 cat >>confdefs.h <<_ACEOF
49553 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
49556 ac_header_dirent=$ac_hdr; break
49560 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
49561 if test $ac_header_dirent = dirent.h; then
49562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
49563 $as_echo_n "checking for library containing opendir... " >&6; }
49564 if ${ac_cv_search_opendir+:} false; then :
49565 $as_echo_n "(cached) " >&6
49567 ac_func_search_save_LIBS=$LIBS
49568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49569 /* end confdefs.h. */
49571 /* Override any GCC internal prototype to avoid an error.
49572 Use char because int might match the return type of a GCC
49573 builtin and then its argument prototype would still apply. */
49586 for ac_lib in '' dir; do
49587 if test -z "$ac_lib"; then
49588 ac_res="none required"
49591 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
49593 if ac_fn_c_try_link "$LINENO"; then :
49594 ac_cv_search_opendir=$ac_res
49596 rm -f core conftest.err conftest.$ac_objext \
49598 if ${ac_cv_search_opendir+:} false; then :
49602 if ${ac_cv_search_opendir+:} false; then :
49605 ac_cv_search_opendir=no
49607 rm conftest.$ac_ext
49608 LIBS=$ac_func_search_save_LIBS
49610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
49611 $as_echo "$ac_cv_search_opendir" >&6; }
49612 ac_res=$ac_cv_search_opendir
49613 if test "$ac_res" != no; then :
49614 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
49620 $as_echo_n "checking for library containing opendir... " >&6; }
49621 if ${ac_cv_search_opendir+:} false; then :
49622 $as_echo_n "(cached) " >&6
49624 ac_func_search_save_LIBS=$LIBS
49625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49626 /* end confdefs.h. */
49628 /* Override any GCC internal prototype to avoid an error.
49629 Use char because int might match the return type of a GCC
49630 builtin and then its argument prototype would still apply. */
49643 for ac_lib in '' x; do
49644 if test -z "$ac_lib"; then
49645 ac_res="none required"
49648 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
49650 if ac_fn_c_try_link "$LINENO"; then :
49651 ac_cv_search_opendir=$ac_res
49653 rm -f core conftest.err conftest.$ac_objext \
49655 if ${ac_cv_search_opendir+:} false; then :
49659 if ${ac_cv_search_opendir+:} false; then :
49662 ac_cv_search_opendir=no
49664 rm conftest.$ac_ext
49665 LIBS=$ac_func_search_save_LIBS
49667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
49668 $as_echo "$ac_cv_search_opendir" >&6; }
49669 ac_res=$ac_cv_search_opendir
49670 if test "$ac_res" != no; then :
49671 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
49677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
49678 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
49679 if ${ac_cv_header_stat_broken+:} false; then :
49680 $as_echo_n "(cached) " >&6
49682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49683 /* end confdefs.h. */
49684 #include <sys/types.h>
49685 #include <sys/stat.h>
49687 #if defined S_ISBLK && defined S_IFDIR
49688 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
49691 #if defined S_ISBLK && defined S_IFCHR
49692 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
49695 #if defined S_ISLNK && defined S_IFREG
49696 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
49699 #if defined S_ISSOCK && defined S_IFREG
49700 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
49704 if ac_fn_c_try_compile "$LINENO"; then :
49705 ac_cv_header_stat_broken=no
49707 ac_cv_header_stat_broken=yes
49709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
49712 $as_echo "$ac_cv_header_stat_broken" >&6; }
49713 if test $ac_cv_header_stat_broken = yes; then
49715 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
49719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
49720 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
49721 if ${ac_cv_header_sys_wait_h+:} false; then :
49722 $as_echo_n "(cached) " >&6
49724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49725 /* end confdefs.h. */
49726 #include <sys/types.h>
49727 #include <sys/wait.h>
49728 #ifndef WEXITSTATUS
49729 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
49732 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
49740 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
49745 if ac_fn_c_try_compile "$LINENO"; then :
49746 ac_cv_header_sys_wait_h=yes
49748 ac_cv_header_sys_wait_h=no
49750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
49753 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
49754 if test $ac_cv_header_sys_wait_h = yes; then
49756 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
49763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
49764 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
49765 if ${ac_cv_type_uid_t+:} false; then :
49766 $as_echo_n "(cached) " >&6
49768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49769 /* end confdefs.h. */
49770 #include <sys/types.h>
49773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49774 $EGREP "uid_t" >/dev/null 2>&1; then :
49775 ac_cv_type_uid_t=yes
49777 ac_cv_type_uid_t=no
49782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
49783 $as_echo "$ac_cv_type_uid_t" >&6; }
49784 if test $ac_cv_type_uid_t = no; then
49786 $as_echo "#define uid_t int" >>confdefs.h
49789 $as_echo "#define gid_t int" >>confdefs.h
49793 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
49794 if test "x$ac_cv_type_size_t" = xyes; then :
49798 cat >>confdefs.h <<_ACEOF
49799 #define size_t unsigned int
49804 ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
49805 if test "x$ac_cv_type_ssize_t" = xyes; then :
49809 cat >>confdefs.h <<_ACEOF
49810 #define ssize_t int
49815 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
49816 if test "x$ac_cv_type_pid_t" = xyes; then :
49820 cat >>confdefs.h <<_ACEOF
49826 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
49827 if test "x$ac_cv_type_ino_t" = xyes; then :
49831 cat >>confdefs.h <<_ACEOF
49832 #define ino_t unsigned long
49837 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
49838 if test "x$ac_cv_type_dev_t" = xyes; then :
49842 cat >>confdefs.h <<_ACEOF
49843 #define dev_t unsigned long
49848 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
49849 if test "x$ac_cv_type_mode_t" = xyes; then :
49853 cat >>confdefs.h <<_ACEOF
49859 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
49860 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
49862 cat >>confdefs.h <<_ACEOF
49863 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
49867 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
49870 case " $LIBOBJS " in
49871 *" fileblocks.$ac_objext "* ) ;;
49872 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
49879 ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
49880 if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
49882 cat >>confdefs.h <<_ACEOF
49883 #define HAVE_STRUCT_STAT_ST_RDEV 1
49892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
49893 $as_echo_n "checking for promoted mode_t type... " >&6; }
49894 if ${gl_cv_promoted_mode_t+:} false; then :
49895 $as_echo_n "(cached) " >&6
49898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49899 /* end confdefs.h. */
49900 #include <sys/types.h>
49904 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
49909 if ac_fn_c_try_compile "$LINENO"; then :
49910 gl_cv_promoted_mode_t='int'
49912 gl_cv_promoted_mode_t='mode_t'
49914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
49918 $as_echo "$gl_cv_promoted_mode_t" >&6; }
49920 cat >>confdefs.h <<_ACEOF
49921 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
49927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
49928 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
49929 if ${ac_cv_struct_tm+:} false; then :
49930 $as_echo_n "(cached) " >&6
49932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49933 /* end confdefs.h. */
49934 #include <sys/types.h>
49941 int *p = &tm.tm_sec;
49947 if ac_fn_c_try_compile "$LINENO"; then :
49948 ac_cv_struct_tm=time.h
49950 ac_cv_struct_tm=sys/time.h
49952 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
49955 $as_echo "$ac_cv_struct_tm" >&6; }
49956 if test $ac_cv_struct_tm = sys/time.h; then
49958 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
49962 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
49963 #include <$ac_cv_struct_tm>
49966 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
49968 cat >>confdefs.h <<_ACEOF
49969 #define HAVE_STRUCT_TM_TM_ZONE 1
49975 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
49977 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
49980 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
49982 if test "x$ac_cv_have_decl_tzname" = xyes; then :
49988 cat >>confdefs.h <<_ACEOF
49989 #define HAVE_DECL_TZNAME $ac_have_decl
49992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
49993 $as_echo_n "checking for tzname... " >&6; }
49994 if ${ac_cv_var_tzname+:} false; then :
49995 $as_echo_n "(cached) " >&6
49997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49998 /* end confdefs.h. */
50000 #if !HAVE_DECL_TZNAME
50001 extern char *tzname[];
50007 return tzname[0][0];
50012 if ac_fn_c_try_link "$LINENO"; then :
50013 ac_cv_var_tzname=yes
50015 ac_cv_var_tzname=no
50017 rm -f core conftest.err conftest.$ac_objext \
50018 conftest$ac_exeext conftest.$ac_ext
50020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
50021 $as_echo "$ac_cv_var_tzname" >&6; }
50022 if test $ac_cv_var_tzname = yes; then
50024 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
50030 for ac_func in strftime
50032 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
50033 if test "x$ac_cv_func_strftime" = xyes; then :
50034 cat >>confdefs.h <<_ACEOF
50035 #define HAVE_STRFTIME 1
50039 # strftime is in -lintl on SCO UNIX.
50040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
50041 $as_echo_n "checking for strftime in -lintl... " >&6; }
50042 if ${ac_cv_lib_intl_strftime+:} false; then :
50043 $as_echo_n "(cached) " >&6
50045 ac_check_lib_save_LIBS=$LIBS
50046 LIBS="-lintl $LIBS"
50047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50048 /* end confdefs.h. */
50050 /* Override any GCC internal prototype to avoid an error.
50051 Use char because int might match the return type of a GCC
50052 builtin and then its argument prototype would still apply. */
50060 return strftime ();
50065 if ac_fn_c_try_link "$LINENO"; then :
50066 ac_cv_lib_intl_strftime=yes
50068 ac_cv_lib_intl_strftime=no
50070 rm -f core conftest.err conftest.$ac_objext \
50071 conftest$ac_exeext conftest.$ac_ext
50072 LIBS=$ac_check_lib_save_LIBS
50074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
50075 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
50076 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
50077 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
50079 LIBS="-lintl $LIBS"
50085 ac_fn_c_check_func "$LINENO" "memcmp" "ac_cv_func_memcmp"
50086 if test "x$ac_cv_func_memcmp" = xyes; then :
50087 $as_echo "#define HAVE_MEMCMP 1" >>confdefs.h
50090 case " $LIBOBJS " in
50091 *" memcmp.$ac_objext "* ) ;;
50092 *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
50098 ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
50099 if test "x$ac_cv_func_memset" = xyes; then :
50100 $as_echo "#define HAVE_MEMSET 1" >>confdefs.h
50103 case " $LIBOBJS " in
50104 *" memset.$ac_objext "* ) ;;
50105 *) LIBOBJS="$LIBOBJS memset.$ac_objext"
50111 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
50112 if test "x$ac_cv_func_stpcpy" = xyes; then :
50113 $as_echo "#define HAVE_STPCPY 1" >>confdefs.h
50116 case " $LIBOBJS " in
50117 *" stpcpy.$ac_objext "* ) ;;
50118 *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext"
50124 ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
50125 if test "x$ac_cv_func_strdup" = xyes; then :
50126 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
50129 case " $LIBOBJS " in
50130 *" strdup.$ac_objext "* ) ;;
50131 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
50137 ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
50138 if test "x$ac_cv_func_strstr" = xyes; then :
50139 $as_echo "#define HAVE_STRSTR 1" >>confdefs.h
50142 case " $LIBOBJS " in
50143 *" strstr.$ac_objext "* ) ;;
50144 *) LIBOBJS="$LIBOBJS strstr.$ac_objext"
50150 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
50151 if test "x$ac_cv_func_strtol" = xyes; then :
50152 $as_echo "#define HAVE_STRTOL 1" >>confdefs.h
50155 case " $LIBOBJS " in
50156 *" strtol.$ac_objext "* ) ;;
50157 *) LIBOBJS="$LIBOBJS strtol.$ac_objext"
50163 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
50164 if test "x$ac_cv_func_strtoul" = xyes; then :
50165 $as_echo "#define HAVE_STRTOUL 1" >>confdefs.h
50168 case " $LIBOBJS " in
50169 *" strtoul.$ac_objext "* ) ;;
50170 *) LIBOBJS="$LIBOBJS strtoul.$ac_objext"
50177 for ac_func in fchdir getcwd strerror endgrent endpwent setlocale
50179 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50180 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50181 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50182 cat >>confdefs.h <<_ACEOF
50183 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50189 for ac_func in getrusage
50191 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
50192 if test "x$ac_cv_func_getrusage" = xyes; then :
50193 cat >>confdefs.h <<_ACEOF
50194 #define HAVE_GETRUSAGE 1
50200 for ac_func in vprintf
50202 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
50203 if test "x$ac_cv_func_vprintf" = xyes; then :
50204 cat >>confdefs.h <<_ACEOF
50205 #define HAVE_VPRINTF 1
50208 ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
50209 if test "x$ac_cv_func__doprnt" = xyes; then :
50211 $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
50219 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
50220 # for constant arguments. Useless!
50221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
50222 $as_echo_n "checking for working alloca.h... " >&6; }
50223 if ${ac_cv_working_alloca_h+:} false; then :
50224 $as_echo_n "(cached) " >&6
50226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50227 /* end confdefs.h. */
50228 #include <alloca.h>
50232 char *p = (char *) alloca (2 * sizeof (int));
50238 if ac_fn_c_try_link "$LINENO"; then :
50239 ac_cv_working_alloca_h=yes
50241 ac_cv_working_alloca_h=no
50243 rm -f core conftest.err conftest.$ac_objext \
50244 conftest$ac_exeext conftest.$ac_ext
50246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
50247 $as_echo "$ac_cv_working_alloca_h" >&6; }
50248 if test $ac_cv_working_alloca_h = yes; then
50250 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
50254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
50255 $as_echo_n "checking for alloca... " >&6; }
50256 if ${ac_cv_func_alloca_works+:} false; then :
50257 $as_echo_n "(cached) " >&6
50259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50260 /* end confdefs.h. */
50262 # define alloca __builtin_alloca
50265 # include <malloc.h>
50266 # define alloca _alloca
50268 # ifdef HAVE_ALLOCA_H
50269 # include <alloca.h>
50274 # ifndef alloca /* predefined by HP cc +Olibcalls */
50275 void *alloca (size_t);
50285 char *p = (char *) alloca (1);
50291 if ac_fn_c_try_link "$LINENO"; then :
50292 ac_cv_func_alloca_works=yes
50294 ac_cv_func_alloca_works=no
50296 rm -f core conftest.err conftest.$ac_objext \
50297 conftest$ac_exeext conftest.$ac_ext
50299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
50300 $as_echo "$ac_cv_func_alloca_works" >&6; }
50302 if test $ac_cv_func_alloca_works = yes; then
50304 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
50307 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
50308 # that cause trouble. Some versions do not even contain alloca or
50309 # contain a buggy version. If you still want to use their alloca,
50310 # use ar to extract alloca.o from them instead of compiling alloca.c.
50312 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
50314 $as_echo "#define C_ALLOCA 1" >>confdefs.h
50317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
50318 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
50319 if ${ac_cv_os_cray+:} false; then :
50320 $as_echo_n "(cached) " >&6
50322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50323 /* end confdefs.h. */
50324 #if defined CRAY && ! defined CRAY2
50331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50332 $EGREP "webecray" >/dev/null 2>&1; then :
50340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
50341 $as_echo "$ac_cv_os_cray" >&6; }
50342 if test $ac_cv_os_cray = yes; then
50343 for ac_func in _getb67 GETB67 getb67; do
50344 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50345 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50346 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50348 cat >>confdefs.h <<_ACEOF
50349 #define CRAY_STACKSEG_END $ac_func
50358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
50359 $as_echo_n "checking stack direction for C alloca... " >&6; }
50360 if ${ac_cv_c_stack_direction+:} false; then :
50361 $as_echo_n "(cached) " >&6
50363 if test "$cross_compiling" = yes; then :
50364 ac_cv_c_stack_direction=0
50366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50367 /* end confdefs.h. */
50368 $ac_includes_default
50370 find_stack_direction (int *addr, int depth)
50372 int dir, dummy = 0;
50375 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
50376 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
50377 return dir + dummy;
50381 main (int argc, char **argv)
50383 return find_stack_direction (0, argc + !argv + 20) < 0;
50386 if ac_fn_c_try_run "$LINENO"; then :
50387 ac_cv_c_stack_direction=1
50389 ac_cv_c_stack_direction=-1
50391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50392 conftest.$ac_objext conftest.beam conftest.$ac_ext
50396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
50397 $as_echo "$ac_cv_c_stack_direction" >&6; }
50398 cat >>confdefs.h <<_ACEOF
50399 #define STACK_DIRECTION $ac_cv_c_stack_direction
50405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5
50406 $as_echo_n "checking whether closedir returns void... " >&6; }
50407 if ${ac_cv_func_closedir_void+:} false; then :
50408 $as_echo_n "(cached) " >&6
50410 if test "$cross_compiling" = yes; then :
50411 ac_cv_func_closedir_void=yes
50413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50414 /* end confdefs.h. */
50415 $ac_includes_default
50416 #include <$ac_header_dirent>
50417 #ifndef __cplusplus
50424 return closedir (opendir (".")) != 0;
50429 if ac_fn_c_try_run "$LINENO"; then :
50430 ac_cv_func_closedir_void=no
50432 ac_cv_func_closedir_void=yes
50434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50435 conftest.$ac_objext conftest.beam conftest.$ac_ext
50439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5
50440 $as_echo "$ac_cv_func_closedir_void" >&6; }
50441 if test $ac_cv_func_closedir_void = yes; then
50443 $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h
50448 ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50449 if test "x$ac_cv_func_getmntent" = xyes; then :
50452 # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4,
50453 # -lseq on Dynix/PTX, -lgen on Unixware.
50454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getmntent" >&5
50455 $as_echo_n "checking for library containing getmntent... " >&6; }
50456 if ${ac_cv_search_getmntent+:} false; then :
50457 $as_echo_n "(cached) " >&6
50459 ac_func_search_save_LIBS=$LIBS
50460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50461 /* end confdefs.h. */
50463 /* Override any GCC internal prototype to avoid an error.
50464 Use char because int might match the return type of a GCC
50465 builtin and then its argument prototype would still apply. */
50473 return getmntent ();
50478 for ac_lib in '' sun seq gen; do
50479 if test -z "$ac_lib"; then
50480 ac_res="none required"
50483 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
50485 if ac_fn_c_try_link "$LINENO"; then :
50486 ac_cv_search_getmntent=$ac_res
50488 rm -f core conftest.err conftest.$ac_objext \
50490 if ${ac_cv_search_getmntent+:} false; then :
50494 if ${ac_cv_search_getmntent+:} false; then :
50497 ac_cv_search_getmntent=no
50499 rm conftest.$ac_ext
50500 LIBS=$ac_func_search_save_LIBS
50502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getmntent" >&5
50503 $as_echo "$ac_cv_search_getmntent" >&6; }
50504 ac_res=$ac_cv_search_getmntent
50505 if test "$ac_res" != no; then :
50506 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
50510 for ac_func in getmntent
50512 ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50513 if test "x$ac_cv_func_getmntent" = xyes; then :
50514 cat >>confdefs.h <<_ACEOF
50515 #define HAVE_GETMNTENT 1
50524 for ac_func in getmntent
50526 ac_fn_c_check_func "$LINENO" "getmntent" "ac_cv_func_getmntent"
50527 if test "x$ac_cv_func_getmntent" = xyes; then :
50528 cat >>confdefs.h <<_ACEOF
50529 #define HAVE_GETMNTENT 1
50535 for ac_func in setmntent endmntent
50537 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50538 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50539 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50540 cat >>confdefs.h <<_ACEOF
50541 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50549 for ac_func in waitpid strspn
50551 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50552 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50553 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50554 cat >>confdefs.h <<_ACEOF
50555 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50559 case $FINDLIBOBJS in
50560 "$ac_func.$ac_objext" | \
50561 *" $ac_func.$ac_objext" | \
50562 "$ac_func.$ac_objext "* | \
50563 *" $ac_func.$ac_objext "* ) ;;
50564 *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
50571 for ac_func in forcefindlib
50573 ac_fn_c_check_func "$LINENO" "forcefindlib" "ac_cv_func_forcefindlib"
50574 if test "x$ac_cv_func_forcefindlib" = xyes; then :
50575 cat >>confdefs.h <<_ACEOF
50576 #define HAVE_FORCEFINDLIB 1
50580 case $FINDLIBOBJS in
50581 "$ac_func.$ac_objext" | \
50582 *" $ac_func.$ac_objext" | \
50583 "$ac_func.$ac_objext "* | \
50584 *" $ac_func.$ac_objext "* ) ;;
50585 *) FINDLIBOBJS="$FINDLIBOBJS $ac_func.$ac_objext" ;;
50594 # Check for common but not-POSIX functions.
50595 for ac_func in setgroups
50597 ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups"
50598 if test "x$ac_cv_func_setgroups" = xyes; then :
50599 cat >>confdefs.h <<_ACEOF
50600 #define HAVE_SETGROUPS 1
50610 if test $ac_cv_func_alloca_works = no; then
50614 # Define an additional variable used in the Makefile substitution.
50615 if test $ac_cv_working_alloca_h = yes; then
50616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
50617 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
50618 if ${gl_cv_rpl_alloca+:} false; then :
50619 $as_echo_n "(cached) " >&6
50622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50623 /* end confdefs.h. */
50625 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
50630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50631 $EGREP "Need own alloca" >/dev/null 2>&1; then :
50632 gl_cv_rpl_alloca=yes
50634 gl_cv_rpl_alloca=no
50640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
50641 $as_echo "$gl_cv_rpl_alloca" >&6; }
50642 if test $gl_cv_rpl_alloca = yes; then
50644 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
50654 if test -n "$ALLOCA_H"; then
50655 GL_GENERATE_ALLOCA_H_TRUE=
50656 GL_GENERATE_ALLOCA_H_FALSE='#'
50658 GL_GENERATE_ALLOCA_H_TRUE='#'
50659 GL_GENERATE_ALLOCA_H_FALSE=
50666 # Check whether --with-included-regex was given.
50667 if test "${with_included_regex+set}" = set; then :
50668 withval=$with_included_regex;
50672 case $with_included_regex in #(
50673 yes|no) ac_use_included_regex=$with_included_regex
50676 # If the system regex support is good enough that it passes the
50677 # following run test, then default to *not* using the included regex.c.
50678 # If cross compiling, assume the test would fail and use the included
50694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
50695 $as_echo_n "checking for working re_compile_pattern... " >&6; }
50696 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
50697 $as_echo_n "(cached) " >&6
50699 if test "$cross_compiling" = yes; then :
50700 gl_cv_func_re_compile_pattern_working=no
50702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50703 /* end confdefs.h. */
50706 #include <locale.h>
50707 #include <limits.h>
50708 #include <string.h>
50710 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
50711 # include <signal.h>
50712 # include <unistd.h>
50716 # include <malloc.h>
50719 #ifdef M_CHECK_ACTION
50720 /* Exit with distinguishable exit code. */
50721 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
50728 static struct re_pattern_buffer regex;
50729 unsigned char folded_chars[UCHAR_MAX + 1];
50732 struct re_registers regs;
50734 /* Some builds of glibc go into an infinite loop on this
50735 test. Use alarm to force death, and mallopt to avoid
50736 malloc recursion in diagnosing the corrupted heap. */
50737 #if HAVE_DECL_ALARM
50738 signal (SIGALRM, SIG_DFL);
50741 #ifdef M_CHECK_ACTION
50742 signal (SIGABRT, sigabrt_no_core);
50743 mallopt (M_CHECK_ACTION, 2);
50746 if (setlocale (LC_ALL, "en_US.UTF-8"))
50749 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
50750 This test needs valgrind to catch the bug on Debian
50751 GNU/Linux 3.1 x86, but it might catch the bug better
50752 on other platforms and it shouldn't hurt to try the
50754 static char const pat[] = "insert into";
50755 static char const data[] =
50756 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
50757 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
50759 memset (®ex, 0, sizeof regex);
50760 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
50763 else if (re_search (®ex, data, sizeof data - 1,
50764 0, sizeof data - 1, ®s)
50770 /* This test is from glibc bug 15078.
50771 The test case is from Andreas Schwab in
50772 <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
50774 static char const pat[] = "[^x]x";
50775 static char const data[] =
50776 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
50787 memset (®ex, 0, sizeof regex);
50788 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
50793 i = re_search (®ex, data, sizeof data - 1,
50794 0, sizeof data - 1, 0);
50795 if (i != 0 && i != 21)
50800 if (! setlocale (LC_ALL, "C"))
50804 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
50805 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
50806 memset (®ex, 0, sizeof regex);
50807 s = re_compile_pattern ("a[^x]b", 6, ®ex);
50810 /* This should fail, but succeeds for glibc-2.5. */
50811 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
50814 /* This regular expression is from Spencer ere test number 75
50816 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
50817 memset (®ex, 0, sizeof regex);
50818 for (i = 0; i <= UCHAR_MAX; i++)
50819 folded_chars[i] = i;
50820 regex.translate = folded_chars;
50821 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
50822 /* This should fail with _Invalid character class name_ error. */
50826 /* Ensure that [b-a] is diagnosed as invalid, when
50827 using RE_NO_EMPTY_RANGES. */
50828 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
50829 memset (®ex, 0, sizeof regex);
50830 s = re_compile_pattern ("a[b-a]", 6, ®ex);
50834 /* This should succeed, but does not for glibc-2.1.3. */
50835 memset (®ex, 0, sizeof regex);
50836 s = re_compile_pattern ("{1", 2, ®ex);
50840 /* The following example is derived from a problem report
50841 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
50842 memset (®ex, 0, sizeof regex);
50843 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
50846 /* This should match, but does not for glibc-2.2.1. */
50847 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
50850 memset (®ex, 0, sizeof regex);
50851 s = re_compile_pattern ("x", 1, ®ex);
50854 /* glibc-2.2.93 does not work with a negative RANGE argument. */
50855 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
50858 /* The version of regex.c in older versions of gnulib
50859 ignored RE_ICASE. Detect that problem too. */
50860 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
50861 memset (®ex, 0, sizeof regex);
50862 s = re_compile_pattern ("x", 1, ®ex);
50865 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
50868 /* Catch a bug reported by Vin Shelton in
50869 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
50871 re_set_syntax (RE_SYNTAX_POSIX_BASIC
50872 & ~RE_CONTEXT_INVALID_DUP
50873 & ~RE_NO_EMPTY_RANGES);
50874 memset (®ex, 0, sizeof regex);
50875 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
50879 /* REG_STARTEND was added to glibc on 2004-01-15.
50880 Reject older versions. */
50881 if (! REG_STARTEND)
50885 /* It would be nice to reject hosts whose regoff_t values are too
50886 narrow (including glibc on hosts with 64-bit ptrdiff_t and
50887 32-bit int), but we should wait until glibc implements this
50888 feature. Otherwise, support for equivalence classes and
50889 multibyte collation symbols would always be broken except
50890 when compiling --without-included-regex. */
50891 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
50892 || sizeof (regoff_t) < sizeof (ssize_t))
50902 if ac_fn_c_try_run "$LINENO"; then :
50903 gl_cv_func_re_compile_pattern_working=yes
50905 gl_cv_func_re_compile_pattern_working=no
50907 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50908 conftest.$ac_objext conftest.beam conftest.$ac_ext
50912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
50913 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
50914 case $gl_cv_func_re_compile_pattern_working in #(
50915 yes) ac_use_included_regex=no;; #(
50916 no) ac_use_included_regex=yes;;
50919 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
50923 if test $ac_use_included_regex = yes; then
50925 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
50928 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
50931 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
50934 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
50937 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
50940 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
50943 $as_echo "#define re_search rpl_re_search" >>confdefs.h
50946 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
50949 $as_echo "#define re_match rpl_re_match" >>confdefs.h
50952 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
50955 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
50958 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
50961 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
50964 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
50967 $as_echo "#define regexec rpl_regexec" >>confdefs.h
50970 $as_echo "#define regerror rpl_regerror" >>confdefs.h
50973 $as_echo "#define regfree rpl_regfree" >>confdefs.h
50980 # Extract the first word of "sort", so it can be a program name with args.
50981 set dummy sort; ac_word=$2
50982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50983 $as_echo_n "checking for $ac_word... " >&6; }
50984 if ${ac_cv_path_SORT+:} false; then :
50985 $as_echo_n "(cached) " >&6
50989 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
50992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50993 for as_dir in $PATH
50996 test -z "$as_dir" && as_dir=.
50997 for ac_exec_ext in '' $ac_executable_extensions; do
50998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50999 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
51000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51007 test -z "$ac_cv_path_SORT" && ac_cv_path_SORT="sort"
51011 SORT=$ac_cv_path_SORT
51012 if test -n "$SORT"; then
51013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
51014 $as_echo "$SORT" >&6; }
51016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51017 $as_echo "no" >&6; }
51021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $SORT supports the -z option" >&5
51022 $as_echo_n "checking if $SORT supports the -z option... " >&6; }
51023 if test "x$cross_compiling" = xyes
51025 # We are cross-compiling, so cannot test the target's "sort".
51026 ac_sort_has_z=false
51028 # find out if the sort command has a working -z option.
51029 if $SORT -z -c < "${srcdir:-.}/m4/order-good.bin" 2>/dev/null >/dev/null
51031 # sort has a -z option, but we have not yet established that
51032 # sort thinks there is more than one input line there. We have
51033 # to make sort -c do its thing with the input lines in the wrong
51034 # order to determine that (we can't do it in one shot because
51035 # if sort returns nonzero we can't tell that it wasn't just
51036 # complaining about this unknown -z option.
51037 if $SORT -z -c < "${srcdir:-.}/m4/order-bad.bin" 2>/dev/null >/dev/null
51039 # sort likes -z but it doesn't seem to make \0
51041 ac_sort_has_z=false
51046 # Doesn't like the z option.
51047 ac_sort_has_z=false
51051 if test "x$cross_compiling" = xyes
51053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume no, since we are cross compiling" >&5
51054 $as_echo "assume no, since we are cross compiling" >&6; }
51055 SORT_SUPPORTS_Z=false
51057 elif $ac_sort_has_z
51059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51060 $as_echo "yes" >&6; }
51061 SORT_SUPPORTS_Z=true
51064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51065 $as_echo "no" >&6; }
51066 SORT_SUPPORTS_Z=false
51072 ac_fn_c_check_member "$LINENO" "struct dirent" "d_type" "ac_cv_member_struct_dirent_d_type" "
51073 #include <sys/types.h>
51074 #include <dirent.h>
51076 if test "x$ac_cv_member_struct_dirent_d_type" = xyes; then :
51081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ ((__noreturn__)) support" >&5
51082 $as_echo_n "checking for __attribute__ ((__noreturn__)) support... " >&6; }
51083 if ${jy_cv_cc_attribute_noreturn+:} false; then :
51084 $as_echo_n "(cached) " >&6
51086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51087 /* end confdefs.h. */
51092 void report_fatal_error(void) __attribute__ ((__noreturn__));
51097 if ac_fn_c_try_compile "$LINENO"; then :
51098 jy_cv_cc_attribute_noreturn=yes
51100 jy_cv_cc_attribute_noreturn=no
51102 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $jy_cv_cc_attribute_noreturn" >&5
51105 $as_echo "$jy_cv_cc_attribute_noreturn" >&6; }
51106 if test $jy_cv_cc_attribute_noreturn = yes; then
51107 HAVE_ATTRIBUTE_NORETURN=1
51109 HAVE_ATTRIBUTE_NORETURN=0
51113 cat >>confdefs.h <<_ACEOF
51114 #define HAVE_ATTRIBUTE_NORETURN $HAVE_ATTRIBUTE_NORETURN
51120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
51121 $as_echo_n "checking whether NLS is requested... " >&6; }
51122 # Check whether --enable-nls was given.
51123 if test "${enable_nls+set}" = set; then :
51124 enableval=$enable_nls; USE_NLS=$enableval
51129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
51130 $as_echo "$USE_NLS" >&6; }
51135 GETTEXT_MACRO_VERSION=0.18
51140 # Prepare PATH_SEPARATOR.
51141 # The user is always right.
51142 if test "${PATH_SEPARATOR+set}" != set; then
51143 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51144 # contains only /bin. Note that ksh looks also at the FPATH variable,
51145 # so we have to set that as well for the test.
51147 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51148 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51149 || PATH_SEPARATOR=';'
51153 # Find out how to test for executable files. Don't use a zero-byte file,
51154 # as systems may use methods other than mode bits to determine executability.
51155 cat >conf$$.file <<_ASEOF
51159 chmod +x conf$$.file
51160 if test -x conf$$.file >/dev/null 2>&1; then
51161 ac_executable_p="test -x"
51163 ac_executable_p="test -f"
51167 # Extract the first word of "msgfmt", so it can be a program name with args.
51168 set dummy msgfmt; ac_word=$2
51169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51170 $as_echo_n "checking for $ac_word... " >&6; }
51171 if ${ac_cv_path_MSGFMT+:} false; then :
51172 $as_echo_n "(cached) " >&6
51176 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
51179 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51180 for ac_dir in $PATH; do
51182 test -z "$ac_dir" && ac_dir=.
51183 for ac_exec_ext in '' $ac_executable_extensions; do
51184 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51185 echo "$as_me: trying $ac_dir/$ac_word..." >&5
51186 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
51187 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
51188 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
51195 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
51199 MSGFMT="$ac_cv_path_MSGFMT"
51200 if test "$MSGFMT" != ":"; then
51201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
51202 $as_echo "$MSGFMT" >&6; }
51204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51205 $as_echo "no" >&6; }
51208 # Extract the first word of "gmsgfmt", so it can be a program name with args.
51209 set dummy gmsgfmt; ac_word=$2
51210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51211 $as_echo_n "checking for $ac_word... " >&6; }
51212 if ${ac_cv_path_GMSGFMT+:} false; then :
51213 $as_echo_n "(cached) " >&6
51217 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
51220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51221 for as_dir in $PATH
51224 test -z "$as_dir" && as_dir=.
51225 for ac_exec_ext in '' $ac_executable_extensions; do
51226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51227 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
51228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51235 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
51239 GMSGFMT=$ac_cv_path_GMSGFMT
51240 if test -n "$GMSGFMT"; then
51241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
51242 $as_echo "$GMSGFMT" >&6; }
51244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51245 $as_echo "no" >&6; }
51250 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51251 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
51252 *) MSGFMT_015=$MSGFMT ;;
51255 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51256 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
51257 *) GMSGFMT_015=$GMSGFMT ;;
51262 # Prepare PATH_SEPARATOR.
51263 # The user is always right.
51264 if test "${PATH_SEPARATOR+set}" != set; then
51265 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51266 # contains only /bin. Note that ksh looks also at the FPATH variable,
51267 # so we have to set that as well for the test.
51269 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51270 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51271 || PATH_SEPARATOR=';'
51275 # Find out how to test for executable files. Don't use a zero-byte file,
51276 # as systems may use methods other than mode bits to determine executability.
51277 cat >conf$$.file <<_ASEOF
51281 chmod +x conf$$.file
51282 if test -x conf$$.file >/dev/null 2>&1; then
51283 ac_executable_p="test -x"
51285 ac_executable_p="test -f"
51289 # Extract the first word of "xgettext", so it can be a program name with args.
51290 set dummy xgettext; ac_word=$2
51291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51292 $as_echo_n "checking for $ac_word... " >&6; }
51293 if ${ac_cv_path_XGETTEXT+:} false; then :
51294 $as_echo_n "(cached) " >&6
51296 case "$XGETTEXT" in
51298 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
51301 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51302 for ac_dir in $PATH; do
51304 test -z "$ac_dir" && ac_dir=.
51305 for ac_exec_ext in '' $ac_executable_extensions; do
51306 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51307 echo "$as_me: trying $ac_dir/$ac_word..." >&5
51308 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
51309 (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
51310 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
51317 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
51321 XGETTEXT="$ac_cv_path_XGETTEXT"
51322 if test "$XGETTEXT" != ":"; then
51323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
51324 $as_echo "$XGETTEXT" >&6; }
51326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51327 $as_echo "no" >&6; }
51332 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
51333 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
51334 *) XGETTEXT_015=$XGETTEXT ;;
51339 # Prepare PATH_SEPARATOR.
51340 # The user is always right.
51341 if test "${PATH_SEPARATOR+set}" != set; then
51342 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
51343 # contains only /bin. Note that ksh looks also at the FPATH variable,
51344 # so we have to set that as well for the test.
51346 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51347 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
51348 || PATH_SEPARATOR=';'
51352 # Find out how to test for executable files. Don't use a zero-byte file,
51353 # as systems may use methods other than mode bits to determine executability.
51354 cat >conf$$.file <<_ASEOF
51358 chmod +x conf$$.file
51359 if test -x conf$$.file >/dev/null 2>&1; then
51360 ac_executable_p="test -x"
51362 ac_executable_p="test -f"
51366 # Extract the first word of "msgmerge", so it can be a program name with args.
51367 set dummy msgmerge; ac_word=$2
51368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51369 $as_echo_n "checking for $ac_word... " >&6; }
51370 if ${ac_cv_path_MSGMERGE+:} false; then :
51371 $as_echo_n "(cached) " >&6
51373 case "$MSGMERGE" in
51375 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
51378 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
51379 for ac_dir in $PATH; do
51381 test -z "$ac_dir" && ac_dir=.
51382 for ac_exec_ext in '' $ac_executable_extensions; do
51383 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
51384 echo "$as_me: trying $ac_dir/$ac_word..." >&5
51385 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
51386 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
51393 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
51397 MSGMERGE="$ac_cv_path_MSGMERGE"
51398 if test "$MSGMERGE" != ":"; then
51399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
51400 $as_echo "$MSGMERGE" >&6; }
51402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51403 $as_echo "no" >&6; }
51407 test -n "$localedir" || localedir='${datadir}/locale'
51410 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
51413 ac_config_commands="$ac_config_commands po-directories"
51429 acl_save_prefix="$prefix"
51430 prefix="$acl_final_prefix"
51431 acl_save_exec_prefix="$exec_prefix"
51432 exec_prefix="$acl_final_exec_prefix"
51434 eval additional_includedir=\"$includedir\"
51435 eval additional_libdir=\"$libdir\"
51437 exec_prefix="$acl_save_exec_prefix"
51438 prefix="$acl_save_prefix"
51441 # Check whether --with-libiconv-prefix was given.
51442 if test "${with_libiconv_prefix+set}" = set; then :
51443 withval=$with_libiconv_prefix;
51444 if test "X$withval" = "Xno"; then
51447 if test "X$withval" = "X"; then
51449 acl_save_prefix="$prefix"
51450 prefix="$acl_final_prefix"
51451 acl_save_exec_prefix="$exec_prefix"
51452 exec_prefix="$acl_final_exec_prefix"
51454 eval additional_includedir=\"$includedir\"
51455 eval additional_libdir=\"$libdir\"
51457 exec_prefix="$acl_save_exec_prefix"
51458 prefix="$acl_save_prefix"
51461 additional_includedir="$withval/include"
51462 additional_libdir="$withval/$acl_libdirstem"
51463 if test "$acl_libdirstem2" != "$acl_libdirstem" \
51464 && ! test -d "$withval/$acl_libdirstem"; then
51465 additional_libdir="$withval/$acl_libdirstem2"
51479 names_already_handled=
51480 names_next_round='iconv '
51481 while test -n "$names_next_round"; do
51482 names_this_round="$names_next_round"
51484 for name in $names_this_round; do
51486 for n in $names_already_handled; do
51487 if test "$n" = "$name"; then
51488 already_handled=yes
51492 if test -z "$already_handled"; then
51493 names_already_handled="$names_already_handled $name"
51494 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
51495 eval value=\"\$HAVE_LIB$uppername\"
51496 if test -n "$value"; then
51497 if test "$value" = yes; then
51498 eval value=\"\$LIB$uppername\"
51499 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
51500 eval value=\"\$LTLIB$uppername\"
51501 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
51510 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
51511 if test -n "$acl_shlibext"; then
51512 shrext=".$acl_shlibext" # typically: shrext=.so
51516 if test $use_additional = yes; then
51517 dir="$additional_libdir"
51518 if test -n "$acl_shlibext"; then
51519 if test -f "$dir/$libname$shrext"; then
51521 found_so="$dir/$libname$shrext"
51523 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
51524 ver=`(cd "$dir" && \
51525 for f in "$libname$shrext".*; do echo "$f"; done \
51526 | sed -e "s,^$libname$shrext\\\\.,," \
51527 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
51528 | sed 1q ) 2>/dev/null`
51529 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
51531 found_so="$dir/$libname$shrext.$ver"
51534 eval library_names=\"$acl_library_names_spec\"
51535 for f in $library_names; do
51536 if test -f "$dir/$f"; then
51545 if test "X$found_dir" = "X"; then
51546 if test -f "$dir/$libname.$acl_libext"; then
51548 found_a="$dir/$libname.$acl_libext"
51551 if test "X$found_dir" != "X"; then
51552 if test -f "$dir/$libname.la"; then
51553 found_la="$dir/$libname.la"
51557 if test "X$found_dir" = "X"; then
51558 for x in $LDFLAGS $LTLIBICONV; do
51560 acl_save_prefix="$prefix"
51561 prefix="$acl_final_prefix"
51562 acl_save_exec_prefix="$exec_prefix"
51563 exec_prefix="$acl_final_exec_prefix"
51565 exec_prefix="$acl_save_exec_prefix"
51566 prefix="$acl_save_prefix"
51570 dir=`echo "X$x" | sed -e 's/^X-L//'`
51571 if test -n "$acl_shlibext"; then
51572 if test -f "$dir/$libname$shrext"; then
51574 found_so="$dir/$libname$shrext"
51576 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
51577 ver=`(cd "$dir" && \
51578 for f in "$libname$shrext".*; do echo "$f"; done \
51579 | sed -e "s,^$libname$shrext\\\\.,," \
51580 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
51581 | sed 1q ) 2>/dev/null`
51582 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
51584 found_so="$dir/$libname$shrext.$ver"
51587 eval library_names=\"$acl_library_names_spec\"
51588 for f in $library_names; do
51589 if test -f "$dir/$f"; then
51598 if test "X$found_dir" = "X"; then
51599 if test -f "$dir/$libname.$acl_libext"; then
51601 found_a="$dir/$libname.$acl_libext"
51604 if test "X$found_dir" != "X"; then
51605 if test -f "$dir/$libname.la"; then
51606 found_la="$dir/$libname.la"
51611 if test "X$found_dir" != "X"; then
51616 if test "X$found_dir" != "X"; then
51617 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
51618 if test "X$found_so" != "X"; then
51619 if test "$enable_rpath" = no \
51620 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
51621 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
51622 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51625 for x in $ltrpathdirs; do
51626 if test "X$x" = "X$found_dir"; then
51631 if test -z "$haveit"; then
51632 ltrpathdirs="$ltrpathdirs $found_dir"
51634 if test "$acl_hardcode_direct" = yes; then
51635 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51637 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
51638 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51640 for x in $rpathdirs; do
51641 if test "X$x" = "X$found_dir"; then
51646 if test -z "$haveit"; then
51647 rpathdirs="$rpathdirs $found_dir"
51651 for x in $LDFLAGS $LIBICONV; do
51653 acl_save_prefix="$prefix"
51654 prefix="$acl_final_prefix"
51655 acl_save_exec_prefix="$exec_prefix"
51656 exec_prefix="$acl_final_exec_prefix"
51658 exec_prefix="$acl_save_exec_prefix"
51659 prefix="$acl_save_prefix"
51661 if test "X$x" = "X-L$found_dir"; then
51666 if test -z "$haveit"; then
51667 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
51669 if test "$acl_hardcode_minus_L" != no; then
51670 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
51672 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
51678 if test "X$found_a" != "X"; then
51679 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
51681 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
51684 additional_includedir=
51685 case "$found_dir" in
51686 */$acl_libdirstem | */$acl_libdirstem/)
51687 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
51688 if test "$name" = 'iconv'; then
51689 LIBICONV_PREFIX="$basedir"
51691 additional_includedir="$basedir/include"
51693 */$acl_libdirstem2 | */$acl_libdirstem2/)
51694 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
51695 if test "$name" = 'iconv'; then
51696 LIBICONV_PREFIX="$basedir"
51698 additional_includedir="$basedir/include"
51701 if test "X$additional_includedir" != "X"; then
51702 if test "X$additional_includedir" != "X/usr/include"; then
51704 if test "X$additional_includedir" = "X/usr/local/include"; then
51705 if test -n "$GCC"; then
51707 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51711 if test -z "$haveit"; then
51712 for x in $CPPFLAGS $INCICONV; do
51714 acl_save_prefix="$prefix"
51715 prefix="$acl_final_prefix"
51716 acl_save_exec_prefix="$exec_prefix"
51717 exec_prefix="$acl_final_exec_prefix"
51719 exec_prefix="$acl_save_exec_prefix"
51720 prefix="$acl_save_prefix"
51722 if test "X$x" = "X-I$additional_includedir"; then
51727 if test -z "$haveit"; then
51728 if test -d "$additional_includedir"; then
51729 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
51735 if test -n "$found_la"; then
51736 save_libdir="$libdir"
51737 case "$found_la" in
51738 */* | *\\*) . "$found_la" ;;
51739 *) . "./$found_la" ;;
51741 libdir="$save_libdir"
51742 for dep in $dependency_libs; do
51745 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
51746 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
51747 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
51749 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
51750 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
51751 if test -n "$GCC"; then
51753 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
51757 if test -z "$haveit"; then
51759 for x in $LDFLAGS $LIBICONV; do
51761 acl_save_prefix="$prefix"
51762 prefix="$acl_final_prefix"
51763 acl_save_exec_prefix="$exec_prefix"
51764 exec_prefix="$acl_final_exec_prefix"
51766 exec_prefix="$acl_save_exec_prefix"
51767 prefix="$acl_save_prefix"
51769 if test "X$x" = "X-L$additional_libdir"; then
51774 if test -z "$haveit"; then
51775 if test -d "$additional_libdir"; then
51776 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
51780 for x in $LDFLAGS $LTLIBICONV; do
51782 acl_save_prefix="$prefix"
51783 prefix="$acl_final_prefix"
51784 acl_save_exec_prefix="$exec_prefix"
51785 exec_prefix="$acl_final_exec_prefix"
51787 exec_prefix="$acl_save_exec_prefix"
51788 prefix="$acl_save_prefix"
51790 if test "X$x" = "X-L$additional_libdir"; then
51795 if test -z "$haveit"; then
51796 if test -d "$additional_libdir"; then
51797 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
51804 dir=`echo "X$dep" | sed -e 's/^X-R//'`
51805 if test "$enable_rpath" != no; then
51807 for x in $rpathdirs; do
51808 if test "X$x" = "X$dir"; then
51813 if test -z "$haveit"; then
51814 rpathdirs="$rpathdirs $dir"
51817 for x in $ltrpathdirs; do
51818 if test "X$x" = "X$dir"; then
51823 if test -z "$haveit"; then
51824 ltrpathdirs="$ltrpathdirs $dir"
51829 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
51832 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
51835 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
51836 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
51842 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
51843 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
51849 if test "X$rpathdirs" != "X"; then
51850 if test -n "$acl_hardcode_libdir_separator"; then
51852 for found_dir in $rpathdirs; do
51853 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
51855 acl_save_libdir="$libdir"
51857 eval flag=\"$acl_hardcode_libdir_flag_spec\"
51858 libdir="$acl_save_libdir"
51859 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
51861 for found_dir in $rpathdirs; do
51862 acl_save_libdir="$libdir"
51863 libdir="$found_dir"
51864 eval flag=\"$acl_hardcode_libdir_flag_spec\"
51865 libdir="$acl_save_libdir"
51866 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
51870 if test "X$ltrpathdirs" != "X"; then
51871 for found_dir in $ltrpathdirs; do
51872 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
51906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
51907 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
51908 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
51909 $as_echo_n "(cached) " >&6
51911 gt_save_LIBS="$LIBS"
51912 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
51913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51914 /* end confdefs.h. */
51915 #include <CoreFoundation/CFPreferences.h>
51919 CFPreferencesCopyAppValue(NULL, NULL)
51924 if ac_fn_c_try_link "$LINENO"; then :
51925 gt_cv_func_CFPreferencesCopyAppValue=yes
51927 gt_cv_func_CFPreferencesCopyAppValue=no
51929 rm -f core conftest.err conftest.$ac_objext \
51930 conftest$ac_exeext conftest.$ac_ext
51931 LIBS="$gt_save_LIBS"
51933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
51934 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
51935 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
51937 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
51940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
51941 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
51942 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
51943 $as_echo_n "(cached) " >&6
51945 gt_save_LIBS="$LIBS"
51946 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
51947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51948 /* end confdefs.h. */
51949 #include <CoreFoundation/CFLocale.h>
51953 CFLocaleCopyCurrent();
51958 if ac_fn_c_try_link "$LINENO"; then :
51959 gt_cv_func_CFLocaleCopyCurrent=yes
51961 gt_cv_func_CFLocaleCopyCurrent=no
51963 rm -f core conftest.err conftest.$ac_objext \
51964 conftest$ac_exeext conftest.$ac_ext
51965 LIBS="$gt_save_LIBS"
51967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
51968 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
51969 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
51971 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
51975 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
51976 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
51988 case " $gt_needs " in
51989 *" need-formatstring-macros "*) gt_api_version=3 ;;
51990 *" need-ngettext "*) gt_api_version=2 ;;
51991 *) gt_api_version=1 ;;
51993 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
51994 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
51996 if test "$USE_NLS" = "yes"; then
51997 gt_use_preinstalled_gnugettext=no
52000 if test $gt_api_version -ge 3; then
52001 gt_revision_test_code='
52002 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
52003 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
52005 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
52008 gt_revision_test_code=
52010 if test $gt_api_version -ge 2; then
52011 gt_expression_test_code=' + * ngettext ("", "", 0)'
52013 gt_expression_test_code=
52016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
52017 $as_echo_n "checking for GNU gettext in libc... " >&6; }
52018 if eval \${$gt_func_gnugettext_libc+:} false; then :
52019 $as_echo_n "(cached) " >&6
52021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52022 /* end confdefs.h. */
52024 #include <libintl.h>
52025 $gt_revision_test_code
52026 extern int _nl_msg_cat_cntr;
52027 extern int *_nl_domain_bindings;
52033 bindtextdomain ("", "");
52034 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
52040 if ac_fn_c_try_link "$LINENO"; then :
52041 eval "$gt_func_gnugettext_libc=yes"
52043 eval "$gt_func_gnugettext_libc=no"
52045 rm -f core conftest.err conftest.$ac_objext \
52046 conftest$ac_exeext conftest.$ac_ext
52048 eval ac_res=\$$gt_func_gnugettext_libc
52049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
52050 $as_echo "$ac_res" >&6; }
52052 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
52058 am_save_CPPFLAGS="$CPPFLAGS"
52060 for element in $INCICONV; do
52062 for x in $CPPFLAGS; do
52064 acl_save_prefix="$prefix"
52065 prefix="$acl_final_prefix"
52066 acl_save_exec_prefix="$exec_prefix"
52067 exec_prefix="$acl_final_exec_prefix"
52069 exec_prefix="$acl_save_exec_prefix"
52070 prefix="$acl_save_prefix"
52072 if test "X$x" = "X$element"; then
52077 if test -z "$haveit"; then
52078 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
52083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
52084 $as_echo_n "checking for iconv... " >&6; }
52085 if ${am_cv_func_iconv+:} false; then :
52086 $as_echo_n "(cached) " >&6
52089 am_cv_func_iconv="no, consider installing GNU libiconv"
52091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52092 /* end confdefs.h. */
52094 #include <stdlib.h>
52100 iconv_t cd = iconv_open("","");
52101 iconv(cd,NULL,NULL,NULL,NULL);
52107 if ac_fn_c_try_link "$LINENO"; then :
52108 am_cv_func_iconv=yes
52110 rm -f core conftest.err conftest.$ac_objext \
52111 conftest$ac_exeext conftest.$ac_ext
52112 if test "$am_cv_func_iconv" != yes; then
52113 am_save_LIBS="$LIBS"
52114 LIBS="$LIBS $LIBICONV"
52115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52116 /* end confdefs.h. */
52118 #include <stdlib.h>
52124 iconv_t cd = iconv_open("","");
52125 iconv(cd,NULL,NULL,NULL,NULL);
52131 if ac_fn_c_try_link "$LINENO"; then :
52132 am_cv_lib_iconv=yes
52133 am_cv_func_iconv=yes
52135 rm -f core conftest.err conftest.$ac_objext \
52136 conftest$ac_exeext conftest.$ac_ext
52137 LIBS="$am_save_LIBS"
52141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
52142 $as_echo "$am_cv_func_iconv" >&6; }
52143 if test "$am_cv_func_iconv" = yes; then
52144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
52145 $as_echo_n "checking for working iconv... " >&6; }
52146 if ${am_cv_func_iconv_works+:} false; then :
52147 $as_echo_n "(cached) " >&6
52150 am_save_LIBS="$LIBS"
52151 if test $am_cv_lib_iconv = yes; then
52152 LIBS="$LIBS $LIBICONV"
52154 if test "$cross_compiling" = yes; then :
52157 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
52158 *) am_cv_func_iconv_works="guessing yes" ;;
52162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52163 /* end confdefs.h. */
52166 #include <string.h>
52170 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
52173 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
52174 if (cd_utf8_to_88591 != (iconv_t)(-1))
52176 static const char input[] = "\342\202\254"; /* EURO SIGN */
52178 const char *inptr = input;
52179 size_t inbytesleft = strlen (input);
52180 char *outptr = buf;
52181 size_t outbytesleft = sizeof (buf);
52182 size_t res = iconv (cd_utf8_to_88591,
52183 (char **) &inptr, &inbytesleft,
52184 &outptr, &outbytesleft);
52187 iconv_close (cd_utf8_to_88591);
52190 /* Test against Solaris 10 bug: Failures are not distinguishable from
52191 successful returns. */
52193 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
52194 if (cd_ascii_to_88591 != (iconv_t)(-1))
52196 static const char input[] = "\263";
52198 const char *inptr = input;
52199 size_t inbytesleft = strlen (input);
52200 char *outptr = buf;
52201 size_t outbytesleft = sizeof (buf);
52202 size_t res = iconv (cd_ascii_to_88591,
52203 (char **) &inptr, &inbytesleft,
52204 &outptr, &outbytesleft);
52207 iconv_close (cd_ascii_to_88591);
52210 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
52212 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
52213 if (cd_88591_to_utf8 != (iconv_t)(-1))
52215 static const char input[] = "\304";
52216 static char buf[2] = { (char)0xDE, (char)0xAD };
52217 const char *inptr = input;
52218 size_t inbytesleft = 1;
52219 char *outptr = buf;
52220 size_t outbytesleft = 1;
52221 size_t res = iconv (cd_88591_to_utf8,
52222 (char **) &inptr, &inbytesleft,
52223 &outptr, &outbytesleft);
52224 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
52226 iconv_close (cd_88591_to_utf8);
52229 #if 0 /* This bug could be worked around by the caller. */
52230 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
52232 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
52233 if (cd_88591_to_utf8 != (iconv_t)(-1))
52235 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
52237 const char *inptr = input;
52238 size_t inbytesleft = strlen (input);
52239 char *outptr = buf;
52240 size_t outbytesleft = sizeof (buf);
52241 size_t res = iconv (cd_88591_to_utf8,
52242 (char **) &inptr, &inbytesleft,
52243 &outptr, &outbytesleft);
52246 iconv_close (cd_88591_to_utf8);
52250 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
52252 if (/* Try standardized names. */
52253 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
52254 /* Try IRIX, OSF/1 names. */
52255 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
52256 /* Try AIX names. */
52257 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
52258 /* Try HP-UX names. */
52259 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
52264 if ac_fn_c_try_run "$LINENO"; then :
52265 am_cv_func_iconv_works=yes
52267 am_cv_func_iconv_works=no
52269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
52270 conftest.$ac_objext conftest.beam conftest.$ac_ext
52273 LIBS="$am_save_LIBS"
52276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
52277 $as_echo "$am_cv_func_iconv_works" >&6; }
52278 case "$am_cv_func_iconv_works" in
52279 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
52280 *) am_func_iconv=yes ;;
52283 am_func_iconv=no am_cv_lib_iconv=no
52285 if test "$am_func_iconv" = yes; then
52287 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
52290 if test "$am_cv_lib_iconv" = yes; then
52291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
52292 $as_echo_n "checking how to link with libiconv... " >&6; }
52293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
52294 $as_echo "$LIBICONV" >&6; }
52296 CPPFLAGS="$am_save_CPPFLAGS"
52313 acl_save_prefix="$prefix"
52314 prefix="$acl_final_prefix"
52315 acl_save_exec_prefix="$exec_prefix"
52316 exec_prefix="$acl_final_exec_prefix"
52318 eval additional_includedir=\"$includedir\"
52319 eval additional_libdir=\"$libdir\"
52321 exec_prefix="$acl_save_exec_prefix"
52322 prefix="$acl_save_prefix"
52325 # Check whether --with-libintl-prefix was given.
52326 if test "${with_libintl_prefix+set}" = set; then :
52327 withval=$with_libintl_prefix;
52328 if test "X$withval" = "Xno"; then
52331 if test "X$withval" = "X"; then
52333 acl_save_prefix="$prefix"
52334 prefix="$acl_final_prefix"
52335 acl_save_exec_prefix="$exec_prefix"
52336 exec_prefix="$acl_final_exec_prefix"
52338 eval additional_includedir=\"$includedir\"
52339 eval additional_libdir=\"$libdir\"
52341 exec_prefix="$acl_save_exec_prefix"
52342 prefix="$acl_save_prefix"
52345 additional_includedir="$withval/include"
52346 additional_libdir="$withval/$acl_libdirstem"
52347 if test "$acl_libdirstem2" != "$acl_libdirstem" \
52348 && ! test -d "$withval/$acl_libdirstem"; then
52349 additional_libdir="$withval/$acl_libdirstem2"
52363 names_already_handled=
52364 names_next_round='intl '
52365 while test -n "$names_next_round"; do
52366 names_this_round="$names_next_round"
52368 for name in $names_this_round; do
52370 for n in $names_already_handled; do
52371 if test "$n" = "$name"; then
52372 already_handled=yes
52376 if test -z "$already_handled"; then
52377 names_already_handled="$names_already_handled $name"
52378 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
52379 eval value=\"\$HAVE_LIB$uppername\"
52380 if test -n "$value"; then
52381 if test "$value" = yes; then
52382 eval value=\"\$LIB$uppername\"
52383 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
52384 eval value=\"\$LTLIB$uppername\"
52385 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
52394 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
52395 if test -n "$acl_shlibext"; then
52396 shrext=".$acl_shlibext" # typically: shrext=.so
52400 if test $use_additional = yes; then
52401 dir="$additional_libdir"
52402 if test -n "$acl_shlibext"; then
52403 if test -f "$dir/$libname$shrext"; then
52405 found_so="$dir/$libname$shrext"
52407 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
52408 ver=`(cd "$dir" && \
52409 for f in "$libname$shrext".*; do echo "$f"; done \
52410 | sed -e "s,^$libname$shrext\\\\.,," \
52411 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
52412 | sed 1q ) 2>/dev/null`
52413 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
52415 found_so="$dir/$libname$shrext.$ver"
52418 eval library_names=\"$acl_library_names_spec\"
52419 for f in $library_names; do
52420 if test -f "$dir/$f"; then
52429 if test "X$found_dir" = "X"; then
52430 if test -f "$dir/$libname.$acl_libext"; then
52432 found_a="$dir/$libname.$acl_libext"
52435 if test "X$found_dir" != "X"; then
52436 if test -f "$dir/$libname.la"; then
52437 found_la="$dir/$libname.la"
52441 if test "X$found_dir" = "X"; then
52442 for x in $LDFLAGS $LTLIBINTL; do
52444 acl_save_prefix="$prefix"
52445 prefix="$acl_final_prefix"
52446 acl_save_exec_prefix="$exec_prefix"
52447 exec_prefix="$acl_final_exec_prefix"
52449 exec_prefix="$acl_save_exec_prefix"
52450 prefix="$acl_save_prefix"
52454 dir=`echo "X$x" | sed -e 's/^X-L//'`
52455 if test -n "$acl_shlibext"; then
52456 if test -f "$dir/$libname$shrext"; then
52458 found_so="$dir/$libname$shrext"
52460 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
52461 ver=`(cd "$dir" && \
52462 for f in "$libname$shrext".*; do echo "$f"; done \
52463 | sed -e "s,^$libname$shrext\\\\.,," \
52464 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
52465 | sed 1q ) 2>/dev/null`
52466 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
52468 found_so="$dir/$libname$shrext.$ver"
52471 eval library_names=\"$acl_library_names_spec\"
52472 for f in $library_names; do
52473 if test -f "$dir/$f"; then
52482 if test "X$found_dir" = "X"; then
52483 if test -f "$dir/$libname.$acl_libext"; then
52485 found_a="$dir/$libname.$acl_libext"
52488 if test "X$found_dir" != "X"; then
52489 if test -f "$dir/$libname.la"; then
52490 found_la="$dir/$libname.la"
52495 if test "X$found_dir" != "X"; then
52500 if test "X$found_dir" != "X"; then
52501 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
52502 if test "X$found_so" != "X"; then
52503 if test "$enable_rpath" = no \
52504 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
52505 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
52506 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52509 for x in $ltrpathdirs; do
52510 if test "X$x" = "X$found_dir"; then
52515 if test -z "$haveit"; then
52516 ltrpathdirs="$ltrpathdirs $found_dir"
52518 if test "$acl_hardcode_direct" = yes; then
52519 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52521 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
52522 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52524 for x in $rpathdirs; do
52525 if test "X$x" = "X$found_dir"; then
52530 if test -z "$haveit"; then
52531 rpathdirs="$rpathdirs $found_dir"
52535 for x in $LDFLAGS $LIBINTL; do
52537 acl_save_prefix="$prefix"
52538 prefix="$acl_final_prefix"
52539 acl_save_exec_prefix="$exec_prefix"
52540 exec_prefix="$acl_final_exec_prefix"
52542 exec_prefix="$acl_save_exec_prefix"
52543 prefix="$acl_save_prefix"
52545 if test "X$x" = "X-L$found_dir"; then
52550 if test -z "$haveit"; then
52551 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
52553 if test "$acl_hardcode_minus_L" != no; then
52554 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
52556 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
52562 if test "X$found_a" != "X"; then
52563 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
52565 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
52568 additional_includedir=
52569 case "$found_dir" in
52570 */$acl_libdirstem | */$acl_libdirstem/)
52571 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
52572 if test "$name" = 'intl'; then
52573 LIBINTL_PREFIX="$basedir"
52575 additional_includedir="$basedir/include"
52577 */$acl_libdirstem2 | */$acl_libdirstem2/)
52578 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
52579 if test "$name" = 'intl'; then
52580 LIBINTL_PREFIX="$basedir"
52582 additional_includedir="$basedir/include"
52585 if test "X$additional_includedir" != "X"; then
52586 if test "X$additional_includedir" != "X/usr/include"; then
52588 if test "X$additional_includedir" = "X/usr/local/include"; then
52589 if test -n "$GCC"; then
52591 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
52595 if test -z "$haveit"; then
52596 for x in $CPPFLAGS $INCINTL; do
52598 acl_save_prefix="$prefix"
52599 prefix="$acl_final_prefix"
52600 acl_save_exec_prefix="$exec_prefix"
52601 exec_prefix="$acl_final_exec_prefix"
52603 exec_prefix="$acl_save_exec_prefix"
52604 prefix="$acl_save_prefix"
52606 if test "X$x" = "X-I$additional_includedir"; then
52611 if test -z "$haveit"; then
52612 if test -d "$additional_includedir"; then
52613 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
52619 if test -n "$found_la"; then
52620 save_libdir="$libdir"
52621 case "$found_la" in
52622 */* | *\\*) . "$found_la" ;;
52623 *) . "./$found_la" ;;
52625 libdir="$save_libdir"
52626 for dep in $dependency_libs; do
52629 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
52630 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
52631 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
52633 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
52634 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
52635 if test -n "$GCC"; then
52637 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
52641 if test -z "$haveit"; then
52643 for x in $LDFLAGS $LIBINTL; do
52645 acl_save_prefix="$prefix"
52646 prefix="$acl_final_prefix"
52647 acl_save_exec_prefix="$exec_prefix"
52648 exec_prefix="$acl_final_exec_prefix"
52650 exec_prefix="$acl_save_exec_prefix"
52651 prefix="$acl_save_prefix"
52653 if test "X$x" = "X-L$additional_libdir"; then
52658 if test -z "$haveit"; then
52659 if test -d "$additional_libdir"; then
52660 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
52664 for x in $LDFLAGS $LTLIBINTL; do
52666 acl_save_prefix="$prefix"
52667 prefix="$acl_final_prefix"
52668 acl_save_exec_prefix="$exec_prefix"
52669 exec_prefix="$acl_final_exec_prefix"
52671 exec_prefix="$acl_save_exec_prefix"
52672 prefix="$acl_save_prefix"
52674 if test "X$x" = "X-L$additional_libdir"; then
52679 if test -z "$haveit"; then
52680 if test -d "$additional_libdir"; then
52681 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
52688 dir=`echo "X$dep" | sed -e 's/^X-R//'`
52689 if test "$enable_rpath" != no; then
52691 for x in $rpathdirs; do
52692 if test "X$x" = "X$dir"; then
52697 if test -z "$haveit"; then
52698 rpathdirs="$rpathdirs $dir"
52701 for x in $ltrpathdirs; do
52702 if test "X$x" = "X$dir"; then
52707 if test -z "$haveit"; then
52708 ltrpathdirs="$ltrpathdirs $dir"
52713 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
52716 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
52719 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
52720 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
52726 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
52727 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
52733 if test "X$rpathdirs" != "X"; then
52734 if test -n "$acl_hardcode_libdir_separator"; then
52736 for found_dir in $rpathdirs; do
52737 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
52739 acl_save_libdir="$libdir"
52741 eval flag=\"$acl_hardcode_libdir_flag_spec\"
52742 libdir="$acl_save_libdir"
52743 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
52745 for found_dir in $rpathdirs; do
52746 acl_save_libdir="$libdir"
52747 libdir="$found_dir"
52748 eval flag=\"$acl_hardcode_libdir_flag_spec\"
52749 libdir="$acl_save_libdir"
52750 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
52754 if test "X$ltrpathdirs" != "X"; then
52755 for found_dir in $ltrpathdirs; do
52756 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
52765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
52766 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
52767 if eval \${$gt_func_gnugettext_libintl+:} false; then :
52768 $as_echo_n "(cached) " >&6
52770 gt_save_CPPFLAGS="$CPPFLAGS"
52771 CPPFLAGS="$CPPFLAGS $INCINTL"
52772 gt_save_LIBS="$LIBS"
52773 LIBS="$LIBS $LIBINTL"
52774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52775 /* end confdefs.h. */
52777 #include <libintl.h>
52778 $gt_revision_test_code
52779 extern int _nl_msg_cat_cntr;
52784 const char *_nl_expand_alias (const char *);
52790 bindtextdomain ("", "");
52791 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
52797 if ac_fn_c_try_link "$LINENO"; then :
52798 eval "$gt_func_gnugettext_libintl=yes"
52800 eval "$gt_func_gnugettext_libintl=no"
52802 rm -f core conftest.err conftest.$ac_objext \
52803 conftest$ac_exeext conftest.$ac_ext
52804 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
52805 LIBS="$LIBS $LIBICONV"
52806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52807 /* end confdefs.h. */
52809 #include <libintl.h>
52810 $gt_revision_test_code
52811 extern int _nl_msg_cat_cntr;
52816 const char *_nl_expand_alias (const char *);
52822 bindtextdomain ("", "");
52823 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
52829 if ac_fn_c_try_link "$LINENO"; then :
52830 LIBINTL="$LIBINTL $LIBICONV"
52831 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
52832 eval "$gt_func_gnugettext_libintl=yes"
52835 rm -f core conftest.err conftest.$ac_objext \
52836 conftest$ac_exeext conftest.$ac_ext
52838 CPPFLAGS="$gt_save_CPPFLAGS"
52839 LIBS="$gt_save_LIBS"
52841 eval ac_res=\$$gt_func_gnugettext_libintl
52842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
52843 $as_echo "$ac_res" >&6; }
52846 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
52847 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
52848 && test "$PACKAGE" != gettext-runtime \
52849 && test "$PACKAGE" != gettext-tools; }; then
52850 gt_use_preinstalled_gnugettext=yes
52859 if test -n "$INTL_MACOSX_LIBS"; then
52860 if test "$gt_use_preinstalled_gnugettext" = "yes" \
52861 || test "$nls_cv_use_gnu_gettext" = "yes"; then
52862 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
52863 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
52867 if test "$gt_use_preinstalled_gnugettext" = "yes" \
52868 || test "$nls_cv_use_gnu_gettext" = "yes"; then
52870 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
52877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
52878 $as_echo_n "checking whether to use NLS... " >&6; }
52879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
52880 $as_echo "$USE_NLS" >&6; }
52881 if test "$USE_NLS" = "yes"; then
52882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
52883 $as_echo_n "checking where the gettext function comes from... " >&6; }
52884 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
52885 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
52886 gt_source="external libintl"
52891 gt_source="included intl directory"
52893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
52894 $as_echo "$gt_source" >&6; }
52897 if test "$USE_NLS" = "yes"; then
52899 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
52900 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
52901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
52902 $as_echo_n "checking how to link with libintl... " >&6; }
52903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
52904 $as_echo "$LIBINTL" >&6; }
52906 for element in $INCINTL; do
52908 for x in $CPPFLAGS; do
52910 acl_save_prefix="$prefix"
52911 prefix="$acl_final_prefix"
52912 acl_save_exec_prefix="$exec_prefix"
52913 exec_prefix="$acl_final_exec_prefix"
52915 exec_prefix="$acl_save_exec_prefix"
52916 prefix="$acl_save_prefix"
52918 if test "X$x" = "X$element"; then
52923 if test -z "$haveit"; then
52924 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
52931 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
52934 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
52943 INTLLIBS="$LIBINTL"
52953 $as_echo "#define FINDUTILS 1" >>confdefs.h
52956 $as_echo "#define ALREADY_INCLUDED_CONFIG_H 1" >>confdefs.h
52965 # Find any Python interpreter.
52966 if test -z "$PYTHON"; then
52967 for ac_prog in python python2 python3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0
52969 # Extract the first word of "$ac_prog", so it can be a program name with args.
52970 set dummy $ac_prog; ac_word=$2
52971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52972 $as_echo_n "checking for $ac_word... " >&6; }
52973 if ${ac_cv_path_PYTHON+:} false; then :
52974 $as_echo_n "(cached) " >&6
52978 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
52981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52982 for as_dir in $PATH
52985 test -z "$as_dir" && as_dir=.
52986 for ac_exec_ext in '' $ac_executable_extensions; do
52987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52988 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
52989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52999 PYTHON=$ac_cv_path_PYTHON
53000 if test -n "$PYTHON"; then
53001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
53002 $as_echo "$PYTHON" >&6; }
53004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53005 $as_echo "no" >&6; }
53009 test -n "$PYTHON" && break
53011 test -n "$PYTHON" || PYTHON=":"
53014 am_display_PYTHON=python
53017 if test "$PYTHON" = :; then
53022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5
53023 $as_echo_n "checking for $am_display_PYTHON version... " >&6; }
53024 if ${am_cv_python_version+:} false; then :
53025 $as_echo_n "(cached) " >&6
53027 am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
53029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
53030 $as_echo "$am_cv_python_version" >&6; }
53031 PYTHON_VERSION=$am_cv_python_version
53035 PYTHON_PREFIX='${prefix}'
53037 PYTHON_EXEC_PREFIX='${exec_prefix}'
53041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5
53042 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; }
53043 if ${am_cv_python_platform+:} false; then :
53044 $as_echo_n "(cached) " >&6
53046 am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`
53048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5
53049 $as_echo "$am_cv_python_platform" >&6; }
53050 PYTHON_PLATFORM=$am_cv_python_platform
53055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5
53056 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; }
53057 if ${am_cv_python_pythondir+:} false; then :
53058 $as_echo_n "(cached) " >&6
53060 if test "x$prefix" = xNONE
53062 am_py_prefix=$ac_default_prefix
53064 am_py_prefix=$prefix
53066 am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
53067 case $am_cv_python_pythondir in
53069 am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
53070 am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
53073 case $am_py_prefix in
53076 am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
53083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5
53084 $as_echo "$am_cv_python_pythondir" >&6; }
53085 pythondir=$am_cv_python_pythondir
53089 pkgpythondir=\${pythondir}/$PACKAGE
53092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5
53093 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; }
53094 if ${am_cv_python_pyexecdir+:} false; then :
53095 $as_echo_n "(cached) " >&6
53097 if test "x$exec_prefix" = xNONE
53099 am_py_exec_prefix=$am_py_prefix
53101 am_py_exec_prefix=$exec_prefix
53103 am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
53104 case $am_cv_python_pyexecdir in
53105 $am_py_exec_prefix*)
53106 am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
53107 am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
53110 case $am_py_exec_prefix in
53113 am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
53120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5
53121 $as_echo "$am_cv_python_pyexecdir" >&6; }
53122 pyexecdir=$am_cv_python_pyexecdir
53126 pkgpyexecdir=\${pyexecdir}/$PACKAGE
53133 if test "$PYTHON" != :; then
53135 HAVE_PYTHON_FALSE='#'
53137 HAVE_PYTHON_TRUE='#'
53141 for ac_prog in faketime
53143 # Extract the first word of "$ac_prog", so it can be a program name with args.
53144 set dummy $ac_prog; ac_word=$2
53145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53146 $as_echo_n "checking for $ac_word... " >&6; }
53147 if ${ac_cv_prog_FAKETIME+:} false; then :
53148 $as_echo_n "(cached) " >&6
53150 if test -n "$FAKETIME"; then
53151 ac_cv_prog_FAKETIME="$FAKETIME" # Let the user override the test.
53153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53154 for as_dir in $PATH
53157 test -z "$as_dir" && as_dir=.
53158 for ac_exec_ext in '' $ac_executable_extensions; do
53159 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53160 ac_cv_prog_FAKETIME="$ac_prog"
53161 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53170 FAKETIME=$ac_cv_prog_FAKETIME
53171 if test -n "$FAKETIME"; then
53172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FAKETIME" >&5
53173 $as_echo "$FAKETIME" >&6; }
53175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53176 $as_echo "no" >&6; }
53180 test -n "$FAKETIME" && break
53182 test -n "$FAKETIME" || FAKETIME=":"
53184 if test "$FAKETIME" != :; then
53185 HAVE_FAKETIME_TRUE=
53186 HAVE_FAKETIME_FALSE='#'
53188 HAVE_FAKETIME_TRUE='#'
53189 HAVE_FAKETIME_FALSE=
53193 # This is necessary so that .o files in LIBOBJS are also built via
53194 # the ANSI2KNR-filtering rules.
53195 #LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
53197 # Note that in the list below, po/Makefile.in should appear before
53198 # po/Makefile, so that po/Makefile can be created even if po/Makefile.in
53199 # starts off missing.
53200 ac_config_files="$ac_config_files Makefile build-aux/Makefile doc/Makefile find/Makefile find/testsuite/Makefile gl/Makefile gl/lib/Makefile lib/Makefile locate/Makefile locate/testsuite/Makefile m4/Makefile po/Makefile.in po/Makefile tests/Makefile xargs/Makefile xargs/testsuite/Makefile"
53202 cat >confcache <<\_ACEOF
53203 # This file is a shell script that caches the results of configure
53204 # tests run on this system so they can be shared between configure
53205 # scripts and configure runs, see configure's option --config-cache.
53206 # It is not useful on other systems. If it contains results you don't
53207 # want to keep, you may remove or edit it.
53209 # config.status only pays attention to the cache file if you give it
53210 # the --recheck option to rerun configure.
53212 # `ac_cv_env_foo' variables (set or unset) will be overridden when
53213 # loading this file, other *unset* `ac_cv_foo' will be assigned the
53214 # following values.
53218 # The following way of writing the cache mishandles newlines in values,
53219 # but we know of no workaround that is simple, portable, and efficient.
53220 # So, we kill variables containing newlines.
53221 # Ultrix sh set writes to stderr and can't be redirected directly,
53222 # and sets the high bit in the cache file unless we assign to the vars.
53224 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53225 eval ac_val=\$$ac_var
53229 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53230 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53233 _ | IFS | as_nl) ;; #(
53234 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53235 *) { eval $ac_var=; unset $ac_var;} ;;
53241 case $as_nl`(ac_space=' '; set) 2>&1` in #(
53242 *${as_nl}ac_space=\ *)
53243 # `set' does not quote correctly, so add quotes: double-quote
53244 # substitution turns \\\\ into \\, and sed turns \\ into \.
53247 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53250 # `set' quotes correctly as required by POSIX, so do not add quotes.
53251 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53260 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53262 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53264 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53265 if test -w "$cache_file"; then
53266 if test "x$cache_file" != "x/dev/null"; then
53267 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53268 $as_echo "$as_me: updating cache $cache_file" >&6;}
53269 if test ! -f "$cache_file" || test -h "$cache_file"; then
53270 cat confcache >"$cache_file"
53272 case $cache_file in #(
53274 mv -f confcache "$cache_file"$$ &&
53275 mv -f "$cache_file"$$ "$cache_file" ;; #(
53277 mv -f confcache "$cache_file" ;;
53282 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53283 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53288 test "x$prefix" = xNONE && prefix=$ac_default_prefix
53289 # Let make expand exec_prefix.
53290 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53292 DEFS=-DHAVE_CONFIG_H
53297 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53298 # 1. Remove the extension, and $U if already installed.
53299 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53300 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53301 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
53302 # will be set to the directory where LIBOBJS objects are built.
53303 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53304 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53306 LIBOBJS=$ac_libobjs
53308 LTLIBOBJS=$ac_ltlibobjs
53311 if test -n "$EXEEXT"; then
53313 am__EXEEXT_FALSE='#'
53315 am__EXEEXT_TRUE='#'
53319 if test -z "${WITH_FTS_TRUE}" && test -z "${WITH_FTS_FALSE}"; then
53320 as_fn_error $? "conditional \"WITH_FTS\" was never defined.
53321 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53323 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
53324 as_fn_error $? "conditional \"AMDEP\" was never defined.
53325 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53327 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
53328 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
53329 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53331 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
53332 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
53333 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53335 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
53336 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
53337 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53339 if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then
53340 as_fn_error $? "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined.
53341 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53343 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
53344 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
53345 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53347 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
53348 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
53349 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53351 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
53352 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
53353 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53355 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
53356 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
53357 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53361 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
53362 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
53363 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53365 CONFIG_INCLUDE=config.h
53367 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
53368 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
53369 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53371 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
53372 as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
53373 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53375 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
53376 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
53377 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53379 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
53380 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
53381 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53383 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
53384 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
53385 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53387 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
53388 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
53389 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53391 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
53392 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
53393 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53398 if test -n "$gl_LIBOBJS"; then
53399 # Remove the extension.
53400 sed_drop_objext='s/\.o$//;s/\.obj$//'
53401 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
53402 gl_libobjs="$gl_libobjs $i.$ac_objext"
53403 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
53406 gl_LIBOBJS=$gl_libobjs
53408 gl_LTLIBOBJS=$gl_ltlibobjs
53415 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
53416 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
53417 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53422 if test -n "$gltests_LIBOBJS"; then
53423 # Remove the extension.
53424 sed_drop_objext='s/\.o$//;s/\.obj$//'
53425 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
53426 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
53427 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
53430 gltests_LIBOBJS=$gltests_libobjs
53432 gltests_LTLIBOBJS=$gltests_ltlibobjs
53435 if test -z "${CROSS_COMPILING_TRUE}" && test -z "${CROSS_COMPILING_FALSE}"; then
53436 as_fn_error $? "conditional \"CROSS_COMPILING\" was never defined.
53437 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53439 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
53440 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
53441 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53443 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
53444 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
53445 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53447 if test -z "${HAVE_FAKETIME_TRUE}" && test -z "${HAVE_FAKETIME_FALSE}"; then
53448 as_fn_error $? "conditional \"HAVE_FAKETIME\" was never defined.
53449 Usually this means the macro was only invoked conditionally." "$LINENO" 5
53452 : "${CONFIG_STATUS=./config.status}"
53454 ac_clean_files_save=$ac_clean_files
53455 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53456 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53457 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53459 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53461 # Generated by $as_me.
53462 # Run this file to recreate the current configuration.
53463 # Compiler output produced by configure, useful for debugging
53464 # configure, is in config.log if it exists.
53467 ac_cs_recheck=false
53470 SHELL=\${CONFIG_SHELL-$SHELL}
53473 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53474 ## -------------------- ##
53475 ## M4sh Initialization. ##
53476 ## -------------------- ##
53478 # Be more Bourne compatible
53479 DUALCASE=1; export DUALCASE # for MKS sh
53480 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53483 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53484 # is contrary to our usage. Disable this feature.
53485 alias -g '${1+"$@"}'='"$@"'
53486 setopt NO_GLOB_SUBST
53488 case `(set -o) 2>/dev/null` in #(
53500 # Printing a long string crashes Solaris 7 /usr/bin/printf.
53501 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53502 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53503 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53504 # Prefer a ksh shell builtin over an external printf program on Solaris,
53505 # but without wasting forks for bash or zsh.
53506 if test -z "$BASH_VERSION$ZSH_VERSION" \
53507 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53508 as_echo='print -r --'
53509 as_echo_n='print -rn --'
53510 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53511 as_echo='printf %s\n'
53512 as_echo_n='printf %s'
53514 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53515 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53516 as_echo_n='/usr/ucb/echo -n'
53518 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53519 as_echo_n_body='eval
53523 expr "X$arg" : "X\\(.*\\)$as_nl";
53524 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53526 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53528 export as_echo_n_body
53529 as_echo_n='sh -c $as_echo_n_body as_echo'
53531 export as_echo_body
53532 as_echo='sh -c $as_echo_body as_echo'
53535 # The user is always right.
53536 if test "${PATH_SEPARATOR+set}" != set; then
53538 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53539 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53546 # We need space, tab and new line, in precisely that order. Quoting is
53547 # there to prevent editors from complaining about space-tab.
53548 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
53549 # splitting by setting IFS to empty value.)
53552 # Find who we are. Look in the path if we contain no directory separator.
53555 *[\\/]* ) as_myself=$0 ;;
53556 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53557 for as_dir in $PATH
53560 test -z "$as_dir" && as_dir=.
53561 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53567 # We did not find ourselves, most probably we were run as `sh COMMAND'
53568 # in which case we are not to be found in the path.
53569 if test "x$as_myself" = x; then
53572 if test ! -f "$as_myself"; then
53573 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53577 # Unset variables that we do not need and which cause bugs (e.g. in
53578 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
53579 # suppresses any "Segmentation fault" message there. '((' could
53580 # trigger a bug in pdksh 5.2.14.
53581 for as_var in BASH_ENV ENV MAIL MAILPATH
53582 do eval test x\${$as_var+set} = xset \
53583 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53596 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53599 # as_fn_error STATUS ERROR [LINENO LOG_FD]
53600 # ----------------------------------------
53601 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53602 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53603 # script with STATUS, using 1 if that was 0.
53606 as_status=$1; test $as_status -eq 0 && as_status=1
53608 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53609 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53611 $as_echo "$as_me: error: $2" >&2
53612 as_fn_exit $as_status
53616 # as_fn_set_status STATUS
53617 # -----------------------
53618 # Set $? to STATUS, without forking.
53619 as_fn_set_status ()
53622 } # as_fn_set_status
53624 # as_fn_exit STATUS
53625 # -----------------
53626 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53630 as_fn_set_status $1
53636 # Portably unset VAR.
53639 { eval $1=; unset $1;}
53641 as_unset=as_fn_unset
53642 # as_fn_append VAR VALUE
53643 # ----------------------
53644 # Append the text in VALUE to the end of the definition contained in VAR. Take
53645 # advantage of any shell optimizations that allow amortized linear growth over
53646 # repeated appends, instead of the typical quadratic growth present in naive
53648 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53649 eval 'as_fn_append ()
53660 # as_fn_arith ARG...
53661 # ------------------
53662 # Perform arithmetic evaluation on the ARGs, and store the result in the
53663 # global $as_val. Take advantage of shells that can avoid forks. The arguments
53664 # must be portable across $(()) and expr.
53665 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53666 eval 'as_fn_arith ()
53673 as_val=`expr "$@" || test $? -eq 1`
53678 if expr a : '\(a\)' >/dev/null 2>&1 &&
53679 test "X`expr 00001 : '.*\(...\)'`" = X001; then
53685 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53686 as_basename=basename
53691 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53697 as_me=`$as_basename -- "$0" ||
53698 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53699 X"$0" : 'X\(//\)$' \| \
53700 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53702 sed '/^.*\/\([^/][^/]*\)\/*$/{
53716 # Avoid depending upon Character Ranges.
53717 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53718 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53719 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53720 as_cr_digits='0123456789'
53721 as_cr_alnum=$as_cr_Letters$as_cr_digits
53723 ECHO_C= ECHO_N= ECHO_T=
53724 case `echo -n x` in #(((((
53726 case `echo 'xy\c'` in
53727 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
53729 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
53736 rm -f conf$$ conf$$.exe conf$$.file
53737 if test -d conf$$.dir; then
53738 rm -f conf$$.dir/conf$$.file
53741 mkdir conf$$.dir 2>/dev/null
53743 if (echo >conf$$.file) 2>/dev/null; then
53744 if ln -s conf$$.file conf$$ 2>/dev/null; then
53746 # ... but there are two gotchas:
53747 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53748 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53749 # In both cases, we have to default to `cp -pR'.
53750 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53752 elif ln conf$$.file conf$$ 2>/dev/null; then
53760 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53761 rmdir conf$$.dir 2>/dev/null
53766 # Create "$as_dir" as a directory, including parents if necessary.
53771 -*) as_dir=./$as_dir;;
53773 test -d "$as_dir" || eval $as_mkdir_p || {
53777 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53778 *) as_qdir=$as_dir;;
53780 as_dirs="'$as_qdir' $as_dirs"
53781 as_dir=`$as_dirname -- "$as_dir" ||
53782 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53783 X"$as_dir" : 'X\(//\)[^/]' \| \
53784 X"$as_dir" : 'X\(//\)$' \| \
53785 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53786 $as_echo X"$as_dir" |
53787 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53791 /^X\(\/\/\)[^/].*/{
53804 test -d "$as_dir" && break
53806 test -z "$as_dirs" || eval "mkdir $as_dirs"
53807 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53811 if mkdir -p . 2>/dev/null; then
53812 as_mkdir_p='mkdir -p "$as_dir"'
53814 test -d ./-p && rmdir ./-p
53819 # as_fn_executable_p FILE
53820 # -----------------------
53821 # Test if FILE is an executable regular file.
53822 as_fn_executable_p ()
53824 test -f "$1" && test -x "$1"
53825 } # as_fn_executable_p
53826 as_test_x='test -x'
53827 as_executable_p=as_fn_executable_p
53829 # Sed expression to map a string onto a valid CPP name.
53830 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53832 # Sed expression to map a string onto a valid variable name.
53833 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53837 ## ----------------------------------- ##
53838 ## Main body of $CONFIG_STATUS script. ##
53839 ## ----------------------------------- ##
53841 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53843 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53844 # Save the log message, to keep $0 and so on meaningful, and to
53845 # report actual input values of CONFIG_FILES etc. instead of their
53846 # values after options handling.
53848 This file was extended by GNU findutils $as_me 4.5.14, which was
53849 generated by GNU Autoconf 2.69. Invocation command line was
53851 CONFIG_FILES = $CONFIG_FILES
53852 CONFIG_HEADERS = $CONFIG_HEADERS
53853 CONFIG_LINKS = $CONFIG_LINKS
53854 CONFIG_COMMANDS = $CONFIG_COMMANDS
53857 on `(hostname || uname -n) 2>/dev/null | sed 1q`
53862 case $ac_config_files in *"
53863 "*) set x $ac_config_files; shift; ac_config_files=$*;;
53866 case $ac_config_headers in *"
53867 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
53871 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53872 # Files that config.status was made for.
53873 config_files="$ac_config_files"
53874 config_headers="$ac_config_headers"
53875 config_links="$ac_config_links"
53876 config_commands="$ac_config_commands"
53880 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53882 \`$as_me' instantiates files and other configuration actions
53883 from templates according to the current configuration. Unless the files
53884 and actions are specified as TAGs, all are instantiated by default.
53886 Usage: $0 [OPTION]... [TAG]...
53888 -h, --help print this help, then exit
53889 -V, --version print version number and configuration settings, then exit
53890 --config print configuration, then exit
53891 -q, --quiet, --silent
53892 do not print progress messages
53893 -d, --debug don't remove temporary files
53894 --recheck update $as_me by reconfiguring in the same conditions
53895 --file=FILE[:TEMPLATE]
53896 instantiate the configuration file FILE
53897 --header=FILE[:TEMPLATE]
53898 instantiate the configuration header FILE
53900 Configuration files:
53903 Configuration headers:
53906 Configuration links:
53909 Configuration commands:
53912 Report bugs to <bug-findutils@gnu.org>.
53913 GNU findutils home page: <http://www.gnu.org/software/findutils/>.
53914 General help using GNU software: <http://www.gnu.org/gethelp/>."
53917 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53918 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53920 GNU findutils config.status 4.5.14
53921 configured by $0, generated by GNU Autoconf 2.69,
53922 with options \\"\$ac_cs_config\\"
53924 Copyright (C) 2012 Free Software Foundation, Inc.
53925 This config.status script is free software; the Free Software Foundation
53926 gives unlimited permission to copy, distribute and modify it."
53933 test -n "\$AWK" || AWK=awk
53936 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53937 # The default lists apply if the user does not specify any file.
53943 ac_option=`expr "X$1" : 'X\([^=]*\)='`
53944 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53948 ac_option=`expr "X$1" : 'X\([^=]*\)='`
53960 # Handling of the options.
53961 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53963 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53964 $as_echo "$ac_cs_version"; exit ;;
53965 --config | --confi | --conf | --con | --co | --c )
53966 $as_echo "$ac_cs_config"; exit ;;
53967 --debug | --debu | --deb | --de | --d | -d )
53969 --file | --fil | --fi | --f )
53972 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53973 '') as_fn_error $? "missing file argument" ;;
53975 as_fn_append CONFIG_FILES " '$ac_optarg'"
53976 ac_need_defaults=false;;
53977 --header | --heade | --head | --hea )
53980 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53982 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
53983 ac_need_defaults=false;;
53985 # Conflict between --help and --header
53986 as_fn_error $? "ambiguous option: \`$1'
53987 Try \`$0 --help' for more information.";;
53988 --help | --hel | -h )
53989 $as_echo "$ac_cs_usage"; exit ;;
53990 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53991 | -silent | --silent | --silen | --sile | --sil | --si | --s)
53994 # This is an error.
53995 -*) as_fn_error $? "unrecognized option: \`$1'
53996 Try \`$0 --help' for more information." ;;
53998 *) as_fn_append ac_config_targets " $1"
53999 ac_need_defaults=false ;;
54005 ac_configure_extra_args=
54007 if $ac_cs_silent; then
54009 ac_configure_extra_args="$ac_configure_extra_args --silent"
54013 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54014 if \$ac_cs_recheck; then
54015 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54017 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54018 CONFIG_SHELL='$SHELL'
54019 export CONFIG_SHELL
54024 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54028 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54029 ## Running $as_me. ##
54035 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54039 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
54040 GNUmakefile=$GNUmakefile
54041 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
54042 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
54043 # from automake < 1.5.
54044 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
54045 # Capture the value of LINGUAS because we need it to compute CATALOGS.
54046 LINGUAS="${LINGUAS-%UNSET%}"
54051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54053 # Handling of arguments.
54054 for ac_config_target in $ac_config_targets
54056 case $ac_config_target in
54057 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
54058 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
54059 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
54060 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
54061 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
54062 "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;;
54063 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
54064 "find/Makefile") CONFIG_FILES="$CONFIG_FILES find/Makefile" ;;
54065 "find/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES find/testsuite/Makefile" ;;
54066 "gl/Makefile") CONFIG_FILES="$CONFIG_FILES gl/Makefile" ;;
54067 "gl/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gl/lib/Makefile" ;;
54068 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
54069 "locate/Makefile") CONFIG_FILES="$CONFIG_FILES locate/Makefile" ;;
54070 "locate/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES locate/testsuite/Makefile" ;;
54071 "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
54072 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
54073 "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
54074 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
54075 "xargs/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/Makefile" ;;
54076 "xargs/testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES xargs/testsuite/Makefile" ;;
54078 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54083 # If the user did not use the arguments to specify the items to instantiate,
54084 # then the envvar interface is used. Set only those that are not.
54085 # We use the long form for the default assignment because of an extremely
54086 # bizarre bug on SunOS 4.1.3.
54087 if $ac_need_defaults; then
54088 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54089 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
54090 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
54091 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
54094 # Have a temporary directory for convenience. Make it in the build tree
54095 # simply because there is no reason against having it here, and in addition,
54096 # creating and moving files from /tmp can sometimes cause problems.
54097 # Hook for its removal unless debugging.
54098 # Note that there is a small window in which the directory will not be cleaned:
54099 # after its creation but before its name has been assigned to `$tmp'.
54103 trap 'exit_status=$?
54104 : "${ac_tmp:=$tmp}"
54105 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54107 trap 'as_fn_exit 1' 1 2 13 15
54109 # Create a (secure) tmp directory for tmp files.
54112 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54116 tmp=./conf$$-$RANDOM
54117 (umask 077 && mkdir "$tmp")
54118 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54121 # Set up the scripts for CONFIG_FILES section.
54122 # No need to generate them if there are no CONFIG_FILES.
54123 # This happens for instance with `./config.status config.h'.
54124 if test -n "$CONFIG_FILES"; then
54127 ac_cr=`echo X | tr X '\015'`
54128 # On cygwin, bash can eat \r inside `` if the user requested igncr.
54129 # But we know of no other shell where ac_cr would be empty at this
54130 # point, so we can use a bashism as a fallback.
54131 if test "x$ac_cr" = x; then
54132 eval ac_cr=\$\'\\r\'
54134 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54135 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54138 ac_cs_awk_cr=$ac_cr
54141 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54146 echo "cat >conf$$subs.awk <<_ACEOF" &&
54147 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54149 } >conf$$subs.sh ||
54150 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54151 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54153 for ac_last_try in false false false false false :; do
54154 . ./conf$$subs.sh ||
54155 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54157 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54158 if test $ac_delim_n = $ac_delim_num; then
54160 elif $ac_last_try; then
54161 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54163 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54166 rm -f conf$$subs.sh
54168 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54169 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54173 s/^/S["/; s/!.*/"]=/
54183 s/\(.\{148\}\)..*/\1/
54185 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54190 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54197 s/\(.\{148\}\)..*/\1/
54199 s/["\\]/\\&/g; s/^/"/; s/$/"/
54203 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54208 ' <conf$$subs.awk | sed '
54213 ' >>$CONFIG_STATUS || ac_write_fail=1
54214 rm -f conf$$subs.awk
54215 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54217 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54218 for (key in S) S_is_set[key] = 1
54224 nfields = split(line, field, "@")
54226 len = length(field[1])
54227 for (i = 2; i < nfields; i++) {
54229 keylen = length(key)
54230 if (S_is_set[key]) {
54232 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54233 len += length(value) + length(field[++i])
54244 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54245 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54246 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54249 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54250 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54253 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54254 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54255 # trailing colons and then remove the whole line if VPATH becomes empty
54256 # (actually we leave an empty line to preserve line numbers).
54257 if test "x$srcdir" = x.; then
54258 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
54276 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54277 fi # test -n "$CONFIG_FILES"
54279 # Set up the scripts for CONFIG_HEADERS section.
54280 # No need to generate them if there are no CONFIG_HEADERS.
54281 # This happens for instance with `./config.status Makefile'.
54282 if test -n "$CONFIG_HEADERS"; then
54283 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
54287 # Transform confdefs.h into an awk script `defines.awk', embedded as
54288 # here-document in config.status, that substitutes the proper values into
54289 # config.h.in to produce config.h.
54291 # Create a delimiter string that does not exist in confdefs.h, to ease
54292 # handling of long lines.
54294 for ac_last_try in false false :; do
54295 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
54296 if test -z "$ac_tt"; then
54298 elif $ac_last_try; then
54299 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
54301 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54305 # For the awk script, D is an array of macro values keyed by name,
54306 # likewise P contains macro parameters if any. Preserve backslash
54307 # newline sequences.
54309 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
54311 s/.\{148\}/&'"$ac_delim"'/g
54314 s/^[ ]*#[ ]*define[ ][ ]*/ /
54321 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
54323 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
54327 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
54328 D["\1"]=" \3\\\\\\n"\\/p
54330 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
54335 s/.\{148\}/&'"$ac_delim"'/g
54340 s/["\\]/\\&/g; s/^/"/; s/$/"/p
54343 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
54345 ' <confdefs.h | sed '
54346 s/'"$ac_delim"'/"\\\
54347 "/g' >>$CONFIG_STATUS || ac_write_fail=1
54349 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54350 for (key in D) D_is_set[key] = 1
54353 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
54355 split(line, arg, " ")
54356 if (arg[1] == "#") {
54360 defundef = substr(arg[1], 2)
54363 split(mac1, mac2, "(") #)
54365 prefix = substr(line, 1, index(line, defundef) - 1)
54366 if (D_is_set[macro]) {
54367 # Preserve the white space surrounding the "#".
54368 print prefix "define", macro P[macro] D[macro]
54371 # Replace #undef with comments. This is necessary, for example,
54372 # in the case of _POSIX_SOURCE, which is predefined and required
54373 # on some systems where configure will not decide to define it.
54374 if (defundef == "undef") {
54375 print "/*", prefix defundef, macro, "*/"
54383 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54384 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
54385 fi # test -n "$CONFIG_HEADERS"
54388 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
54393 :[FHLC]) ac_mode=$ac_tag; continue;;
54395 case $ac_mode$ac_tag in
54397 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54398 :[FH]-) ac_tag=-:-;;
54399 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54416 -) ac_f="$ac_tmp/stdin";;
54417 *) # Look for the file first in the build tree, then in the source tree
54418 # (if the path is not absolute). The absolute path cannot be DOS-style,
54419 # because $ac_f cannot contain `:'.
54423 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54425 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54427 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54428 as_fn_append ac_file_inputs " '$ac_f'"
54431 # Let's still pretend it is `configure' which instantiates (i.e., don't
54432 # use $as_me), people would be surprised to read:
54433 # /* config.h. Generated by config.status. */
54434 configure_input='Generated from '`
54435 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54437 if test x"$ac_file" != x-; then
54438 configure_input="$ac_file. $configure_input"
54439 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54440 $as_echo "$as_me: creating $ac_file" >&6;}
54442 # Neutralize special characters interpreted by sed in replacement strings.
54443 case $configure_input in #(
54444 *\&* | *\|* | *\\* )
54445 ac_sed_conf_input=`$as_echo "$configure_input" |
54446 sed 's/[\\\\&|]/\\\\&/g'`;; #(
54447 *) ac_sed_conf_input=$configure_input;;
54451 *:-:* | *:-) cat >"$ac_tmp/stdin" \
54452 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54457 ac_dir=`$as_dirname -- "$ac_file" ||
54458 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54459 X"$ac_file" : 'X\(//\)[^/]' \| \
54460 X"$ac_file" : 'X\(//\)$' \| \
54461 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54462 $as_echo X"$ac_file" |
54463 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54467 /^X\(\/\/\)[^/].*/{
54480 as_dir="$ac_dir"; as_fn_mkdir_p
54484 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54486 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54487 # A ".." for each directory in $ac_dir_suffix.
54488 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54489 case $ac_top_builddir_sub in
54490 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54491 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54494 ac_abs_top_builddir=$ac_pwd
54495 ac_abs_builddir=$ac_pwd$ac_dir_suffix
54496 # for backward compatibility:
54497 ac_top_builddir=$ac_top_build_prefix
54500 .) # We are building in place.
54502 ac_top_srcdir=$ac_top_builddir_sub
54503 ac_abs_top_srcdir=$ac_pwd ;;
54504 [\\/]* | ?:[\\/]* ) # Absolute name.
54505 ac_srcdir=$srcdir$ac_dir_suffix;
54506 ac_top_srcdir=$srcdir
54507 ac_abs_top_srcdir=$srcdir ;;
54508 *) # Relative name.
54509 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54510 ac_top_srcdir=$ac_top_build_prefix$srcdir
54511 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54513 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54523 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
54524 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
54526 ac_MKDIR_P=$MKDIR_P
54528 [\\/$]* | ?:[\\/]* ) ;;
54529 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
54533 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54534 # If the template does not know about datarootdir, expand it.
54535 # FIXME: This hack should be removed a few years after 2.60.
54536 ac_datarootdir_hack=; ac_datarootdir_seen=
54547 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54548 *datarootdir*) ac_datarootdir_seen=yes;;
54549 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54550 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54551 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54553 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54554 ac_datarootdir_hack='
54555 s&@datadir@&$datadir&g
54556 s&@docdir@&$docdir&g
54557 s&@infodir@&$infodir&g
54558 s&@localedir@&$localedir&g
54559 s&@mandir@&$mandir&g
54560 s&\\\${datarootdir}&$datarootdir&g' ;;
54564 # Neutralize VPATH when `$srcdir' = `.'.
54565 # Shell code in configure.ac might set extrasub.
54566 # FIXME: do we really want to maintain this feature?
54567 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54568 ac_sed_extra="$ac_vpsub
54571 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54573 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54574 s|@configure_input@|$ac_sed_conf_input|;t t
54575 s&@top_builddir@&$ac_top_builddir_sub&;t t
54576 s&@top_build_prefix@&$ac_top_build_prefix&;t t
54577 s&@srcdir@&$ac_srcdir&;t t
54578 s&@abs_srcdir@&$ac_abs_srcdir&;t t
54579 s&@top_srcdir@&$ac_top_srcdir&;t t
54580 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54581 s&@builddir@&$ac_builddir&;t t
54582 s&@abs_builddir@&$ac_abs_builddir&;t t
54583 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54584 s&@INSTALL@&$ac_INSTALL&;t t
54585 s&@MKDIR_P@&$ac_MKDIR_P&;t t
54586 $ac_datarootdir_hack
54588 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54589 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54591 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54592 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54593 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
54594 "$ac_tmp/out"`; test -z "$ac_out"; } &&
54595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54596 which seems to be undefined. Please make sure it is defined" >&5
54597 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54598 which seems to be undefined. Please make sure it is defined" >&2;}
54600 rm -f "$ac_tmp/stdin"
54602 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54603 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54605 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54611 if test x"$ac_file" != x-; then
54613 $as_echo "/* $configure_input */" \
54614 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
54615 } >"$ac_tmp/config.h" \
54616 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54617 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
54618 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
54619 $as_echo "$as_me: $ac_file is unchanged" >&6;}
54622 mv "$ac_tmp/config.h" "$ac_file" \
54623 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54626 $as_echo "/* $configure_input */" \
54627 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
54628 || as_fn_error $? "could not create -" "$LINENO" 5
54630 # Compute "$ac_file"'s index in $config_headers.
54633 for _am_header in $config_headers :; do
54634 case $_am_header in
54635 $_am_arg | $_am_arg:* )
54638 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
54641 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
54642 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54643 X"$_am_arg" : 'X\(//\)[^/]' \| \
54644 X"$_am_arg" : 'X\(//\)$' \| \
54645 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
54646 $as_echo X"$_am_arg" |
54647 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54651 /^X\(\/\/\)[^/].*/{
54663 s/.*/./; q'`/stamp-h$_am_stamp_count
54670 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
54673 # Prefer the file from the source tree if names are identical.
54674 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
54675 ac_source=$srcdir/$ac_source
54678 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
54679 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
54681 if test ! -r "$ac_source"; then
54682 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
54686 # Try a relative symlink, then a hard link, then a copy.
54688 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
54689 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
54691 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
54692 ln "$ac_source" "$ac_file" 2>/dev/null ||
54693 cp -p "$ac_source" "$ac_file" ||
54694 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
54697 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
54698 $as_echo "$as_me: executing $ac_file commands" >&6;}
54703 case $ac_file$ac_mode in
54704 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
54705 # Autoconf 2.62 quotes --file arguments for eval, but not when files
54706 # are listed without --file. Let's play safe and only enable the eval
54707 # if we detect the quoting.
54708 case $CONFIG_FILES in
54709 *\'*) eval set x "$CONFIG_FILES" ;;
54710 *) set x $CONFIG_FILES ;;
54715 # Strip MF so we end up with the name of the file.
54716 mf=`echo "$mf" | sed -e 's/:.*$//'`
54717 # Check whether this is an Automake generated Makefile or not.
54718 # We used to match only the files named `Makefile.in', but
54719 # some people rename them; so instead we look at the file content.
54720 # Grep'ing the first line is not enough: some people post-process
54721 # each Makefile.in and add a new line on top of each file to say so.
54722 # Grep'ing the whole file is not good either: AIX grep has a line
54723 # limit of 2048, but all sed's we know have understand at least 4000.
54724 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
54725 dirpart=`$as_dirname -- "$mf" ||
54726 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54727 X"$mf" : 'X\(//\)[^/]' \| \
54728 X"$mf" : 'X\(//\)$' \| \
54729 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
54731 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54735 /^X\(\/\/\)[^/].*/{
54751 # Extract the definition of DEPDIR, am__include, and am__quote
54752 # from the Makefile without running `make'.
54753 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
54754 test -z "$DEPDIR" && continue
54755 am__include=`sed -n 's/^am__include = //p' < "$mf"`
54756 test -z "am__include" && continue
54757 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
54758 # When using ansi2knr, U may be empty or an underscore; expand it
54759 U=`sed -n 's/^U = //p' < "$mf"`
54760 # Find all dependency output files, they are included files with
54761 # $(DEPDIR) in their names. We invoke sed twice because it is the
54762 # simplest approach to changing $(DEPDIR) to its actual value in the
54764 for file in `sed -n "
54765 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
54766 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
54767 # Make sure the directory exists.
54768 test -f "$dirpart/$file" && continue
54769 fdir=`$as_dirname -- "$file" ||
54770 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54771 X"$file" : 'X\(//\)[^/]' \| \
54772 X"$file" : 'X\(//\)$' \| \
54773 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
54774 $as_echo X"$file" |
54775 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54779 /^X\(\/\/\)[^/].*/{
54792 as_dir=$dirpart/$fdir; as_fn_mkdir_p
54793 # echo "creating $dirpart/$file"
54794 echo '# dummy' > "$dirpart/$file"
54799 "po-directories":C)
54800 for ac_file in $CONFIG_FILES; do
54801 # Support "outfile[:infile[:infile...]]"
54803 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
54805 # PO directories have a Makefile.in generated from Makefile.in.in.
54806 case "$ac_file" in */Makefile.in)
54807 # Adjust a relative srcdir.
54808 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
54809 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
54810 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
54811 # In autoconf-2.13 it is called $ac_given_srcdir.
54812 # In autoconf-2.50 it is called $srcdir.
54813 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
54814 case "$ac_given_srcdir" in
54815 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
54816 /*) top_srcdir="$ac_given_srcdir" ;;
54817 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
54819 # Treat a directory as a PO directory if and only if it has a
54820 # POTFILES.in file. This allows packages to have multiple PO
54821 # directories under different names or in different locations.
54822 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
54823 rm -f "$ac_dir/POTFILES"
54824 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
54825 gt_tab=`printf '\t'`
54826 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"
54827 POMAKEFILEDEPS="POTFILES.in"
54828 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
54829 # on $ac_dir but don't depend on user-specified configuration
54831 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
54832 # The LINGUAS file contains the set of available languages.
54833 if test -n "$OBSOLETE_ALL_LINGUAS"; then
54834 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
54836 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
54837 # Hide the ALL_LINGUAS assignment from automake < 1.5.
54838 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
54839 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
54841 # The set of available languages was given in configure.in.
54842 # Hide the ALL_LINGUAS assignment from automake < 1.5.
54843 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
54846 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
54847 # Compute UPDATEPOFILES
54848 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
54849 # Compute DUMMYPOFILES
54850 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
54852 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
54853 case "$ac_given_srcdir" in
54855 *) srcdirpre='$(srcdir)/' ;;
54861 for lang in $ALL_LINGUAS; do
54862 POFILES="$POFILES $srcdirpre$lang.po"
54863 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
54864 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
54865 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
54867 # CATALOGS depends on both $ac_dir and the user's LINGUAS
54868 # environment variable.
54870 if test -n "$ALL_LINGUAS"; then
54871 for presentlang in $ALL_LINGUAS; do
54873 if test "%UNSET%" != "$LINGUAS"; then
54874 desiredlanguages="$LINGUAS"
54876 desiredlanguages="$ALL_LINGUAS"
54878 for desiredlang in $desiredlanguages; do
54879 # Use the presentlang catalog if desiredlang is
54880 # a. equal to presentlang, or
54881 # b. a variant of presentlang (because in this case,
54882 # presentlang can be used as a fallback for messages
54883 # which are not translated in the desiredlang catalog).
54884 case "$desiredlang" in
54885 "$presentlang"*) useit=yes;;
54888 if test $useit = yes; then
54889 INST_LINGUAS="$INST_LINGUAS $presentlang"
54894 if test -n "$INST_LINGUAS"; then
54895 for lang in $INST_LINGUAS; do
54896 CATALOGS="$CATALOGS $lang.gmo"
54899 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
54900 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"
54901 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
54902 if test -f "$f"; then
54904 *.orig | *.bak | *~) ;;
54905 *) cat "$f" >> "$ac_dir/Makefile" ;;
54920 ac_clean_files=$ac_clean_files_save
54922 test $ac_write_fail = 0 ||
54923 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54926 # configure is writing to config.log, and then calls config.status.
54927 # config.status does its own redirection, appending to config.log.
54928 # Unfortunately, on DOS this fails, as config.log is still kept open
54929 # by configure, so config.status won't be able to write to it; its
54930 # output is simply discarded. So we exec the FD to /dev/null,
54931 # effectively closing config.log, so it can be properly (re)opened and
54932 # appended to by config.status. When coming back to configure, we
54933 # need to make the FD available again.
54934 if test "$no_create" != yes; then
54936 ac_config_status_args=
54937 test "$silent" = yes &&
54938 ac_config_status_args="$ac_config_status_args --quiet"
54940 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54942 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54943 # would make configure fail if this is the last instruction.
54944 $ac_cs_success || as_fn_exit 1
54946 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54948 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}