2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU tar 1.28.
5 # Report bugs to <bug-tar@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 bug-tar@gnu.org
270 $0: about your system, including any error possibly output
271 $0: before this message. Then install a modern shell, or
272 $0: manually run the script under such a shell if you do
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 tar'
582 PACKAGE_TARNAME='tar'
583 PACKAGE_VERSION='1.28'
584 PACKAGE_STRING='GNU tar 1.28'
585 PACKAGE_BUGREPORT='bug-tar@gnu.org'
586 PACKAGE_URL='http://www.gnu.org/software/tar/'
588 ac_unique_file="src/tar.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>
627 gl_fnmatch_required=POSIX
628 gl_getopt_required=POSIX
629 gl_getopt_required=POSIX
631 ac_subst_vars='gltests_LTLIBOBJS
640 BACKUP_LIBEXEC_SCRIPTS
645 XGETTEXT_EXTRA_OPTIONS
653 GETTEXT_MACRO_VERSION
658 DEFAULT_QUOTING_STYLE
661 DEFAULT_ARCHIVE_FORMAT
664 TAR_COND_GRANTPT_FALSE
665 TAR_COND_GRANTPT_TRUE
668 TAR_COND_XATTR_H_FALSE
669 TAR_COND_XATTR_H_TRUE
670 GNULIB_TEST_WARN_CFLAGS
683 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
686 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
687 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
688 LIBUNISTRING_UNIWIDTH_H
689 LIBUNISTRING_UNITYPES_H
691 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
693 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
694 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
695 TIME_H_DEFINES_STRUCT_TIMESPEC
696 NEXT_AS_FIRST_DIRECTIVE_TIME_H
698 GL_GENERATE_SYSEXITS_H_FALSE
699 GL_GENERATE_SYSEXITS_H_TRUE
702 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
705 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
707 NEXT_AS_FIRST_DIRECTIVE_STRING_H
709 HAVE_DECL_STRNCASECMP
713 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
715 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
717 GL_GENERATE_STDARG_H_FALSE
718 GL_GENERATE_STDARG_H_TRUE
720 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
722 GL_GENERATE_STDALIGN_H_FALSE
723 GL_GENERATE_STDALIGN_H_TRUE
725 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
727 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
728 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
730 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
731 NEXT_SELINUX_SELINUX_H
734 REPLACE_PTHREAD_SIGMASK
736 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
737 HAVE_STRUCT_SIGACTION_SA_SIGACTION
743 HAVE_POSIX_SIGNALBLOCKING
746 GNULIB_SIGNAL_H_SIGPIPE
748 GNULIB_PTHREAD_SIGMASK
752 GL_GENERATE_STDBOOL_H_FALSE
753 GL_GENERATE_STDBOOL_H_TRUE
764 HAVE_DECL_LOCALTIME_R
846 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
849 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
851 GL_GENERATE_STDDEF_H_FALSE
852 GL_GENERATE_STDDEF_H_TRUE
864 LOCALCHARSET_TESTS_ENVIRONMENT
866 HAVE_LANGINFO_YESEXPR
868 HAVE_LANGINFO_T_FMT_AMPM
869 HAVE_LANGINFO_CODESET
871 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
879 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
892 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
894 UINT64_MAX_EQ_ULONG_MAX
895 UINT32_MAX_LT_UINTMAX_MAX
898 INT64_MAX_EQ_LONG_MAX
899 INT32_MAX_LT_INTMAX_MAX
910 GL_GENERATE_STDINT_H_FALSE
911 GL_GENERATE_STDINT_H_TRUE
920 HAVE_SIGNED_SIG_ATOMIC_T
923 BITSIZEOF_SIG_ATOMIC_T
926 APPLE_UNIVERSAL_BUILD
930 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
935 HAVE_UNSIGNED_LONG_LONG_INT
937 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
939 REPLACE_STRUCT_TIMEVAL
947 GNULIB_GL_UNISTD_H_GETOPT
950 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
952 WINDOWS_64_BIT_ST_SIZE
953 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
956 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
965 REPLACE_STDIO_WRITE_FUNCS
966 REPLACE_STDIO_READ_FUNCS
975 REPLACE_OBSTACK_PRINTF
1000 HAVE_DECL_OBSTACK_PRINTF
1006 GNULIB_VSPRINTF_POSIX
1008 GNULIB_VPRINTF_POSIX
1010 GNULIB_VFPRINTF_POSIX
1017 GNULIB_STDIO_H_SIGPIPE
1018 GNULIB_STDIO_H_NONBLOCKING
1019 GNULIB_SPRINTF_POSIX
1033 GNULIB_OBSTACK_PRINTF_POSIX
1034 GNULIB_OBSTACK_PRINTF
1050 GNULIB_FPRINTF_POSIX
1059 GL_GENERATE_FNMATCH_H_FALSE
1060 GL_GENERATE_FNMATCH_H_TRUE
1063 GL_GENERATE_FLOAT_H_FALSE
1064 GL_GENERATE_FLOAT_H_TRUE
1066 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1068 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1119 GL_GENERATE_ERRNO_H_FALSE
1120 GL_GENERATE_ERRNO_H_TRUE
1122 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1125 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1128 PRAGMA_SYSTEM_HEADER
1129 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1156 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1158 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1159 UNISTD_H_HAVE_WINSOCK2_H
1180 REPLACE_GETDTABLESIZE
1181 REPLACE_GETDOMAINNAME
1192 HAVE_DECL_SETHOSTNAME
1193 HAVE_DECL_GETUSERSHELL
1194 HAVE_DECL_GETPAGESIZE
1195 HAVE_DECL_GETLOGIN_R
1196 HAVE_DECL_GETDOMAINNAME
1235 GNULIB_UNISTD_H_SIGPIPE
1236 GNULIB_UNISTD_H_NONBLOCKING
1262 GNULIB_GETDTABLESIZE
1263 GNULIB_GETDOMAINNAME
1292 REPLACE_CANONICALIZE_FILE_NAME
1297 HAVE_STRUCT_RANDOM_DATA
1319 HAVE_DECL_GETLOADAVG
1320 HAVE_CANONICALIZE_FILE_NAME
1331 GNULIB_SECURE_GETENV
1334 GNULIB_REALLOC_POSIX
1351 GNULIB_CANONICALIZE_FILE_NAME
1455 GL_GENERATE_ALLOCA_H_FALSE
1456 GL_GENERATE_ALLOCA_H_TRUE
1459 GL_COND_LIBTOOL_FALSE
1460 GL_COND_LIBTOOL_TRUE
1488 AM_DEFAULT_VERBOSITY
1499 INSTALL_STRIP_PROGRAM
1541 program_transform_name
1554 enable_option_checking
1556 enable_dependency_tracking
1563 with_packager_version
1564 with_packager_bug_reports
1577 with_libiconv_prefix
1580 enable_backup_scripts
1582 ac_precious_vars='build_alias
1595 DEFAULT_ARCHIVE_FORMAT
1598 DEFAULT_QUOTING_STYLE'
1601 # Initialize some variables set by options.
1603 ac_init_version=false
1604 ac_unrecognized_opts=
1605 ac_unrecognized_sep=
1606 # The variables have the same names as the options, with
1607 # dashes changed to underlines.
1608 cache_file=/dev/null
1615 program_transform_name=s,x,x,
1623 # Installation directory options.
1624 # These are left unexpanded so users can "make install exec_prefix=/foo"
1625 # and all the variables that are supposed to be based on exec_prefix
1626 # by default will actually change.
1627 # Use braces instead of parens because sh, perl, etc. also accept them.
1628 # (The list follows the same order as the GNU Coding Standards.)
1629 bindir='${exec_prefix}/bin'
1630 sbindir='${exec_prefix}/sbin'
1631 libexecdir='${exec_prefix}/libexec'
1632 datarootdir='${prefix}/share'
1633 datadir='${datarootdir}'
1634 sysconfdir='${prefix}/etc'
1635 sharedstatedir='${prefix}/com'
1636 localstatedir='${prefix}/var'
1637 includedir='${prefix}/include'
1638 oldincludedir='/usr/include'
1639 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1640 infodir='${datarootdir}/info'
1645 libdir='${exec_prefix}/lib'
1646 localedir='${datarootdir}/locale'
1647 mandir='${datarootdir}/man'
1653 # If the previous option needs an argument, assign it.
1654 if test -n "$ac_prev"; then
1655 eval $ac_prev=\$ac_option
1661 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1666 # Accept the important Cygnus configure options, so we can diagnose typos.
1668 case $ac_dashdash$ac_option in
1672 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1674 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1675 bindir=$ac_optarg ;;
1677 -build | --build | --buil | --bui | --bu)
1678 ac_prev=build_alias ;;
1679 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1680 build_alias=$ac_optarg ;;
1682 -cache-file | --cache-file | --cache-fil | --cache-fi \
1683 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1684 ac_prev=cache_file ;;
1685 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1686 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1687 cache_file=$ac_optarg ;;
1689 --config-cache | -C)
1690 cache_file=config.cache ;;
1692 -datadir | --datadir | --datadi | --datad)
1694 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1695 datadir=$ac_optarg ;;
1697 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1698 | --dataroo | --dataro | --datar)
1699 ac_prev=datarootdir ;;
1700 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1701 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1702 datarootdir=$ac_optarg ;;
1704 -disable-* | --disable-*)
1705 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1706 # Reject names that are not valid shell variable names.
1707 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1708 as_fn_error $? "invalid feature name: $ac_useropt"
1709 ac_useropt_orig=$ac_useropt
1710 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1711 case $ac_user_opts in
1713 "enable_$ac_useropt"
1715 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1716 ac_unrecognized_sep=', ';;
1718 eval enable_$ac_useropt=no ;;
1720 -docdir | --docdir | --docdi | --doc | --do)
1722 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1723 docdir=$ac_optarg ;;
1725 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1727 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1728 dvidir=$ac_optarg ;;
1730 -enable-* | --enable-*)
1731 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1732 # Reject names that are not valid shell variable names.
1733 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1734 as_fn_error $? "invalid feature name: $ac_useropt"
1735 ac_useropt_orig=$ac_useropt
1736 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1737 case $ac_user_opts in
1739 "enable_$ac_useropt"
1741 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1742 ac_unrecognized_sep=', ';;
1744 eval enable_$ac_useropt=\$ac_optarg ;;
1746 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1747 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1748 | --exec | --exe | --ex)
1749 ac_prev=exec_prefix ;;
1750 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1751 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1752 | --exec=* | --exe=* | --ex=*)
1753 exec_prefix=$ac_optarg ;;
1755 -gas | --gas | --ga | --g)
1756 # Obsolete; use --with-gas.
1759 -help | --help | --hel | --he | -h)
1760 ac_init_help=long ;;
1761 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1762 ac_init_help=recursive ;;
1763 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1764 ac_init_help=short ;;
1766 -host | --host | --hos | --ho)
1767 ac_prev=host_alias ;;
1768 -host=* | --host=* | --hos=* | --ho=*)
1769 host_alias=$ac_optarg ;;
1771 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1773 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1775 htmldir=$ac_optarg ;;
1777 -includedir | --includedir | --includedi | --included | --include \
1778 | --includ | --inclu | --incl | --inc)
1779 ac_prev=includedir ;;
1780 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1781 | --includ=* | --inclu=* | --incl=* | --inc=*)
1782 includedir=$ac_optarg ;;
1784 -infodir | --infodir | --infodi | --infod | --info | --inf)
1786 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1787 infodir=$ac_optarg ;;
1789 -libdir | --libdir | --libdi | --libd)
1791 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1792 libdir=$ac_optarg ;;
1794 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1795 | --libexe | --libex | --libe)
1796 ac_prev=libexecdir ;;
1797 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1798 | --libexe=* | --libex=* | --libe=*)
1799 libexecdir=$ac_optarg ;;
1801 -localedir | --localedir | --localedi | --localed | --locale)
1802 ac_prev=localedir ;;
1803 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1804 localedir=$ac_optarg ;;
1806 -localstatedir | --localstatedir | --localstatedi | --localstated \
1807 | --localstate | --localstat | --localsta | --localst | --locals)
1808 ac_prev=localstatedir ;;
1809 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1810 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1811 localstatedir=$ac_optarg ;;
1813 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1815 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1816 mandir=$ac_optarg ;;
1818 -nfp | --nfp | --nf)
1819 # Obsolete; use --without-fp.
1822 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1823 | --no-cr | --no-c | -n)
1826 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1827 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1830 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1831 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1832 | --oldin | --oldi | --old | --ol | --o)
1833 ac_prev=oldincludedir ;;
1834 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1835 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1836 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1837 oldincludedir=$ac_optarg ;;
1839 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1841 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1842 prefix=$ac_optarg ;;
1844 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1845 | --program-pre | --program-pr | --program-p)
1846 ac_prev=program_prefix ;;
1847 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1848 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1849 program_prefix=$ac_optarg ;;
1851 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1852 | --program-suf | --program-su | --program-s)
1853 ac_prev=program_suffix ;;
1854 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1855 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1856 program_suffix=$ac_optarg ;;
1858 -program-transform-name | --program-transform-name \
1859 | --program-transform-nam | --program-transform-na \
1860 | --program-transform-n | --program-transform- \
1861 | --program-transform | --program-transfor \
1862 | --program-transfo | --program-transf \
1863 | --program-trans | --program-tran \
1864 | --progr-tra | --program-tr | --program-t)
1865 ac_prev=program_transform_name ;;
1866 -program-transform-name=* | --program-transform-name=* \
1867 | --program-transform-nam=* | --program-transform-na=* \
1868 | --program-transform-n=* | --program-transform-=* \
1869 | --program-transform=* | --program-transfor=* \
1870 | --program-transfo=* | --program-transf=* \
1871 | --program-trans=* | --program-tran=* \
1872 | --progr-tra=* | --program-tr=* | --program-t=*)
1873 program_transform_name=$ac_optarg ;;
1875 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1877 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1878 pdfdir=$ac_optarg ;;
1880 -psdir | --psdir | --psdi | --psd | --ps)
1882 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1885 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1886 | -silent | --silent | --silen | --sile | --sil)
1889 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1891 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1893 sbindir=$ac_optarg ;;
1895 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1896 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1897 | --sharedst | --shareds | --shared | --share | --shar \
1899 ac_prev=sharedstatedir ;;
1900 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1901 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1902 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1904 sharedstatedir=$ac_optarg ;;
1906 -site | --site | --sit)
1908 -site=* | --site=* | --sit=*)
1911 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1913 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1914 srcdir=$ac_optarg ;;
1916 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1917 | --syscon | --sysco | --sysc | --sys | --sy)
1918 ac_prev=sysconfdir ;;
1919 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1920 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1921 sysconfdir=$ac_optarg ;;
1923 -target | --target | --targe | --targ | --tar | --ta | --t)
1924 ac_prev=target_alias ;;
1925 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1926 target_alias=$ac_optarg ;;
1928 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1931 -version | --version | --versio | --versi | --vers | -V)
1932 ac_init_version=: ;;
1935 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1936 # Reject names that are not valid shell variable names.
1937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1938 as_fn_error $? "invalid package name: $ac_useropt"
1939 ac_useropt_orig=$ac_useropt
1940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1941 case $ac_user_opts in
1945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1946 ac_unrecognized_sep=', ';;
1948 eval with_$ac_useropt=\$ac_optarg ;;
1950 -without-* | --without-*)
1951 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1952 # Reject names that are not valid shell variable names.
1953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1954 as_fn_error $? "invalid package name: $ac_useropt"
1955 ac_useropt_orig=$ac_useropt
1956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1957 case $ac_user_opts in
1961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1962 ac_unrecognized_sep=', ';;
1964 eval with_$ac_useropt=no ;;
1967 # Obsolete; use --with-x.
1970 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1971 | --x-incl | --x-inc | --x-in | --x-i)
1972 ac_prev=x_includes ;;
1973 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1974 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1975 x_includes=$ac_optarg ;;
1977 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1978 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1979 ac_prev=x_libraries ;;
1980 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1981 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1982 x_libraries=$ac_optarg ;;
1984 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1985 Try \`$0 --help' for more information"
1989 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1990 # Reject names that are not valid shell variable names.
1991 case $ac_envvar in #(
1992 '' | [0-9]* | *[!_$as_cr_alnum]* )
1993 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1995 eval $ac_envvar=\$ac_optarg
1996 export $ac_envvar ;;
1999 # FIXME: should be removed in autoconf 3.0.
2000 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2001 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
2002 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2003 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2009 if test -n "$ac_prev"; then
2010 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
2011 as_fn_error $? "missing argument to $ac_option"
2014 if test -n "$ac_unrecognized_opts"; then
2015 case $enable_option_checking in
2017 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2018 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2022 # Check all directory arguments for consistency.
2023 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2024 datadir sysconfdir sharedstatedir localstatedir includedir \
2025 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2026 libdir localedir mandir
2028 eval ac_val=\$$ac_var
2029 # Remove trailing slashes.
2032 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2033 eval $ac_var=\$ac_val;;
2035 # Be sure to have absolute directory names.
2037 [\\/$]* | ?:[\\/]* ) continue;;
2038 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2040 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2043 # There might be people who depend on the old broken behavior: `$host'
2044 # used to hold the argument of --host etc.
2045 # FIXME: To remove some day.
2048 target=$target_alias
2050 # FIXME: To remove some day.
2051 if test "x$host_alias" != x; then
2052 if test "x$build_alias" = x; then
2053 cross_compiling=maybe
2054 elif test "x$build_alias" != "x$host_alias"; then
2060 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2062 test "$silent" = yes && exec 6>/dev/null
2065 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2066 ac_ls_di=`ls -di .` &&
2067 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2068 as_fn_error $? "working directory cannot be determined"
2069 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2070 as_fn_error $? "pwd does not report name of working directory"
2073 # Find the source files, if location was not specified.
2074 if test -z "$srcdir"; then
2075 ac_srcdir_defaulted=yes
2076 # Try the directory containing this script, then the parent directory.
2077 ac_confdir=`$as_dirname -- "$as_myself" ||
2078 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2079 X"$as_myself" : 'X\(//\)[^/]' \| \
2080 X"$as_myself" : 'X\(//\)$' \| \
2081 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2082 $as_echo X"$as_myself" |
2083 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2101 if test ! -r "$srcdir/$ac_unique_file"; then
2105 ac_srcdir_defaulted=no
2107 if test ! -r "$srcdir/$ac_unique_file"; then
2108 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2109 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2111 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2113 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2115 # When building in place, set srcdir=.
2116 if test "$ac_abs_confdir" = "$ac_pwd"; then
2119 # Remove unnecessary trailing slashes from srcdir.
2120 # Double slashes in file names in object file debugging info
2121 # mess up M-x gdb in Emacs.
2123 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2125 for ac_var in $ac_precious_vars; do
2126 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2127 eval ac_env_${ac_var}_value=\$${ac_var}
2128 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2129 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2133 # Report the --help message.
2135 if test "$ac_init_help" = "long"; then
2136 # Omit some internal or obsolete options to make the list less imposing.
2137 # This message is too long to be a string in the A/UX 3.1 sh.
2139 \`configure' configures GNU tar 1.28 to adapt to many kinds of systems.
2141 Usage: $0 [OPTION]... [VAR=VALUE]...
2143 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2144 VAR=VALUE. See below for descriptions of some of the useful variables.
2146 Defaults for the options are specified in brackets.
2149 -h, --help display this help and exit
2150 --help=short display options specific to this package
2151 --help=recursive display the short help of all the included packages
2152 -V, --version display version information and exit
2153 -q, --quiet, --silent do not print \`checking ...' messages
2154 --cache-file=FILE cache test results in FILE [disabled]
2155 -C, --config-cache alias for \`--cache-file=config.cache'
2156 -n, --no-create do not create output files
2157 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2159 Installation directories:
2160 --prefix=PREFIX install architecture-independent files in PREFIX
2161 [$ac_default_prefix]
2162 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2165 By default, \`make install' will install all the files in
2166 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2167 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2168 for instance \`--prefix=\$HOME'.
2170 For better control, use the options below.
2172 Fine tuning of the installation directories:
2173 --bindir=DIR user executables [EPREFIX/bin]
2174 --sbindir=DIR system admin executables [EPREFIX/sbin]
2175 --libexecdir=DIR program executables [EPREFIX/libexec]
2176 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2177 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2178 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2179 --libdir=DIR object code libraries [EPREFIX/lib]
2180 --includedir=DIR C header files [PREFIX/include]
2181 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2182 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2183 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2184 --infodir=DIR info documentation [DATAROOTDIR/info]
2185 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2186 --mandir=DIR man documentation [DATAROOTDIR/man]
2187 --docdir=DIR documentation root [DATAROOTDIR/doc/tar]
2188 --htmldir=DIR html documentation [DOCDIR]
2189 --dvidir=DIR dvi documentation [DOCDIR]
2190 --pdfdir=DIR pdf documentation [DOCDIR]
2191 --psdir=DIR ps documentation [DOCDIR]
2197 --program-prefix=PREFIX prepend PREFIX to installed program names
2198 --program-suffix=SUFFIX append SUFFIX to installed program names
2199 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2202 --build=BUILD configure for building on BUILD [guessed]
2203 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2207 if test -n "$ac_init_help"; then
2208 case $ac_init_help in
2209 short | recursive ) echo "Configuration of GNU tar 1.28:";;
2214 --disable-option-checking ignore unrecognized --enable/--with options
2215 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2216 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2217 --enable-silent-rules less verbose build output (undo: "make V=1")
2218 --disable-silent-rules verbose build output (undo: "make V=0")
2219 --enable-dependency-tracking
2220 do not reject slow dependency extractors
2221 --disable-dependency-tracking
2222 speeds up one-time build
2223 --disable-largefile omit support for large files
2224 --disable-acl do not support ACLs
2225 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2227 --disable-rpath do not hardcode runtime library paths
2228 --disable-nls do not use Native Language Support
2229 --enable-backup-scripts Create and install backup and restore scripts
2232 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2233 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2234 --without-posix-acls do not use POSIX.1e access control lists
2235 --without-included-regex
2236 don't compile regex; this is the default on systems
2237 with recent-enough versions of the GNU C Library
2238 (use with caution on other systems).
2239 --without-selinux do not use SELinux, even on systems with SELinux
2240 --with-packager String identifying the packager of this software
2241 --with-packager-version Packager-specific version information
2242 --with-packager-bug-reports
2243 Packager info for bug reports (URL/e-mail/...)
2244 --with-rmt=FILE Use FILE as the default `rmt' program. Do not build
2245 included copy of `rmt'.
2246 --without-xattrs don't use linux extended attributes
2247 --with-compress=PROG use PROG as compress compressor program
2248 --with-gzip=PROG use PROG as gzip compressor program
2249 --with-bzip2=PROG use PROG as bzip2 compressor program
2250 --with-lzip=PROG use PROG as lzip compressor program
2251 --with-lzma=PROG use PROG as lzma compressor program
2252 --with-lzop=PROG use PROG as lzop compressor program
2253 --with-xz=PROG use PROG as xz compressor program
2254 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2255 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2256 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2257 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2258 --without-libintl-prefix don't search for libintl in includedir and libdir
2260 Some influential environment variables:
2261 CC C compiler command
2262 CFLAGS C compiler flags
2263 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2264 nonstandard directory <lib dir>
2265 LIBS libraries to pass to the linker, e.g. -l<library>
2266 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2267 you have headers in a nonstandard directory <include dir>
2268 YACC The `Yet Another Compiler Compiler' implementation to use.
2269 Defaults to the first program found out of: `bison -y', `byacc',
2271 YFLAGS The list of arguments that will be passed by default to $YACC.
2272 This script will default YFLAGS to the empty string to avoid a
2273 default value of `-d' given by some make applications.
2276 Define full file name of the directory where to install `rmt'.
2277 (default: $(libexecdir))
2278 RSH Configure absolute path to default remote shell binary
2279 DEFAULT_ARCHIVE_FORMAT
2280 Set the default archive format. Allowed values are: V7, OLDGNU,
2281 USTAR, POSIX, GNU. Default is GNU
2283 Set the name of the default archive (default: -)
2285 Define default blocking factor (default: 20)
2286 DEFAULT_QUOTING_STYLE
2287 Set the default quoting style. Allowed values are: literal,
2288 shell, shell-always, c, escape, locale, clocale . Default is
2291 Use these variables to override the choices made by `configure' or to help
2292 it to find libraries and programs with nonstandard names/locations.
2294 Report bugs to <bug-tar@gnu.org>.
2295 GNU tar home page: <http://www.gnu.org/software/tar/>.
2296 General help using GNU software: <http://www.gnu.org/gethelp/>.
2301 if test "$ac_init_help" = "recursive"; then
2302 # If there are subdirs, report their specific --help.
2303 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2304 test -d "$ac_dir" ||
2305 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2310 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2312 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2313 # A ".." for each directory in $ac_dir_suffix.
2314 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2315 case $ac_top_builddir_sub in
2316 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2317 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2320 ac_abs_top_builddir=$ac_pwd
2321 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2322 # for backward compatibility:
2323 ac_top_builddir=$ac_top_build_prefix
2326 .) # We are building in place.
2328 ac_top_srcdir=$ac_top_builddir_sub
2329 ac_abs_top_srcdir=$ac_pwd ;;
2330 [\\/]* | ?:[\\/]* ) # Absolute name.
2331 ac_srcdir=$srcdir$ac_dir_suffix;
2332 ac_top_srcdir=$srcdir
2333 ac_abs_top_srcdir=$srcdir ;;
2335 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2336 ac_top_srcdir=$ac_top_build_prefix$srcdir
2337 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2339 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2341 cd "$ac_dir" || { ac_status=$?; continue; }
2342 # Check for guested configure.
2343 if test -f "$ac_srcdir/configure.gnu"; then
2345 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2346 elif test -f "$ac_srcdir/configure"; then
2348 $SHELL "$ac_srcdir/configure" --help=recursive
2350 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2352 cd "$ac_pwd" || { ac_status=$?; break; }
2356 test -n "$ac_init_help" && exit $ac_status
2357 if $ac_init_version; then
2359 GNU tar configure 1.28
2360 generated by GNU Autoconf 2.69
2362 Copyright (C) 2012 Free Software Foundation, Inc.
2363 This configure script is free software; the Free Software Foundation
2364 gives unlimited permission to copy, distribute and modify it.
2369 ## ------------------------ ##
2370 ## Autoconf initialization. ##
2371 ## ------------------------ ##
2373 # ac_fn_c_try_compile LINENO
2374 # --------------------------
2375 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2376 ac_fn_c_try_compile ()
2378 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379 rm -f conftest.$ac_objext
2380 if { { ac_try="$ac_compile"
2382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383 *) ac_try_echo=$ac_try;;
2385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386 $as_echo "$ac_try_echo"; } >&5
2387 (eval "$ac_compile") 2>conftest.err
2389 if test -s conftest.err; then
2390 grep -v '^ *+' conftest.err >conftest.er1
2391 cat conftest.er1 >&5
2392 mv -f conftest.er1 conftest.err
2394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395 test $ac_status = 0; } && {
2396 test -z "$ac_c_werror_flag" ||
2397 test ! -s conftest.err
2398 } && test -s conftest.$ac_objext; then :
2401 $as_echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2406 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2407 as_fn_set_status $ac_retval
2409 } # ac_fn_c_try_compile
2411 # ac_fn_c_try_cpp LINENO
2412 # ----------------------
2413 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2416 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2417 if { { ac_try="$ac_cpp conftest.$ac_ext"
2419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2420 *) ac_try_echo=$ac_try;;
2422 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2423 $as_echo "$ac_try_echo"; } >&5
2424 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2426 if test -s conftest.err; then
2427 grep -v '^ *+' conftest.err >conftest.er1
2428 cat conftest.er1 >&5
2429 mv -f conftest.er1 conftest.err
2431 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2432 test $ac_status = 0; } > conftest.i && {
2433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2434 test ! -s conftest.err
2438 $as_echo "$as_me: failed program was:" >&5
2439 sed 's/^/| /' conftest.$ac_ext >&5
2443 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2444 as_fn_set_status $ac_retval
2448 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2449 # -------------------------------------------------------
2450 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2451 # the include files in INCLUDES and setting the cache variable VAR
2453 ac_fn_c_check_header_mongrel ()
2455 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456 if eval \${$3+:} false; then :
2457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2458 $as_echo_n "checking for $2... " >&6; }
2459 if eval \${$3+:} false; then :
2460 $as_echo_n "(cached) " >&6
2463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2464 $as_echo "$ac_res" >&6; }
2466 # Is the header compilable?
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2468 $as_echo_n "checking $2 usability... " >&6; }
2469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2470 /* end confdefs.h. */
2474 if ac_fn_c_try_compile "$LINENO"; then :
2475 ac_header_compiler=yes
2477 ac_header_compiler=no
2479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2481 $as_echo "$ac_header_compiler" >&6; }
2483 # Is the header present?
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2485 $as_echo_n "checking $2 presence... " >&6; }
2486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2487 /* end confdefs.h. */
2490 if ac_fn_c_try_cpp "$LINENO"; then :
2491 ac_header_preproc=yes
2493 ac_header_preproc=no
2495 rm -f conftest.err conftest.i conftest.$ac_ext
2496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2497 $as_echo "$ac_header_preproc" >&6; }
2499 # So? What about this header?
2500 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2503 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2505 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2508 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2509 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2511 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2513 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2515 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2517 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2518 ( $as_echo "## ------------------------------ ##
2519 ## Report this to bug-tar@gnu.org ##
2520 ## ------------------------------ ##"
2521 ) | sed "s/^/$as_me: WARNING: /" >&2
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2525 $as_echo_n "checking for $2... " >&6; }
2526 if eval \${$3+:} false; then :
2527 $as_echo_n "(cached) " >&6
2529 eval "$3=\$ac_header_compiler"
2532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533 $as_echo "$ac_res" >&6; }
2535 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537 } # ac_fn_c_check_header_mongrel
2539 # ac_fn_c_try_run LINENO
2540 # ----------------------
2541 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2542 # that executables *can* be run.
2545 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2546 if { { ac_try="$ac_link"
2548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549 *) ac_try_echo=$ac_try;;
2551 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2552 $as_echo "$ac_try_echo"; } >&5
2553 (eval "$ac_link") 2>&5
2555 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2556 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2557 { { case "(($ac_try" in
2558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559 *) ac_try_echo=$ac_try;;
2561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562 $as_echo "$ac_try_echo"; } >&5
2563 (eval "$ac_try") 2>&5
2565 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2566 test $ac_status = 0; }; }; then :
2569 $as_echo "$as_me: program exited with status $ac_status" >&5
2570 $as_echo "$as_me: failed program was:" >&5
2571 sed 's/^/| /' conftest.$ac_ext >&5
2573 ac_retval=$ac_status
2575 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2576 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2577 as_fn_set_status $ac_retval
2581 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2582 # -------------------------------------------------------
2583 # Tests whether HEADER exists and can be compiled using the include files in
2584 # INCLUDES, setting the cache variable VAR accordingly.
2585 ac_fn_c_check_header_compile ()
2587 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2589 $as_echo_n "checking for $2... " >&6; }
2590 if eval \${$3+:} false; then :
2591 $as_echo_n "(cached) " >&6
2593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594 /* end confdefs.h. */
2598 if ac_fn_c_try_compile "$LINENO"; then :
2603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2607 $as_echo "$ac_res" >&6; }
2608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2610 } # ac_fn_c_check_header_compile
2612 # ac_fn_c_try_link LINENO
2613 # -----------------------
2614 # Try to link conftest.$ac_ext, and return whether this succeeded.
2617 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618 rm -f conftest.$ac_objext conftest$ac_exeext
2619 if { { ac_try="$ac_link"
2621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2622 *) ac_try_echo=$ac_try;;
2624 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2625 $as_echo "$ac_try_echo"; } >&5
2626 (eval "$ac_link") 2>conftest.err
2628 if test -s conftest.err; then
2629 grep -v '^ *+' conftest.err >conftest.er1
2630 cat conftest.er1 >&5
2631 mv -f conftest.er1 conftest.err
2633 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2634 test $ac_status = 0; } && {
2635 test -z "$ac_c_werror_flag" ||
2636 test ! -s conftest.err
2637 } && test -s conftest$ac_exeext && {
2638 test "$cross_compiling" = yes ||
2639 test -x conftest$ac_exeext
2643 $as_echo "$as_me: failed program was:" >&5
2644 sed 's/^/| /' conftest.$ac_ext >&5
2648 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2649 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2650 # interfere with the next link command; also delete a directory that is
2651 # left behind by Apple's compiler. We do this before executing the actions.
2652 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2653 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2654 as_fn_set_status $ac_retval
2656 } # ac_fn_c_try_link
2658 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2659 # -------------------------------------------
2660 # Tests whether TYPE exists after having included INCLUDES, setting cache
2661 # variable VAR accordingly.
2662 ac_fn_c_check_type ()
2664 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666 $as_echo_n "checking for $2... " >&6; }
2667 if eval \${$3+:} false; then :
2668 $as_echo_n "(cached) " >&6
2671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2672 /* end confdefs.h. */
2683 if ac_fn_c_try_compile "$LINENO"; then :
2684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2685 /* end confdefs.h. */
2696 if ac_fn_c_try_compile "$LINENO"; then :
2701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2707 $as_echo "$ac_res" >&6; }
2708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2710 } # ac_fn_c_check_type
2712 # ac_fn_c_check_func LINENO FUNC VAR
2713 # ----------------------------------
2714 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2715 ac_fn_c_check_func ()
2717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2719 $as_echo_n "checking for $2... " >&6; }
2720 if eval \${$3+:} false; then :
2721 $as_echo_n "(cached) " >&6
2723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2724 /* end confdefs.h. */
2725 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2726 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2727 #define $2 innocuous_$2
2729 /* System header to define __stub macros and hopefully few prototypes,
2730 which can conflict with char $2 (); below.
2731 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2732 <limits.h> exists even on freestanding compilers. */
2735 # include <limits.h>
2737 # include <assert.h>
2742 /* Override any GCC internal prototype to avoid an error.
2743 Use char because int might match the return type of a GCC
2744 builtin and then its argument prototype would still apply. */
2749 /* The GNU C library defines this for functions which it implements
2750 to always fail with ENOSYS. Some functions are actually named
2751 something starting with __ and the normal name is an alias. */
2752 #if defined __stub_$2 || defined __stub___$2
2764 if ac_fn_c_try_link "$LINENO"; then :
2769 rm -f core conftest.err conftest.$ac_objext \
2770 conftest$ac_exeext conftest.$ac_ext
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2774 $as_echo "$ac_res" >&6; }
2775 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2777 } # ac_fn_c_check_func
2779 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2780 # ---------------------------------------------
2781 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2783 ac_fn_c_check_decl ()
2785 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2786 as_decl_name=`echo $2|sed 's/ *(.*//'`
2787 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2789 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2790 if eval \${$3+:} false; then :
2791 $as_echo_n "(cached) " >&6
2793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794 /* end confdefs.h. */
2799 #ifndef $as_decl_name
2801 (void) $as_decl_use;
2803 (void) $as_decl_name;
2811 if ac_fn_c_try_compile "$LINENO"; then :
2816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2820 $as_echo "$ac_res" >&6; }
2821 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2823 } # ac_fn_c_check_decl
2825 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2826 # --------------------------------------------
2827 # Tries to find the compile-time value of EXPR in a program that includes
2828 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2830 ac_fn_c_compute_int ()
2832 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2833 if test "$cross_compiling" = yes; then
2834 # Depending upon the size, compute the lo and hi bounds.
2835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2836 /* end confdefs.h. */
2841 static int test_array [1 - 2 * !(($2) >= 0)];
2843 return test_array [0];
2849 if ac_fn_c_try_compile "$LINENO"; then :
2852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853 /* end confdefs.h. */
2858 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860 return test_array [0];
2866 if ac_fn_c_try_compile "$LINENO"; then :
2867 ac_hi=$ac_mid; break
2869 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2870 if test $ac_lo -le $ac_mid; then
2874 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880 /* end confdefs.h. */
2885 static int test_array [1 - 2 * !(($2) < 0)];
2887 return test_array [0];
2893 if ac_fn_c_try_compile "$LINENO"; then :
2896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897 /* end confdefs.h. */
2902 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2904 return test_array [0];
2910 if ac_fn_c_try_compile "$LINENO"; then :
2911 ac_lo=$ac_mid; break
2913 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2914 if test $ac_mid -le $ac_hi; then
2918 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2928 # Binary search between lo and hi bounds.
2929 while test "x$ac_lo" != "x$ac_hi"; do
2930 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2932 /* end confdefs.h. */
2937 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2939 return test_array [0];
2945 if ac_fn_c_try_compile "$LINENO"; then :
2948 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2953 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2958 /* end confdefs.h. */
2960 static long int longval () { return $2; }
2961 static unsigned long int ulongval () { return $2; }
2968 FILE *f = fopen ("conftest.val", "w");
2973 long int i = longval ();
2976 fprintf (f, "%ld", i);
2980 unsigned long int i = ulongval ();
2983 fprintf (f, "%lu", i);
2985 /* Do not output a trailing newline, as this causes \r\n confusion
2986 on some platforms. */
2987 return ferror (f) || fclose (f) != 0;
2993 if ac_fn_c_try_run "$LINENO"; then :
2994 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2999 conftest.$ac_objext conftest.beam conftest.$ac_ext
3003 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3004 as_fn_set_status $ac_retval
3006 } # ac_fn_c_compute_int
3008 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3009 # ----------------------------------------------------
3010 # Tries to find if the field MEMBER exists in type AGGR, after including
3011 # INCLUDES, setting cache variable VAR accordingly.
3012 ac_fn_c_check_member ()
3014 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3016 $as_echo_n "checking for $2.$3... " >&6; }
3017 if eval \${$4+:} false; then :
3018 $as_echo_n "(cached) " >&6
3020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3021 /* end confdefs.h. */
3033 if ac_fn_c_try_compile "$LINENO"; then :
3036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3037 /* end confdefs.h. */
3043 if (sizeof ac_aggr.$3)
3049 if ac_fn_c_try_compile "$LINENO"; then :
3054 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3060 $as_echo "$ac_res" >&6; }
3061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3063 } # ac_fn_c_check_member
3064 cat >config.log <<_ACEOF
3065 This file contains any messages produced by compilers while
3066 running configure, to aid debugging if configure makes a mistake.
3068 It was created by GNU tar $as_me 1.28, which was
3069 generated by GNU Autoconf 2.69. Invocation command line was
3081 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3082 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3083 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3084 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3085 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3087 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3088 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3090 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3091 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3092 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3093 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3094 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3095 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3096 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3100 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3104 test -z "$as_dir" && as_dir=.
3105 $as_echo "PATH: $as_dir"
3121 # Keep a trace of the command line.
3122 # Strip out --no-create and --no-recursion so they do not pile up.
3123 # Strip out --silent because we don't want to record it for future runs.
3124 # Also quote any args containing shell meta-characters.
3125 # Make two passes to allow for proper duplicate-argument suppression.
3129 ac_must_keep_next=false
3135 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3137 | -silent | --silent | --silen | --sile | --sil)
3140 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3143 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3145 as_fn_append ac_configure_args1 " '$ac_arg'"
3146 if test $ac_must_keep_next = true; then
3147 ac_must_keep_next=false # Got value, back to normal.
3150 *=* | --config-cache | -C | -disable-* | --disable-* \
3151 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3152 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3153 | -with-* | --with-* | -without-* | --without-* | --x)
3154 case "$ac_configure_args0 " in
3155 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3158 -* ) ac_must_keep_next=true ;;
3161 as_fn_append ac_configure_args " '$ac_arg'"
3166 { ac_configure_args0=; unset ac_configure_args0;}
3167 { ac_configure_args1=; unset ac_configure_args1;}
3169 # When interrupted or exit'd, cleanup temporary files, and complete
3170 # config.log. We remove comments because anyway the quotes in there
3171 # would cause problems or look ugly.
3172 # WARNING: Use '\'' to represent an apostrophe within the trap.
3173 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3174 trap 'exit_status=$?
3175 # Save into config.log some information that might help in debugging.
3179 $as_echo "## ---------------- ##
3180 ## Cache variables. ##
3181 ## ---------------- ##"
3183 # The following way of writing the cache mishandles newlines in values,
3185 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3186 eval ac_val=\$$ac_var
3190 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3191 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3194 _ | IFS | as_nl) ;; #(
3195 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3196 *) { eval $ac_var=; unset $ac_var;} ;;
3201 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3202 *${as_nl}ac_space=\ *)
3204 "s/'\''/'\''\\\\'\'''\''/g;
3205 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3208 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3215 $as_echo "## ----------------- ##
3216 ## Output variables. ##
3217 ## ----------------- ##"
3219 for ac_var in $ac_subst_vars
3221 eval ac_val=\$$ac_var
3223 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3225 $as_echo "$ac_var='\''$ac_val'\''"
3229 if test -n "$ac_subst_files"; then
3230 $as_echo "## ------------------- ##
3231 ## File substitutions. ##
3232 ## ------------------- ##"
3234 for ac_var in $ac_subst_files
3236 eval ac_val=\$$ac_var
3238 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3240 $as_echo "$ac_var='\''$ac_val'\''"
3245 if test -s confdefs.h; then
3246 $as_echo "## ----------- ##
3253 test "$ac_signal" != 0 &&
3254 $as_echo "$as_me: caught signal $ac_signal"
3255 $as_echo "$as_me: exit $exit_status"
3257 rm -f core *.core core.conftest.* &&
3258 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3261 for ac_signal in 1 2 13 15; do
3262 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3266 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3267 rm -f -r conftest* confdefs.h
3269 $as_echo "/* confdefs.h */" > confdefs.h
3271 # Predefined preprocessor variables.
3273 cat >>confdefs.h <<_ACEOF
3274 #define PACKAGE_NAME "$PACKAGE_NAME"
3277 cat >>confdefs.h <<_ACEOF
3278 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3281 cat >>confdefs.h <<_ACEOF
3282 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3285 cat >>confdefs.h <<_ACEOF
3286 #define PACKAGE_STRING "$PACKAGE_STRING"
3289 cat >>confdefs.h <<_ACEOF
3290 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3293 cat >>confdefs.h <<_ACEOF
3294 #define PACKAGE_URL "$PACKAGE_URL"
3298 # Let the site file select an alternate cache file if it wants to.
3299 # Prefer an explicitly selected file to automatically selected ones.
3302 if test -n "$CONFIG_SITE"; then
3303 # We do not want a PATH search for config.site.
3304 case $CONFIG_SITE in #((
3305 -*) ac_site_file1=./$CONFIG_SITE;;
3306 */*) ac_site_file1=$CONFIG_SITE;;
3307 *) ac_site_file1=./$CONFIG_SITE;;
3309 elif test "x$prefix" != xNONE; then
3310 ac_site_file1=$prefix/share/config.site
3311 ac_site_file2=$prefix/etc/config.site
3313 ac_site_file1=$ac_default_prefix/share/config.site
3314 ac_site_file2=$ac_default_prefix/etc/config.site
3316 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3318 test "x$ac_site_file" = xNONE && continue
3319 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3320 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3321 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3322 sed 's/^/| /' "$ac_site_file" >&5
3324 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3325 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3326 as_fn_error $? "failed to load site script $ac_site_file
3327 See \`config.log' for more details" "$LINENO" 5; }
3331 if test -r "$cache_file"; then
3332 # Some versions of bash will fail to source /dev/null (special files
3333 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3334 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3335 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3336 $as_echo "$as_me: loading cache $cache_file" >&6;}
3338 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3339 *) . "./$cache_file";;
3343 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3344 $as_echo "$as_me: creating cache $cache_file" >&6;}
3348 as_fn_append ac_header_list " fcntl.h"
3349 as_fn_append ac_header_list " linux/fd.h"
3350 as_fn_append ac_header_list " memory.h"
3351 as_fn_append ac_header_list " net/errno.h"
3352 as_fn_append ac_header_list " sgtty.h"
3353 as_fn_append ac_header_list " string.h"
3354 as_fn_append ac_header_list " sys/param.h"
3355 as_fn_append ac_header_list " sys/device.h"
3356 as_fn_append ac_header_list " sys/gentape.h"
3357 as_fn_append ac_header_list " sys/inet.h"
3358 as_fn_append ac_header_list " sys/io/trioctl.h"
3359 as_fn_append ac_header_list " sys/mtio.h"
3360 as_fn_append ac_header_list " sys/time.h"
3361 as_fn_append ac_header_list " sys/tprintf.h"
3362 as_fn_append ac_header_list " sys/tape.h"
3363 as_fn_append ac_header_list " unistd.h"
3364 as_fn_append ac_header_list " locale.h"
3365 as_fn_append ac_func_list " flockfile"
3366 as_fn_append ac_func_list " funlockfile"
3367 as_fn_append ac_header_list " features.h"
3368 as_fn_append ac_header_list " linewrap.h"
3369 as_fn_append ac_func_list " pathconf"
3370 as_fn_append ac_func_list " btowc"
3371 as_fn_append ac_func_list " canonicalize_file_name"
3372 as_fn_append ac_func_list " getcwd"
3373 as_fn_append ac_func_list " readlink"
3374 as_fn_append ac_func_list " realpath"
3375 as_fn_append ac_func_list " readlinkat"
3376 as_fn_append ac_func_list " chown"
3377 as_fn_append ac_func_list " fchown"
3378 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3379 as_fn_append ac_header_list " sys/socket.h"
3380 as_fn_append ac_func_list " fchdir"
3381 as_fn_append ac_header_list " dirent.h"
3382 as_fn_append ac_func_list " fdopendir"
3383 as_fn_append ac_func_list " faccessat"
3384 as_fn_append ac_func_list " fchmodat"
3385 as_fn_append ac_func_list " lchmod"
3386 as_fn_append ac_func_list " fcntl"
3387 as_fn_append ac_func_list " symlink"
3388 as_fn_append ac_func_list " mempcpy"
3389 as_fn_append ac_func_list " isblank"
3390 as_fn_append ac_func_list " iswctype"
3391 as_fn_append ac_func_list " mbsrtowcs"
3392 as_fn_append ac_func_list " wmemchr"
3393 as_fn_append ac_func_list " wmemcpy"
3394 as_fn_append ac_func_list " wmempcpy"
3395 as_fn_append ac_header_list " wctype.h"
3396 gl_fnmatch_required=GNU
3397 as_fn_append ac_header_list " stdio_ext.h"
3398 as_fn_append ac_header_list " sys/stat.h"
3399 as_fn_append ac_func_list " fstatat"
3400 as_fn_append ac_func_list " futimens"
3401 as_fn_append ac_func_list " getdelim"
3402 as_fn_append ac_func_list " getdtablesize"
3403 gl_getopt_required=GNU
3404 as_fn_append ac_header_list " getopt.h"
3405 as_fn_append ac_func_list " gettimeofday"
3406 as_fn_append ac_func_list " nanotime"
3407 as_fn_append ac_header_list " wchar.h"
3408 as_fn_append ac_header_list " stdint.h"
3409 as_fn_append ac_header_list " inttypes.h"
3410 as_fn_append ac_func_list " iswcntrl"
3411 as_fn_append ac_func_list " iswblank"
3412 as_fn_append ac_header_list " langinfo.h"
3413 as_fn_append ac_func_list " link"
3414 as_fn_append ac_func_list " openat"
3415 as_fn_append ac_func_list " linkat"
3416 as_fn_append ac_header_list " xlocale.h"
3417 as_fn_append ac_func_list " lstat"
3418 as_fn_append ac_func_list " mbsinit"
3419 as_fn_append ac_func_list " mbrtowc"
3420 as_fn_append ac_header_list " sys/mman.h"
3421 as_fn_append ac_func_list " mprotect"
3422 as_fn_append ac_func_list " mkdirat"
3423 as_fn_append ac_func_list " mkfifo"
3424 as_fn_append ac_func_list " mkfifoat"
3425 as_fn_append ac_func_list " mknodat"
3426 as_fn_append ac_func_list " mknod"
3427 as_fn_append ac_func_list " nl_langinfo"
3428 as_fn_append ac_func_list " posix_openpt"
3429 as_fn_append ac_header_list " priv.h"
3430 as_fn_append ac_func_list " ptsname_r"
3431 as_fn_append ac_func_list " fchmod"
3432 as_fn_append ac_header_list " malloc.h"
3433 as_fn_append ac_func_list " renameat"
3434 as_fn_append ac_func_list " secure_getenv"
3435 as_fn_append ac_header_list " selinux/selinux.h"
3436 as_fn_append ac_func_list " setenv"
3437 as_fn_append ac_func_list " sleep"
3438 as_fn_append ac_func_list " snprintf"
3439 as_fn_append ac_func_list " strdup"
3440 as_fn_append ac_func_list " tzset"
3441 as_fn_append ac_header_list " strings.h"
3442 as_fn_append ac_func_list " strndup"
3443 as_fn_append ac_func_list " strtoimax"
3444 as_fn_append ac_func_list " strtoumax"
3445 as_fn_append ac_func_list " symlinkat"
3446 as_fn_append ac_header_list " sysexits.h"
3447 as_fn_append ac_func_list " localtime_r"
3448 as_fn_append ac_func_list " pipe"
3449 as_fn_append ac_func_list " unlinkat"
3450 as_fn_append ac_header_list " utime.h"
3451 as_fn_append ac_func_list " futimes"
3452 as_fn_append ac_func_list " futimesat"
3453 as_fn_append ac_func_list " utimensat"
3454 as_fn_append ac_func_list " lutimes"
3455 as_fn_append ac_func_list " vasnprintf"
3456 as_fn_append ac_func_list " wcrtomb"
3457 as_fn_append ac_func_list " wcwidth"
3458 as_fn_append ac_header_list " netdb.h"
3459 as_fn_append ac_header_list " sys/wait.h"
3460 as_fn_append ac_header_list " pwd.h"
3461 as_fn_append ac_header_list " grp.h"
3462 as_fn_append ac_func_list " setlocale"
3463 as_fn_append ac_func_list " fsync"
3464 as_fn_append ac_func_list " grantpt"
3465 gt_needs="$gt_needs need-formatstring-macros"
3466 # Check that the precious variables saved in the cache have kept the same
3468 ac_cache_corrupted=false
3469 for ac_var in $ac_precious_vars; do
3470 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3471 eval ac_new_set=\$ac_env_${ac_var}_set
3472 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3473 eval ac_new_val=\$ac_env_${ac_var}_value
3474 case $ac_old_set,$ac_new_set in
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3477 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3478 ac_cache_corrupted=: ;;
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3481 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3482 ac_cache_corrupted=: ;;
3485 if test "x$ac_old_val" != "x$ac_new_val"; then
3486 # differences in whitespace do not lead to failure.
3487 ac_old_val_w=`echo x $ac_old_val`
3488 ac_new_val_w=`echo x $ac_new_val`
3489 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3491 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3492 ac_cache_corrupted=:
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3495 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3496 eval $ac_var=\$ac_old_val
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3499 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3501 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3504 # Pass precious variables to config.status.
3505 if test "$ac_new_set" = set; then
3507 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3508 *) ac_arg=$ac_var=$ac_new_val ;;
3510 case " $ac_configure_args " in
3511 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3512 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3516 if $ac_cache_corrupted; then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3518 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3520 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3521 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3523 ## -------------------- ##
3524 ## Main body of script. ##
3525 ## -------------------- ##
3528 ac_cpp='$CPP $CPPFLAGS'
3529 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3530 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3531 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3536 for ac_dir in build-aux "$srcdir"/build-aux; do
3537 if test -f "$ac_dir/install-sh"; then
3539 ac_install_sh="$ac_aux_dir/install-sh -c"
3541 elif test -f "$ac_dir/install.sh"; then
3543 ac_install_sh="$ac_aux_dir/install.sh -c"
3545 elif test -f "$ac_dir/shtool"; then
3547 ac_install_sh="$ac_aux_dir/shtool install -c"
3551 if test -z "$ac_aux_dir"; then
3552 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3555 # These three variables are undocumented and unsupported,
3556 # and are intended to be withdrawn in a future Autoconf release.
3557 # They can cause serious problems if a builder's source tree is in a directory
3558 # whose full name contains unusual characters.
3559 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3560 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3561 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3564 ac_config_headers="$ac_config_headers config.h"
3567 am__api_version='1.14'
3569 # Find a good install program. We prefer a C program (faster),
3570 # so one script is as good as another. But avoid the broken or
3571 # incompatible versions:
3572 # SysV /etc/install, /usr/sbin/install
3573 # SunOS /usr/etc/install
3574 # IRIX /sbin/install
3576 # AmigaOS /C/install, which installs bootblocks on floppy discs
3577 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3578 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3579 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3580 # OS/2's system install, which has a completely different semantic
3581 # ./install, which can be erroneously created by make from ./install.sh.
3582 # Reject install programs that cannot install multiple files.
3583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3584 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3585 if test -z "$INSTALL"; then
3586 if ${ac_cv_path_install+:} false; then :
3587 $as_echo_n "(cached) " >&6
3589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3593 test -z "$as_dir" && as_dir=.
3594 # Account for people who put trailing slashes in PATH elements.
3595 case $as_dir/ in #((
3596 ./ | .// | /[cC]/* | \
3597 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3598 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3601 # OSF1 and SCO ODT 3.0 have their own names for install.
3602 # Don't use installbsd from OSF since it installs stuff as root
3604 for ac_prog in ginstall scoinst install; do
3605 for ac_exec_ext in '' $ac_executable_extensions; do
3606 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3607 if test $ac_prog = install &&
3608 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3609 # AIX install. It has an incompatible calling convention.
3611 elif test $ac_prog = install &&
3612 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3613 # program-specific install script used by HP pwplus--don't use.
3616 rm -rf conftest.one conftest.two conftest.dir
3617 echo one > conftest.one
3618 echo two > conftest.two
3620 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3621 test -s conftest.one && test -s conftest.two &&
3622 test -s conftest.dir/conftest.one &&
3623 test -s conftest.dir/conftest.two
3625 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3638 rm -rf conftest.one conftest.two conftest.dir
3641 if test "${ac_cv_path_install+set}" = set; then
3642 INSTALL=$ac_cv_path_install
3644 # As a last resort, use the slow shell script. Don't cache a
3645 # value for INSTALL within a source directory, because that will
3646 # break other packages using the cache if that directory is
3647 # removed, or if the value is a relative name.
3648 INSTALL=$ac_install_sh
3651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3652 $as_echo "$INSTALL" >&6; }
3654 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3655 # It thinks the first close brace ends the variable substitution.
3656 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3658 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3660 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3663 $as_echo_n "checking whether build environment is sane... " >&6; }
3664 # Reject unsafe characters in $srcdir or the absolute working directory
3665 # name. Accept space and tab only in the latter.
3669 *[\\\"\#\$\&\'\`$am_lf]*)
3670 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3673 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3674 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3677 # Do 'set' in a subshell so we don't clobber the current shell's
3678 # arguments. Must try -L first in case configure is actually a
3679 # symlink; some systems play weird games with the mod time of symlinks
3680 # (eg FreeBSD returns the mod time of the symlink's containing
3684 for am_try in 1 2; do
3685 echo "timestamp, slept: $am_has_slept" > conftest.file
3686 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3687 if test "$*" = "X"; then
3689 set X `ls -t "$srcdir/configure" conftest.file`
3691 if test "$*" != "X $srcdir/configure conftest.file" \
3692 && test "$*" != "X conftest.file $srcdir/configure"; then
3694 # If neither matched, then we have a broken ls. This can happen
3695 # if, for instance, CONFIG_SHELL is bash and it inherits a
3696 # broken ls alias from the environment. This has actually
3697 # happened. Such a system could not be considered "sane".
3698 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3699 alias in your environment" "$LINENO" 5
3701 if test "$2" = conftest.file || test $am_try -eq 2; then
3708 test "$2" = conftest.file
3714 as_fn_error $? "newly created file is older than distributed files!
3715 Check your system clock" "$LINENO" 5
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3718 $as_echo "yes" >&6; }
3719 # If we didn't sleep, we still need to ensure time stamps of config.status and
3720 # generated files are strictly newer.
3722 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3729 test "$program_prefix" != NONE &&
3730 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3731 # Use a double $ so make ignores it.
3732 test "$program_suffix" != NONE &&
3733 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3734 # Double any \ or $.
3735 # By default was `s,x,x', remove it if useless.
3736 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3737 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3739 # expand $ac_aux_dir to an absolute path
3740 am_aux_dir=`cd $ac_aux_dir && pwd`
3742 if test x"${MISSING+set}" != xset; then
3745 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3747 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3750 # Use eval to expand $SHELL
3751 if eval "$MISSING --is-lightweight"; then
3752 am_missing_run="$MISSING "
3755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3756 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3759 if test x"${install_sh}" != xset; then
3762 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3764 install_sh="\${SHELL} $am_aux_dir/install-sh"
3768 # Installed binaries are usually stripped using 'strip' when the user
3769 # run "make install-strip". However 'strip' might not be the right
3770 # tool to use in cross-compilation environments, therefore Automake
3771 # will honor the 'STRIP' environment variable to overrule this program.
3772 if test "$cross_compiling" != no; then
3773 if test -n "$ac_tool_prefix"; then
3774 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3775 set dummy ${ac_tool_prefix}strip; ac_word=$2
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777 $as_echo_n "checking for $ac_word... " >&6; }
3778 if ${ac_cv_prog_STRIP+:} false; then :
3779 $as_echo_n "(cached) " >&6
3781 if test -n "$STRIP"; then
3782 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3788 test -z "$as_dir" && as_dir=.
3789 for ac_exec_ext in '' $ac_executable_extensions; do
3790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3791 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3801 STRIP=$ac_cv_prog_STRIP
3802 if test -n "$STRIP"; then
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3804 $as_echo "$STRIP" >&6; }
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807 $as_echo "no" >&6; }
3812 if test -z "$ac_cv_prog_STRIP"; then
3814 # Extract the first word of "strip", so it can be a program name with args.
3815 set dummy strip; ac_word=$2
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817 $as_echo_n "checking for $ac_word... " >&6; }
3818 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3819 $as_echo_n "(cached) " >&6
3821 if test -n "$ac_ct_STRIP"; then
3822 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3828 test -z "$as_dir" && as_dir=.
3829 for ac_exec_ext in '' $ac_executable_extensions; do
3830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3831 ac_cv_prog_ac_ct_STRIP="strip"
3832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3841 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3842 if test -n "$ac_ct_STRIP"; then
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3844 $as_echo "$ac_ct_STRIP" >&6; }
3846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847 $as_echo "no" >&6; }
3850 if test "x$ac_ct_STRIP" = x; then
3853 case $cross_compiling:$ac_tool_warned in
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3856 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3857 ac_tool_warned=yes ;;
3862 STRIP="$ac_cv_prog_STRIP"
3866 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3869 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3870 if test -z "$MKDIR_P"; then
3871 if ${ac_cv_path_mkdir+:} false; then :
3872 $as_echo_n "(cached) " >&6
3874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3875 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3878 test -z "$as_dir" && as_dir=.
3879 for ac_prog in mkdir gmkdir; do
3880 for ac_exec_ext in '' $ac_executable_extensions; do
3881 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3882 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3883 'mkdir (GNU coreutils) '* | \
3884 'mkdir (coreutils) '* | \
3885 'mkdir (fileutils) '4.1*)
3886 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3896 test -d ./--version && rmdir ./--version
3897 if test "${ac_cv_path_mkdir+set}" = set; then
3898 MKDIR_P="$ac_cv_path_mkdir -p"
3900 # As a last resort, use the slow shell script. Don't cache a
3901 # value for MKDIR_P within a source directory, because that will
3902 # break other packages using the cache if that directory is
3903 # removed, or if the value is a relative name.
3904 MKDIR_P="$ac_install_sh -d"
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3908 $as_echo "$MKDIR_P" >&6; }
3910 for ac_prog in gawk mawk nawk awk
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913 set dummy $ac_prog; ac_word=$2
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915 $as_echo_n "checking for $ac_word... " >&6; }
3916 if ${ac_cv_prog_AWK+:} false; then :
3917 $as_echo_n "(cached) " >&6
3919 if test -n "$AWK"; then
3920 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3926 test -z "$as_dir" && as_dir=.
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3929 ac_cv_prog_AWK="$ac_prog"
3930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3940 if test -n "$AWK"; then
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3942 $as_echo "$AWK" >&6; }
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3949 test -n "$AWK" && break
3952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3953 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3955 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3956 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3957 $as_echo_n "(cached) " >&6
3959 cat >conftest.make <<\_ACEOF
3962 @echo '@@@%%%=$(MAKE)=@@@%%%'
3964 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3965 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3967 eval ac_cv_prog_make_${ac_make}_set=yes;;
3969 eval ac_cv_prog_make_${ac_make}_set=no;;
3973 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3975 $as_echo "yes" >&6; }
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979 $as_echo "no" >&6; }
3980 SET_MAKE="MAKE=${MAKE-make}"
3983 rm -rf .tst 2>/dev/null
3984 mkdir .tst 2>/dev/null
3985 if test -d .tst; then
3990 rmdir .tst 2>/dev/null
3992 # Check whether --enable-silent-rules was given.
3993 if test "${enable_silent_rules+set}" = set; then :
3994 enableval=$enable_silent_rules;
3997 case $enable_silent_rules in # (((
3998 yes) AM_DEFAULT_VERBOSITY=0;;
3999 no) AM_DEFAULT_VERBOSITY=1;;
4000 *) AM_DEFAULT_VERBOSITY=1;;
4002 am_make=${MAKE-make}
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4004 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4005 if ${am_cv_make_support_nested_variables+:} false; then :
4006 $as_echo_n "(cached) " >&6
4008 if $as_echo 'TRUE=$(BAR$(V))
4014 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4015 am_cv_make_support_nested_variables=yes
4017 am_cv_make_support_nested_variables=no
4020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4021 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4022 if test $am_cv_make_support_nested_variables = yes; then
4024 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4026 AM_V=$AM_DEFAULT_VERBOSITY
4027 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4031 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4032 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4033 # is not polluted with repeated "-I."
4034 am__isrc=' -I$(srcdir)'
4035 # test to see if srcdir already configured
4036 if test -f $srcdir/config.status; then
4037 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4041 # test whether we have cygpath
4042 if test -z "$CYGPATH_W"; then
4043 if (cygpath --version) >/dev/null 2>/dev/null; then
4044 CYGPATH_W='cygpath -w'
4051 # Define the identity of the package.
4056 cat >>confdefs.h <<_ACEOF
4057 #define PACKAGE "$PACKAGE"
4061 cat >>confdefs.h <<_ACEOF
4062 #define VERSION "$VERSION"
4065 # Some tools Automake needs.
4067 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4070 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4073 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4076 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4079 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4081 # For better backward compatibility. To be removed once Automake 1.9.x
4082 # dies out for good. For more background, see:
4083 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4084 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4085 mkdir_p='$(MKDIR_P)'
4087 # We need awk for the "check" target. The system "awk" is bad on
4089 # Always define AMTAR for backward compatibility. Yes, it's still used
4090 # in the wild :-( We should find a proper way to deprecate it ...
4094 # We'll loop over all known methods to create a tar archive until one works.
4095 _am_tools='gnutar plaintar pax cpio none'
4097 # The POSIX 1988 'ustar' format is defined with fixed-size fields.
4098 # There is notably a 21 bits limit for the UID and the GID. In fact,
4099 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
4101 am_max_uid=2097151 # 2^21 - 1
4102 am_max_gid=$am_max_uid
4103 # The $UID and $GID variables are not portable, so we need to resort
4104 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
4105 # below are definitely unexpected, so allow the users to see them
4106 # (that is, avoid stderr redirection).
4107 am_uid=`id -u || echo unknown`
4108 am_gid=`id -g || echo unknown`
4109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5
4110 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; }
4111 if test $am_uid -le $am_max_uid; then
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4113 $as_echo "yes" >&6; }
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4116 $as_echo "no" >&6; }
4119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5
4120 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; }
4121 if test $am_gid -le $am_max_gid; then
4122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4123 $as_echo "yes" >&6; }
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4126 $as_echo "no" >&6; }
4130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4131 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4133 # Go ahead even if we have the value already cached. We do so because we
4134 # need to set the values for the 'am__tar' and 'am__untar' variables.
4135 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4137 for _am_tool in $_am_tools; do
4140 for _am_tar in tar gnutar gtar; do
4141 { echo "$as_me:$LINENO: $_am_tar --version" >&5
4142 ($_am_tar --version) >&5 2>&5
4144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4145 (exit $ac_status); } && break
4147 am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4148 am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4149 am__untar="$_am_tar -xf -"
4152 # Must skip GNU tar: if it does not support --format= it doesn't create
4153 # ustar tarball either.
4154 (tar --version) >/dev/null 2>&1 && continue
4155 am__tar='tar chf - "$$tardir"'
4156 am__tar_='tar chf - "$tardir"'
4157 am__untar='tar xf -'
4160 am__tar='pax -L -x ustar -w "$$tardir"'
4161 am__tar_='pax -L -x ustar -w "$tardir"'
4165 am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4166 am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4167 am__untar='cpio -i -H ustar -d'
4176 # If the value was cached, stop now. We just wanted to have am__tar
4177 # and am__untar set.
4178 test -n "${am_cv_prog_tar_ustar}" && break
4180 # tar/untar a dummy directory, and stop if the command works.
4183 echo GrepMe > conftest.dir/file
4184 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4185 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4188 (exit $ac_status); }
4190 if test -s conftest.tar; then
4191 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4192 ($am__untar <conftest.tar) >&5 2>&5
4194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4195 (exit $ac_status); }
4196 { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
4197 (cat conftest.dir/file) >&5 2>&5
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); }
4201 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4206 if ${am_cv_prog_tar_ustar+:} false; then :
4207 $as_echo_n "(cached) " >&6
4209 am_cv_prog_tar_ustar=$_am_tool
4212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4213 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4220 # POSIX will say in a future version that running "rm -f" with no argument
4221 # is OK; and we want to be able to make that assumption in our Makefile
4222 # recipes. So use an aggressive probe to check that the usage we want is
4223 # actually supported "in the wild" to an acceptable degree.
4224 # See automake bug#10828.
4225 # To make any issue more visible, cause the running configure to be aborted
4226 # by default if the 'rm' program in use doesn't match our expectations; the
4227 # user can still override this though.
4228 if rm -f && rm -fr && rm -rf; then : OK; else
4232 Your 'rm' program seems unable to run without file operands specified
4233 on the command line, even when the '-f' option is present. This is contrary
4234 to the behaviour of most rm programs out there, and not conforming with
4235 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4237 Please tell bug-automake@gnu.org about your system, including the value
4238 of your $PATH and any error possibly output before this message. This
4239 can help us improve future automake versions.
4242 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4243 echo 'Configuration will proceed anyway, since you have set the' >&2
4244 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4248 Aborting the configuration process, to ensure you take notice of the issue.
4250 You can download and install GNU coreutils to get an 'rm' implementation
4251 that behaves properly: <http://www.gnu.org/software/coreutils/>.
4253 If you want to complete the configuration process using your problematic
4254 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4255 to "yes", and re-run configure.
4258 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4262 # Enable silent rules by default:
4263 # Check whether --enable-silent-rules was given.
4264 if test "${enable_silent_rules+set}" = set; then :
4265 enableval=$enable_silent_rules;
4268 case $enable_silent_rules in # (((
4269 yes) AM_DEFAULT_VERBOSITY=0;;
4270 no) AM_DEFAULT_VERBOSITY=1;;
4271 *) AM_DEFAULT_VERBOSITY=0;;
4273 am_make=${MAKE-make}
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4275 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4276 if ${am_cv_make_support_nested_variables+:} false; then :
4277 $as_echo_n "(cached) " >&6
4279 if $as_echo 'TRUE=$(BAR$(V))
4285 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4286 am_cv_make_support_nested_variables=yes
4288 am_cv_make_support_nested_variables=no
4291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4292 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4293 if test $am_cv_make_support_nested_variables = yes; then
4295 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4297 AM_V=$AM_DEFAULT_VERBOSITY
4298 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4303 DEPDIR="${am__leading_dot}deps"
4305 ac_config_commands="$ac_config_commands depfiles"
4308 am_make=${MAKE-make}
4309 cat > confinc << 'END'
4311 @echo this is the am__doit target
4314 # If we don't find an include directive, just comment out the code.
4315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4316 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4320 # First try GNU make style include.
4321 echo "include confinc" > confmf
4322 # Ignore all kinds of additional output from 'make'.
4323 case `$am_make -s -f confmf 2> /dev/null` in #(
4324 *the\ am__doit\ target*)
4330 # Now try BSD make style include.
4331 if test "$am__include" = "#"; then
4332 echo '.include "confinc"' > confmf
4333 case `$am_make -s -f confmf 2> /dev/null` in #(
4334 *the\ am__doit\ target*)
4335 am__include=.include
4343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4344 $as_echo "$_am_result" >&6; }
4345 rm -f confinc confmf
4347 # Check whether --enable-dependency-tracking was given.
4348 if test "${enable_dependency_tracking+set}" = set; then :
4349 enableval=$enable_dependency_tracking;
4352 if test "x$enable_dependency_tracking" != xno; then
4353 am_depcomp="$ac_aux_dir/depcomp"
4357 if test "x$enable_dependency_tracking" != xno; then
4367 ac_cpp='$CPP $CPPFLAGS'
4368 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4371 if test -n "$ac_tool_prefix"; then
4372 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4373 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375 $as_echo_n "checking for $ac_word... " >&6; }
4376 if ${ac_cv_prog_CC+:} false; then :
4377 $as_echo_n "(cached) " >&6
4379 if test -n "$CC"; then
4380 ac_cv_prog_CC="$CC" # Let the user override the test.
4382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4386 test -z "$as_dir" && as_dir=.
4387 for ac_exec_ext in '' $ac_executable_extensions; do
4388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4389 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4400 if test -n "$CC"; then
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4402 $as_echo "$CC" >&6; }
4404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4405 $as_echo "no" >&6; }
4410 if test -z "$ac_cv_prog_CC"; then
4412 # Extract the first word of "gcc", so it can be a program name with args.
4413 set dummy gcc; ac_word=$2
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415 $as_echo_n "checking for $ac_word... " >&6; }
4416 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4417 $as_echo_n "(cached) " >&6
4419 if test -n "$ac_ct_CC"; then
4420 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426 test -z "$as_dir" && as_dir=.
4427 for ac_exec_ext in '' $ac_executable_extensions; do
4428 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4429 ac_cv_prog_ac_ct_CC="gcc"
4430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4439 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4440 if test -n "$ac_ct_CC"; then
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4442 $as_echo "$ac_ct_CC" >&6; }
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4445 $as_echo "no" >&6; }
4448 if test "x$ac_ct_CC" = x; then
4451 case $cross_compiling:$ac_tool_warned in
4453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4454 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4455 ac_tool_warned=yes ;;
4463 if test -z "$CC"; then
4464 if test -n "$ac_tool_prefix"; then
4465 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4466 set dummy ${ac_tool_prefix}cc; ac_word=$2
4467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4468 $as_echo_n "checking for $ac_word... " >&6; }
4469 if ${ac_cv_prog_CC+:} false; then :
4470 $as_echo_n "(cached) " >&6
4472 if test -n "$CC"; then
4473 ac_cv_prog_CC="$CC" # Let the user override the test.
4475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4479 test -z "$as_dir" && as_dir=.
4480 for ac_exec_ext in '' $ac_executable_extensions; do
4481 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4482 ac_cv_prog_CC="${ac_tool_prefix}cc"
4483 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4493 if test -n "$CC"; then
4494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4495 $as_echo "$CC" >&6; }
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4498 $as_echo "no" >&6; }
4504 if test -z "$CC"; then
4505 # Extract the first word of "cc", so it can be a program name with args.
4506 set dummy cc; ac_word=$2
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508 $as_echo_n "checking for $ac_word... " >&6; }
4509 if ${ac_cv_prog_CC+:} false; then :
4510 $as_echo_n "(cached) " >&6
4512 if test -n "$CC"; then
4513 ac_cv_prog_CC="$CC" # Let the user override the test.
4516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4520 test -z "$as_dir" && as_dir=.
4521 for ac_exec_ext in '' $ac_executable_extensions; do
4522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4523 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4524 ac_prog_rejected=yes
4528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4535 if test $ac_prog_rejected = yes; then
4536 # We found a bogon in the path, so make sure we never use it.
4537 set dummy $ac_cv_prog_CC
4539 if test $# != 0; then
4540 # We chose a different compiler from the bogus one.
4541 # However, it has the same basename, so the bogon will be chosen
4542 # first if we set CC to just the basename; use the full file name.
4544 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4550 if test -n "$CC"; then
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4552 $as_echo "$CC" >&6; }
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4555 $as_echo "no" >&6; }
4560 if test -z "$CC"; then
4561 if test -n "$ac_tool_prefix"; then
4562 for ac_prog in cl.exe
4564 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4565 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_prog_CC+:} false; then :
4569 $as_echo_n "(cached) " >&6
4571 if test -n "$CC"; then
4572 ac_cv_prog_CC="$CC" # Let the user override the test.
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578 test -z "$as_dir" && as_dir=.
4579 for ac_exec_ext in '' $ac_executable_extensions; do
4580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4592 if test -n "$CC"; then
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4594 $as_echo "$CC" >&6; }
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597 $as_echo "no" >&6; }
4601 test -n "$CC" && break
4604 if test -z "$CC"; then
4606 for ac_prog in cl.exe
4608 # Extract the first word of "$ac_prog", so it can be a program name with args.
4609 set dummy $ac_prog; ac_word=$2
4610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611 $as_echo_n "checking for $ac_word... " >&6; }
4612 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4613 $as_echo_n "(cached) " >&6
4615 if test -n "$ac_ct_CC"; then
4616 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 test -z "$as_dir" && as_dir=.
4623 for ac_exec_ext in '' $ac_executable_extensions; do
4624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4625 ac_cv_prog_ac_ct_CC="$ac_prog"
4626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4635 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4636 if test -n "$ac_ct_CC"; then
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4638 $as_echo "$ac_ct_CC" >&6; }
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641 $as_echo "no" >&6; }
4645 test -n "$ac_ct_CC" && break
4648 if test "x$ac_ct_CC" = x; then
4651 case $cross_compiling:$ac_tool_warned in
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4654 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4655 ac_tool_warned=yes ;;
4664 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4665 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4666 as_fn_error $? "no acceptable C compiler found in \$PATH
4667 See \`config.log' for more details" "$LINENO" 5; }
4669 # Provide some information about the compiler.
4670 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4673 for ac_option in --version -v -V -qversion; do
4674 { { ac_try="$ac_compiler $ac_option >&5"
4676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4677 *) ac_try_echo=$ac_try;;
4679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4680 $as_echo "$ac_try_echo"; } >&5
4681 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4683 if test -s conftest.err; then
4685 ... rest of stderr output deleted ...
4686 10q' conftest.err >conftest.er1
4687 cat conftest.er1 >&5
4689 rm -f conftest.er1 conftest.err
4690 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4691 test $ac_status = 0; }
4694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4695 /* end confdefs.h. */
4705 ac_clean_files_save=$ac_clean_files
4706 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4707 # Try to create an executable without -o first, disregard a.out.
4708 # It will help us diagnose broken compilers, and finding out an intuition
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4711 $as_echo_n "checking whether the C compiler works... " >&6; }
4712 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4714 # The possible output files:
4715 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4718 for ac_file in $ac_files
4721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4722 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4727 if { { ac_try="$ac_link_default"
4729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4730 *) ac_try_echo=$ac_try;;
4732 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4733 $as_echo "$ac_try_echo"; } >&5
4734 (eval "$ac_link_default") 2>&5
4736 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4737 test $ac_status = 0; }; then :
4738 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4739 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4740 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4741 # so that the user can short-circuit this test for compilers unknown to
4743 for ac_file in $ac_files ''
4745 test -f "$ac_file" || continue
4747 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4750 # We found the default executable, but exeext='' is most
4754 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4756 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4758 # We set ac_cv_exeext here because the later test for it is not
4759 # safe: cross compilers may not add the suffix if given an `-o'
4760 # argument, so we may need to know it at that point already.
4761 # Even if this section looks crufty: it has the advantage of
4768 test "$ac_cv_exeext" = no && ac_cv_exeext=
4773 if test -z "$ac_file"; then :
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4775 $as_echo "no" >&6; }
4776 $as_echo "$as_me: failed program was:" >&5
4777 sed 's/^/| /' conftest.$ac_ext >&5
4779 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4780 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4781 as_fn_error 77 "C compiler cannot create executables
4782 See \`config.log' for more details" "$LINENO" 5; }
4784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4785 $as_echo "yes" >&6; }
4787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4788 $as_echo_n "checking for C compiler default output file name... " >&6; }
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4790 $as_echo "$ac_file" >&6; }
4791 ac_exeext=$ac_cv_exeext
4793 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4794 ac_clean_files=$ac_clean_files_save
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4796 $as_echo_n "checking for suffix of executables... " >&6; }
4797 if { { ac_try="$ac_link"
4799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800 *) ac_try_echo=$ac_try;;
4802 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4803 $as_echo "$ac_try_echo"; } >&5
4804 (eval "$ac_link") 2>&5
4806 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4807 test $ac_status = 0; }; then :
4808 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4809 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4810 # work properly (i.e., refer to `conftest.exe'), while it won't with
4812 for ac_file in conftest.exe conftest conftest.*; do
4813 test -f "$ac_file" || continue
4815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4816 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4822 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4823 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4824 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4825 See \`config.log' for more details" "$LINENO" 5; }
4827 rm -f conftest conftest$ac_cv_exeext
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4829 $as_echo "$ac_cv_exeext" >&6; }
4831 rm -f conftest.$ac_ext
4832 EXEEXT=$ac_cv_exeext
4834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4835 /* end confdefs.h. */
4840 FILE *f = fopen ("conftest.out", "w");
4841 return ferror (f) || fclose (f) != 0;
4847 ac_clean_files="$ac_clean_files conftest.out"
4848 # Check that the compiler produces executables we can run. If not, either
4849 # the compiler is broken, or we cross compile.
4850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4851 $as_echo_n "checking whether we are cross compiling... " >&6; }
4852 if test "$cross_compiling" != yes; then
4853 { { ac_try="$ac_link"
4855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4856 *) ac_try_echo=$ac_try;;
4858 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4859 $as_echo "$ac_try_echo"; } >&5
4860 (eval "$ac_link") 2>&5
4862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4863 test $ac_status = 0; }
4864 if { ac_try='./conftest$ac_cv_exeext'
4865 { { case "(($ac_try" in
4866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4867 *) ac_try_echo=$ac_try;;
4869 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4870 $as_echo "$ac_try_echo"; } >&5
4871 (eval "$ac_try") 2>&5
4873 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4874 test $ac_status = 0; }; }; then
4877 if test "$cross_compiling" = maybe; then
4880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4881 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4882 as_fn_error $? "cannot run C compiled programs.
4883 If you meant to cross compile, use \`--host'.
4884 See \`config.log' for more details" "$LINENO" 5; }
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4889 $as_echo "$cross_compiling" >&6; }
4891 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4892 ac_clean_files=$ac_clean_files_save
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4894 $as_echo_n "checking for suffix of object files... " >&6; }
4895 if ${ac_cv_objext+:} false; then :
4896 $as_echo_n "(cached) " >&6
4898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4899 /* end confdefs.h. */
4909 rm -f conftest.o conftest.obj
4910 if { { ac_try="$ac_compile"
4912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4913 *) ac_try_echo=$ac_try;;
4915 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4916 $as_echo "$ac_try_echo"; } >&5
4917 (eval "$ac_compile") 2>&5
4919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4920 test $ac_status = 0; }; then :
4921 for ac_file in conftest.o conftest.obj conftest.*; do
4922 test -f "$ac_file" || continue;
4924 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4925 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4930 $as_echo "$as_me: failed program was:" >&5
4931 sed 's/^/| /' conftest.$ac_ext >&5
4933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4934 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4935 as_fn_error $? "cannot compute suffix of object files: cannot compile
4936 See \`config.log' for more details" "$LINENO" 5; }
4938 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4941 $as_echo "$ac_cv_objext" >&6; }
4942 OBJEXT=$ac_cv_objext
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4945 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4946 if ${ac_cv_c_compiler_gnu+:} false; then :
4947 $as_echo_n "(cached) " >&6
4949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4950 /* end confdefs.h. */
4963 if ac_fn_c_try_compile "$LINENO"; then :
4968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4969 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4973 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4974 if test $ac_compiler_gnu = yes; then
4979 ac_test_CFLAGS=${CFLAGS+set}
4980 ac_save_CFLAGS=$CFLAGS
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4982 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4983 if ${ac_cv_prog_cc_g+:} false; then :
4984 $as_echo_n "(cached) " >&6
4986 ac_save_c_werror_flag=$ac_c_werror_flag
4987 ac_c_werror_flag=yes
4990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4991 /* end confdefs.h. */
5001 if ac_fn_c_try_compile "$LINENO"; then :
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h. */
5016 if ac_fn_c_try_compile "$LINENO"; then :
5019 ac_c_werror_flag=$ac_save_c_werror_flag
5021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5022 /* end confdefs.h. */
5032 if ac_fn_c_try_compile "$LINENO"; then :
5035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5040 ac_c_werror_flag=$ac_save_c_werror_flag
5042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5043 $as_echo "$ac_cv_prog_cc_g" >&6; }
5044 if test "$ac_test_CFLAGS" = set; then
5045 CFLAGS=$ac_save_CFLAGS
5046 elif test $ac_cv_prog_cc_g = yes; then
5047 if test "$GCC" = yes; then
5053 if test "$GCC" = yes; then
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5060 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5061 if ${ac_cv_prog_cc_c89+:} false; then :
5062 $as_echo_n "(cached) " >&6
5064 ac_cv_prog_cc_c89=no
5066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5067 /* end confdefs.h. */
5071 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5072 struct buf { int x; };
5073 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5074 static char *e (p, i)
5080 static char *f (char * (*g) (char **, int), char **p, ...)
5085 s = g (p, va_arg (v,int));
5090 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5091 function prototypes and stuff, but not '\xHH' hex character constants.
5092 These don't provoke an error unfortunately, instead are silently treated
5093 as 'x'. The following induces an error, until -std is added to get
5094 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5095 array size at least. It's necessary to write '\x00'==0 to get something
5096 that's true only with -std. */
5097 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5099 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5100 inside strings and character constants. */
5102 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5104 int test (int i, double x);
5105 struct s1 {int (*f) (int a);};
5106 struct s2 {int (*f) (double a);};
5107 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5113 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5118 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5119 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5121 CC="$ac_save_CC $ac_arg"
5122 if ac_fn_c_try_compile "$LINENO"; then :
5123 ac_cv_prog_cc_c89=$ac_arg
5125 rm -f core conftest.err conftest.$ac_objext
5126 test "x$ac_cv_prog_cc_c89" != "xno" && break
5128 rm -f conftest.$ac_ext
5133 case "x$ac_cv_prog_cc_c89" in
5135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5136 $as_echo "none needed" >&6; } ;;
5138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5139 $as_echo "unsupported" >&6; } ;;
5141 CC="$CC $ac_cv_prog_cc_c89"
5142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5143 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5145 if test "x$ac_cv_prog_cc_c89" != xno; then :
5150 ac_cpp='$CPP $CPPFLAGS'
5151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5156 ac_cpp='$CPP $CPPFLAGS'
5157 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5158 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5159 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5161 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
5162 if ${am_cv_prog_cc_c_o+:} false; then :
5163 $as_echo_n "(cached) " >&6
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166 /* end confdefs.h. */
5176 # Make sure it works both with $CC and with simple cc.
5177 # Following AC_PROG_CC_C_O, we do the test twice because some
5178 # compilers refuse to overwrite an existing .o file with -o,
5179 # though they will create one.
5180 am_cv_prog_cc_c_o=yes
5182 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5183 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5186 (exit $ac_status); } \
5187 && test -f conftest2.$ac_objext; then
5190 am_cv_prog_cc_c_o=no
5194 rm -f core conftest*
5197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5198 $as_echo "$am_cv_prog_cc_c_o" >&6; }
5199 if test "$am_cv_prog_cc_c_o" != yes; then
5200 # Losing compiler, so override with the script.
5201 # FIXME: It is wrong to rewrite CC.
5202 # But if we don't then we get into trouble of one sort or another.
5203 # A longer-term fix would be to have automake use am__CC in this case,
5204 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5205 CC="$am_aux_dir/compile $CC"
5208 ac_cpp='$CPP $CPPFLAGS'
5209 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5210 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5211 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5214 depcc="$CC" am_compiler_list=
5216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5217 $as_echo_n "checking dependency style of $depcc... " >&6; }
5218 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5219 $as_echo_n "(cached) " >&6
5221 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5222 # We make a subdir and do the tests there. Otherwise we can end up
5223 # making bogus files that we don't know about and never remove. For
5224 # instance it was reported that on HP-UX the gcc test will end up
5225 # making a dummy file named 'D' -- because '-MD' means "put the output
5229 # Copy depcomp to subdir because otherwise we won't find it if we're
5230 # using a relative directory.
5231 cp "$am_depcomp" conftest.dir
5233 # We will build objects and dependencies in a subdirectory because
5234 # it helps to detect inapplicable dependency modes. For instance
5235 # both Tru64's cc and ICC support -MD to output dependencies as a
5236 # side effect of compilation, but ICC will put the dependencies in
5237 # the current directory while Tru64 will put them in the object
5241 am_cv_CC_dependencies_compiler_type=none
5242 if test "$am_compiler_list" = ""; then
5243 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5246 case " $depcc " in #(
5247 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5250 for depmode in $am_compiler_list; do
5251 # Setup a source with many dependencies, because some compilers
5252 # like to wrap large dependency lists on column 80 (with \), and
5253 # we should not choose a depcomp mode which is confused by this.
5255 # We need to recreate these files for each test, as the compiler may
5256 # overwrite some of them when testing with obscure command lines.
5257 # This happens at least with the AIX C compiler.
5259 for i in 1 2 3 4 5 6; do
5260 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5261 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5262 # Solaris 10 /bin/sh.
5263 echo '/* dummy */' > sub/conftst$i.h
5265 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5267 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5268 # mode. It turns out that the SunPro C++ compiler does not properly
5269 # handle '-M -o', and we need to detect this. Also, some Intel
5270 # versions had trouble with output in subdirs.
5271 am__obj=sub/conftest.${OBJEXT-o}
5272 am__minus_obj="-o $am__obj"
5275 # This depmode causes a compiler race in universal mode.
5276 test "$am__universal" = false || continue
5279 # After this tag, mechanisms are not by side-effect, so they'll
5280 # only be used when explicitly requested.
5281 if test "x$enable_dependency_tracking" = xyes; then
5287 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5288 # This compiler won't grok '-c -o', but also, the minuso test has
5289 # not run yet. These depmodes are late enough in the game, and
5290 # so weak that their functioning should not be impacted.
5291 am__obj=conftest.${OBJEXT-o}
5296 if depmode=$depmode \
5297 source=sub/conftest.c object=$am__obj \
5298 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5299 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5300 >/dev/null 2>conftest.err &&
5301 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5302 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5303 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5304 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5305 # icc doesn't choke on unknown options, it will just issue warnings
5306 # or remarks (even with -Werror). So we grep stderr for any message
5307 # that says an option was ignored or not supported.
5308 # When given -MP, icc 7.0 and 7.1 complain thusly:
5309 # icc: Command line warning: ignoring option '-M'; no argument required
5310 # The diagnosis changed in icc 8.0:
5311 # icc: Command line remark: option '-MP' not supported
5312 if (grep 'ignoring option' conftest.err ||
5313 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5314 am_cv_CC_dependencies_compiler_type=$depmode
5323 am_cv_CC_dependencies_compiler_type=none
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5328 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5329 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5332 test "x$enable_dependency_tracking" != xno \
5333 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5335 am__fastdepCC_FALSE='#'
5337 am__fastdepCC_TRUE='#'
5338 am__fastdepCC_FALSE=
5342 case $ac_cv_prog_cc_stdc in #(
5344 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
5347 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
5348 if ${ac_cv_prog_cc_c99+:} false; then :
5349 $as_echo_n "(cached) " >&6
5351 ac_cv_prog_cc_c99=no
5353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5354 /* end confdefs.h. */
5356 #include <stdbool.h>
5361 // Check varargs macros. These examples are taken from C99 6.10.3.5.
5362 #define debug(...) fprintf (stderr, __VA_ARGS__)
5363 #define showlist(...) puts (#__VA_ARGS__)
5364 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
5366 test_varargs_macros (void)
5371 debug ("X = %d\n", x);
5372 showlist (The first, second, and third items.);
5373 report (x>y, "x is %d but y is %d", x, y);
5376 // Check long long types.
5377 #define BIG64 18446744073709551615ull
5378 #define BIG32 4294967295ul
5379 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
5381 your preprocessor is broken;
5385 your preprocessor is broken;
5387 static long long int bignum = -9223372036854775807LL;
5388 static unsigned long long int ubignum = BIG64;
5390 struct incomplete_array
5398 const wchar_t *name;
5402 typedef const char *ccp;
5405 test_restrict (ccp restrict text)
5407 // See if C++-style comments work.
5408 // Iterate through items via the restricted pointer.
5409 // Also check for declarations in for loops.
5410 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5415 // Check varargs and va_copy.
5417 test_varargs (const char *format, ...)
5420 va_start (args, format);
5422 va_copy (args_copy, args);
5433 str = va_arg (args_copy, const char *);
5436 number = va_arg (args_copy, int);
5439 fnumber = va_arg (args_copy, double);
5454 _Bool success = false;
5457 if (test_restrict ("String literal") == 0)
5459 char *restrict newvar = "Another string";
5462 test_varargs ("s, d' f .", "string", 65, 34.234);
5463 test_varargs_macros ();
5465 // Check flexible array members.
5466 struct incomplete_array *ia =
5467 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5469 for (int i = 0; i < ia->datasize; ++i)
5470 ia->data[i] = i * 1.234;
5472 // Check named initializers.
5473 struct named_init ni = {
5475 .name = L"Test wide string",
5476 .average = 543.34343,
5481 int dynamic_array[ni.number];
5482 dynamic_array[ni.number - 1] = 543;
5484 // work around unused variable warnings
5485 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5486 || dynamic_array[ni.number - 1] != 543);
5492 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5494 CC="$ac_save_CC $ac_arg"
5495 if ac_fn_c_try_compile "$LINENO"; then :
5496 ac_cv_prog_cc_c99=$ac_arg
5498 rm -f core conftest.err conftest.$ac_objext
5499 test "x$ac_cv_prog_cc_c99" != "xno" && break
5501 rm -f conftest.$ac_ext
5506 case "x$ac_cv_prog_cc_c99" in
5508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5509 $as_echo "none needed" >&6; } ;;
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5512 $as_echo "unsupported" >&6; } ;;
5514 CC="$CC $ac_cv_prog_cc_c99"
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5516 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5518 if test "x$ac_cv_prog_cc_c99" != xno; then :
5519 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5522 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5523 if ${ac_cv_prog_cc_c89+:} false; then :
5524 $as_echo_n "(cached) " >&6
5526 ac_cv_prog_cc_c89=no
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529 /* end confdefs.h. */
5533 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5534 struct buf { int x; };
5535 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5536 static char *e (p, i)
5542 static char *f (char * (*g) (char **, int), char **p, ...)
5547 s = g (p, va_arg (v,int));
5552 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5553 function prototypes and stuff, but not '\xHH' hex character constants.
5554 These don't provoke an error unfortunately, instead are silently treated
5555 as 'x'. The following induces an error, until -std is added to get
5556 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5557 array size at least. It's necessary to write '\x00'==0 to get something
5558 that's true only with -std. */
5559 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5561 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5562 inside strings and character constants. */
5564 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5566 int test (int i, double x);
5567 struct s1 {int (*f) (int a);};
5568 struct s2 {int (*f) (double a);};
5569 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5575 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5580 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5581 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5583 CC="$ac_save_CC $ac_arg"
5584 if ac_fn_c_try_compile "$LINENO"; then :
5585 ac_cv_prog_cc_c89=$ac_arg
5587 rm -f core conftest.err conftest.$ac_objext
5588 test "x$ac_cv_prog_cc_c89" != "xno" && break
5590 rm -f conftest.$ac_ext
5595 case "x$ac_cv_prog_cc_c89" in
5597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5598 $as_echo "none needed" >&6; } ;;
5600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5601 $as_echo "unsupported" >&6; } ;;
5603 CC="$CC $ac_cv_prog_cc_c89"
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5605 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5607 if test "x$ac_cv_prog_cc_c89" != xno; then :
5608 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5610 ac_cv_prog_cc_stdc=no
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5617 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5618 if ${ac_cv_prog_cc_stdc+:} false; then :
5619 $as_echo_n "(cached) " >&6
5622 case $ac_cv_prog_cc_stdc in #(
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5625 $as_echo "unsupported" >&6; } ;; #(
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5628 $as_echo "none needed" >&6; } ;; #(
5630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5631 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5635 if test -n "$ac_tool_prefix"; then
5636 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5637 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5639 $as_echo_n "checking for $ac_word... " >&6; }
5640 if ${ac_cv_prog_RANLIB+:} false; then :
5641 $as_echo_n "(cached) " >&6
5643 if test -n "$RANLIB"; then
5644 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5650 test -z "$as_dir" && as_dir=.
5651 for ac_exec_ext in '' $ac_executable_extensions; do
5652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5653 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663 RANLIB=$ac_cv_prog_RANLIB
5664 if test -n "$RANLIB"; then
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5666 $as_echo "$RANLIB" >&6; }
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669 $as_echo "no" >&6; }
5674 if test -z "$ac_cv_prog_RANLIB"; then
5675 ac_ct_RANLIB=$RANLIB
5676 # Extract the first word of "ranlib", so it can be a program name with args.
5677 set dummy ranlib; ac_word=$2
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5679 $as_echo_n "checking for $ac_word... " >&6; }
5680 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5681 $as_echo_n "(cached) " >&6
5683 if test -n "$ac_ct_RANLIB"; then
5684 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5690 test -z "$as_dir" && as_dir=.
5691 for ac_exec_ext in '' $ac_executable_extensions; do
5692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5693 ac_cv_prog_ac_ct_RANLIB="ranlib"
5694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5703 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5704 if test -n "$ac_ct_RANLIB"; then
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5706 $as_echo "$ac_ct_RANLIB" >&6; }
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709 $as_echo "no" >&6; }
5712 if test "x$ac_ct_RANLIB" = x; then
5715 case $cross_compiling:$ac_tool_warned in
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5718 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5719 ac_tool_warned=yes ;;
5721 RANLIB=$ac_ct_RANLIB
5724 RANLIB="$ac_cv_prog_RANLIB"
5727 for ac_prog in 'bison -y' byacc
5729 # Extract the first word of "$ac_prog", so it can be a program name with args.
5730 set dummy $ac_prog; ac_word=$2
5731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5732 $as_echo_n "checking for $ac_word... " >&6; }
5733 if ${ac_cv_prog_YACC+:} false; then :
5734 $as_echo_n "(cached) " >&6
5736 if test -n "$YACC"; then
5737 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5739 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5743 test -z "$as_dir" && as_dir=.
5744 for ac_exec_ext in '' $ac_executable_extensions; do
5745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5746 ac_cv_prog_YACC="$ac_prog"
5747 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5756 YACC=$ac_cv_prog_YACC
5757 if test -n "$YACC"; then
5758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5759 $as_echo "$YACC" >&6; }
5761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762 $as_echo "no" >&6; }
5766 test -n "$YACC" && break
5768 test -n "$YACC" || YACC="yacc"
5772 ac_cpp='$CPP $CPPFLAGS'
5773 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5774 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5775 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5777 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5778 # On Suns, sometimes $CPP names a directory.
5779 if test -n "$CPP" && test -d "$CPP"; then
5782 if test -z "$CPP"; then
5783 if ${ac_cv_prog_CPP+:} false; then :
5784 $as_echo_n "(cached) " >&6
5786 # Double quotes because CPP needs to be expanded
5787 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5790 for ac_c_preproc_warn_flag in '' yes
5792 # Use a header file that comes with gcc, so configuring glibc
5793 # with a fresh cross-compiler works.
5794 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5795 # <limits.h> exists even on freestanding compilers.
5796 # On the NeXT, cc -E runs the code through the compiler's parser,
5797 # not just through cpp. "Syntax error" is here to catch this case.
5798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799 /* end confdefs.h. */
5801 # include <limits.h>
5803 # include <assert.h>
5807 if ac_fn_c_try_cpp "$LINENO"; then :
5810 # Broken: fails on valid input.
5813 rm -f conftest.err conftest.i conftest.$ac_ext
5815 # OK, works on sane cases. Now check whether nonexistent headers
5816 # can be detected and how.
5817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5818 /* end confdefs.h. */
5819 #include <ac_nonexistent.h>
5821 if ac_fn_c_try_cpp "$LINENO"; then :
5822 # Broken: success on invalid input.
5825 # Passes both tests.
5829 rm -f conftest.err conftest.i conftest.$ac_ext
5832 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5833 rm -f conftest.i conftest.err conftest.$ac_ext
5834 if $ac_preproc_ok; then :
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5847 $as_echo "$CPP" >&6; }
5849 for ac_c_preproc_warn_flag in '' yes
5851 # Use a header file that comes with gcc, so configuring glibc
5852 # with a fresh cross-compiler works.
5853 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5854 # <limits.h> exists even on freestanding compilers.
5855 # On the NeXT, cc -E runs the code through the compiler's parser,
5856 # not just through cpp. "Syntax error" is here to catch this case.
5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5858 /* end confdefs.h. */
5860 # include <limits.h>
5862 # include <assert.h>
5866 if ac_fn_c_try_cpp "$LINENO"; then :
5869 # Broken: fails on valid input.
5872 rm -f conftest.err conftest.i conftest.$ac_ext
5874 # OK, works on sane cases. Now check whether nonexistent headers
5875 # can be detected and how.
5876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5877 /* end confdefs.h. */
5878 #include <ac_nonexistent.h>
5880 if ac_fn_c_try_cpp "$LINENO"; then :
5881 # Broken: success on invalid input.
5884 # Passes both tests.
5888 rm -f conftest.err conftest.i conftest.$ac_ext
5891 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5892 rm -f conftest.i conftest.err conftest.$ac_ext
5893 if $ac_preproc_ok; then :
5896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5897 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5898 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5899 See \`config.log' for more details" "$LINENO" 5; }
5903 ac_cpp='$CPP $CPPFLAGS'
5904 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5905 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5906 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5910 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5911 if ${ac_cv_path_GREP+:} false; then :
5912 $as_echo_n "(cached) " >&6
5914 if test -z "$GREP"; then
5915 ac_path_GREP_found=false
5916 # Loop through the user's path and test for each of PROGNAME-LIST
5917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5921 test -z "$as_dir" && as_dir=.
5922 for ac_prog in grep ggrep; do
5923 for ac_exec_ext in '' $ac_executable_extensions; do
5924 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5925 as_fn_executable_p "$ac_path_GREP" || continue
5926 # Check for GNU ac_path_GREP and select it if it is found.
5927 # Check for GNU $ac_path_GREP
5928 case `"$ac_path_GREP" --version 2>&1` in
5930 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5933 $as_echo_n 0123456789 >"conftest.in"
5936 cat "conftest.in" "conftest.in" >"conftest.tmp"
5937 mv "conftest.tmp" "conftest.in"
5938 cp "conftest.in" "conftest.nl"
5939 $as_echo 'GREP' >> "conftest.nl"
5940 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5941 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5942 as_fn_arith $ac_count + 1 && ac_count=$as_val
5943 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5944 # Best one so far, save it but keep looking for a better one
5945 ac_cv_path_GREP="$ac_path_GREP"
5946 ac_path_GREP_max=$ac_count
5948 # 10*(2^10) chars as input seems more than enough
5949 test $ac_count -gt 10 && break
5951 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5954 $ac_path_GREP_found && break 3
5959 if test -z "$ac_cv_path_GREP"; then
5960 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5963 ac_cv_path_GREP=$GREP
5967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5968 $as_echo "$ac_cv_path_GREP" >&6; }
5969 GREP="$ac_cv_path_GREP"
5972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5973 $as_echo_n "checking for egrep... " >&6; }
5974 if ${ac_cv_path_EGREP+:} false; then :
5975 $as_echo_n "(cached) " >&6
5977 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5978 then ac_cv_path_EGREP="$GREP -E"
5980 if test -z "$EGREP"; then
5981 ac_path_EGREP_found=false
5982 # Loop through the user's path and test for each of PROGNAME-LIST
5983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5987 test -z "$as_dir" && as_dir=.
5988 for ac_prog in egrep; do
5989 for ac_exec_ext in '' $ac_executable_extensions; do
5990 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5991 as_fn_executable_p "$ac_path_EGREP" || continue
5992 # Check for GNU ac_path_EGREP and select it if it is found.
5993 # Check for GNU $ac_path_EGREP
5994 case `"$ac_path_EGREP" --version 2>&1` in
5996 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5999 $as_echo_n 0123456789 >"conftest.in"
6002 cat "conftest.in" "conftest.in" >"conftest.tmp"
6003 mv "conftest.tmp" "conftest.in"
6004 cp "conftest.in" "conftest.nl"
6005 $as_echo 'EGREP' >> "conftest.nl"
6006 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6007 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6008 as_fn_arith $ac_count + 1 && ac_count=$as_val
6009 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6010 # Best one so far, save it but keep looking for a better one
6011 ac_cv_path_EGREP="$ac_path_EGREP"
6012 ac_path_EGREP_max=$ac_count
6014 # 10*(2^10) chars as input seems more than enough
6015 test $ac_count -gt 10 && break
6017 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6020 $ac_path_EGREP_found && break 3
6025 if test -z "$ac_cv_path_EGREP"; then
6026 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6029 ac_cv_path_EGREP=$EGREP
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6035 $as_echo "$ac_cv_path_EGREP" >&6; }
6036 EGREP="$ac_cv_path_EGREP"
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6042 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6043 if ${gl_cv_c_amsterdam_compiler+:} false; then :
6044 $as_echo_n "(cached) " >&6
6047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6048 /* end confdefs.h. */
6055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6056 $EGREP "Amsterdam" >/dev/null 2>&1; then :
6057 gl_cv_c_amsterdam_compiler=yes
6059 gl_cv_c_amsterdam_compiler=no
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6066 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6067 if test -z "$AR"; then
6068 if test $gl_cv_c_amsterdam_compiler = yes; then
6070 if test -z "$ARFLAGS"; then
6074 if test -n "$ac_tool_prefix"; then
6075 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6076 set dummy ${ac_tool_prefix}ar; ac_word=$2
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6078 $as_echo_n "checking for $ac_word... " >&6; }
6079 if ${ac_cv_prog_AR+:} false; then :
6080 $as_echo_n "(cached) " >&6
6082 if test -n "$AR"; then
6083 ac_cv_prog_AR="$AR" # Let the user override the test.
6085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089 test -z "$as_dir" && as_dir=.
6090 for ac_exec_ext in '' $ac_executable_extensions; do
6091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6092 ac_cv_prog_AR="${ac_tool_prefix}ar"
6093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6103 if test -n "$AR"; then
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6105 $as_echo "$AR" >&6; }
6107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6108 $as_echo "no" >&6; }
6113 if test -z "$ac_cv_prog_AR"; then
6115 # Extract the first word of "ar", so it can be a program name with args.
6116 set dummy ar; ac_word=$2
6117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6118 $as_echo_n "checking for $ac_word... " >&6; }
6119 if ${ac_cv_prog_ac_ct_AR+:} false; then :
6120 $as_echo_n "(cached) " >&6
6122 if test -n "$ac_ct_AR"; then
6123 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6129 test -z "$as_dir" && as_dir=.
6130 for ac_exec_ext in '' $ac_executable_extensions; do
6131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6132 ac_cv_prog_ac_ct_AR="ar"
6133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142 ac_ct_AR=$ac_cv_prog_ac_ct_AR
6143 if test -n "$ac_ct_AR"; then
6144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6145 $as_echo "$ac_ct_AR" >&6; }
6147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6148 $as_echo "no" >&6; }
6151 if test "x$ac_ct_AR" = x; then
6154 case $cross_compiling:$ac_tool_warned in
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6157 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6158 ac_tool_warned=yes ;;
6166 if test -z "$ARFLAGS"; then
6171 if test -z "$ARFLAGS"; then
6177 if test -z "$RANLIB"; then
6178 if test $gl_cv_c_amsterdam_compiler = yes; then
6181 if test -n "$ac_tool_prefix"; then
6182 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6183 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6185 $as_echo_n "checking for $ac_word... " >&6; }
6186 if ${ac_cv_prog_RANLIB+:} false; then :
6187 $as_echo_n "(cached) " >&6
6189 if test -n "$RANLIB"; then
6190 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6196 test -z "$as_dir" && as_dir=.
6197 for ac_exec_ext in '' $ac_executable_extensions; do
6198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6199 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6209 RANLIB=$ac_cv_prog_RANLIB
6210 if test -n "$RANLIB"; then
6211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6212 $as_echo "$RANLIB" >&6; }
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215 $as_echo "no" >&6; }
6220 if test -z "$ac_cv_prog_RANLIB"; then
6221 ac_ct_RANLIB=$RANLIB
6222 # Extract the first word of "ranlib", so it can be a program name with args.
6223 set dummy ranlib; ac_word=$2
6224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225 $as_echo_n "checking for $ac_word... " >&6; }
6226 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6227 $as_echo_n "(cached) " >&6
6229 if test -n "$ac_ct_RANLIB"; then
6230 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6236 test -z "$as_dir" && as_dir=.
6237 for ac_exec_ext in '' $ac_executable_extensions; do
6238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6239 ac_cv_prog_ac_ct_RANLIB="ranlib"
6240 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6249 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6250 if test -n "$ac_ct_RANLIB"; then
6251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6252 $as_echo "$ac_ct_RANLIB" >&6; }
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255 $as_echo "no" >&6; }
6258 if test "x$ac_ct_RANLIB" = x; then
6261 case $cross_compiling:$ac_tool_warned in
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6264 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6265 ac_tool_warned=yes ;;
6267 RANLIB=$ac_ct_RANLIB
6270 RANLIB="$ac_cv_prog_RANLIB"
6278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6279 $as_echo_n "checking for ANSI C header files... " >&6; }
6280 if ${ac_cv_header_stdc+:} false; then :
6281 $as_echo_n "(cached) " >&6
6283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6284 /* end confdefs.h. */
6298 if ac_fn_c_try_compile "$LINENO"; then :
6299 ac_cv_header_stdc=yes
6301 ac_cv_header_stdc=no
6303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6305 if test $ac_cv_header_stdc = yes; then
6306 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6308 /* end confdefs.h. */
6312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6313 $EGREP "memchr" >/dev/null 2>&1; then :
6316 ac_cv_header_stdc=no
6322 if test $ac_cv_header_stdc = yes; then
6323 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6325 /* end confdefs.h. */
6329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6330 $EGREP "free" >/dev/null 2>&1; then :
6333 ac_cv_header_stdc=no
6339 if test $ac_cv_header_stdc = yes; then
6340 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6341 if test "$cross_compiling" = yes; then :
6344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6345 /* end confdefs.h. */
6348 #if ((' ' & 0x0FF) == 0x020)
6349 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6350 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6352 # define ISLOWER(c) \
6353 (('a' <= (c) && (c) <= 'i') \
6354 || ('j' <= (c) && (c) <= 'r') \
6355 || ('s' <= (c) && (c) <= 'z'))
6356 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6359 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6364 for (i = 0; i < 256; i++)
6365 if (XOR (islower (i), ISLOWER (i))
6366 || toupper (i) != TOUPPER (i))
6371 if ac_fn_c_try_run "$LINENO"; then :
6374 ac_cv_header_stdc=no
6376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6377 conftest.$ac_objext conftest.beam conftest.$ac_ext
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6383 $as_echo "$ac_cv_header_stdc" >&6; }
6384 if test $ac_cv_header_stdc = yes; then
6386 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6390 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6391 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6392 inttypes.h stdint.h unistd.h
6394 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6395 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6397 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6398 cat >>confdefs.h <<_ACEOF
6399 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6408 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6409 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6416 if test "$MINIX" = yes; then
6418 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6421 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6424 $as_echo "#define _MINIX 1" >>confdefs.h
6427 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6433 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6434 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6435 $as_echo_n "(cached) " >&6
6437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6438 /* end confdefs.h. */
6440 # define __EXTENSIONS__ 1
6441 $ac_includes_default
6450 if ac_fn_c_try_compile "$LINENO"; then :
6451 ac_cv_safe_to_define___extensions__=yes
6453 ac_cv_safe_to_define___extensions__=no
6455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6458 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6459 test $ac_cv_safe_to_define___extensions__ = yes &&
6460 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6462 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6464 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6466 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6468 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6470 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6473 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6474 if ${ac_cv_should_define__xopen_source+:} false; then :
6475 $as_echo_n "(cached) " >&6
6477 ac_cv_should_define__xopen_source=no
6478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6479 /* end confdefs.h. */
6491 if ac_fn_c_try_compile "$LINENO"; then :
6494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495 /* end confdefs.h. */
6497 #define _XOPEN_SOURCE 500
6508 if ac_fn_c_try_compile "$LINENO"; then :
6509 ac_cv_should_define__xopen_source=yes
6511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6516 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6517 test $ac_cv_should_define__xopen_source = yes &&
6518 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6528 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6529 if ${ac_cv_sys_largefile_source+:} false; then :
6530 $as_echo_n "(cached) " >&6
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h. */
6535 #include <sys/types.h> /* for off_t */
6540 int (*fp) (FILE *, off_t, int) = fseeko;
6541 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6546 if ac_fn_c_try_link "$LINENO"; then :
6547 ac_cv_sys_largefile_source=no; break
6549 rm -f core conftest.err conftest.$ac_objext \
6550 conftest$ac_exeext conftest.$ac_ext
6551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6552 /* end confdefs.h. */
6553 #define _LARGEFILE_SOURCE 1
6554 #include <sys/types.h> /* for off_t */
6559 int (*fp) (FILE *, off_t, int) = fseeko;
6560 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6565 if ac_fn_c_try_link "$LINENO"; then :
6566 ac_cv_sys_largefile_source=1; break
6568 rm -f core conftest.err conftest.$ac_objext \
6569 conftest$ac_exeext conftest.$ac_ext
6570 ac_cv_sys_largefile_source=unknown
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6575 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6576 case $ac_cv_sys_largefile_source in #(
6579 cat >>confdefs.h <<_ACEOF
6580 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6586 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6587 # in glibc 2.1.3, but that breaks too many other things.
6588 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6589 if test $ac_cv_sys_largefile_source != unknown; then
6591 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6595 # Check whether --enable-largefile was given.
6596 if test "${enable_largefile+set}" = set; then :
6597 enableval=$enable_largefile;
6600 if test "$enable_largefile" != no; then
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6603 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6604 if ${ac_cv_sys_largefile_CC+:} false; then :
6605 $as_echo_n "(cached) " >&6
6607 ac_cv_sys_largefile_CC=no
6608 if test "$GCC" != yes; then
6611 # IRIX 6.2 and later do not support large files by default,
6612 # so use the C compiler's -n32 option if that helps.
6613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6614 /* end confdefs.h. */
6615 #include <sys/types.h>
6616 /* Check that off_t can represent 2**63 - 1 correctly.
6617 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6618 since some C++ compilers masquerading as C compilers
6619 incorrectly reject 9223372036854775807. */
6620 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6621 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6622 && LARGE_OFF_T % 2147483647 == 1)
6632 if ac_fn_c_try_compile "$LINENO"; then :
6635 rm -f core conftest.err conftest.$ac_objext
6637 if ac_fn_c_try_compile "$LINENO"; then :
6638 ac_cv_sys_largefile_CC=' -n32'; break
6640 rm -f core conftest.err conftest.$ac_objext
6644 rm -f conftest.$ac_ext
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6648 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6649 if test "$ac_cv_sys_largefile_CC" != no; then
6650 CC=$CC$ac_cv_sys_largefile_CC
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6654 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6655 if ${ac_cv_sys_file_offset_bits+:} false; then :
6656 $as_echo_n "(cached) " >&6
6659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660 /* end confdefs.h. */
6661 #include <sys/types.h>
6662 /* Check that off_t can represent 2**63 - 1 correctly.
6663 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6664 since some C++ compilers masquerading as C compilers
6665 incorrectly reject 9223372036854775807. */
6666 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6667 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6668 && LARGE_OFF_T % 2147483647 == 1)
6678 if ac_fn_c_try_compile "$LINENO"; then :
6679 ac_cv_sys_file_offset_bits=no; break
6681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6683 /* end confdefs.h. */
6684 #define _FILE_OFFSET_BITS 64
6685 #include <sys/types.h>
6686 /* Check that off_t can represent 2**63 - 1 correctly.
6687 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6688 since some C++ compilers masquerading as C compilers
6689 incorrectly reject 9223372036854775807. */
6690 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6691 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6692 && LARGE_OFF_T % 2147483647 == 1)
6702 if ac_fn_c_try_compile "$LINENO"; then :
6703 ac_cv_sys_file_offset_bits=64; break
6705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706 ac_cv_sys_file_offset_bits=unknown
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6711 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6712 case $ac_cv_sys_file_offset_bits in #(
6715 cat >>confdefs.h <<_ACEOF
6716 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6721 if test $ac_cv_sys_file_offset_bits = unknown; then
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6723 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6724 if ${ac_cv_sys_large_files+:} false; then :
6725 $as_echo_n "(cached) " >&6
6728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729 /* end confdefs.h. */
6730 #include <sys/types.h>
6731 /* Check that off_t can represent 2**63 - 1 correctly.
6732 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6733 since some C++ compilers masquerading as C compilers
6734 incorrectly reject 9223372036854775807. */
6735 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6736 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6737 && LARGE_OFF_T % 2147483647 == 1)
6747 if ac_fn_c_try_compile "$LINENO"; then :
6748 ac_cv_sys_large_files=no; break
6750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6752 /* end confdefs.h. */
6753 #define _LARGE_FILES 1
6754 #include <sys/types.h>
6755 /* Check that off_t can represent 2**63 - 1 correctly.
6756 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6757 since some C++ compilers masquerading as C compilers
6758 incorrectly reject 9223372036854775807. */
6759 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6760 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6761 && LARGE_OFF_T % 2147483647 == 1)
6771 if ac_fn_c_try_compile "$LINENO"; then :
6772 ac_cv_sys_large_files=1; break
6774 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6775 ac_cv_sys_large_files=unknown
6779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6780 $as_echo "$ac_cv_sys_large_files" >&6; }
6781 case $ac_cv_sys_large_files in #(
6784 cat >>confdefs.h <<_ACEOF
6785 #define _LARGE_FILES $ac_cv_sys_large_files
6793 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6800 # Code from module absolute-header:
6801 # Code from module acl:
6802 # Code from module alloca:
6803 # Code from module alloca-opt:
6804 # Code from module allocator:
6805 # Code from module areadlink:
6806 # Code from module areadlinkat:
6807 # Code from module argmatch:
6808 # Code from module argp:
6809 # Code from module argp-version-etc:
6810 # Code from module at-internal:
6811 # Code from module backupfile:
6812 # Code from module bitrotate:
6813 # Code from module btowc:
6814 # Code from module c-ctype:
6815 # Code from module c-strcase:
6816 # Code from module c-strcaseeq:
6817 # Code from module canonicalize-lgpl:
6818 # Code from module careadlinkat:
6819 # Code from module chdir:
6820 # Code from module chdir-long:
6821 # Code from module chown:
6822 # Code from module clock-time:
6823 # Code from module cloexec:
6824 # Code from module close:
6825 # Code from module close-stream:
6826 # Code from module closedir:
6827 # Code from module closeout:
6828 # Code from module configmake:
6829 # Code from module d-ino:
6830 # Code from module dirent:
6831 # Code from module dirent-safer:
6832 # Code from module dirfd:
6833 # Code from module dirname:
6834 # Code from module dirname-lgpl:
6835 # Code from module dosname:
6836 # Code from module double-slash-root:
6837 # Code from module dup:
6838 # Code from module dup2:
6839 # Code from module environ:
6840 # Code from module errno:
6841 # Code from module error:
6842 # Code from module euidaccess:
6843 # Code from module exclude:
6844 # Code from module exitfail:
6845 # Code from module extensions:
6847 # Code from module extern-inline:
6848 # Code from module faccessat:
6849 # Code from module fchdir:
6850 # Code from module fchmodat:
6851 # Code from module fchownat:
6852 # Code from module fcntl:
6853 # Code from module fcntl-h:
6854 # Code from module fd-hook:
6855 # Code from module fdopendir:
6856 # Code from module fdutimensat:
6857 # Code from module fileblocks:
6858 # Code from module filename:
6859 # Code from module filenamecat-lgpl:
6860 # Code from module float:
6861 # Code from module fnmatch:
6862 # Code from module fnmatch-gnu:
6863 # Code from module fpending:
6864 # Code from module fprintftime:
6865 # Code from module fseek:
6866 # Code from module fseeko:
6868 # Code from module fstat:
6869 # Code from module fstatat:
6870 # Code from module full-write:
6871 # Code from module futimens:
6872 # Code from module getcwd:
6873 # Code from module getcwd-lgpl:
6874 # Code from module getdelim:
6875 # Code from module getdtablesize:
6876 # Code from module getgroups:
6877 # Code from module getline:
6878 # Code from module getopt-gnu:
6879 # Code from module getopt-posix:
6880 # Code from module getpagesize:
6881 # Code from module gettext:
6882 # Code from module gettext-h:
6883 # Code from module gettime:
6884 # Code from module gettimeofday:
6885 # Code from module gitlog-to-changelog:
6886 # Code from module group-member:
6887 # Code from module hash:
6888 # Code from module havelib:
6889 # Code from module human:
6890 # Code from module include_next:
6891 # Code from module intprops:
6892 # Code from module inttostr:
6893 # Code from module inttypes:
6894 # Code from module inttypes-incomplete:
6895 # Code from module isatty:
6896 # Code from module iswblank:
6897 # Code from module langinfo:
6898 # Code from module largefile:
6900 # Code from module lchown:
6901 # Code from module link:
6902 # Code from module link-follow:
6903 # Code from module linkat:
6904 # Code from module localcharset:
6905 # Code from module locale:
6906 # Code from module localeconv:
6907 # Code from module lseek:
6908 # Code from module lstat:
6909 # Code from module malloc-gnu:
6910 # Code from module malloc-posix:
6911 # Code from module malloca:
6912 # Code from module manywarnings:
6913 # Code from module mbchar:
6914 # Code from module mbrtowc:
6915 # Code from module mbscasecmp:
6916 # Code from module mbsinit:
6917 # Code from module mbsrtowcs:
6918 # Code from module mbtowc:
6919 # Code from module mbuiter:
6920 # Code from module memchr:
6921 # Code from module mempcpy:
6922 # Code from module memrchr:
6923 # Code from module mkdir:
6924 # Code from module mkdirat:
6925 # Code from module mkdtemp:
6926 # Code from module mkfifo:
6927 # Code from module mkfifoat:
6928 # Code from module mknod:
6929 # Code from module mktime:
6930 # Code from module modechange:
6931 # Code from module msvc-inval:
6932 # Code from module msvc-nothrow:
6933 # Code from module multiarch:
6934 # Code from module nl_langinfo:
6935 # Code from module nocrash:
6936 # Code from module obstack:
6937 # Code from module open:
6938 # Code from module openat:
6939 # Code from module openat-die:
6940 # Code from module openat-h:
6941 # Code from module opendir:
6942 # Code from module parse-datetime:
6943 # Code from module pathmax:
6944 # Code from module posix_openpt:
6945 # Code from module priv-set:
6946 # Code from module progname:
6947 # Code from module ptsname:
6948 # Code from module ptsname_r:
6949 # Code from module qacl:
6950 # Code from module quote:
6951 # Code from module quotearg:
6952 # Code from module quotearg-simple:
6953 # Code from module raise:
6954 # Code from module rawmemchr:
6955 # Code from module read:
6956 # Code from module readdir:
6957 # Code from module readlink:
6958 # Code from module readlinkat:
6959 # Code from module realloc-posix:
6960 # Code from module regex:
6961 # Code from module rename:
6962 # Code from module renameat:
6963 # Code from module rewinddir:
6964 # Code from module rmdir:
6965 # Code from module root-uid:
6966 # Code from module rpmatch:
6967 # Code from module safe-read:
6968 # Code from module safe-write:
6969 # Code from module same-inode:
6970 # Code from module save-cwd:
6971 # Code from module savedir:
6972 # Code from module secure_getenv:
6973 # Code from module selinux-at:
6974 # Code from module selinux-h:
6975 # Code from module setenv:
6976 # Code from module signal-h:
6977 # Code from module size_max:
6978 # Code from module sleep:
6979 # Code from module snippet/_Noreturn:
6980 # Code from module snippet/arg-nonnull:
6981 # Code from module snippet/c++defs:
6982 # Code from module snippet/unused-parameter:
6983 # Code from module snippet/warn-on-use:
6984 # Code from module snprintf:
6985 # Code from module ssize_t:
6986 # Code from module stat:
6987 # Code from module stat-macros:
6988 # Code from module stat-time:
6989 # Code from module statat:
6990 # Code from module stdalign:
6991 # Code from module stdarg:
6995 # Code from module stdbool:
6996 # Code from module stddef:
6997 # Code from module stdint:
6998 # Code from module stdio:
6999 # Code from module stdlib:
7000 # Code from module stpcpy:
7001 # Code from module strcase:
7002 # Code from module strchrnul:
7003 # Code from module strdup-posix:
7004 # Code from module streq:
7005 # Code from module strerror:
7006 # Code from module strerror-override:
7007 # Code from module strftime:
7008 # Code from module string:
7009 # Code from module strings:
7010 # Code from module strndup:
7011 # Code from module strnlen:
7012 # Code from module strnlen1:
7013 # Code from module strtoimax:
7014 # Code from module strtol:
7015 # Code from module strtoll:
7016 # Code from module strtoul:
7017 # Code from module strtoull:
7018 # Code from module strtoumax:
7019 # Code from module symlink:
7020 # Code from module symlinkat:
7021 # Code from module sys_stat:
7022 # Code from module sys_time:
7023 # Code from module sys_types:
7024 # Code from module sysexits:
7025 # Code from module tempname:
7026 # Code from module time:
7027 # Code from module time_r:
7028 # Code from module timespec:
7029 # Code from module ttyname_r:
7030 # Code from module unistd:
7031 # Code from module unistd-safer:
7032 # Code from module unitypes:
7033 # Code from module uniwidth/base:
7034 # Code from module uniwidth/width:
7035 # Code from module unlink:
7036 # Code from module unlinkat:
7037 # Code from module unlinkdir:
7038 # Code from module unlocked-io:
7039 # Code from module unlockpt:
7040 # Code from module unsetenv:
7041 # Code from module utimens:
7042 # Code from module utimensat:
7043 # Code from module vasnprintf:
7044 # Code from module vasprintf:
7045 # Code from module verify:
7046 # Code from module version-etc:
7047 # Code from module version-etc-fsf:
7048 # Code from module vsnprintf:
7049 # Code from module warnings:
7050 # Code from module wchar:
7051 # Code from module wcrtomb:
7052 # Code from module wctype-h:
7053 # Code from module wcwidth:
7054 # Code from module write:
7055 # Code from module xalloc:
7056 # Code from module xalloc-die:
7057 # Code from module xalloc-oversized:
7058 # Code from module xgetcwd:
7059 # Code from module xsize:
7060 # Code from module xstrndup:
7061 # Code from module xstrtol:
7062 # Code from module xstrtoumax:
7063 # Code from module xvasprintf:
7065 if test -n "$ac_tool_prefix"; then
7068 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7069 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7071 $as_echo_n "checking for $ac_word... " >&6; }
7072 if ${ac_cv_prog_AR+:} false; then :
7073 $as_echo_n "(cached) " >&6
7075 if test -n "$AR"; then
7076 ac_cv_prog_AR="$AR" # Let the user override the test.
7078 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7082 test -z "$as_dir" && as_dir=.
7083 for ac_exec_ext in '' $ac_executable_extensions; do
7084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7085 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7096 if test -n "$AR"; then
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7098 $as_echo "$AR" >&6; }
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7101 $as_echo "no" >&6; }
7105 test -n "$AR" && break
7108 if test -z "$AR"; then
7112 # Extract the first word of "$ac_prog", so it can be a program name with args.
7113 set dummy $ac_prog; ac_word=$2
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7115 $as_echo_n "checking for $ac_word... " >&6; }
7116 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7117 $as_echo_n "(cached) " >&6
7119 if test -n "$ac_ct_AR"; then
7120 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7126 test -z "$as_dir" && as_dir=.
7127 for ac_exec_ext in '' $ac_executable_extensions; do
7128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7129 ac_cv_prog_ac_ct_AR="$ac_prog"
7130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7140 if test -n "$ac_ct_AR"; then
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7142 $as_echo "$ac_ct_AR" >&6; }
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145 $as_echo "no" >&6; }
7149 test -n "$ac_ct_AR" && break
7152 if test "x$ac_ct_AR" = x; then
7155 case $cross_compiling:$ac_tool_warned in
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7158 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7159 ac_tool_warned=yes ;;
7166 # Check whether --enable-largefile was given.
7167 if test "${enable_largefile+set}" = set; then :
7168 enableval=$enable_largefile;
7171 if test "$enable_largefile" != no; then
7173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7174 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7175 if ${ac_cv_sys_largefile_CC+:} false; then :
7176 $as_echo_n "(cached) " >&6
7178 ac_cv_sys_largefile_CC=no
7179 if test "$GCC" != yes; then
7182 # IRIX 6.2 and later do not support large files by default,
7183 # so use the C compiler's -n32 option if that helps.
7184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7185 /* end confdefs.h. */
7186 #include <sys/types.h>
7187 /* Check that off_t can represent 2**63 - 1 correctly.
7188 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7189 since some C++ compilers masquerading as C compilers
7190 incorrectly reject 9223372036854775807. */
7191 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7192 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7193 && LARGE_OFF_T % 2147483647 == 1)
7203 if ac_fn_c_try_compile "$LINENO"; then :
7206 rm -f core conftest.err conftest.$ac_objext
7208 if ac_fn_c_try_compile "$LINENO"; then :
7209 ac_cv_sys_largefile_CC=' -n32'; break
7211 rm -f core conftest.err conftest.$ac_objext
7215 rm -f conftest.$ac_ext
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7219 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7220 if test "$ac_cv_sys_largefile_CC" != no; then
7221 CC=$CC$ac_cv_sys_largefile_CC
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7225 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7226 if ${ac_cv_sys_file_offset_bits+:} false; then :
7227 $as_echo_n "(cached) " >&6
7230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231 /* end confdefs.h. */
7232 #include <sys/types.h>
7233 /* Check that off_t can represent 2**63 - 1 correctly.
7234 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7235 since some C++ compilers masquerading as C compilers
7236 incorrectly reject 9223372036854775807. */
7237 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7238 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7239 && LARGE_OFF_T % 2147483647 == 1)
7249 if ac_fn_c_try_compile "$LINENO"; then :
7250 ac_cv_sys_file_offset_bits=no; break
7252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7254 /* end confdefs.h. */
7255 #define _FILE_OFFSET_BITS 64
7256 #include <sys/types.h>
7257 /* Check that off_t can represent 2**63 - 1 correctly.
7258 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7259 since some C++ compilers masquerading as C compilers
7260 incorrectly reject 9223372036854775807. */
7261 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7262 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7263 && LARGE_OFF_T % 2147483647 == 1)
7273 if ac_fn_c_try_compile "$LINENO"; then :
7274 ac_cv_sys_file_offset_bits=64; break
7276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7277 ac_cv_sys_file_offset_bits=unknown
7281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7282 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7283 case $ac_cv_sys_file_offset_bits in #(
7286 cat >>confdefs.h <<_ACEOF
7287 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7292 if test $ac_cv_sys_file_offset_bits = unknown; then
7293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7294 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7295 if ${ac_cv_sys_large_files+:} false; then :
7296 $as_echo_n "(cached) " >&6
7299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7300 /* end confdefs.h. */
7301 #include <sys/types.h>
7302 /* Check that off_t can represent 2**63 - 1 correctly.
7303 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7304 since some C++ compilers masquerading as C compilers
7305 incorrectly reject 9223372036854775807. */
7306 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7307 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7308 && LARGE_OFF_T % 2147483647 == 1)
7318 if ac_fn_c_try_compile "$LINENO"; then :
7319 ac_cv_sys_large_files=no; break
7321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7323 /* end confdefs.h. */
7324 #define _LARGE_FILES 1
7325 #include <sys/types.h>
7326 /* Check that off_t can represent 2**63 - 1 correctly.
7327 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7328 since some C++ compilers masquerading as C compilers
7329 incorrectly reject 9223372036854775807. */
7330 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7331 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7332 && LARGE_OFF_T % 2147483647 == 1)
7342 if ac_fn_c_try_compile "$LINENO"; then :
7343 ac_cv_sys_large_files=1; break
7345 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7346 ac_cv_sys_large_files=unknown
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7351 $as_echo "$ac_cv_sys_large_files" >&6; }
7352 case $ac_cv_sys_large_files in #(
7355 cat >>confdefs.h <<_ACEOF
7356 #define _LARGE_FILES $ac_cv_sys_large_files
7364 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7369 $as_echo_n "checking for inline... " >&6; }
7370 if ${ac_cv_c_inline+:} false; then :
7371 $as_echo_n "(cached) " >&6
7374 for ac_kw in inline __inline__ __inline; do
7375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7376 /* end confdefs.h. */
7379 static $ac_kw foo_t static_foo () {return 0; }
7380 $ac_kw foo_t foo () {return 0; }
7384 if ac_fn_c_try_compile "$LINENO"; then :
7385 ac_cv_c_inline=$ac_kw
7387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7388 test "$ac_cv_c_inline" != no && break
7392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7393 $as_echo "$ac_cv_c_inline" >&6; }
7395 case $ac_cv_c_inline in
7398 case $ac_cv_c_inline in
7400 *) ac_val=$ac_cv_c_inline;;
7402 cat >>confdefs.h <<_ACEOF
7404 #define inline $ac_val
7414 for ac_header in $ac_header_list
7416 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7417 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7419 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7420 cat >>confdefs.h <<_ACEOF
7421 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7464 for ac_header in sys/buf.h
7466 ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7467 #include <sys/param.h>
7470 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7471 cat >>confdefs.h <<_ACEOF
7472 #define HAVE_SYS_BUF_H 1
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7481 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7482 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7483 $as_echo_n "(cached) " >&6
7485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7486 /* end confdefs.h. */
7487 #include <sys/types.h>
7491 return makedev(0, 0);
7496 if ac_fn_c_try_link "$LINENO"; then :
7497 ac_cv_header_sys_types_h_makedev=yes
7499 ac_cv_header_sys_types_h_makedev=no
7501 rm -f core conftest.err conftest.$ac_objext \
7502 conftest$ac_exeext conftest.$ac_ext
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7506 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7508 if test $ac_cv_header_sys_types_h_makedev = no; then
7509 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7510 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7512 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7518 if test $ac_cv_header_sys_mkdev_h = no; then
7519 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7520 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7522 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7532 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7533 if ${diff_cv_st_fstype_string+:} false; then :
7534 $as_echo_n "(cached) " >&6
7536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7537 /* end confdefs.h. */
7538 #include <sys/types.h>
7539 #include <sys/stat.h>
7543 struct stat s; s.st_fstype[0] = 'x';
7548 if ac_fn_c_try_compile "$LINENO"; then :
7549 diff_cv_st_fstype_string=yes
7551 diff_cv_st_fstype_string=no
7553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7557 $as_echo "$diff_cv_st_fstype_string" >&6; }
7558 if test $diff_cv_st_fstype_string = yes; then
7560 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7564 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7565 # of very useful file_has_acl() function) we need following checks that restrict
7566 # tar to use POSIX.1e ACLs only.
7568 # Check whether --with-posix-acls was given.
7569 if test "${with_posix_acls+set}" = set; then :
7570 withval=$with_posix_acls;
7575 if test "x$with_posix_acls" != "xno"; then
7576 for ac_header in sys/acl.h
7578 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7579 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7580 cat >>confdefs.h <<_ACEOF
7581 #define HAVE_SYS_ACL_H 1
7590 for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7591 acl_to_text acl_from_text acl_delete_def_file \
7593 test "x$with_posix_acls" = xno && break
7594 as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7596 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7597 if eval \${$as_ac_Search+:} false; then :
7598 $as_echo_n "(cached) " >&6
7600 ac_func_search_save_LIBS=$LIBS
7601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7602 /* end confdefs.h. */
7604 /* Override any GCC internal prototype to avoid an error.
7605 Use char because int might match the return type of a GCC
7606 builtin and then its argument prototype would still apply. */
7610 char $tar_acl_func ();
7614 return $tar_acl_func ();
7619 for ac_lib in '' acl pacl; do
7620 if test -z "$ac_lib"; then
7621 ac_res="none required"
7624 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7626 if ac_fn_c_try_link "$LINENO"; then :
7627 eval "$as_ac_Search=\$ac_res"
7629 rm -f core conftest.err conftest.$ac_objext \
7631 if eval \${$as_ac_Search+:} false; then :
7635 if eval \${$as_ac_Search+:} false; then :
7638 eval "$as_ac_Search=no"
7641 LIBS=$ac_func_search_save_LIBS
7643 eval ac_res=\$$as_ac_Search
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7645 $as_echo "$ac_res" >&6; }
7646 eval ac_res=\$$as_ac_Search
7647 if test "$ac_res" != no; then :
7648 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7655 if test "x$with_posix_acls" != xno; then
7657 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7661 # disable acls in gnulib's checks
7662 export enable_acl=no
7665 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7666 if test "x$ac_cv_type_mode_t" = xyes; then :
7670 cat >>confdefs.h <<_ACEOF
7676 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7677 if test "x$ac_cv_type_pid_t" = xyes; then :
7681 cat >>confdefs.h <<_ACEOF
7687 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7688 if test "x$ac_cv_type_off_t" = xyes; then :
7692 cat >>confdefs.h <<_ACEOF
7693 #define off_t long int
7698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7699 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
7700 if ${ac_cv_type_uid_t+:} false; then :
7701 $as_echo_n "(cached) " >&6
7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7704 /* end confdefs.h. */
7705 #include <sys/types.h>
7708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7709 $EGREP "uid_t" >/dev/null 2>&1; then :
7710 ac_cv_type_uid_t=yes
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7718 $as_echo "$ac_cv_type_uid_t" >&6; }
7719 if test $ac_cv_type_uid_t = no; then
7721 $as_echo "#define uid_t int" >>confdefs.h
7724 $as_echo "#define gid_t int" >>confdefs.h
7728 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
7729 if test "x$ac_cv_type_major_t" = xyes; then :
7733 $as_echo "#define major_t int" >>confdefs.h
7737 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
7738 if test "x$ac_cv_type_minor_t" = xyes; then :
7742 $as_echo "#define minor_t int" >>confdefs.h
7746 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
7747 if test "x$ac_cv_type_dev_t" = xyes; then :
7751 cat >>confdefs.h <<_ACEOF
7752 #define dev_t unsigned
7757 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
7758 if test "x$ac_cv_type_ino_t" = xyes; then :
7762 cat >>confdefs.h <<_ACEOF
7763 #define ino_t unsigned
7770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
7771 $as_echo_n "checking for ssize_t... " >&6; }
7772 if ${gt_cv_ssize_t+:} false; then :
7773 $as_echo_n "(cached) " >&6
7775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7776 /* end confdefs.h. */
7777 #include <sys/types.h>
7781 int x = sizeof (ssize_t *) + sizeof (ssize_t);
7787 if ac_fn_c_try_compile "$LINENO"; then :
7792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
7795 $as_echo "$gt_cv_ssize_t" >&6; }
7796 if test $gt_cv_ssize_t = no; then
7798 $as_echo "#define ssize_t int" >>confdefs.h
7809 LIBC_FATAL_STDERR_=1
7810 export LIBC_FATAL_STDERR_
7812 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7813 if test "x$ac_cv_type_size_t" = xyes; then :
7817 cat >>confdefs.h <<_ACEOF
7818 #define size_t unsigned int
7823 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
7824 # for constant arguments. Useless!
7825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
7826 $as_echo_n "checking for working alloca.h... " >&6; }
7827 if ${ac_cv_working_alloca_h+:} false; then :
7828 $as_echo_n "(cached) " >&6
7830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7831 /* end confdefs.h. */
7836 char *p = (char *) alloca (2 * sizeof (int));
7842 if ac_fn_c_try_link "$LINENO"; then :
7843 ac_cv_working_alloca_h=yes
7845 ac_cv_working_alloca_h=no
7847 rm -f core conftest.err conftest.$ac_objext \
7848 conftest$ac_exeext conftest.$ac_ext
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
7851 $as_echo "$ac_cv_working_alloca_h" >&6; }
7852 if test $ac_cv_working_alloca_h = yes; then
7854 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
7859 $as_echo_n "checking for alloca... " >&6; }
7860 if ${ac_cv_func_alloca_works+:} false; then :
7861 $as_echo_n "(cached) " >&6
7863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7864 /* end confdefs.h. */
7866 # define alloca __builtin_alloca
7869 # include <malloc.h>
7870 # define alloca _alloca
7872 # ifdef HAVE_ALLOCA_H
7873 # include <alloca.h>
7878 # ifndef alloca /* predefined by HP cc +Olibcalls */
7879 void *alloca (size_t);
7889 char *p = (char *) alloca (1);
7895 if ac_fn_c_try_link "$LINENO"; then :
7896 ac_cv_func_alloca_works=yes
7898 ac_cv_func_alloca_works=no
7900 rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext conftest.$ac_ext
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7904 $as_echo "$ac_cv_func_alloca_works" >&6; }
7906 if test $ac_cv_func_alloca_works = yes; then
7908 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7911 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7912 # that cause trouble. Some versions do not even contain alloca or
7913 # contain a buggy version. If you still want to use their alloca,
7914 # use ar to extract alloca.o from them instead of compiling alloca.c.
7920 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
7922 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
7926 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
7927 if ${ac_cv_os_cray+:} false; then :
7928 $as_echo_n "(cached) " >&6
7930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7931 /* end confdefs.h. */
7932 #if defined CRAY && ! defined CRAY2
7939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7940 $EGREP "webecray" >/dev/null 2>&1; then :
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
7949 $as_echo "$ac_cv_os_cray" >&6; }
7950 if test $ac_cv_os_cray = yes; then
7951 for ac_func in _getb67 GETB67 getb67; do
7952 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7953 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7954 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7956 cat >>confdefs.h <<_ACEOF
7957 #define CRAY_STACKSEG_END $ac_func
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7967 $as_echo_n "checking stack direction for C alloca... " >&6; }
7968 if ${ac_cv_c_stack_direction+:} false; then :
7969 $as_echo_n "(cached) " >&6
7971 if test "$cross_compiling" = yes; then :
7972 ac_cv_c_stack_direction=0
7974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7975 /* end confdefs.h. */
7976 $ac_includes_default
7978 find_stack_direction (int *addr, int depth)
7983 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7984 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7989 main (int argc, char **argv)
7991 return find_stack_direction (0, argc + !argv + 20) < 0;
7994 if ac_fn_c_try_run "$LINENO"; then :
7995 ac_cv_c_stack_direction=1
7997 ac_cv_c_stack_direction=-1
7999 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8000 conftest.$ac_objext conftest.beam conftest.$ac_ext
8004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8005 $as_echo "$ac_cv_c_stack_direction" >&6; }
8006 cat >>confdefs.h <<_ACEOF
8007 #define STACK_DIRECTION $ac_cv_c_stack_direction
8013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8014 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8015 if ${ac_cv_c_restrict+:} false; then :
8016 $as_echo_n "(cached) " >&6
8019 # The order here caters to the fact that C++ does not require restrict.
8020 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8022 /* end confdefs.h. */
8023 typedef int * int_ptr;
8024 int foo (int_ptr $ac_kw ip) {
8038 if ac_fn_c_try_compile "$LINENO"; then :
8039 ac_cv_c_restrict=$ac_kw
8041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8042 test "$ac_cv_c_restrict" != no && break
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8047 $as_echo "$ac_cv_c_restrict" >&6; }
8049 case $ac_cv_c_restrict in
8051 no) $as_echo "#define restrict /**/" >>confdefs.h
8053 *) cat >>confdefs.h <<_ACEOF
8054 #define restrict $ac_cv_c_restrict
8059 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8060 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8066 cat >>confdefs.h <<_ACEOF
8067 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8070 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8071 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8077 cat >>confdefs.h <<_ACEOF
8078 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8081 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8082 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8088 cat >>confdefs.h <<_ACEOF
8089 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8092 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8093 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8099 cat >>confdefs.h <<_ACEOF
8100 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8103 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8104 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8110 cat >>confdefs.h <<_ACEOF
8111 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8114 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8115 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8121 cat >>confdefs.h <<_ACEOF
8122 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8125 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8126 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8132 cat >>confdefs.h <<_ACEOF
8133 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8136 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8137 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8143 cat >>confdefs.h <<_ACEOF
8144 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8147 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8148 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8154 cat >>confdefs.h <<_ACEOF
8155 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8158 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8159 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8165 cat >>confdefs.h <<_ACEOF
8166 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8169 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8170 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8176 cat >>confdefs.h <<_ACEOF
8177 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8180 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8181 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8187 cat >>confdefs.h <<_ACEOF
8188 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8191 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8192 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8198 cat >>confdefs.h <<_ACEOF
8199 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8205 for ac_func in $ac_func_list
8207 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8208 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8209 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8210 cat >>confdefs.h <<_ACEOF
8211 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8226 XGETTEXT_EXTRA_OPTIONS=
8228 # Make sure we can run config.sub.
8229 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8230 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8233 $as_echo_n "checking build system type... " >&6; }
8234 if ${ac_cv_build+:} false; then :
8235 $as_echo_n "(cached) " >&6
8237 ac_build_alias=$build_alias
8238 test "x$ac_build_alias" = x &&
8239 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8240 test "x$ac_build_alias" = x &&
8241 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8242 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8243 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8247 $as_echo "$ac_cv_build" >&6; }
8248 case $ac_cv_build in
8250 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8253 ac_save_IFS=$IFS; IFS='-'
8259 # Remember, the first character of IFS is used to create $*,
8260 # except with old shells:
8263 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8267 $as_echo_n "checking host system type... " >&6; }
8268 if ${ac_cv_host+:} false; then :
8269 $as_echo_n "(cached) " >&6
8271 if test "x$host_alias" = x; then
8272 ac_cv_host=$ac_cv_build
8274 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8275 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8280 $as_echo "$ac_cv_host" >&6; }
8283 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8286 ac_save_IFS=$IFS; IFS='-'
8292 # Remember, the first character of IFS is used to create $*,
8293 # except with old shells:
8296 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8300 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8301 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8302 $as_echo_n "(cached) " >&6
8304 if test "$cross_compiling" = yes; then :
8306 # Guess yes on glibc systems with Linux kernel.
8307 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8308 # If we don't know, assume the worst.
8309 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
8313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8314 /* end confdefs.h. */
8315 #include <sys/types.h>
8316 #include <sys/stat.h>
8322 DIR *dp = opendir (".");
8330 if (lstat (e->d_name, &st) != 0)
8332 if (e->d_ino != st.st_ino)
8340 if ac_fn_c_try_run "$LINENO"; then :
8341 gl_cv_struct_dirent_d_ino=yes
8343 gl_cv_struct_dirent_d_ino=no
8345 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8346 conftest.$ac_objext conftest.beam conftest.$ac_ext
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8351 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8352 case "$gl_cv_struct_dirent_d_ino" in
8355 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8362 $as_echo_n "checking for long file names... " >&6; }
8363 if ${ac_cv_sys_long_file_names+:} false; then :
8364 $as_echo_n "(cached) " >&6
8366 ac_cv_sys_long_file_names=yes
8367 # Test for long file names in all the places we know might matter:
8368 # . the current directory, where building will happen
8369 # $prefix/lib where we will be installing things
8370 # $exec_prefix/lib likewise
8371 # $TMPDIR if set, where it might want to write temporary files
8372 # /tmp where it might want to write temporary files
8375 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8376 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8377 # in the usual case where exec_prefix is '${prefix}'.
8379 . | /* | ?:[\\/]*) ;; #(
8382 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8383 ac_xdir=$ac_dir/cf$$
8384 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8385 ac_tf1=$ac_xdir/conftest9012345
8386 ac_tf2=$ac_xdir/conftest9012346
8387 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8388 ac_cv_sys_long_file_names=no
8389 rm -f -r "$ac_xdir" 2>/dev/null
8390 test $ac_cv_sys_long_file_names = no && break
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8394 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8395 if test $ac_cv_sys_long_file_names = yes; then
8397 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8410 GNULIB_MBSNRTOWCS=0;
8413 GNULIB_WCSNRTOMBS=0;
8430 GNULIB_WCSCASECMP=0;
8431 GNULIB_WCSNCASECMP=0;
8481 HAVE_DECL_WCWIDTH=1;
8482 REPLACE_MBSTATE_T=0;
8488 REPLACE_MBSRTOWCS=0;
8489 REPLACE_MBSNRTOWCS=0;
8491 REPLACE_WCSRTOMBS=0;
8492 REPLACE_WCSNRTOMBS=0;
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8498 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8499 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8500 $as_echo_n "(cached) " >&6
8502 gl_cv_header_wchar_h_correct_inline=yes
8503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8504 /* end confdefs.h. */
8506 #define wcstod renamed_wcstod
8507 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8509 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8510 included before <wchar.h>. */
8515 extern int zero (void);
8516 int main () { return zero(); }
8519 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8520 (eval $ac_compile) 2>&5
8522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8523 test $ac_status = 0; }; then
8524 mv conftest.$ac_objext conftest1.$ac_objext
8525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8526 /* end confdefs.h. */
8528 #define wcstod renamed_wcstod
8529 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8531 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8532 included before <wchar.h>. */
8537 int zero (void) { return 0; }
8540 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8541 (eval $ac_compile) 2>&5
8543 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8544 test $ac_status = 0; }; then
8545 mv conftest.$ac_objext conftest2.$ac_objext
8546 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8549 gl_cv_header_wchar_h_correct_inline=no
8553 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8557 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8558 if test $gl_cv_header_wchar_h_correct_inline = no; then
8559 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8560 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8561 C99 mode. You have four options:
8562 - Add the flag -fgnu89-inline to CC and reconfigure, or
8563 - Fix your include files, using parts of
8564 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8565 - Use a gcc version older than 4.3, or
8566 - Don't use the flags -std=c99 or -std=gnu99.
8567 Configuration aborted." "$LINENO" 5
8573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8574 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8575 if ${am_cv_langinfo_codeset+:} false; then :
8576 $as_echo_n "(cached) " >&6
8578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8579 /* end confdefs.h. */
8580 #include <langinfo.h>
8584 char* cs = nl_langinfo(CODESET); return !cs;
8589 if ac_fn_c_try_link "$LINENO"; then :
8590 am_cv_langinfo_codeset=yes
8592 am_cv_langinfo_codeset=no
8594 rm -f core conftest.err conftest.$ac_objext \
8595 conftest$ac_exeext conftest.$ac_ext
8598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8599 $as_echo "$am_cv_langinfo_codeset" >&6; }
8600 if test $am_cv_langinfo_codeset = yes; then
8602 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8610 $as_echo_n "checking for a traditional french locale... " >&6; }
8611 if ${gt_cv_locale_fr+:} false; then :
8612 $as_echo_n "(cached) " >&6
8615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8616 /* end confdefs.h. */
8620 #if HAVE_LANGINFO_CODESET
8621 # include <langinfo.h>
8628 /* Check whether the given locale name is recognized by the system. */
8629 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8630 /* On native Windows, setlocale(category, "") looks at the system settings,
8631 not at the environment variables. Also, when an encoding suffix such
8632 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8633 category of the locale to "C". */
8634 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8635 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8638 if (setlocale (LC_ALL, "") == NULL) return 1;
8640 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8641 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8642 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8643 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8644 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8645 some unit tests fail.
8646 On MirBSD 10, when an unsupported locale is specified, setlocale()
8647 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8648 #if HAVE_LANGINFO_CODESET
8650 const char *cs = nl_langinfo (CODESET);
8651 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8652 || strcmp (cs, "UTF-8") == 0)
8657 /* On Cygwin, avoid locale names without encoding suffix, because the
8658 locale_charset() function relies on the encoding suffix. Note that
8659 LC_ALL is set on the command line. */
8660 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8662 /* Check whether in the abbreviation of the second month, the second
8663 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8664 one byte long. This excludes the UTF-8 encoding. */
8665 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8666 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8667 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8668 /* Check whether the decimal separator is a comma.
8669 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8670 are nl_langinfo(RADIXCHAR) are both ".". */
8671 if (localeconv () ->decimal_point[0] != ',') return 1;
8677 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8678 (eval $ac_link) 2>&5
8680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8681 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8683 # Handle native Windows specially, because there setlocale() interprets
8684 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8685 # "fr" or "fra" as "French" or "French_France.1252",
8686 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8687 # "ja" as "Japanese" or "Japanese_Japan.932",
8690 # Test for the native Windows locale name.
8691 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8692 gt_cv_locale_fr=French_France.1252
8695 gt_cv_locale_fr=none
8699 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8700 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8701 # configure script would override the LC_ALL setting. Likewise for
8702 # LC_CTYPE, which is also set at the beginning of the configure script.
8703 # Test for the usual locale name.
8704 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8705 gt_cv_locale_fr=fr_FR
8707 # Test for the locale name with explicit encoding suffix.
8708 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8709 gt_cv_locale_fr=fr_FR.ISO-8859-1
8711 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
8712 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8713 gt_cv_locale_fr=fr_FR.ISO8859-1
8715 # Test for the HP-UX locale name.
8716 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8717 gt_cv_locale_fr=fr_FR.iso88591
8719 # Test for the Solaris 7 locale name.
8720 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8724 gt_cv_locale_fr=none
8736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
8737 $as_echo "$gt_cv_locale_fr" >&6; }
8738 LOCALE_FR=$gt_cv_locale_fr
8744 GNULIB_CALLOC_POSIX=0;
8745 GNULIB_CANONICALIZE_FILE_NAME=0;
8746 GNULIB_GETLOADAVG=0;
8749 GNULIB_MALLOC_POSIX=0;
8756 GNULIB_POSIX_OPENPT=0;
8762 GNULIB_REALLOC_POSIX=0;
8765 GNULIB_SECURE_GETENV=0;
8770 GNULIB_SYSTEM_POSIX=0;
8776 HAVE_CANONICALIZE_FILE_NAME=1;
8777 HAVE_DECL_GETLOADAVG=1;
8785 HAVE_POSIX_OPENPT=1;
8793 HAVE_SECURE_GETENV=1;
8799 HAVE_STRUCT_RANDOM_DATA=1;
8800 HAVE_SYS_LOADAVG_H=0;
8802 HAVE_DECL_UNSETENV=1;
8804 REPLACE_CANONICALIZE_FILE_NAME=0;
8809 REPLACE_PTSNAME_R=0;
8827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
8828 $as_echo_n "checking whether // is distinct from /... " >&6; }
8829 if ${gl_cv_double_slash_root+:} false; then :
8830 $as_echo_n "(cached) " >&6
8832 if test x"$cross_compiling" = xyes ; then
8833 # When cross-compiling, there is no way to tell whether // is special
8834 # short of a list of hosts. However, the only known hosts to date
8835 # that have a distinct // are Apollo DomainOS (too old to port to),
8836 # Cygwin, and z/OS. If anyone knows of another system for which // has
8837 # special semantics and is distinct from /, please report it to
8838 # <bug-gnulib@gnu.org>.
8840 *-cygwin | i370-ibm-openedition)
8841 gl_cv_double_slash_root=yes ;;
8843 # Be optimistic and assume that / and // are the same when we
8845 gl_cv_double_slash_root='unknown, assuming no' ;;
8848 set x `ls -di / // 2>/dev/null`
8849 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
8850 gl_cv_double_slash_root=no
8852 gl_cv_double_slash_root=yes
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
8857 $as_echo "$gl_cv_double_slash_root" >&6; }
8858 if test "$gl_cv_double_slash_root" = yes; then
8860 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
8869 $as_echo_n "checking whether realpath works... " >&6; }
8870 if ${gl_cv_func_realpath_works+:} false; then :
8871 $as_echo_n "(cached) " >&6
8876 if test "$cross_compiling" = yes; then :
8878 # Guess yes on glibc systems.
8879 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
8880 # If we don't know, assume the worst.
8881 *) gl_cv_func_realpath_works="guessing no" ;;
8885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8886 /* end confdefs.h. */
8891 #if defined __MACH__ && defined __APPLE__
8892 /* Avoid a crash on Mac OS X. */
8893 #include <mach/mach.h>
8894 #include <mach/mach_error.h>
8895 #include <mach/thread_status.h>
8896 #include <mach/exception.h>
8897 #include <mach/task.h>
8898 #include <pthread.h>
8899 /* The exception port on which our thread listens. */
8900 static mach_port_t our_exception_port;
8901 /* The main function of the thread listening for exceptions of type
8904 mach_exception_thread (void *arg)
8906 /* Buffer for a message to be received. */
8908 mach_msg_header_t head;
8909 mach_msg_body_t msgh_body;
8912 mach_msg_return_t retval;
8913 /* Wait for a message on the exception port. */
8914 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8915 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8916 if (retval != MACH_MSG_SUCCESS)
8923 mach_port_t self = mach_task_self ();
8924 /* Allocate a port on which the thread shall listen for exceptions. */
8925 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8927 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
8928 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8929 MACH_MSG_TYPE_MAKE_SEND)
8931 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
8933 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8934 /* Create the thread listening on the exception port. */
8935 pthread_attr_t attr;
8937 if (pthread_attr_init (&attr) == 0
8938 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8939 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8940 pthread_attr_destroy (&attr);
8941 /* Replace the exception port info for these exceptions with our own.
8942 Note that we replace the exception port for the entire task, not only
8943 for a particular thread. This has the effect that when our exception
8944 port gets the message, the thread specific exception port has already
8945 been asked, and we don't need to bother about it.
8946 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
8947 task_set_exception_ports (self, mask, our_exception_port,
8948 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8953 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8954 /* Avoid a crash on native Windows. */
8955 #define WIN32_LEAN_AND_MEAN
8956 #include <windows.h>
8957 #include <winerror.h>
8959 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8961 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8963 case EXCEPTION_ACCESS_VIOLATION:
8964 case EXCEPTION_IN_PAGE_ERROR:
8965 case EXCEPTION_STACK_OVERFLOW:
8966 case EXCEPTION_GUARD_PAGE:
8967 case EXCEPTION_PRIV_INSTRUCTION:
8968 case EXCEPTION_ILLEGAL_INSTRUCTION:
8969 case EXCEPTION_DATATYPE_MISALIGNMENT:
8970 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8971 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8974 return EXCEPTION_CONTINUE_SEARCH;
8979 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8982 /* Avoid a crash on POSIX systems. */
8984 /* A POSIX signal handler. */
8986 exception_handler (int sig)
8994 signal (SIGSEGV, exception_handler);
8997 signal (SIGBUS, exception_handler);
9011 char *name = realpath ("conftest.a", NULL);
9012 if (!(name && *name == '/'))
9016 char *name = realpath ("conftest.b/../conftest.a", NULL);
9021 char *name = realpath ("conftest.a/", NULL);
9026 char *name1 = realpath (".", NULL);
9027 char *name2 = realpath ("conftest.d//./..", NULL);
9028 if (strcmp (name1, name2) != 0)
9038 if ac_fn_c_try_run "$LINENO"; then :
9039 gl_cv_func_realpath_works=yes
9041 gl_cv_func_realpath_works=no
9043 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9044 conftest.$ac_objext conftest.beam conftest.$ac_ext
9047 rm -rf conftest.a conftest.d
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9051 $as_echo "$gl_cv_func_realpath_works" >&6; }
9052 case "$gl_cv_func_realpath_works" in
9055 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9077 GNULIB_EUIDACCESS=0;
9085 GNULIB_GETDOMAINNAME=0;
9086 GNULIB_GETDTABLESIZE=0;
9088 GNULIB_GETHOSTNAME=0;
9090 GNULIB_GETLOGIN_R=0;
9091 GNULIB_GETPAGESIZE=0;
9092 GNULIB_GETUSERSHELL=0;
9093 GNULIB_GROUP_MEMBER=0;
9105 GNULIB_READLINKAT=0;
9107 GNULIB_SETHOSTNAME=0;
9112 GNULIB_UNISTD_H_NONBLOCKING=0;
9113 GNULIB_UNISTD_H_SIGPIPE=0;
9128 HAVE_GETDTABLESIZE=1;
9133 HAVE_GROUP_MEMBER=1;
9149 HAVE_DECL_ENVIRON=1;
9151 HAVE_DECL_FDATASYNC=1;
9152 HAVE_DECL_GETDOMAINNAME=1;
9153 HAVE_DECL_GETLOGIN_R=1;
9154 HAVE_DECL_GETPAGESIZE=1;
9155 HAVE_DECL_GETUSERSHELL=1;
9156 HAVE_DECL_SETHOSTNAME=1;
9157 HAVE_DECL_TTYNAME_R=1;
9165 REPLACE_FTRUNCATE=0;
9167 REPLACE_GETDOMAINNAME=0;
9168 REPLACE_GETDTABLESIZE=0;
9169 REPLACE_GETLOGIN_R=0;
9170 REPLACE_GETGROUPS=0;
9171 REPLACE_GETPAGESIZE=0;
9184 REPLACE_TTYNAME_R=0;
9189 UNISTD_H_HAVE_WINSOCK2_H=0;
9190 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9197 for ac_header in unistd.h
9199 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9200 if test "x$ac_cv_header_unistd_h" = xyes; then :
9201 cat >>confdefs.h <<_ACEOF
9202 #define HAVE_UNISTD_H 1
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9210 $as_echo_n "checking for working chown... " >&6; }
9211 if ${ac_cv_func_chown_works+:} false; then :
9212 $as_echo_n "(cached) " >&6
9214 if test "$cross_compiling" = yes; then :
9215 case "$host_os" in # ((
9216 # Guess yes on glibc systems.
9217 *-gnu*) ac_cv_func_chown_works=yes ;;
9218 # If we don't know, assume the worst.
9219 *) ac_cv_func_chown_works=no ;;
9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224 /* end confdefs.h. */
9225 $ac_includes_default
9232 char *f = "conftest.chown";
9233 struct stat before, after;
9235 if (creat (f, 0600) < 0)
9237 if (stat (f, &before) < 0)
9239 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9241 if (stat (f, &after) < 0)
9243 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9250 if ac_fn_c_try_run "$LINENO"; then :
9251 ac_cv_func_chown_works=yes
9253 ac_cv_func_chown_works=no
9255 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9256 conftest.$ac_objext conftest.beam conftest.$ac_ext
9259 rm -f conftest.chown
9262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9263 $as_echo "$ac_cv_func_chown_works" >&6; }
9264 if test $ac_cv_func_chown_works = yes; then
9266 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9272 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9273 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9274 $as_echo_n "(cached) " >&6
9277 if test "$cross_compiling" = yes; then :
9278 gl_cv_func_chown_follows_symlink=yes
9281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9282 /* end confdefs.h. */
9292 char const *dangling_symlink = "conftest.dangle";
9294 unlink (dangling_symlink);
9295 if (symlink ("conftest.no-such", dangling_symlink))
9298 /* Exit successfully on a conforming system,
9299 i.e., where chown must fail with ENOENT. */
9300 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9302 if (errno != ENOENT)
9308 if ac_fn_c_try_run "$LINENO"; then :
9309 gl_cv_func_chown_follows_symlink=yes
9311 gl_cv_func_chown_follows_symlink=no
9313 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9314 conftest.$ac_objext conftest.beam conftest.$ac_ext
9320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9321 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9323 if test $gl_cv_func_chown_follows_symlink = no; then
9325 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9340 if test $ac_cv_func_chown = no; then
9343 if test $gl_cv_func_chown_follows_symlink = no; then
9347 if test $ac_cv_func_chown_works = no; then
9349 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9355 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9356 if ${gl_cv_func_chown_slash_works+:} false; then :
9357 $as_echo_n "(cached) " >&6
9359 touch conftest.file && rm -f conftest.link
9360 if test "$cross_compiling" = yes; then :
9362 # Guess yes on glibc systems.
9363 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9364 # If we don't know, assume the worst.
9365 *) gl_cv_func_chown_slash_works="guessing no" ;;
9369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9370 /* end confdefs.h. */
9379 if (symlink ("conftest.file", "conftest.link")) return 1;
9380 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9386 if ac_fn_c_try_run "$LINENO"; then :
9387 gl_cv_func_chown_slash_works=yes
9389 gl_cv_func_chown_slash_works=no
9391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9392 conftest.$ac_objext conftest.beam conftest.$ac_ext
9395 rm -f conftest.link conftest.file
9397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9398 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9399 case "$gl_cv_func_chown_slash_works" in
9403 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9410 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9411 if ${gl_cv_func_chown_ctime_works+:} false; then :
9412 $as_echo_n "(cached) " >&6
9414 if test "$cross_compiling" = yes; then :
9416 # Guess yes on glibc systems.
9417 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9418 # If we don't know, assume the worst.
9419 *) gl_cv_func_chown_ctime_works="guessing no" ;;
9423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9424 /* end confdefs.h. */
9430 #include <sys/stat.h>
9435 struct stat st1, st2;
9436 if (close (creat ("conftest.file", 0600))) return 1;
9437 if (stat ("conftest.file", &st1)) return 2;
9439 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9440 if (stat ("conftest.file", &st2)) return 4;
9441 if (st2.st_ctime <= st1.st_ctime) return 5;
9447 if ac_fn_c_try_run "$LINENO"; then :
9448 gl_cv_func_chown_ctime_works=yes
9450 gl_cv_func_chown_ctime_works=no
9452 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9453 conftest.$ac_objext conftest.beam conftest.$ac_ext
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9459 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9460 case "$gl_cv_func_chown_ctime_works" in
9464 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9475 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9476 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9478 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9481 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9503 HAVE_DECL_FDOPENDIR=1;
9510 REPLACE_FDOPENDIR=0;
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9515 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9516 if ${gl_cv_have_include_next+:} false; then :
9517 $as_echo_n "(cached) " >&6
9519 rm -rf conftestd1a conftestd1b conftestd2
9520 mkdir conftestd1a conftestd1b conftestd2
9521 cat <<EOF > conftestd1a/conftest.h
9522 #define DEFINED_IN_CONFTESTD1
9523 #include_next <conftest.h>
9524 #ifdef DEFINED_IN_CONFTESTD2
9527 #error "include_next doesn't work"
9530 cat <<EOF > conftestd1b/conftest.h
9531 #define DEFINED_IN_CONFTESTD1
9533 #include_next <conftest.h>
9534 #ifdef DEFINED_IN_CONFTESTD2
9537 #error "include_next doesn't work"
9540 cat <<EOF > conftestd2/conftest.h
9541 #ifndef DEFINED_IN_CONFTESTD1
9542 #error "include_next test doesn't work"
9544 #define DEFINED_IN_CONFTESTD2
9546 gl_save_CPPFLAGS="$CPPFLAGS"
9547 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9549 /* end confdefs.h. */
9550 #include <conftest.h>
9552 if ac_fn_c_try_compile "$LINENO"; then :
9553 gl_cv_have_include_next=yes
9555 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9557 /* end confdefs.h. */
9558 #include <conftest.h>
9560 if ac_fn_c_try_compile "$LINENO"; then :
9561 gl_cv_have_include_next=buggy
9563 gl_cv_have_include_next=no
9565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9569 CPPFLAGS="$gl_save_CPPFLAGS"
9570 rm -rf conftestd1a conftestd1b conftestd2
9573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9574 $as_echo "$gl_cv_have_include_next" >&6; }
9575 PRAGMA_SYSTEM_HEADER=
9576 if test $gl_cv_have_include_next = yes; then
9577 INCLUDE_NEXT=include_next
9578 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9579 if test -n "$GCC"; then
9580 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9583 if test $gl_cv_have_include_next = buggy; then
9584 INCLUDE_NEXT=include
9585 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9587 INCLUDE_NEXT=include
9588 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9595 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9596 if ${gl_cv_pragma_columns+:} false; then :
9597 $as_echo_n "(cached) " >&6
9599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9600 /* end confdefs.h. */
9607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9608 $EGREP "choke me" >/dev/null 2>&1; then :
9609 gl_cv_pragma_columns=yes
9611 gl_cv_pragma_columns=no
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9618 $as_echo "$gl_cv_pragma_columns" >&6; }
9619 if test $gl_cv_pragma_columns = yes; then
9620 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9642 $as_echo_n "checking if environ is properly declared... " >&6; }
9643 if ${gt_cv_var_environ_declaration+:} false; then :
9644 $as_echo_n "(cached) " >&6
9647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648 /* end confdefs.h. */
9652 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9655 extern struct { int foo; } environ;
9664 if ac_fn_c_try_compile "$LINENO"; then :
9665 gt_cv_var_environ_declaration=no
9667 gt_cv_var_environ_declaration=yes
9669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9673 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9674 if test $gt_cv_var_environ_declaration = yes; then
9676 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9681 if test $gt_cv_var_environ_declaration != yes; then
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9688 $as_echo_n "checking for complete errno.h... " >&6; }
9689 if ${gl_cv_header_errno_h_complete+:} false; then :
9690 $as_echo_n "(cached) " >&6
9693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9694 /* end confdefs.h. */
9697 #if !defined ETXTBSY
9706 #if !defined ENOLINK
9712 #if !defined EMULTIHOP
9715 #if !defined EBADMSG
9718 #if !defined EOVERFLOW
9721 #if !defined ENOTSUP
9724 #if !defined ENETRESET
9727 #if !defined ECONNABORTED
9736 #if !defined ECANCELED
9739 #if !defined EOWNERDEAD
9742 #if !defined ENOTRECOVERABLE
9750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9751 $EGREP "booboo" >/dev/null 2>&1; then :
9752 gl_cv_header_errno_h_complete=no
9754 gl_cv_header_errno_h_complete=yes
9760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
9761 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
9762 if test $gl_cv_header_errno_h_complete = yes; then
9773 if test $gl_cv_have_include_next = yes; then
9774 gl_cv_next_errno_h='<'errno.h'>'
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
9777 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
9778 if ${gl_cv_next_errno_h+:} false; then :
9779 $as_echo_n "(cached) " >&6
9784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9785 /* end confdefs.h. */
9789 aix*) gl_absname_cpp="$ac_cpp -C" ;;
9790 *) gl_absname_cpp="$ac_cpp" ;;
9795 gl_dirsep_regex='[/\\]'
9798 gl_dirsep_regex='\/'
9801 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
9802 gl_header_literal_regex=`echo 'errno.h' \
9803 | sed -e "$gl_make_literal_regex_sed"`
9804 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9805 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9811 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9812 sed -n "$gl_absolute_header_sed"`
9814 gl_header=$gl_cv_absolute_errno_h
9815 gl_cv_next_errno_h='"'$gl_header'"'
9819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
9820 $as_echo "$gl_cv_next_errno_h" >&6; }
9822 NEXT_ERRNO_H=$gl_cv_next_errno_h
9824 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
9825 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9826 gl_next_as_first_directive='<'errno.h'>'
9828 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9829 gl_next_as_first_directive=$gl_cv_next_errno_h
9831 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
9839 if test -n "$ERRNO_H"; then
9840 GL_GENERATE_ERRNO_H_TRUE=
9841 GL_GENERATE_ERRNO_H_FALSE='#'
9843 GL_GENERATE_ERRNO_H_TRUE='#'
9844 GL_GENERATE_ERRNO_H_FALSE=
9848 if test -n "$ERRNO_H"; then
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
9850 $as_echo_n "checking for EMULTIHOP value... " >&6; }
9851 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
9852 $as_echo_n "(cached) " >&6
9855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9856 /* end confdefs.h. */
9864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9865 $EGREP "yes" >/dev/null 2>&1; then :
9866 gl_cv_header_errno_h_EMULTIHOP=yes
9868 gl_cv_header_errno_h_EMULTIHOP=no
9872 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
9873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9874 /* end confdefs.h. */
9876 #define _XOPEN_SOURCE_EXTENDED 1
9883 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9884 $EGREP "yes" >/dev/null 2>&1; then :
9885 gl_cv_header_errno_h_EMULTIHOP=hidden
9889 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
9890 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
9891 #define _XOPEN_SOURCE_EXTENDED 1
9893 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9905 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9906 case $gl_cv_header_errno_h_EMULTIHOP in
9908 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
9911 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
9919 if test -n "$ERRNO_H"; then
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9921 $as_echo_n "checking for ENOLINK value... " >&6; }
9922 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
9923 $as_echo_n "(cached) " >&6
9926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9927 /* end confdefs.h. */
9935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9936 $EGREP "yes" >/dev/null 2>&1; then :
9937 gl_cv_header_errno_h_ENOLINK=yes
9939 gl_cv_header_errno_h_ENOLINK=no
9943 if test $gl_cv_header_errno_h_ENOLINK = no; then
9944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9945 /* end confdefs.h. */
9947 #define _XOPEN_SOURCE_EXTENDED 1
9954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9955 $EGREP "yes" >/dev/null 2>&1; then :
9956 gl_cv_header_errno_h_ENOLINK=hidden
9960 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
9961 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9962 #define _XOPEN_SOURCE_EXTENDED 1
9964 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9976 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9977 case $gl_cv_header_errno_h_ENOLINK in
9979 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
9982 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
9990 if test -n "$ERRNO_H"; then
9991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9992 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9993 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
9994 $as_echo_n "(cached) " >&6
9997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998 /* end confdefs.h. */
10006 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10007 $EGREP "yes" >/dev/null 2>&1; then :
10008 gl_cv_header_errno_h_EOVERFLOW=yes
10010 gl_cv_header_errno_h_EOVERFLOW=no
10014 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10016 /* end confdefs.h. */
10018 #define _XOPEN_SOURCE_EXTENDED 1
10025 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10026 $EGREP "yes" >/dev/null 2>&1; then :
10027 gl_cv_header_errno_h_EOVERFLOW=hidden
10031 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10032 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10033 #define _XOPEN_SOURCE_EXTENDED 1
10035 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10037 #include <stdlib.h>
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10047 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10048 case $gl_cv_header_errno_h_EOVERFLOW in
10050 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10053 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10061 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10062 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10068 cat >>confdefs.h <<_ACEOF
10069 #define HAVE_DECL_STRERROR_R $ac_have_decl
10072 for ac_func in strerror_r
10074 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10075 if test "x$ac_cv_func_strerror_r" = xyes; then :
10076 cat >>confdefs.h <<_ACEOF
10077 #define HAVE_STRERROR_R 1
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10084 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10085 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10086 $as_echo_n "(cached) " >&6
10089 ac_cv_func_strerror_r_char_p=no
10090 if test $ac_cv_have_decl_strerror_r = yes; then
10091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10092 /* end confdefs.h. */
10093 $ac_includes_default
10099 char x = *strerror_r (0, buf, sizeof buf);
10100 char *p = strerror_r (0, buf, sizeof buf);
10107 if ac_fn_c_try_compile "$LINENO"; then :
10108 ac_cv_func_strerror_r_char_p=yes
10110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10112 # strerror_r is not declared. Choose between
10113 # systems that have relatively inaccessible declarations for the
10114 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10115 # former has a strerror_r that returns char*, while the latter
10116 # has a strerror_r that returns `int'.
10117 # This test should segfault on the DEC system.
10118 if test "$cross_compiling" = yes; then :
10121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10122 /* end confdefs.h. */
10123 $ac_includes_default
10124 extern char *strerror_r ();
10129 char x = *strerror_r (0, buf, sizeof buf);
10130 return ! isalpha (x);
10135 if ac_fn_c_try_run "$LINENO"; then :
10136 ac_cv_func_strerror_r_char_p=yes
10138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10139 conftest.$ac_objext conftest.beam conftest.$ac_ext
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10146 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10147 if test $ac_cv_func_strerror_r_char_p = yes; then
10149 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5
10156 $as_echo_n "checking type of array argument to getgroups... " >&6; }
10157 if ${ac_cv_type_getgroups+:} false; then :
10158 $as_echo_n "(cached) " >&6
10160 if test "$cross_compiling" = yes; then :
10161 ac_cv_type_getgroups=cross
10163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10164 /* end confdefs.h. */
10165 /* Thanks to Mike Rendell for this test. */
10166 $ac_includes_default
10169 #define MAX(x, y) ((x) > (y) ? (x) : (y))
10174 gid_t gidset[NGID];
10176 union { gid_t gval; long int lval; } val;
10179 for (i = 0; i < NGID; i++)
10180 gidset[i] = val.gval;
10181 n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
10183 /* Exit non-zero if getgroups seems to require an array of ints. This
10184 happens when gid_t is short int but getgroups modifies an array
10186 return n > 0 && gidset[n] != val.gval;
10189 if ac_fn_c_try_run "$LINENO"; then :
10190 ac_cv_type_getgroups=gid_t
10192 ac_cv_type_getgroups=int
10194 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10195 conftest.$ac_objext conftest.beam conftest.$ac_ext
10198 if test $ac_cv_type_getgroups = cross; then
10199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10200 /* end confdefs.h. */
10201 #include <unistd.h>
10204 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10205 $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then :
10206 ac_cv_type_getgroups=gid_t
10208 ac_cv_type_getgroups=int
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5
10215 $as_echo "$ac_cv_type_getgroups" >&6; }
10217 cat >>confdefs.h <<_ACEOF
10218 #define GETGROUPS_T $ac_cv_type_getgroups
10225 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10226 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10232 cat >>confdefs.h <<_ACEOF
10233 #define HAVE_DECL_FCHDIR $ac_have_decl
10249 GNULIB_UTIMENSAT=0;
10263 REPLACE_FUTIMENS=0;
10269 REPLACE_UTIMENSAT=0;
10277 GNULIB_NONBLOCKING=0;
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10296 $as_echo_n "checking for working fcntl.h... " >&6; }
10297 if ${gl_cv_header_working_fcntl_h+:} false; then :
10298 $as_echo_n "(cached) " >&6
10300 if test "$cross_compiling" = yes; then :
10301 gl_cv_header_working_fcntl_h=cross-compiling
10303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10304 /* end confdefs.h. */
10305 #include <sys/types.h>
10306 #include <sys/stat.h>
10308 # include <unistd.h>
10309 #else /* on Windows with MSVC */
10311 # include <stdlib.h>
10312 # defined sleep(n) _sleep ((n) * 1000)
10316 #define O_NOATIME 0
10319 #define O_NOFOLLOW 0
10321 static int const constants[] =
10323 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10324 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10331 int result = !constants;
10334 static char const sym[] = "conftest.sym";
10335 if (symlink ("/dev/null", sym) != 0)
10339 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10346 if (unlink (sym) != 0 || symlink (".", sym) != 0)
10350 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10361 static char const file[] = "confdefs.h";
10362 int fd = open (file, O_RDONLY | O_NOATIME);
10368 if (fstat (fd, &st0) != 0)
10374 if (read (fd, &c, 1) != 1)
10378 if (close (fd) != 0)
10383 if (stat (file, &st1) != 0)
10386 if (st0.st_atime != st1.st_atime)
10398 if ac_fn_c_try_run "$LINENO"; then :
10399 gl_cv_header_working_fcntl_h=yes
10402 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10403 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10404 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10405 *) gl_cv_header_working_fcntl_h='no';;
10408 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10409 conftest.$ac_objext conftest.beam conftest.$ac_ext
10413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10414 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10416 case $gl_cv_header_working_fcntl_h in #(
10417 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10421 cat >>confdefs.h <<_ACEOF
10422 #define HAVE_WORKING_O_NOATIME $ac_val
10426 case $gl_cv_header_working_fcntl_h in #(
10427 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10431 cat >>confdefs.h <<_ACEOF
10432 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10441 $as_echo_n "checking for mbstate_t... " >&6; }
10442 if ${ac_cv_type_mbstate_t+:} false; then :
10443 $as_echo_n "(cached) " >&6
10445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10446 /* end confdefs.h. */
10447 $ac_includes_default
10448 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10450 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10451 included before <wchar.h>. */
10452 #include <stddef.h>
10459 mbstate_t x; return sizeof x;
10464 if ac_fn_c_try_compile "$LINENO"; then :
10465 ac_cv_type_mbstate_t=yes
10467 ac_cv_type_mbstate_t=no
10469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10472 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10473 if test $ac_cv_type_mbstate_t = yes; then
10475 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10479 $as_echo "#define mbstate_t int" >>confdefs.h
10508 GNULIB_FPRINTF_POSIX=0;
10524 GNULIB_OBSTACK_PRINTF=0;
10525 GNULIB_OBSTACK_PRINTF_POSIX=0;
10530 GNULIB_PRINTF_POSIX=0;
10539 GNULIB_SPRINTF_POSIX=0;
10540 GNULIB_STDIO_H_NONBLOCKING=0;
10541 GNULIB_STDIO_H_SIGPIPE=0;
10543 GNULIB_VASPRINTF=0;
10548 GNULIB_VFPRINTF_POSIX=0;
10550 GNULIB_VPRINTF_POSIX=0;
10551 GNULIB_VSNPRINTF=0;
10552 GNULIB_VSPRINTF_POSIX=0;
10553 HAVE_DECL_FPURGE=1;
10554 HAVE_DECL_FSEEKO=1;
10555 HAVE_DECL_FTELLO=1;
10556 HAVE_DECL_GETDELIM=1;
10557 HAVE_DECL_GETLINE=1;
10558 HAVE_DECL_OBSTACK_PRINTF=1;
10559 HAVE_DECL_SNPRINTF=1;
10560 HAVE_DECL_VSNPRINTF=1;
10581 REPLACE_GETDELIM=0;
10583 REPLACE_OBSTACK_PRINTF=0;
10589 REPLACE_RENAMEAT=0;
10590 REPLACE_SNPRINTF=0;
10592 REPLACE_STDIO_READ_FUNCS=0;
10593 REPLACE_STDIO_WRITE_FUNCS=0;
10595 REPLACE_VASPRINTF=0;
10596 REPLACE_VDPRINTF=0;
10597 REPLACE_VFPRINTF=0;
10599 REPLACE_VSNPRINTF=0;
10600 REPLACE_VSPRINTF=0;
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10604 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10605 if ${gl_cv_var_stdin_large_offset+:} false; then :
10606 $as_echo_n "(cached) " >&6
10608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10609 /* end confdefs.h. */
10614 #if defined __SL64 && defined __SCLE /* cygwin */
10615 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10616 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
10617 it is easier to do a version check than building a runtime test. */
10618 # include <cygwin/version.h>
10619 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10627 if ac_fn_c_try_link "$LINENO"; then :
10628 gl_cv_var_stdin_large_offset=yes
10630 gl_cv_var_stdin_large_offset=no
10632 rm -f core conftest.err conftest.$ac_objext \
10633 conftest$ac_exeext conftest.$ac_ext
10635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10636 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10645 $as_echo_n "checking for 64-bit off_t... " >&6; }
10646 if ${gl_cv_type_off_t_64+:} false; then :
10647 $as_echo_n "(cached) " >&6
10649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10650 /* end confdefs.h. */
10651 #include <sys/types.h>
10652 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10662 if ac_fn_c_try_compile "$LINENO"; then :
10663 gl_cv_type_off_t_64=yes
10665 gl_cv_type_off_t_64=no
10667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10671 $as_echo "$gl_cv_type_off_t_64" >&6; }
10672 if test $gl_cv_type_off_t_64 = no; then
10673 WINDOWS_64_BIT_OFF_T=1
10675 WINDOWS_64_BIT_OFF_T=0
10677 WINDOWS_64_BIT_ST_SIZE=1
10680 WINDOWS_64_BIT_OFF_T=0
10681 WINDOWS_64_BIT_ST_SIZE=0
10701 if test $gl_cv_have_include_next = yes; then
10702 gl_cv_next_sys_types_h='<'sys/types.h'>'
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10705 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10706 if ${gl_cv_next_sys_types_h+:} false; then :
10707 $as_echo_n "(cached) " >&6
10712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10713 /* end confdefs.h. */
10714 #include <sys/types.h>
10717 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10718 *) gl_absname_cpp="$ac_cpp" ;;
10723 gl_dirsep_regex='[/\\]'
10726 gl_dirsep_regex='\/'
10729 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10730 gl_header_literal_regex=`echo 'sys/types.h' \
10731 | sed -e "$gl_make_literal_regex_sed"`
10732 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10733 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10739 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10740 sed -n "$gl_absolute_header_sed"`
10742 gl_header=$gl_cv_absolute_sys_types_h
10743 gl_cv_next_sys_types_h='"'$gl_header'"'
10747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10748 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10750 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10752 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10753 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10754 gl_next_as_first_directive='<'sys/types.h'>'
10756 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10757 gl_next_as_first_directive=$gl_cv_next_sys_types_h
10759 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10771 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10772 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10778 cat >>confdefs.h <<_ACEOF
10779 #define HAVE_DECL_FSEEKO $ac_have_decl
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
10791 $as_echo_n "checking for fseeko... " >&6; }
10792 if ${gl_cv_func_fseeko+:} false; then :
10793 $as_echo_n "(cached) " >&6
10796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10797 /* end confdefs.h. */
10803 fseeko (stdin, 0, 0);
10808 if ac_fn_c_try_link "$LINENO"; then :
10809 gl_cv_func_fseeko=yes
10811 gl_cv_func_fseeko=no
10813 rm -f core conftest.err conftest.$ac_objext \
10814 conftest$ac_exeext conftest.$ac_ext
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
10818 $as_echo "$gl_cv_func_fseeko" >&6; }
10821 if test $ac_cv_have_decl_fseeko = no; then
10825 if test $gl_cv_func_fseeko = no; then
10828 if test $WINDOWS_64_BIT_OFF_T = 1; then
10831 if test $gl_cv_var_stdin_large_offset = no; then
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10838 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10839 if ${ac_cv_header_stat_broken+:} false; then :
10840 $as_echo_n "(cached) " >&6
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10843 /* end confdefs.h. */
10844 #include <sys/types.h>
10845 #include <sys/stat.h>
10847 #if defined S_ISBLK && defined S_IFDIR
10848 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10851 #if defined S_ISBLK && defined S_IFCHR
10852 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10855 #if defined S_ISLNK && defined S_IFREG
10856 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10859 #if defined S_ISSOCK && defined S_IFREG
10860 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10864 if ac_fn_c_try_compile "$LINENO"; then :
10865 ac_cv_header_stat_broken=no
10867 ac_cv_header_stat_broken=yes
10869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10872 $as_echo "$ac_cv_header_stat_broken" >&6; }
10873 if test $ac_cv_header_stat_broken = yes; then
10875 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10895 if test $gl_cv_have_include_next = yes; then
10896 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10899 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10900 if ${gl_cv_next_sys_stat_h+:} false; then :
10901 $as_echo_n "(cached) " >&6
10904 if test $ac_cv_header_sys_stat_h = yes; then
10909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10910 /* end confdefs.h. */
10911 #include <sys/stat.h>
10914 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10915 *) gl_absname_cpp="$ac_cpp" ;;
10920 gl_dirsep_regex='[/\\]'
10923 gl_dirsep_regex='\/'
10926 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10927 gl_header_literal_regex=`echo 'sys/stat.h' \
10928 | sed -e "$gl_make_literal_regex_sed"`
10929 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10930 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10936 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10937 sed -n "$gl_absolute_header_sed"`
10939 gl_header=$gl_cv_absolute_sys_stat_h
10940 gl_cv_next_sys_stat_h='"'$gl_header'"'
10942 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10948 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10950 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
10952 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10953 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10954 gl_next_as_first_directive='<'sys/stat.h'>'
10956 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10957 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
10959 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
10971 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
10973 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
10977 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10978 #include <sys/stat.h>
10980 if test "x$ac_cv_type_nlink_t" = xyes; then :
10984 $as_echo "#define nlink_t int" >>confdefs.h
10990 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
10991 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
10992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
10993 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
10994 if eval \${$as_gl_Symbol+:} false; then :
10995 $as_echo_n "(cached) " >&6
10997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10998 /* end confdefs.h. */
10999 #include <sys/stat.h>
11010 if ac_fn_c_try_compile "$LINENO"; then :
11011 eval "$as_gl_Symbol=yes"
11013 eval "$as_gl_Symbol=no"
11015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11017 eval ac_res=\$$as_gl_Symbol
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11019 $as_echo "$ac_res" >&6; }
11020 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11021 cat >>confdefs.h <<_ACEOF
11022 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11025 eval ac_cv_have_decl_$gl_func=yes
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11032 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11033 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11034 $as_echo_n "(cached) " >&6
11036 rm -f conftest.sym conftest.file
11037 echo >conftest.file
11038 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11039 if test "$cross_compiling" = yes; then :
11041 # Guess yes on glibc systems.
11042 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11043 # If we don't know, assume the worst.
11044 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11049 /* end confdefs.h. */
11050 $ac_includes_default
11055 /* Linux will dereference the symlink and fail, as required by
11056 POSIX. That is better in the sense that it means we will not
11057 have to compile and use the lstat wrapper. */
11058 return lstat ("conftest.sym/", &sbuf) == 0;
11064 if ac_fn_c_try_run "$LINENO"; then :
11065 gl_cv_func_lstat_dereferences_slashed_symlink=yes
11067 gl_cv_func_lstat_dereferences_slashed_symlink=no
11069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11070 conftest.$ac_objext conftest.beam conftest.$ac_ext
11074 # If the 'ln -s' command failed, then we probably don't even
11075 # have an lstat function.
11076 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11078 rm -f conftest.sym conftest.file
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11082 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11083 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11086 cat >>confdefs.h <<_ACEOF
11087 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11100 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11101 if ${gl_cv_func_getcwd_null+:} false; then :
11102 $as_echo_n "(cached) " >&6
11104 if test "$cross_compiling" = yes; then :
11106 # Guess yes on glibc systems.
11107 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
11108 # Guess yes on Cygwin.
11109 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11110 # If we don't know, assume the worst.
11111 *) gl_cv_func_getcwd_null="guessing no";;
11115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11116 /* end confdefs.h. */
11119 # include <unistd.h>
11120 # else /* on Windows with MSVC */
11121 # include <direct.h>
11131 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11132 /* mingw cwd does not start with '/', but getcwd does allocate.
11133 However, mingw fails to honor non-zero size. */
11135 if (chdir ("/") != 0)
11139 char *f = getcwd (NULL, 0);
11154 if ac_fn_c_try_run "$LINENO"; then :
11155 gl_cv_func_getcwd_null=yes
11157 gl_cv_func_getcwd_null=no
11159 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11160 conftest.$ac_objext conftest.beam conftest.$ac_ext
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11165 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11169 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11170 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11171 $as_echo_n "(cached) " >&6
11173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11174 /* end confdefs.h. */
11175 #include <unistd.h>
11183 char *getcwd (char *, size_t);
11190 if ac_fn_c_try_compile "$LINENO"; then :
11191 gl_cv_func_getcwd_posix_signature=yes
11193 gl_cv_func_getcwd_posix_signature=no
11195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11199 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11201 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11202 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11208 cat >>confdefs.h <<_ACEOF
11209 #define HAVE_DECL_GETCWD $ac_have_decl
11212 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11213 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11219 cat >>confdefs.h <<_ACEOF
11220 #define HAVE_DECL_GETDELIM $ac_have_decl
11227 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11228 if test "x$ac_cv_have_decl_getline" = xyes; then :
11234 cat >>confdefs.h <<_ACEOF
11235 #define HAVE_DECL_GETLINE $ac_have_decl
11253 if test $gl_cv_have_include_next = yes; then
11254 gl_cv_next_getopt_h='<'getopt.h'>'
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11257 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11258 if ${gl_cv_next_getopt_h+:} false; then :
11259 $as_echo_n "(cached) " >&6
11262 if test $ac_cv_header_getopt_h = yes; then
11267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11268 /* end confdefs.h. */
11269 #include <getopt.h>
11272 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11273 *) gl_absname_cpp="$ac_cpp" ;;
11278 gl_dirsep_regex='[/\\]'
11281 gl_dirsep_regex='\/'
11284 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11285 gl_header_literal_regex=`echo 'getopt.h' \
11286 | sed -e "$gl_make_literal_regex_sed"`
11287 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11288 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11294 gl_cv_absolute_getopt_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11295 sed -n "$gl_absolute_header_sed"`
11297 gl_header=$gl_cv_absolute_getopt_h
11298 gl_cv_next_getopt_h='"'$gl_header'"'
11300 gl_cv_next_getopt_h='<'getopt.h'>'
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11306 $as_echo "$gl_cv_next_getopt_h" >&6; }
11308 NEXT_GETOPT_H=$gl_cv_next_getopt_h
11310 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11312 gl_next_as_first_directive='<'getopt.h'>'
11314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11315 gl_next_as_first_directive=$gl_cv_next_getopt_h
11317 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11322 if test $ac_cv_header_getopt_h = yes; then
11331 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11332 for ac_header in getopt.h
11334 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11335 if test "x$ac_cv_header_getopt_h" = xyes; then :
11336 cat >>confdefs.h <<_ACEOF
11337 #define HAVE_GETOPT_H 1
11341 gl_replace_getopt=yes
11348 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11349 for ac_func in getopt_long_only
11351 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11352 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11353 cat >>confdefs.h <<_ACEOF
11354 #define HAVE_GETOPT_LONG_ONLY 1
11358 gl_replace_getopt=yes
11364 if test -z "$gl_replace_getopt"; then
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11366 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11367 if ${gl_cv_func_getopt_posix+:} false; then :
11368 $as_echo_n "(cached) " >&6
11371 if test $cross_compiling = no; then
11372 if test "$cross_compiling" = yes; then :
11373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11374 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11375 as_fn_error $? "cannot run test program while cross compiling
11376 See \`config.log' for more details" "$LINENO" 5; }
11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h. */
11381 #include <unistd.h>
11382 #include <stdlib.h>
11383 #include <string.h>
11388 static char program[] = "program";
11389 static char a[] = "-a";
11390 static char foo[] = "foo";
11391 static char bar[] = "bar";
11392 char *argv[] = { program, a, foo, bar, NULL };
11395 c = getopt (4, argv, "ab");
11398 c = getopt (4, argv, "ab");
11401 if (!(optind == 2))
11407 if ac_fn_c_try_run "$LINENO"; then :
11408 gl_cv_func_getopt_posix=maybe
11410 gl_cv_func_getopt_posix=no
11412 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11413 conftest.$ac_objext conftest.beam conftest.$ac_ext
11416 if test $gl_cv_func_getopt_posix = maybe; then
11417 if test "$cross_compiling" = yes; then :
11418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11419 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11420 as_fn_error $? "cannot run test program while cross compiling
11421 See \`config.log' for more details" "$LINENO" 5; }
11423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11424 /* end confdefs.h. */
11426 #include <unistd.h>
11427 #include <stdlib.h>
11428 #include <string.h>
11433 static char program[] = "program";
11434 static char donald[] = "donald";
11435 static char p[] = "-p";
11436 static char billy[] = "billy";
11437 static char duck[] = "duck";
11438 static char a[] = "-a";
11439 static char bar[] = "bar";
11440 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11443 c = getopt (7, argv, "+abp:q:");
11446 if (!(strcmp (argv[0], "program") == 0))
11448 if (!(strcmp (argv[1], "donald") == 0))
11450 if (!(strcmp (argv[2], "-p") == 0))
11452 if (!(strcmp (argv[3], "billy") == 0))
11454 if (!(strcmp (argv[4], "duck") == 0))
11456 if (!(strcmp (argv[5], "-a") == 0))
11458 if (!(strcmp (argv[6], "bar") == 0))
11460 if (!(optind == 1))
11466 if ac_fn_c_try_run "$LINENO"; then :
11467 gl_cv_func_getopt_posix=maybe
11469 gl_cv_func_getopt_posix=no
11471 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11472 conftest.$ac_objext conftest.beam conftest.$ac_ext
11476 if test $gl_cv_func_getopt_posix = maybe; then
11477 if test "$cross_compiling" = yes; then :
11478 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11479 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11480 as_fn_error $? "cannot run test program while cross compiling
11481 See \`config.log' for more details" "$LINENO" 5; }
11483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11484 /* end confdefs.h. */
11486 #include <unistd.h>
11487 #include <stdlib.h>
11488 #include <string.h>
11493 static char program[] = "program";
11494 static char ab[] = "-ab";
11495 char *argv[3] = { program, ab, NULL };
11496 if (getopt (2, argv, "ab:") != 'a')
11498 if (getopt (2, argv, "ab:") != '?')
11508 if ac_fn_c_try_run "$LINENO"; then :
11509 gl_cv_func_getopt_posix=yes
11511 gl_cv_func_getopt_posix=no
11513 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11514 conftest.$ac_objext conftest.beam conftest.$ac_ext
11520 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11521 *) gl_cv_func_getopt_posix="guessing yes";;
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11527 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11528 case "$gl_cv_func_getopt_posix" in
11529 *no) gl_replace_getopt=yes ;;
11533 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11535 $as_echo_n "checking for working GNU getopt function... " >&6; }
11536 if ${gl_cv_func_getopt_gnu+:} false; then :
11537 $as_echo_n "(cached) " >&6
11539 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11540 # optstring is necessary for programs like m4 that have POSIX-mandated
11541 # semantics for supporting options interspersed with files.
11542 # Also, since getopt_long is a GNU extension, we require optind=0.
11543 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11544 # so take care to revert to the correct (non-)export state.
11545 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11546 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11547 xx) gl_had_POSIXLY_CORRECT=exported ;;
11548 x) gl_had_POSIXLY_CORRECT=yes ;;
11549 *) gl_had_POSIXLY_CORRECT= ;;
11552 export POSIXLY_CORRECT
11553 if test "$cross_compiling" = yes; then :
11554 gl_cv_func_getopt_gnu="guessing no"
11557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11558 /* end confdefs.h. */
11559 #include <getopt.h>
11560 #include <stddef.h>
11561 #include <string.h>
11563 #include <stdlib.h>
11564 #if defined __MACH__ && defined __APPLE__
11565 /* Avoid a crash on Mac OS X. */
11566 #include <mach/mach.h>
11567 #include <mach/mach_error.h>
11568 #include <mach/thread_status.h>
11569 #include <mach/exception.h>
11570 #include <mach/task.h>
11571 #include <pthread.h>
11572 /* The exception port on which our thread listens. */
11573 static mach_port_t our_exception_port;
11574 /* The main function of the thread listening for exceptions of type
11577 mach_exception_thread (void *arg)
11579 /* Buffer for a message to be received. */
11581 mach_msg_header_t head;
11582 mach_msg_body_t msgh_body;
11585 mach_msg_return_t retval;
11586 /* Wait for a message on the exception port. */
11587 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11588 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11589 if (retval != MACH_MSG_SUCCESS)
11594 nocrash_init (void)
11596 mach_port_t self = mach_task_self ();
11597 /* Allocate a port on which the thread shall listen for exceptions. */
11598 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11600 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11601 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11602 MACH_MSG_TYPE_MAKE_SEND)
11604 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11606 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11607 /* Create the thread listening on the exception port. */
11608 pthread_attr_t attr;
11610 if (pthread_attr_init (&attr) == 0
11611 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11612 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11613 pthread_attr_destroy (&attr);
11614 /* Replace the exception port info for these exceptions with our own.
11615 Note that we replace the exception port for the entire task, not only
11616 for a particular thread. This has the effect that when our exception
11617 port gets the message, the thread specific exception port has already
11618 been asked, and we don't need to bother about it.
11619 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11620 task_set_exception_ports (self, mask, our_exception_port,
11621 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11626 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11627 /* Avoid a crash on native Windows. */
11628 #define WIN32_LEAN_AND_MEAN
11629 #include <windows.h>
11630 #include <winerror.h>
11632 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11634 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11636 case EXCEPTION_ACCESS_VIOLATION:
11637 case EXCEPTION_IN_PAGE_ERROR:
11638 case EXCEPTION_STACK_OVERFLOW:
11639 case EXCEPTION_GUARD_PAGE:
11640 case EXCEPTION_PRIV_INSTRUCTION:
11641 case EXCEPTION_ILLEGAL_INSTRUCTION:
11642 case EXCEPTION_DATATYPE_MISALIGNMENT:
11643 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11644 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11647 return EXCEPTION_CONTINUE_SEARCH;
11650 nocrash_init (void)
11652 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11655 /* Avoid a crash on POSIX systems. */
11656 #include <signal.h>
11657 /* A POSIX signal handler. */
11659 exception_handler (int sig)
11664 nocrash_init (void)
11667 signal (SIGSEGV, exception_handler);
11670 signal (SIGBUS, exception_handler);
11684 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11685 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11686 OSF/1 5.1, Solaris 10. */
11688 static char conftest[] = "conftest";
11689 static char plus[] = "-+";
11690 char *argv[3] = { conftest, plus, NULL };
11692 if (getopt (2, argv, "+a") != '?')
11695 /* This code succeeds on glibc 2.8, mingw,
11696 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11697 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
11699 static char program[] = "program";
11700 static char p[] = "-p";
11701 static char foo[] = "foo";
11702 static char bar[] = "bar";
11703 char *argv[] = { program, p, foo, bar, NULL };
11706 if (getopt (4, argv, "p::") != 'p')
11708 else if (optarg != NULL)
11710 else if (getopt (4, argv, "p::") != -1)
11712 else if (optind != 2)
11715 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
11717 static char program[] = "program";
11718 static char foo[] = "foo";
11719 static char p[] = "-p";
11720 char *argv[] = { program, foo, p, NULL };
11722 if (getopt (3, argv, "-p") != 1)
11724 else if (getopt (3, argv, "-p") != 'p')
11727 /* This code fails on glibc 2.11. */
11729 static char program[] = "program";
11730 static char b[] = "-b";
11731 static char a[] = "-a";
11732 char *argv[] = { program, b, a, NULL };
11733 optind = opterr = 0;
11734 if (getopt (3, argv, "+:a:b") != 'b')
11736 else if (getopt (3, argv, "+:a:b") != ':')
11739 /* This code dumps core on glibc 2.14. */
11741 static char program[] = "program";
11742 static char w[] = "-W";
11743 static char dummy[] = "dummy";
11744 char *argv[] = { program, w, dummy, NULL };
11745 optind = opterr = 1;
11746 if (getopt (3, argv, "W;") != 'W')
11755 if ac_fn_c_try_run "$LINENO"; then :
11756 gl_cv_func_getopt_gnu=yes
11758 gl_cv_func_getopt_gnu=no
11760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11761 conftest.$ac_objext conftest.beam conftest.$ac_ext
11764 case $gl_had_POSIXLY_CORRECT in
11766 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11767 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11772 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11773 if test "$gl_cv_func_getopt_gnu" != yes; then
11774 gl_replace_getopt=yes
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11777 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11778 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11779 $as_echo_n "(cached) " >&6
11781 if test "$cross_compiling" = yes; then :
11783 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11784 *) gl_cv_func_getopt_long_gnu="guessing yes";;
11788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11789 /* end confdefs.h. */
11790 #include <getopt.h>
11791 #include <stddef.h>
11792 #include <string.h>
11797 static const struct option long_options[] =
11799 { "xtremely-",no_argument, NULL, 1003 },
11800 { "xtra", no_argument, NULL, 1001 },
11801 { "xtreme", no_argument, NULL, 1002 },
11802 { "xtremely", no_argument, NULL, 1003 },
11803 { NULL, 0, NULL, 0 }
11805 /* This code fails on OpenBSD 5.0. */
11807 static char program[] = "program";
11808 static char xtremel[] = "--xtremel";
11809 char *argv[] = { program, xtremel, NULL };
11811 optind = 1; opterr = 0;
11812 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11821 if ac_fn_c_try_run "$LINENO"; then :
11822 gl_cv_func_getopt_long_gnu=yes
11824 gl_cv_func_getopt_long_gnu=no
11826 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11827 conftest.$ac_objext conftest.beam conftest.$ac_ext
11832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11833 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11834 case "$gl_cv_func_getopt_long_gnu" in
11836 *) gl_replace_getopt=yes ;;
11848 if test $REPLACE_GETOPT = 1; then
11852 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
11858 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
11859 if test "x$ac_cv_have_decl_getenv" = xyes; then :
11865 cat >>confdefs.h <<_ACEOF
11866 #define HAVE_DECL_GETENV $ac_have_decl
11875 GNULIB_GETTIMEOFDAY=0;
11876 HAVE_GETTIMEOFDAY=1;
11877 HAVE_STRUCT_TIMEVAL=1;
11879 REPLACE_GETTIMEOFDAY=0;
11880 REPLACE_STRUCT_TIMEVAL=0;
11895 if test $gl_cv_have_include_next = yes; then
11896 gl_cv_next_sys_time_h='<'sys/time.h'>'
11898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11899 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11900 if ${gl_cv_next_sys_time_h+:} false; then :
11901 $as_echo_n "(cached) " >&6
11904 if test $ac_cv_header_sys_time_h = yes; then
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910 /* end confdefs.h. */
11911 #include <sys/time.h>
11914 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11915 *) gl_absname_cpp="$ac_cpp" ;;
11920 gl_dirsep_regex='[/\\]'
11923 gl_dirsep_regex='\/'
11926 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11927 gl_header_literal_regex=`echo 'sys/time.h' \
11928 | sed -e "$gl_make_literal_regex_sed"`
11929 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11930 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11936 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11937 sed -n "$gl_absolute_header_sed"`
11939 gl_header=$gl_cv_absolute_sys_time_h
11940 gl_cv_next_sys_time_h='"'$gl_header'"'
11942 gl_cv_next_sys_time_h='<'sys/time.h'>'
11947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11948 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11950 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
11952 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11953 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11954 gl_next_as_first_directive='<'sys/time.h'>'
11956 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11957 gl_next_as_first_directive=$gl_cv_next_sys_time_h
11959 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
11965 if test $ac_cv_header_sys_time_h != yes; then
11973 if test $ac_cv_header_sys_socket_h != yes; then
11974 for ac_header in winsock2.h
11976 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11977 if test "x$ac_cv_header_winsock2_h" = xyes; then :
11978 cat >>confdefs.h <<_ACEOF
11979 #define HAVE_WINSOCK2_H 1
11987 if test "$ac_cv_header_winsock2_h" = yes; then
11989 UNISTD_H_HAVE_WINSOCK2_H=1
11990 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11997 $as_echo_n "checking for struct timeval... " >&6; }
11998 if ${gl_cv_sys_struct_timeval+:} false; then :
11999 $as_echo_n "(cached) " >&6
12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12002 /* end confdefs.h. */
12003 #if HAVE_SYS_TIME_H
12004 #include <sys/time.h>
12007 #if HAVE_WINSOCK2_H
12008 # include <winsock2.h>
12014 static struct timeval x; x.tv_sec = x.tv_usec;
12019 if ac_fn_c_try_compile "$LINENO"; then :
12020 gl_cv_sys_struct_timeval=yes
12022 gl_cv_sys_struct_timeval=no
12024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12028 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12029 if test $gl_cv_sys_struct_timeval != yes; then
12030 HAVE_STRUCT_TIMEVAL=0
12032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12033 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12034 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12035 $as_echo_n "(cached) " >&6
12037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12038 /* end confdefs.h. */
12039 #if HAVE_SYS_TIME_H
12040 #include <sys/time.h>
12043 #if HAVE_WINSOCK2_H
12044 # include <winsock2.h>
12050 static struct timeval x;
12051 typedef int verify_tv_sec_type[
12052 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12059 if ac_fn_c_try_compile "$LINENO"; then :
12060 gl_cv_sys_struct_timeval_tv_sec=yes
12062 gl_cv_sys_struct_timeval_tv_sec=no
12064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12068 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12069 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12070 REPLACE_STRUCT_TIMEVAL=1
12075 for gl_func in gettimeofday; do
12076 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12078 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12079 if eval \${$as_gl_Symbol+:} false; then :
12080 $as_echo_n "(cached) " >&6
12082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12083 /* end confdefs.h. */
12085 #if HAVE_SYS_TIME_H
12086 # include <sys/time.h>
12099 if ac_fn_c_try_compile "$LINENO"; then :
12100 eval "$as_gl_Symbol=yes"
12102 eval "$as_gl_Symbol=no"
12104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12106 eval ac_res=\$$as_gl_Symbol
12107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12108 $as_echo "$ac_res" >&6; }
12109 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12110 cat >>confdefs.h <<_ACEOF
12111 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12114 eval ac_cv_have_decl_$gl_func=yes
12123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12124 $as_echo_n "checking for unsigned long long int... " >&6; }
12125 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12126 $as_echo_n "(cached) " >&6
12128 ac_cv_type_unsigned_long_long_int=yes
12129 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12131 /* end confdefs.h. */
12133 /* For now, do not test the preprocessor; as of 2007 there are too many
12134 implementations with broken preprocessors. Perhaps this can
12135 be revisited in 2012. In the meantime, code should not expect
12136 #if to work with literals wider than 32 bits. */
12137 /* Test literals. */
12138 long long int ll = 9223372036854775807ll;
12139 long long int nll = -9223372036854775807LL;
12140 unsigned long long int ull = 18446744073709551615ULL;
12141 /* Test constant expressions. */
12142 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12144 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12150 /* Test availability of runtime routines for shift and division. */
12151 long long int llmax = 9223372036854775807ll;
12152 unsigned long long int ullmax = 18446744073709551615ull;
12153 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12154 | (llmax / ll) | (llmax % ll)
12155 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12156 | (ullmax / ull) | (ullmax % ull));
12162 if ac_fn_c_try_link "$LINENO"; then :
12165 ac_cv_type_unsigned_long_long_int=no
12167 rm -f core conftest.err conftest.$ac_objext \
12168 conftest$ac_exeext conftest.$ac_ext
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12172 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12173 if test $ac_cv_type_unsigned_long_long_int = yes; then
12175 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12182 $as_echo_n "checking for long long int... " >&6; }
12183 if ${ac_cv_type_long_long_int+:} false; then :
12184 $as_echo_n "(cached) " >&6
12186 ac_cv_type_long_long_int=yes
12187 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12188 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12189 if test $ac_cv_type_long_long_int = yes; then
12190 if test "$cross_compiling" = yes; then :
12193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h. */
12195 #include <limits.h>
12198 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12199 # define LLONG_MAX (HALF - 1 + HALF)
12204 long long int n = 1;
12208 long long int m = n << i;
12211 if (LLONG_MAX / 2 < m)
12219 if ac_fn_c_try_run "$LINENO"; then :
12222 ac_cv_type_long_long_int=no
12224 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12225 conftest.$ac_objext conftest.beam conftest.$ac_ext
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12232 $as_echo "$ac_cv_type_long_long_int" >&6; }
12233 if test $ac_cv_type_long_long_int = yes; then
12235 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12244 gl_cv_c_multiarch=no
12245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12246 /* end confdefs.h. */
12247 #ifndef __APPLE_CC__
12248 not a universal capable compiler
12253 if ac_fn_c_try_compile "$LINENO"; then :
12257 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12258 if test -n "$prev"; then
12260 i?86 | x86_64 | ppc | ppc64)
12261 if test -z "$arch" || test "$arch" = "$word"; then
12264 gl_cv_c_multiarch=yes
12270 if test "x$word" = "x-arch"; then
12277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12278 if test $gl_cv_c_multiarch = yes; then
12279 APPLE_UNIVERSAL_BUILD=1
12281 APPLE_UNIVERSAL_BUILD=0
12288 if test $ac_cv_type_long_long_int = yes; then
12289 HAVE_LONG_LONG_INT=1
12291 HAVE_LONG_LONG_INT=0
12295 if test $ac_cv_type_unsigned_long_long_int = yes; then
12296 HAVE_UNSIGNED_LONG_LONG_INT=1
12298 HAVE_UNSIGNED_LONG_LONG_INT=0
12303 if test $ac_cv_header_wchar_h = yes; then
12310 if test $ac_cv_header_inttypes_h = yes; then
12317 if test $ac_cv_header_sys_types_h = yes; then
12333 if test $gl_cv_have_include_next = yes; then
12334 gl_cv_next_stdint_h='<'stdint.h'>'
12336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12337 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12338 if ${gl_cv_next_stdint_h+:} false; then :
12339 $as_echo_n "(cached) " >&6
12342 if test $ac_cv_header_stdint_h = yes; then
12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12348 /* end confdefs.h. */
12349 #include <stdint.h>
12352 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12353 *) gl_absname_cpp="$ac_cpp" ;;
12358 gl_dirsep_regex='[/\\]'
12361 gl_dirsep_regex='\/'
12364 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12365 gl_header_literal_regex=`echo 'stdint.h' \
12366 | sed -e "$gl_make_literal_regex_sed"`
12367 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12368 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12374 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12375 sed -n "$gl_absolute_header_sed"`
12377 gl_header=$gl_cv_absolute_stdint_h
12378 gl_cv_next_stdint_h='"'$gl_header'"'
12380 gl_cv_next_stdint_h='<'stdint.h'>'
12385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12386 $as_echo "$gl_cv_next_stdint_h" >&6; }
12388 NEXT_STDINT_H=$gl_cv_next_stdint_h
12390 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12391 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12392 gl_next_as_first_directive='<'stdint.h'>'
12394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12395 gl_next_as_first_directive=$gl_cv_next_stdint_h
12397 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12402 if test $ac_cv_header_stdint_h = yes; then
12409 if test $ac_cv_header_stdint_h = yes; then
12410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12411 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12412 if ${gl_cv_header_working_stdint_h+:} false; then :
12413 $as_echo_n "(cached) " >&6
12415 gl_cv_header_working_stdint_h=no
12416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12417 /* end confdefs.h. */
12420 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12421 #include <stdint.h>
12422 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12423 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12424 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12428 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12429 included before <wchar.h>. */
12430 #include <stddef.h>
12431 #include <signal.h>
12433 # include <stdio.h>
12435 # include <wchar.h>
12440 int8_t a1 = INT8_MAX;
12441 int8_t a1min = INT8_MIN;
12444 int16_t a2 = INT16_MAX;
12445 int16_t a2min = INT16_MIN;
12448 int32_t a3 = INT32_MAX;
12449 int32_t a3min = INT32_MIN;
12452 int64_t a4 = INT64_MAX;
12453 int64_t a4min = INT64_MIN;
12456 uint8_t b1 = UINT8_MAX;
12458 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12461 uint16_t b2 = UINT16_MAX;
12464 uint32_t b3 = UINT32_MAX;
12467 uint64_t b4 = UINT64_MAX;
12469 int_least8_t c1 = INT8_C (0x7f);
12470 int_least8_t c1max = INT_LEAST8_MAX;
12471 int_least8_t c1min = INT_LEAST8_MIN;
12472 int_least16_t c2 = INT16_C (0x7fff);
12473 int_least16_t c2max = INT_LEAST16_MAX;
12474 int_least16_t c2min = INT_LEAST16_MIN;
12475 int_least32_t c3 = INT32_C (0x7fffffff);
12476 int_least32_t c3max = INT_LEAST32_MAX;
12477 int_least32_t c3min = INT_LEAST32_MIN;
12478 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12479 int_least64_t c4max = INT_LEAST64_MAX;
12480 int_least64_t c4min = INT_LEAST64_MIN;
12481 uint_least8_t d1 = UINT8_C (0xff);
12482 uint_least8_t d1max = UINT_LEAST8_MAX;
12483 uint_least16_t d2 = UINT16_C (0xffff);
12484 uint_least16_t d2max = UINT_LEAST16_MAX;
12485 uint_least32_t d3 = UINT32_C (0xffffffff);
12486 uint_least32_t d3max = UINT_LEAST32_MAX;
12487 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12488 uint_least64_t d4max = UINT_LEAST64_MAX;
12489 int_fast8_t e1 = INT_FAST8_MAX;
12490 int_fast8_t e1min = INT_FAST8_MIN;
12491 int_fast16_t e2 = INT_FAST16_MAX;
12492 int_fast16_t e2min = INT_FAST16_MIN;
12493 int_fast32_t e3 = INT_FAST32_MAX;
12494 int_fast32_t e3min = INT_FAST32_MIN;
12495 int_fast64_t e4 = INT_FAST64_MAX;
12496 int_fast64_t e4min = INT_FAST64_MIN;
12497 uint_fast8_t f1 = UINT_FAST8_MAX;
12498 uint_fast16_t f2 = UINT_FAST16_MAX;
12499 uint_fast32_t f3 = UINT_FAST32_MAX;
12500 uint_fast64_t f4 = UINT_FAST64_MAX;
12502 intptr_t g = INTPTR_MAX;
12503 intptr_t gmin = INTPTR_MIN;
12506 uintptr_t h = UINTPTR_MAX;
12508 intmax_t i = INTMAX_MAX;
12509 uintmax_t j = UINTMAX_MAX;
12511 #include <limits.h> /* for CHAR_BIT */
12512 #define TYPE_MINIMUM(t) \
12513 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12514 #define TYPE_MAXIMUM(t) \
12515 ((t) ((t) 0 < (t) -1 \
12517 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12520 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12521 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12523 /* Detect bug in FreeBSD 6.0 / ia64. */
12524 int check_SIG_ATOMIC:
12525 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12526 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12528 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12530 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12531 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12533 /* Detect bug in mingw. */
12535 WINT_MIN == TYPE_MINIMUM (wint_t)
12536 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12539 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12541 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12542 int check_UINT16_C:
12543 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12545 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12547 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12550 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12553 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12556 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12558 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12559 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12560 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12561 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12562 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12563 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12564 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12565 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12566 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12567 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12568 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12579 if ac_fn_c_try_compile "$LINENO"; then :
12580 if test "$cross_compiling" = yes; then :
12581 gl_cv_header_working_stdint_h=yes
12584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12585 /* end confdefs.h. */
12588 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12589 #include <stdint.h>
12592 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12593 included before <wchar.h>. */
12594 #include <stddef.h>
12595 #include <signal.h>
12597 # include <stdio.h>
12599 # include <wchar.h>
12604 #include <string.h>
12605 #define MVAL(macro) MVAL1(macro)
12606 #define MVAL1(expression) #expression
12607 static const char *macro_values[] =
12641 for (mv = macro_values; *mv != NULL; mv++)
12643 const char *value = *mv;
12644 /* Test whether it looks like a cast expression. */
12645 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12646 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12647 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12648 || strncmp (value, "((int)"/*)*/, 6) == 0
12649 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12650 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12651 return mv - macro_values + 1;
12659 if ac_fn_c_try_run "$LINENO"; then :
12660 gl_cv_header_working_stdint_h=yes
12662 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
12668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12672 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12674 if test "$gl_cv_header_working_stdint_h" = yes; then
12677 for ac_header in sys/inttypes.h sys/bitypes.h
12679 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12680 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12681 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12682 cat >>confdefs.h <<_ACEOF
12683 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12690 if test $ac_cv_header_sys_inttypes_h = yes; then
12691 HAVE_SYS_INTTYPES_H=1
12693 HAVE_SYS_INTTYPES_H=0
12696 if test $ac_cv_header_sys_bitypes_h = yes; then
12697 HAVE_SYS_BITYPES_H=1
12699 HAVE_SYS_BITYPES_H=0
12705 if test $APPLE_UNIVERSAL_BUILD = 0; then
12708 for gltype in ptrdiff_t size_t ; do
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12710 $as_echo_n "checking for bit size of $gltype... " >&6; }
12711 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12712 $as_echo_n "(cached) " >&6
12714 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12715 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12716 included before <wchar.h>. */
12717 #include <stddef.h>
12718 #include <signal.h>
12720 # include <stdio.h>
12722 # include <wchar.h>
12725 #include <limits.h>"; then :
12731 eval gl_cv_bitsizeof_${gltype}=\$result
12734 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12736 $as_echo "$ac_res" >&6; }
12737 eval result=\$gl_cv_bitsizeof_${gltype}
12738 if test $result = unknown; then
12741 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12742 cat >>confdefs.h <<_ACEOF
12743 #define BITSIZEOF_${GLTYPE} $result
12746 eval BITSIZEOF_${GLTYPE}=\$result
12753 for gltype in sig_atomic_t wchar_t wint_t ; do
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12755 $as_echo_n "checking for bit size of $gltype... " >&6; }
12756 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12757 $as_echo_n "(cached) " >&6
12759 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12760 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12761 included before <wchar.h>. */
12762 #include <stddef.h>
12763 #include <signal.h>
12765 # include <stdio.h>
12767 # include <wchar.h>
12770 #include <limits.h>"; then :
12776 eval gl_cv_bitsizeof_${gltype}=\$result
12779 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12781 $as_echo "$ac_res" >&6; }
12782 eval result=\$gl_cv_bitsizeof_${gltype}
12783 if test $result = unknown; then
12786 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12787 cat >>confdefs.h <<_ACEOF
12788 #define BITSIZEOF_${GLTYPE} $result
12791 eval BITSIZEOF_${GLTYPE}=\$result
12797 for gltype in sig_atomic_t wchar_t wint_t ; do
12798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12799 $as_echo_n "checking whether $gltype is signed... " >&6; }
12800 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12801 $as_echo_n "(cached) " >&6
12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804 /* end confdefs.h. */
12806 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12807 included before <wchar.h>. */
12808 #include <stddef.h>
12809 #include <signal.h>
12811 # include <stdio.h>
12813 # include <wchar.h>
12816 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12825 if ac_fn_c_try_compile "$LINENO"; then :
12830 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12831 eval gl_cv_type_${gltype}_signed=\$result
12834 eval ac_res=\$gl_cv_type_${gltype}_signed
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12836 $as_echo "$ac_res" >&6; }
12837 eval result=\$gl_cv_type_${gltype}_signed
12838 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12839 if test "$result" = yes; then
12840 cat >>confdefs.h <<_ACEOF
12841 #define HAVE_SIGNED_${GLTYPE} 1
12844 eval HAVE_SIGNED_${GLTYPE}=1
12846 eval HAVE_SIGNED_${GLTYPE}=0
12851 gl_cv_type_ptrdiff_t_signed=yes
12852 gl_cv_type_size_t_signed=no
12853 if test $APPLE_UNIVERSAL_BUILD = 0; then
12856 for gltype in ptrdiff_t size_t ; do
12857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12858 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12859 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12860 $as_echo_n "(cached) " >&6
12862 eval gl_cv_type_${gltype}_suffix=no
12863 eval result=\$gl_cv_type_${gltype}_signed
12864 if test "$result" = yes; then
12869 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12871 '') gltype1='int';;
12872 l) gltype1='long int';;
12873 ll) gltype1='long long int';;
12874 i64) gltype1='__int64';;
12875 u) gltype1='unsigned int';;
12876 ul) gltype1='unsigned long int';;
12877 ull) gltype1='unsigned long long int';;
12878 ui64)gltype1='unsigned __int64';;
12880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12881 /* end confdefs.h. */
12883 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12884 included before <wchar.h>. */
12885 #include <stddef.h>
12886 #include <signal.h>
12888 # include <stdio.h>
12890 # include <wchar.h>
12893 extern $gltype foo;
12894 extern $gltype1 foo;
12903 if ac_fn_c_try_compile "$LINENO"; then :
12904 eval gl_cv_type_${gltype}_suffix=\$glsuf
12906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12907 eval result=\$gl_cv_type_${gltype}_suffix
12908 test "$result" != no && break
12911 eval ac_res=\$gl_cv_type_${gltype}_suffix
12912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12913 $as_echo "$ac_res" >&6; }
12914 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12915 eval result=\$gl_cv_type_${gltype}_suffix
12916 test "$result" = no && result=
12917 eval ${GLTYPE}_SUFFIX=\$result
12918 cat >>confdefs.h <<_ACEOF
12919 #define ${GLTYPE}_SUFFIX $result
12928 for gltype in sig_atomic_t wchar_t wint_t ; do
12929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
12930 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
12931 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
12932 $as_echo_n "(cached) " >&6
12934 eval gl_cv_type_${gltype}_suffix=no
12935 eval result=\$gl_cv_type_${gltype}_signed
12936 if test "$result" = yes; then
12941 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
12943 '') gltype1='int';;
12944 l) gltype1='long int';;
12945 ll) gltype1='long long int';;
12946 i64) gltype1='__int64';;
12947 u) gltype1='unsigned int';;
12948 ul) gltype1='unsigned long int';;
12949 ull) gltype1='unsigned long long int';;
12950 ui64)gltype1='unsigned __int64';;
12952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12953 /* end confdefs.h. */
12955 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12956 included before <wchar.h>. */
12957 #include <stddef.h>
12958 #include <signal.h>
12960 # include <stdio.h>
12962 # include <wchar.h>
12965 extern $gltype foo;
12966 extern $gltype1 foo;
12975 if ac_fn_c_try_compile "$LINENO"; then :
12976 eval gl_cv_type_${gltype}_suffix=\$glsuf
12978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12979 eval result=\$gl_cv_type_${gltype}_suffix
12980 test "$result" != no && break
12983 eval ac_res=\$gl_cv_type_${gltype}_suffix
12984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12985 $as_echo "$ac_res" >&6; }
12986 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12987 eval result=\$gl_cv_type_${gltype}_suffix
12988 test "$result" = no && result=
12989 eval ${GLTYPE}_SUFFIX=\$result
12990 cat >>confdefs.h <<_ACEOF
12991 #define ${GLTYPE}_SUFFIX $result
12998 if test $BITSIZEOF_WINT_T -lt 32; then
12999 BITSIZEOF_WINT_T=32
13005 if test -n "$STDINT_H"; then
13006 GL_GENERATE_STDINT_H_TRUE=
13007 GL_GENERATE_STDINT_H_FALSE='#'
13009 GL_GENERATE_STDINT_H_TRUE='#'
13010 GL_GENERATE_STDINT_H_FALSE=
13019 GNULIB_STRTOIMAX=0;
13020 GNULIB_STRTOUMAX=0;
13021 HAVE_DECL_IMAXABS=1;
13022 HAVE_DECL_IMAXDIV=1;
13023 HAVE_DECL_STRTOIMAX=1;
13024 HAVE_DECL_STRTOUMAX=1;
13025 REPLACE_STRTOIMAX=0;
13026 REPLACE_STRTOUMAX=0;
13027 INT32_MAX_LT_INTMAX_MAX=1;
13028 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13029 PRI_MACROS_BROKEN=0;
13030 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13031 UINT32_MAX_LT_UINTMAX_MAX=1;
13032 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13048 if test $gl_cv_have_include_next = yes; then
13049 gl_cv_next_inttypes_h='<'inttypes.h'>'
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13052 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13053 if ${gl_cv_next_inttypes_h+:} false; then :
13054 $as_echo_n "(cached) " >&6
13057 if test $ac_cv_header_inttypes_h = yes; then
13062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13063 /* end confdefs.h. */
13064 #include <inttypes.h>
13067 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13068 *) gl_absname_cpp="$ac_cpp" ;;
13073 gl_dirsep_regex='[/\\]'
13076 gl_dirsep_regex='\/'
13079 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13080 gl_header_literal_regex=`echo 'inttypes.h' \
13081 | sed -e "$gl_make_literal_regex_sed"`
13082 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13083 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13089 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13090 sed -n "$gl_absolute_header_sed"`
13092 gl_header=$gl_cv_absolute_inttypes_h
13093 gl_cv_next_inttypes_h='"'$gl_header'"'
13095 gl_cv_next_inttypes_h='<'inttypes.h'>'
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13101 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13103 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13105 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13106 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13107 gl_next_as_first_directive='<'inttypes.h'>'
13109 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13110 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13112 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13121 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13122 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13124 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13125 if eval \${$as_gl_Symbol+:} false; then :
13126 $as_echo_n "(cached) " >&6
13128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13129 /* end confdefs.h. */
13130 #include <inttypes.h>
13141 if ac_fn_c_try_compile "$LINENO"; then :
13142 eval "$as_gl_Symbol=yes"
13144 eval "$as_gl_Symbol=no"
13146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13148 eval ac_res=\$$as_gl_Symbol
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13150 $as_echo "$ac_res" >&6; }
13151 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13152 cat >>confdefs.h <<_ACEOF
13153 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13156 eval ac_cv_have_decl_$gl_func=yes
13162 for ac_header in inttypes.h
13164 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13165 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13166 cat >>confdefs.h <<_ACEOF
13167 #define HAVE_INTTYPES_H 1
13174 if test $ac_cv_header_inttypes_h = yes; then
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13176 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13177 if ${gt_cv_inttypes_pri_broken+:} false; then :
13178 $as_echo_n "(cached) " >&6
13181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13182 /* end confdefs.h. */
13184 #include <inttypes.h>
13197 if ac_fn_c_try_compile "$LINENO"; then :
13198 gt_cv_inttypes_pri_broken=no
13200 gt_cv_inttypes_pri_broken=yes
13202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13206 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13208 if test "$gt_cv_inttypes_pri_broken" = yes; then
13210 cat >>confdefs.h <<_ACEOF
13211 #define PRI_MACROS_BROKEN 1
13214 PRI_MACROS_BROKEN=1
13216 PRI_MACROS_BROKEN=0
13225 GNULIB_TOWCTRANS=0;
13229 REPLACE_ISWBLANK=0;
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13235 $as_echo_n "checking for wint_t... " >&6; }
13236 if ${gt_cv_c_wint_t+:} false; then :
13237 $as_echo_n "(cached) " >&6
13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240 /* end confdefs.h. */
13242 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13244 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13245 before <wchar.h>. */
13246 #include <stddef.h>
13250 wint_t foo = (wchar_t)'\0';
13259 if ac_fn_c_try_compile "$LINENO"; then :
13264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13267 $as_echo "$gt_cv_c_wint_t" >&6; }
13268 if test $gt_cv_c_wint_t = yes; then
13270 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13279 if test $ac_cv_func_iswcntrl = yes; then
13287 if test $gt_cv_c_wint_t = yes; then
13303 if test $gl_cv_have_include_next = yes; then
13304 gl_cv_next_wctype_h='<'wctype.h'>'
13306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13307 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13308 if ${gl_cv_next_wctype_h+:} false; then :
13309 $as_echo_n "(cached) " >&6
13312 if test $ac_cv_header_wctype_h = yes; then
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318 /* end confdefs.h. */
13319 #include <wctype.h>
13322 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13323 *) gl_absname_cpp="$ac_cpp" ;;
13328 gl_dirsep_regex='[/\\]'
13331 gl_dirsep_regex='\/'
13334 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13335 gl_header_literal_regex=`echo 'wctype.h' \
13336 | sed -e "$gl_make_literal_regex_sed"`
13337 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13338 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13344 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13345 sed -n "$gl_absolute_header_sed"`
13347 gl_header=$gl_cv_absolute_wctype_h
13348 gl_cv_next_wctype_h='"'$gl_header'"'
13350 gl_cv_next_wctype_h='<'wctype.h'>'
13355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13356 $as_echo "$gl_cv_next_wctype_h" >&6; }
13358 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13360 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13362 gl_next_as_first_directive='<'wctype.h'>'
13364 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13365 gl_next_as_first_directive=$gl_cv_next_wctype_h
13367 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13372 if test $ac_cv_header_wctype_h = yes; then
13373 if test $ac_cv_func_iswcntrl = yes; then
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13375 $as_echo_n "checking whether iswcntrl works... " >&6; }
13376 if ${gl_cv_func_iswcntrl_works+:} false; then :
13377 $as_echo_n "(cached) " >&6
13380 if test "$cross_compiling" = yes; then :
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382 /* end confdefs.h. */
13383 #include <stdlib.h>
13384 #if __GNU_LIBRARY__ == 1
13385 Linux libc5 i18n is broken.
13395 if ac_fn_c_try_compile "$LINENO"; then :
13396 gl_cv_func_iswcntrl_works="guessing yes"
13398 gl_cv_func_iswcntrl_works="guessing no"
13400 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13404 /* end confdefs.h. */
13406 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13407 included before <wchar.h>.
13408 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13409 must be included before <wchar.h>. */
13410 #include <stddef.h>
13414 #include <wctype.h>
13415 int main () { return iswprint ('x') == 0; }
13418 if ac_fn_c_try_run "$LINENO"; then :
13419 gl_cv_func_iswcntrl_works=yes
13421 gl_cv_func_iswcntrl_works=no
13423 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13424 conftest.$ac_objext conftest.beam conftest.$ac_ext
13429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13430 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13438 case "$gl_cv_func_iswcntrl_works" in
13439 *yes) REPLACE_ISWCNTRL=0 ;;
13440 *) REPLACE_ISWCNTRL=1 ;;
13444 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13448 if test $REPLACE_ISWCNTRL = 1; then
13451 for ac_func in towlower
13453 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13454 if test "x$ac_cv_func_towlower" = xyes; then :
13455 cat >>confdefs.h <<_ACEOF
13456 #define HAVE_TOWLOWER 1
13462 if test $ac_cv_func_towlower = yes; then
13465 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13466 included before <wchar.h>.
13467 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13468 must be included before <wchar.h>. */
13469 #include <stddef.h>
13474 # include <wctype.h>
13478 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13484 cat >>confdefs.h <<_ACEOF
13485 #define HAVE_DECL_TOWLOWER $ac_have_decl
13488 if test $ac_cv_have_decl_towlower = yes; then
13497 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13502 $as_echo_n "checking for wctype_t... " >&6; }
13503 if ${gl_cv_type_wctype_t+:} false; then :
13504 $as_echo_n "(cached) " >&6
13506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13507 /* end confdefs.h. */
13508 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13509 included before <wchar.h>.
13510 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13511 must be included before <wchar.h>. */
13512 #include <stddef.h>
13517 # include <wctype.h>
13529 if ac_fn_c_try_compile "$LINENO"; then :
13530 gl_cv_type_wctype_t=yes
13532 gl_cv_type_wctype_t=no
13534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13538 $as_echo "$gl_cv_type_wctype_t" >&6; }
13539 if test $gl_cv_type_wctype_t = no; then
13543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13544 $as_echo_n "checking for wctrans_t... " >&6; }
13545 if ${gl_cv_type_wctrans_t+:} false; then :
13546 $as_echo_n "(cached) " >&6
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549 /* end confdefs.h. */
13550 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13551 included before <wchar.h>.
13552 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13553 must be included before <wchar.h>. */
13554 #include <stddef.h>
13558 #include <wctype.h>
13569 if ac_fn_c_try_compile "$LINENO"; then :
13570 gl_cv_type_wctrans_t=yes
13572 gl_cv_type_wctrans_t=no
13574 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13578 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13579 if test $gl_cv_type_wctrans_t = no; then
13584 for gl_func in wctype iswctype wctrans towctrans ; do
13585 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13587 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13588 if eval \${$as_gl_Symbol+:} false; then :
13589 $as_echo_n "(cached) " >&6
13591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13592 /* end confdefs.h. */
13594 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13596 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13597 included before <wchar.h>. */
13598 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13599 # include <stddef.h>
13600 # include <stdio.h>
13602 # include <wchar.h>
13604 #include <wctype.h>
13615 if ac_fn_c_try_compile "$LINENO"; then :
13616 eval "$as_gl_Symbol=yes"
13618 eval "$as_gl_Symbol=no"
13620 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13622 eval ac_res=\$$as_gl_Symbol
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13624 $as_echo "$ac_res" >&6; }
13625 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13626 cat >>confdefs.h <<_ACEOF
13627 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13630 eval ac_cv_have_decl_$gl_func=yes
13638 GNULIB_NL_LANGINFO=0;
13639 HAVE_NL_LANGINFO=1;
13640 REPLACE_NL_LANGINFO=0;
13653 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13657 # Solaris 9 has *at functions, but uniformly mishandles trailing
13658 # slash in all of them.
13669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13670 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13671 if ${ac_cv_gnu_library_2_1+:} false; then :
13672 $as_echo_n "(cached) " >&6
13674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675 /* end confdefs.h. */
13677 #include <features.h>
13678 #ifdef __GNU_LIBRARY__
13679 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13689 $EGREP "Lucky" >/dev/null 2>&1; then :
13690 ac_cv_gnu_library_2_1=yes
13692 ac_cv_gnu_library_2_1=no
13699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13700 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13702 GLIBC21="$ac_cv_gnu_library_2_1"
13706 GNULIB_LOCALECONV=0;
13707 GNULIB_SETLOCALE=0;
13708 GNULIB_DUPLOCALE=0;
13710 REPLACE_LOCALECONV=0;
13711 REPLACE_SETLOCALE=0;
13712 REPLACE_DUPLOCALE=0;
13713 REPLACE_STRUCT_LCONV=0;
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13721 $as_echo_n "checking for wchar_t... " >&6; }
13722 if ${gt_cv_c_wchar_t+:} false; then :
13723 $as_echo_n "(cached) " >&6
13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13726 /* end confdefs.h. */
13727 #include <stddef.h>
13728 wchar_t foo = (wchar_t)'\0';
13737 if ac_fn_c_try_compile "$LINENO"; then :
13738 gt_cv_c_wchar_t=yes
13742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13745 $as_echo "$gt_cv_c_wchar_t" >&6; }
13746 if test $gt_cv_c_wchar_t = yes; then
13748 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13756 if test $gt_cv_c_wchar_t = no; then
13760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13761 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13762 if ${gl_cv_decl_null_works+:} false; then :
13763 $as_echo_n "(cached) " >&6
13765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13766 /* end confdefs.h. */
13767 #include <stddef.h>
13768 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13778 if ac_fn_c_try_compile "$LINENO"; then :
13779 gl_cv_decl_null_works=yes
13781 gl_cv_decl_null_works=no
13783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13786 $as_echo "$gl_cv_decl_null_works" >&6; }
13787 if test $gl_cv_decl_null_works = no; then
13792 if test -n "$STDDEF_H"; then
13793 GL_GENERATE_STDDEF_H_TRUE=
13794 GL_GENERATE_STDDEF_H_FALSE='#'
13796 GL_GENERATE_STDDEF_H_TRUE='#'
13797 GL_GENERATE_STDDEF_H_FALSE=
13800 if test -n "$STDDEF_H"; then
13809 if test $gl_cv_have_include_next = yes; then
13810 gl_cv_next_stddef_h='<'stddef.h'>'
13812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13813 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13814 if ${gl_cv_next_stddef_h+:} false; then :
13815 $as_echo_n "(cached) " >&6
13820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13821 /* end confdefs.h. */
13822 #include <stddef.h>
13825 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13826 *) gl_absname_cpp="$ac_cpp" ;;
13831 gl_dirsep_regex='[/\\]'
13834 gl_dirsep_regex='\/'
13837 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13838 gl_header_literal_regex=`echo 'stddef.h' \
13839 | sed -e "$gl_make_literal_regex_sed"`
13840 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13841 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13847 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13848 sed -n "$gl_absolute_header_sed"`
13850 gl_header=$gl_cv_absolute_stddef_h
13851 gl_cv_next_stddef_h='"'$gl_header'"'
13855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
13856 $as_echo "$gl_cv_next_stddef_h" >&6; }
13858 NEXT_STDDEF_H=$gl_cv_next_stddef_h
13860 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13861 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13862 gl_next_as_first_directive='<'stddef.h'>'
13864 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13865 gl_next_as_first_directive=$gl_cv_next_stddef_h
13867 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
13880 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
13881 if ${gl_cv_func_malloc_posix+:} false; then :
13882 $as_echo_n "(cached) " >&6
13885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13886 /* end confdefs.h. */
13891 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
13899 if ac_fn_c_try_compile "$LINENO"; then :
13900 gl_cv_func_malloc_posix=yes
13902 gl_cv_func_malloc_posix=no
13904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
13908 $as_echo "$gl_cv_func_malloc_posix" >&6; }
13912 for ac_header in stdlib.h
13914 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
13915 if test "x$ac_cv_header_stdlib_h" = xyes; then :
13916 cat >>confdefs.h <<_ACEOF
13917 #define HAVE_STDLIB_H 1
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
13925 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
13926 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
13927 $as_echo_n "(cached) " >&6
13929 if test "$cross_compiling" = yes; then :
13931 # Guess yes on platforms where we know the result.
13932 *-gnu* | freebsd* | netbsd* | openbsd* \
13933 | hpux* | solaris* | cygwin* | mingw*)
13934 ac_cv_func_malloc_0_nonnull=yes ;;
13935 # If we don't know, assume the worst.
13936 *) ac_cv_func_malloc_0_nonnull=no ;;
13940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13941 /* end confdefs.h. */
13942 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
13943 # include <stdlib.h>
13951 return ! malloc (0);
13957 if ac_fn_c_try_run "$LINENO"; then :
13958 ac_cv_func_malloc_0_nonnull=yes
13960 ac_cv_func_malloc_0_nonnull=no
13962 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13963 conftest.$ac_objext conftest.beam conftest.$ac_ext
13968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
13969 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
13970 if test $ac_cv_func_malloc_0_nonnull = yes; then :
13971 gl_cv_func_malloc_0_nonnull=1
13973 gl_cv_func_malloc_0_nonnull=0
13977 cat >>confdefs.h <<_ACEOF
13978 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
13990 $as_echo_n "checking for a traditional japanese locale... " >&6; }
13991 if ${gt_cv_locale_ja+:} false; then :
13992 $as_echo_n "(cached) " >&6
13995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996 /* end confdefs.h. */
13998 #include <locale.h>
14000 #if HAVE_LANGINFO_CODESET
14001 # include <langinfo.h>
14003 #include <stdlib.h>
14004 #include <string.h>
14010 /* Check whether the given locale name is recognized by the system. */
14011 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14012 /* On native Windows, setlocale(category, "") looks at the system settings,
14013 not at the environment variables. Also, when an encoding suffix such
14014 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14015 category of the locale to "C". */
14016 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14017 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14020 if (setlocale (LC_ALL, "") == NULL) return 1;
14022 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14023 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14024 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14025 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14026 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14027 some unit tests fail.
14028 On MirBSD 10, when an unsupported locale is specified, setlocale()
14029 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14030 #if HAVE_LANGINFO_CODESET
14032 const char *cs = nl_langinfo (CODESET);
14033 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14034 || strcmp (cs, "UTF-8") == 0)
14039 /* On Cygwin, avoid locale names without encoding suffix, because the
14040 locale_charset() function relies on the encoding suffix. Note that
14041 LC_ALL is set on the command line. */
14042 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14044 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
14045 on Cygwin 1.5.x. */
14046 if (MB_CUR_MAX == 1)
14048 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14049 This excludes the UTF-8 encoding (except on MirBSD). */
14050 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14051 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14052 for (p = buf; *p != '\0'; p++)
14053 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14059 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14060 (eval $ac_link) 2>&5
14062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14063 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14065 # Handle native Windows specially, because there setlocale() interprets
14066 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14067 # "fr" or "fra" as "French" or "French_France.1252",
14068 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14069 # "ja" as "Japanese" or "Japanese_Japan.932",
14072 # Note that on native Windows, the Japanese locale is
14073 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14074 # cannot use it here.
14075 gt_cv_locale_ja=none
14078 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14079 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14080 # configure script would override the LC_ALL setting. Likewise for
14081 # LC_CTYPE, which is also set at the beginning of the configure script.
14082 # Test for the AIX locale name.
14083 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14084 gt_cv_locale_ja=ja_JP
14086 # Test for the locale name with explicit encoding suffix.
14087 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14088 gt_cv_locale_ja=ja_JP.EUC-JP
14090 # Test for the HP-UX, OSF/1, NetBSD locale name.
14091 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14092 gt_cv_locale_ja=ja_JP.eucJP
14094 # Test for the IRIX, FreeBSD locale name.
14095 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14096 gt_cv_locale_ja=ja_JP.EUC
14098 # Test for the Solaris 7 locale name.
14099 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14102 # Special test for NetBSD 1.6.
14103 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14104 gt_cv_locale_ja=ja_JP.eucJP
14107 gt_cv_locale_ja=none
14120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14121 $as_echo "$gt_cv_locale_ja" >&6; }
14122 LOCALE_JA=$gt_cv_locale_ja
14128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14129 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14130 if ${gt_cv_locale_zh_CN+:} false; then :
14131 $as_echo_n "(cached) " >&6
14134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14135 /* end confdefs.h. */
14137 #include <locale.h>
14138 #include <stdlib.h>
14140 #if HAVE_LANGINFO_CODESET
14141 # include <langinfo.h>
14143 #include <stdlib.h>
14144 #include <string.h>
14150 /* Check whether the given locale name is recognized by the system. */
14151 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14152 /* On native Windows, setlocale(category, "") looks at the system settings,
14153 not at the environment variables. Also, when an encoding suffix such
14154 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14155 category of the locale to "C". */
14156 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14157 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14160 if (setlocale (LC_ALL, "") == NULL) return 1;
14162 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14163 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14164 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14165 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14166 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14167 some unit tests fail.
14168 On MirBSD 10, when an unsupported locale is specified, setlocale()
14169 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14170 #if HAVE_LANGINFO_CODESET
14172 const char *cs = nl_langinfo (CODESET);
14173 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14174 || strcmp (cs, "UTF-8") == 0)
14179 /* On Cygwin, avoid locale names without encoding suffix, because the
14180 locale_charset() function relies on the encoding suffix. Note that
14181 LC_ALL is set on the command line. */
14182 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14184 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14185 This excludes the UTF-8 encoding (except on MirBSD). */
14186 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14187 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14188 for (p = buf; *p != '\0'; p++)
14189 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14191 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14192 single wide character. This excludes the GB2312 and GBK encodings. */
14193 if (mblen ("\203\062\332\066", 5) != 4)
14199 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14200 (eval $ac_link) 2>&5
14202 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14203 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14205 # Handle native Windows specially, because there setlocale() interprets
14206 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14207 # "fr" or "fra" as "French" or "French_France.1252",
14208 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14209 # "ja" as "Japanese" or "Japanese_Japan.932",
14212 # Test for the hypothetical native Windows locale name.
14213 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14214 gt_cv_locale_zh_CN=Chinese_China.54936
14217 gt_cv_locale_zh_CN=none
14221 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14222 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14223 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14224 gt_cv_locale_zh_CN=none
14227 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14228 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14229 # configure script would override the LC_ALL setting. Likewise for
14230 # LC_CTYPE, which is also set at the beginning of the configure script.
14231 # Test for the locale name without encoding suffix.
14232 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14233 gt_cv_locale_zh_CN=zh_CN
14235 # Test for the locale name with explicit encoding suffix.
14236 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14237 gt_cv_locale_zh_CN=zh_CN.GB18030
14240 gt_cv_locale_zh_CN=none
14246 # If there was a link error, due to mblen(), the system is so old that
14247 # it certainly doesn't have a chinese locale.
14248 gt_cv_locale_zh_CN=none
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14254 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14255 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14261 $as_echo_n "checking for a french Unicode locale... " >&6; }
14262 if ${gt_cv_locale_fr_utf8+:} false; then :
14263 $as_echo_n "(cached) " >&6
14266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14267 /* end confdefs.h. */
14269 #include <locale.h>
14271 #if HAVE_LANGINFO_CODESET
14272 # include <langinfo.h>
14274 #include <stdlib.h>
14275 #include <string.h>
14279 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14280 imitates locale dependent behaviour by looking at the environment
14281 variables, and all locales use the UTF-8 encoding. */
14282 #if !(defined __BEOS__ || defined __HAIKU__)
14283 /* Check whether the given locale name is recognized by the system. */
14284 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14285 /* On native Windows, setlocale(category, "") looks at the system settings,
14286 not at the environment variables. Also, when an encoding suffix such
14287 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14288 category of the locale to "C". */
14289 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14290 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14293 if (setlocale (LC_ALL, "") == NULL) return 1;
14295 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14296 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14297 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14298 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14299 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14300 some unit tests fail. */
14301 # if HAVE_LANGINFO_CODESET
14303 const char *cs = nl_langinfo (CODESET);
14304 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14309 /* On Cygwin, avoid locale names without encoding suffix, because the
14310 locale_charset() function relies on the encoding suffix. Note that
14311 LC_ALL is set on the command line. */
14312 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14314 /* Check whether in the abbreviation of the second month, the second
14315 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14316 two bytes long, with UTF-8 encoding. */
14317 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14318 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14319 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14322 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14323 /* Check whether the decimal separator is a comma.
14324 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14325 are nl_langinfo(RADIXCHAR) are both ".". */
14326 if (localeconv () ->decimal_point[0] != ',') return 1;
14332 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14333 (eval $ac_link) 2>&5
14335 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14336 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14338 # Handle native Windows specially, because there setlocale() interprets
14339 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14340 # "fr" or "fra" as "French" or "French_France.1252",
14341 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14342 # "ja" as "Japanese" or "Japanese_Japan.932",
14345 # Test for the hypothetical native Windows locale name.
14346 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14347 gt_cv_locale_fr_utf8=French_France.65001
14350 gt_cv_locale_fr_utf8=none
14354 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14355 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14356 # configure script would override the LC_ALL setting. Likewise for
14357 # LC_CTYPE, which is also set at the beginning of the configure script.
14358 # Test for the usual locale name.
14359 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14360 gt_cv_locale_fr_utf8=fr_FR
14362 # Test for the locale name with explicit encoding suffix.
14363 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14364 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14366 # Test for the Solaris 7 locale name.
14367 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14368 gt_cv_locale_fr_utf8=fr.UTF-8
14371 gt_cv_locale_fr_utf8=none
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14382 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14383 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14393 GNULIB_RAWMEMCHR=0;
14396 GNULIB_STRCHRNUL=0;
14404 GNULIB_STRCASESTR=0;
14411 GNULIB_MBSCASECMP=0;
14412 GNULIB_MBSNCASECMP=0;
14413 GNULIB_MBSPCASECMP=0;
14414 GNULIB_MBSCASESTR=0;
14421 GNULIB_STRERROR_R=0;
14422 GNULIB_STRSIGNAL=0;
14423 GNULIB_STRVERSCMP=0;
14428 HAVE_DECL_MEMMEM=1;
14430 HAVE_DECL_MEMRCHR=1;
14435 HAVE_DECL_STRDUP=1;
14436 HAVE_DECL_STRNDUP=1;
14437 HAVE_DECL_STRNLEN=1;
14441 HAVE_DECL_STRTOK_R=1;
14442 HAVE_DECL_STRERROR_R=1;
14443 HAVE_DECL_STRSIGNAL=1;
14450 REPLACE_STRCASESTR=0;
14451 REPLACE_STRCHRNUL=0;
14452 REPLACE_STRERROR=0;
14453 REPLACE_STRERROR_R=0;
14457 REPLACE_STRSIGNAL=0;
14458 REPLACE_STRTOK_R=0;
14459 UNDEFINE_STRTOK_R=0;
14469 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14470 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14471 # irrelevant for anonymous mappings.
14472 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14473 if test "x$ac_cv_func_mmap" = xyes; then :
14480 # Try to allow MAP_ANONYMOUS.
14481 gl_have_mmap_anonymous=no
14482 if test $gl_have_mmap = yes; then
14483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14484 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14486 /* end confdefs.h. */
14488 #include <sys/mman.h>
14489 #ifdef MAP_ANONYMOUS
14490 I cannot identify this map
14494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14495 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14496 gl_have_mmap_anonymous=yes
14500 if test $gl_have_mmap_anonymous != yes; then
14501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14502 /* end confdefs.h. */
14504 #include <sys/mman.h>
14506 I cannot identify this map
14510 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14511 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14513 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14515 gl_have_mmap_anonymous=yes
14520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14521 $as_echo "$gl_have_mmap_anonymous" >&6; }
14522 if test $gl_have_mmap_anonymous = yes; then
14524 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14534 if test $HAVE_MEMCHR = 1; then
14535 # Detect platform-specific bugs in some versions of glibc:
14536 # memchr should not dereference anything with length 0
14537 # http://bugzilla.redhat.com/499689
14538 # memchr should not dereference overestimated length after a match
14539 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14540 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14541 # Assume that memchr works on platforms that lack mprotect.
14542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14543 $as_echo_n "checking whether memchr works... " >&6; }
14544 if ${gl_cv_func_memchr_works+:} false; then :
14545 $as_echo_n "(cached) " >&6
14547 if test "$cross_compiling" = yes; then :
14548 gl_cv_func_memchr_works="guessing no"
14550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14551 /* end confdefs.h. */
14553 #include <string.h>
14554 #if HAVE_SYS_MMAN_H
14555 # include <fcntl.h>
14556 # include <unistd.h>
14557 # include <sys/types.h>
14558 # include <sys/mman.h>
14560 # define MAP_FILE 0
14569 char *fence = NULL;
14570 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14571 # if HAVE_MAP_ANONYMOUS
14572 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14574 # else /* !HAVE_MAP_ANONYMOUS */
14575 const int flags = MAP_FILE | MAP_PRIVATE;
14576 int fd = open ("/dev/zero", O_RDONLY, 0666);
14580 int pagesize = getpagesize ();
14582 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14584 if (two_pages != (char *)(-1)
14585 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14586 fence = two_pages + pagesize;
14591 if (memchr (fence, 0, 0))
14593 strcpy (fence - 9, "12345678");
14594 if (memchr (fence - 9, 0, 79) != fence - 1)
14596 if (memchr (fence - 1, 0, 3) != fence - 1)
14605 if ac_fn_c_try_run "$LINENO"; then :
14606 gl_cv_func_memchr_works=yes
14608 gl_cv_func_memchr_works=no
14610 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14611 conftest.$ac_objext conftest.beam conftest.$ac_ext
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14616 $as_echo "$gl_cv_func_memchr_works" >&6; }
14617 if test "$gl_cv_func_memchr_works" != yes; then
14622 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14623 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14629 cat >>confdefs.h <<_ACEOF
14630 #define HAVE_DECL_MEMRCHR $ac_have_decl
14645 GNULIB_NANOSLEEP=0;
14649 HAVE_DECL_LOCALTIME_R=1;
14653 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14654 REPLACE_MKTIME=GNULIB_PORTCHECK;
14655 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14656 REPLACE_TIMEGM=GNULIB_PORTCHECK;
14658 : ${GNULIB_GETTIMEOFDAY=0};
14660 REPLACE_LOCALTIME=0;
14662 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14663 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14669 cat >>confdefs.h <<_ACEOF
14670 #define HAVE_DECL_ALARM $ac_have_decl
14677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14678 $as_echo_n "checking for promoted mode_t type... " >&6; }
14679 if ${gl_cv_promoted_mode_t+:} false; then :
14680 $as_echo_n "(cached) " >&6
14683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14684 /* end confdefs.h. */
14685 #include <sys/types.h>
14689 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14694 if ac_fn_c_try_compile "$LINENO"; then :
14695 gl_cv_promoted_mode_t='int'
14697 gl_cv_promoted_mode_t='mode_t'
14699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14703 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14705 cat >>confdefs.h <<_ACEOF
14706 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14711 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14712 if ${ac_cv_header_stdbool_h+:} false; then :
14713 $as_echo_n "(cached) " >&6
14715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14716 /* end confdefs.h. */
14718 #include <stdbool.h>
14720 "error: bool is not defined"
14723 "error: false is not defined"
14726 "error: false is not 0"
14729 "error: true is not defined"
14732 "error: true is not 1"
14734 #ifndef __bool_true_false_are_defined
14735 "error: __bool_true_false_are_defined is not defined"
14738 struct s { _Bool s: 1; _Bool t; } s;
14740 char a[true == 1 ? 1 : -1];
14741 char b[false == 0 ? 1 : -1];
14742 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14743 char d[(bool) 0.5 == true ? 1 : -1];
14744 /* See body of main program for 'e'. */
14745 char f[(_Bool) 0.0 == false ? 1 : -1];
14747 char h[sizeof (_Bool)];
14748 char i[sizeof s.t];
14749 enum { j = false, k = true, l = false * true, m = true * 256 };
14750 /* The following fails for
14751 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14753 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14754 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14755 /* Catch a bug in an HP-UX C compiler. See
14756 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14757 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14769 /* Refer to every declared value, to avoid compiler optimizations. */
14770 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14771 + !m + !n + !o + !p + !q + !pq);
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778 ac_cv_header_stdbool_h=yes
14780 ac_cv_header_stdbool_h=no
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14785 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14786 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14787 if test "x$ac_cv_type__Bool" = xyes; then :
14789 cat >>confdefs.h <<_ACEOF
14790 #define HAVE__BOOL 1
14800 # Define two additional variables used in the Makefile substitution.
14802 if test "$ac_cv_header_stdbool_h" = yes; then
14805 STDBOOL_H='stdbool.h'
14808 if test -n "$STDBOOL_H"; then
14809 GL_GENERATE_STDBOOL_H_TRUE=
14810 GL_GENERATE_STDBOOL_H_FALSE='#'
14812 GL_GENERATE_STDBOOL_H_TRUE='#'
14813 GL_GENERATE_STDBOOL_H_FALSE=
14817 if test "$ac_cv_type__Bool" = yes; then
14825 # parse-datetime.y works with bison only.
14826 : ${YACC='bison -y'}
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14830 $as_echo_n "checking for compound literals... " >&6; }
14831 if ${gl_cv_compound_literals+:} false; then :
14832 $as_echo_n "(cached) " >&6
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h. */
14836 struct s { int i, j; };
14840 struct s t = (struct s) { 3, 4 };
14841 if (t.i != 0) return 0;
14846 if ac_fn_c_try_compile "$LINENO"; then :
14847 gl_cv_compound_literals=yes
14849 gl_cv_compound_literals=no
14851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14854 $as_echo "$gl_cv_compound_literals" >&6; }
14855 if test $gl_cv_compound_literals = yes; then
14857 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
14862 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
14863 if ${ac_cv_struct_tm+:} false; then :
14864 $as_echo_n "(cached) " >&6
14866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14867 /* end confdefs.h. */
14868 #include <sys/types.h>
14875 int *p = &tm.tm_sec;
14881 if ac_fn_c_try_compile "$LINENO"; then :
14882 ac_cv_struct_tm=time.h
14884 ac_cv_struct_tm=sys/time.h
14886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
14889 $as_echo "$ac_cv_struct_tm" >&6; }
14890 if test $ac_cv_struct_tm = sys/time.h; then
14892 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
14897 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
14899 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
14901 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
14915 GNULIB_PTHREAD_SIGMASK=0;
14917 GNULIB_SIGNAL_H_SIGPIPE=0;
14918 GNULIB_SIGPROCMASK=0;
14919 GNULIB_SIGACTION=0;
14920 HAVE_POSIX_SIGNALBLOCKING=1;
14921 HAVE_PTHREAD_SIGMASK=1;
14926 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
14928 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
14930 HAVE_SIGHANDLER_T=1;
14931 REPLACE_PTHREAD_SIGMASK=0;
14945 # Check whether --with-selinux was given.
14946 if test "${with_selinux+set}" = set; then :
14947 withval=$with_selinux;
14954 if test "$with_selinux" != no; then
14956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
14957 $as_echo_n "checking for library containing setfilecon... " >&6; }
14958 if ${ac_cv_search_setfilecon+:} false; then :
14959 $as_echo_n "(cached) " >&6
14961 ac_func_search_save_LIBS=$LIBS
14962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14963 /* end confdefs.h. */
14965 /* Override any GCC internal prototype to avoid an error.
14966 Use char because int might match the return type of a GCC
14967 builtin and then its argument prototype would still apply. */
14971 char setfilecon ();
14975 return setfilecon ();
14980 for ac_lib in '' selinux; do
14981 if test -z "$ac_lib"; then
14982 ac_res="none required"
14985 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14987 if ac_fn_c_try_link "$LINENO"; then :
14988 ac_cv_search_setfilecon=$ac_res
14990 rm -f core conftest.err conftest.$ac_objext \
14992 if ${ac_cv_search_setfilecon+:} false; then :
14996 if ${ac_cv_search_setfilecon+:} false; then :
14999 ac_cv_search_setfilecon=no
15001 rm conftest.$ac_ext
15002 LIBS=$ac_func_search_save_LIBS
15004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15005 $as_echo "$ac_cv_search_setfilecon" >&6; }
15006 ac_res=$ac_cv_search_setfilecon
15007 if test "$ac_res" != no; then :
15008 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15009 test "$ac_cv_search_setfilecon" = "none required" ||
15010 LIB_SELINUX=$ac_cv_search_setfilecon
15017 # Warn if SELinux is found but libselinux is absent;
15018 if test "$ac_cv_search_setfilecon" = no; then
15019 if test "$host" = "$build" && test -d /selinux; then
15020 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15021 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15023 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15030 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15031 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15037 cat >>confdefs.h <<_ACEOF
15038 #define HAVE_DECL_SETENV $ac_have_decl
15046 if test $ac_cv_have_decl_setenv = no; then
15054 for ac_header in search.h
15056 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15057 if test "x$ac_cv_header_search_h" = xyes; then :
15058 cat >>confdefs.h <<_ACEOF
15059 #define HAVE_SEARCH_H 1
15066 for ac_func in tsearch
15068 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15069 if test "x$ac_cv_func_tsearch" = xyes; then :
15070 cat >>confdefs.h <<_ACEOF
15071 #define HAVE_TSEARCH 1
15080 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15081 #include <signal.h>
15082 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15083 #include <sys/types.h>
15086 if test "x$ac_cv_type_sigset_t" = xyes; then :
15088 cat >>confdefs.h <<_ACEOF
15089 #define HAVE_SIGSET_T 1
15092 gl_cv_type_sigset_t=yes
15094 gl_cv_type_sigset_t=no
15097 if test $gl_cv_type_sigset_t != yes; then
15111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15112 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15113 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15114 $as_echo_n "(cached) " >&6
15117 if test "$cross_compiling" = yes; then :
15120 # Guess yes on glibc systems.
15121 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15122 # Guess yes on FreeBSD >= 5.
15123 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
15124 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15125 # Guess yes on Mac OS X >= 10.3.
15126 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
15127 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15128 # Guess yes on OpenBSD >= 3.9.
15129 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15130 gl_cv_func_snprintf_retval_c99="guessing no";;
15131 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15132 # Guess yes on Solaris >= 2.10.
15133 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15134 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
15135 # Guess yes on AIX >= 4.
15136 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
15137 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15138 # Guess yes on NetBSD >= 3.
15139 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15140 gl_cv_func_snprintf_retval_c99="guessing no";;
15141 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15142 # Guess yes on BeOS.
15143 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15144 # If we don't know, assume the worst.
15145 *) gl_cv_func_snprintf_retval_c99="guessing no";;
15149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150 /* end confdefs.h. */
15153 #include <string.h>
15155 # define my_snprintf snprintf
15157 # include <stdarg.h>
15158 static int my_snprintf (char *buf, int size, const char *format, ...)
15162 va_start (args, format);
15163 ret = vsnprintf (buf, size, format, args);
15168 static char buf[100];
15171 strcpy (buf, "ABCDEF");
15172 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15174 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15176 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15181 if ac_fn_c_try_run "$LINENO"; then :
15182 gl_cv_func_snprintf_retval_c99=yes
15184 gl_cv_func_snprintf_retval_c99=no
15186 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15187 conftest.$ac_objext conftest.beam conftest.$ac_ext
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15193 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15195 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15196 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15202 cat >>confdefs.h <<_ACEOF
15203 #define HAVE_DECL_SNPRINTF $ac_have_decl
15210 HAVE_DECL_STRNCASECMP=1;
15214 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15215 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15221 cat >>confdefs.h <<_ACEOF
15222 #define HAVE_DECL_STRDUP $ac_have_decl
15226 REPLACE_STRERROR_0=0
15227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15228 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15229 if ${gl_cv_func_strerror_0_works+:} false; then :
15230 $as_echo_n "(cached) " >&6
15232 if test "$cross_compiling" = yes; then :
15234 # Guess yes on glibc systems.
15235 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15236 # If we don't know, assume the worst.
15237 *) gl_cv_func_strerror_0_works="guessing no" ;;
15241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15242 /* end confdefs.h. */
15243 #include <string.h>
15252 str = strerror (0);
15253 if (!*str) result |= 1;
15254 if (errno) result |= 2;
15255 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15262 if ac_fn_c_try_run "$LINENO"; then :
15263 gl_cv_func_strerror_0_works=yes
15265 gl_cv_func_strerror_0_works=no
15267 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15268 conftest.$ac_objext conftest.beam conftest.$ac_ext
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15274 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15275 case "$gl_cv_func_strerror_0_works" in
15278 REPLACE_STRERROR_0=1
15280 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15298 if test $gl_cv_have_include_next = yes; then
15299 gl_cv_next_string_h='<'string.h'>'
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15302 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15303 if ${gl_cv_next_string_h+:} false; then :
15304 $as_echo_n "(cached) " >&6
15309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h. */
15311 #include <string.h>
15314 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15315 *) gl_absname_cpp="$ac_cpp" ;;
15320 gl_dirsep_regex='[/\\]'
15323 gl_dirsep_regex='\/'
15326 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15327 gl_header_literal_regex=`echo 'string.h' \
15328 | sed -e "$gl_make_literal_regex_sed"`
15329 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15330 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15336 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15337 sed -n "$gl_absolute_header_sed"`
15339 gl_header=$gl_cv_absolute_string_h
15340 gl_cv_next_string_h='"'$gl_header'"'
15344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15345 $as_echo "$gl_cv_next_string_h" >&6; }
15347 NEXT_STRING_H=$gl_cv_next_string_h
15349 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15350 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15351 gl_next_as_first_directive='<'string.h'>'
15353 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15354 gl_next_as_first_directive=$gl_cv_next_string_h
15356 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15363 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
15364 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15366 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15367 if eval \${$as_gl_Symbol+:} false; then :
15368 $as_echo_n "(cached) " >&6
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372 #include <string.h>
15383 if ac_fn_c_try_compile "$LINENO"; then :
15384 eval "$as_gl_Symbol=yes"
15386 eval "$as_gl_Symbol=no"
15388 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15390 eval ac_res=\$$as_gl_Symbol
15391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15392 $as_echo "$ac_res" >&6; }
15393 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15394 cat >>confdefs.h <<_ACEOF
15395 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15398 eval ac_cv_have_decl_$gl_func=yes
15417 if test $gl_cv_have_include_next = yes; then
15418 gl_cv_next_strings_h='<'strings.h'>'
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15421 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15422 if ${gl_cv_next_strings_h+:} false; then :
15423 $as_echo_n "(cached) " >&6
15426 if test $ac_cv_header_strings_h = yes; then
15431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15432 /* end confdefs.h. */
15433 #include <strings.h>
15436 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15437 *) gl_absname_cpp="$ac_cpp" ;;
15442 gl_dirsep_regex='[/\\]'
15445 gl_dirsep_regex='\/'
15448 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15449 gl_header_literal_regex=`echo 'strings.h' \
15450 | sed -e "$gl_make_literal_regex_sed"`
15451 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15452 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15458 gl_cv_absolute_strings_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15459 sed -n "$gl_absolute_header_sed"`
15461 gl_header=$gl_cv_absolute_strings_h
15462 gl_cv_next_strings_h='"'$gl_header'"'
15464 gl_cv_next_strings_h='<'strings.h'>'
15469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15470 $as_echo "$gl_cv_next_strings_h" >&6; }
15472 NEXT_STRINGS_H=$gl_cv_next_strings_h
15474 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15475 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15476 gl_next_as_first_directive='<'strings.h'>'
15478 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15479 gl_next_as_first_directive=$gl_cv_next_strings_h
15481 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15486 if test $ac_cv_header_strings_h = yes; then
15494 for gl_func in ffs strcasecmp strncasecmp; do
15495 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15497 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15498 if eval \${$as_gl_Symbol+:} false; then :
15499 $as_echo_n "(cached) " >&6
15501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502 /* end confdefs.h. */
15504 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15506 #include <sys/types.h>
15507 #include <strings.h>
15518 if ac_fn_c_try_compile "$LINENO"; then :
15519 eval "$as_gl_Symbol=yes"
15521 eval "$as_gl_Symbol=no"
15523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15525 eval ac_res=\$$as_gl_Symbol
15526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15527 $as_echo "$ac_res" >&6; }
15528 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15529 cat >>confdefs.h <<_ACEOF
15530 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15533 eval ac_cv_have_decl_$gl_func=yes
15538 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15539 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15545 cat >>confdefs.h <<_ACEOF
15546 #define HAVE_DECL_STRNDUP $ac_have_decl
15551 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15552 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15558 cat >>confdefs.h <<_ACEOF
15559 #define HAVE_DECL_STRNLEN $ac_have_decl
15564 ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
15565 if test "x$ac_cv_have_decl_strtoimax" = xyes; then :
15571 cat >>confdefs.h <<_ACEOF
15572 #define HAVE_DECL_STRTOIMAX $ac_have_decl
15577 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15578 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15584 cat >>confdefs.h <<_ACEOF
15585 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15595 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15596 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15597 $as_echo_n "(cached) " >&6
15599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15600 /* end confdefs.h. */
15606 static struct timespec x; x.tv_sec = x.tv_nsec;
15611 if ac_fn_c_try_compile "$LINENO"; then :
15612 gl_cv_sys_struct_timespec_in_time_h=yes
15614 gl_cv_sys_struct_timespec_in_time_h=no
15616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15619 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15621 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15622 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15623 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15624 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15625 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15628 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15629 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15630 $as_echo_n "(cached) " >&6
15632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15633 /* end confdefs.h. */
15634 #include <sys/time.h>
15639 static struct timespec x; x.tv_sec = x.tv_nsec;
15644 if ac_fn_c_try_compile "$LINENO"; then :
15645 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15647 gl_cv_sys_struct_timespec_in_sys_time_h=no
15649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15652 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15653 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15654 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15657 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15658 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15659 $as_echo_n "(cached) " >&6
15661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15662 /* end confdefs.h. */
15663 #include <pthread.h>
15668 static struct timespec x; x.tv_sec = x.tv_nsec;
15673 if ac_fn_c_try_compile "$LINENO"; then :
15674 gl_cv_sys_struct_timespec_in_pthread_h=yes
15676 gl_cv_sys_struct_timespec_in_pthread_h=no
15678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15681 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15682 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15683 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15702 if test $gl_cv_have_include_next = yes; then
15703 gl_cv_next_time_h='<'time.h'>'
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15706 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15707 if ${gl_cv_next_time_h+:} false; then :
15708 $as_echo_n "(cached) " >&6
15713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15714 /* end confdefs.h. */
15718 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15719 *) gl_absname_cpp="$ac_cpp" ;;
15724 gl_dirsep_regex='[/\\]'
15727 gl_dirsep_regex='\/'
15730 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15731 gl_header_literal_regex=`echo 'time.h' \
15732 | sed -e "$gl_make_literal_regex_sed"`
15733 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15734 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15740 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15741 sed -n "$gl_absolute_header_sed"`
15743 gl_header=$gl_cv_absolute_time_h
15744 gl_cv_next_time_h='"'$gl_header'"'
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15749 $as_echo "$gl_cv_next_time_h" >&6; }
15751 NEXT_TIME_H=$gl_cv_next_time_h
15753 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15754 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15755 gl_next_as_first_directive='<'time.h'>'
15757 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15758 gl_next_as_first_directive=$gl_cv_next_time_h
15760 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15769 ac_fn_c_check_decl "$LINENO" "ttyname_r" "ac_cv_have_decl_ttyname_r" "$ac_includes_default"
15770 if test "x$ac_cv_have_decl_ttyname_r" = xyes; then :
15776 cat >>confdefs.h <<_ACEOF
15777 #define HAVE_DECL_TTYNAME_R $ac_have_decl
15788 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15793 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15798 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;}
15805 if test "$HAVE_LIBUNISTRING" = yes; then
15806 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15807 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15808 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15813 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15814 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15820 cat >>confdefs.h <<_ACEOF
15821 #define HAVE_DECL_UNSETENV $ac_have_decl
15825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15826 $as_echo_n "checking whether the utimes function works... " >&6; }
15827 if ${gl_cv_func_working_utimes+:} false; then :
15828 $as_echo_n "(cached) " >&6
15831 if test "$cross_compiling" = yes; then :
15832 gl_cv_func_working_utimes=no
15834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835 /* end confdefs.h. */
15837 #include <sys/types.h>
15838 #include <sys/stat.h>
15840 #include <sys/time.h>
15842 #include <unistd.h>
15843 #include <stdlib.h>
15848 inorder (time_t a, time_t b, time_t c)
15850 return a <= b && b <= c;
15857 char const *file = "conftest.utimes";
15858 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15860 /* Test whether utimes() essentially works. */
15863 FILE *f = fopen (file, "w");
15866 else if (fclose (f) != 0)
15868 else if (utimes (file, timeval) != 0)
15870 else if (lstat (file, &sbuf) != 0)
15872 else if (!(sbuf.st_atime == timeval[0].tv_sec
15873 && sbuf.st_mtime == timeval[1].tv_sec))
15875 if (unlink (file) != 0)
15879 /* Test whether utimes() with a NULL argument sets the file's timestamp
15880 to the current time. Use 'fstat' as well as 'time' to
15881 determine the "current" time, to accommodate NFS file systems
15882 if there is a time skew between the host and the NFS server. */
15884 int fd = open (file, O_WRONLY|O_CREAT, 0644);
15890 struct stat st0, st1, st2;
15891 if (time (&t0) == (time_t) -1)
15893 else if (fstat (fd, &st0) != 0)
15895 else if (utimes (file, timeval) != 0)
15897 else if (utimes (file, NULL) != 0)
15899 else if (fstat (fd, &st1) != 0)
15901 else if (write (fd, "\n", 1) != 1)
15903 else if (fstat (fd, &st2) != 0)
15905 else if (time (&t2) == (time_t) -1)
15909 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
15910 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
15911 if (! (st1.st_atime == st1.st_mtime))
15913 if (! (m_ok_POSIX || m_ok_NFS))
15916 if (close (fd) != 0)
15919 if (unlink (file) != 0)
15923 /* Test whether utimes() with a NULL argument works on read-only files. */
15925 int fd = open (file, O_WRONLY|O_CREAT, 0444);
15928 else if (close (fd) != 0)
15930 else if (utimes (file, NULL) != 0)
15932 if (unlink (file) != 0)
15940 if ac_fn_c_try_run "$LINENO"; then :
15941 gl_cv_func_working_utimes=yes
15943 gl_cv_func_working_utimes=no
15945 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15946 conftest.$ac_objext conftest.beam conftest.$ac_ext
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
15951 $as_echo "$gl_cv_func_working_utimes" >&6; }
15953 if test $gl_cv_func_working_utimes = yes; then
15955 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
15964 $as_echo_n "checking for struct utimbuf... " >&6; }
15965 if ${gl_cv_sys_struct_utimbuf+:} false; then :
15966 $as_echo_n "(cached) " >&6
15968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15969 /* end confdefs.h. */
15970 #if HAVE_SYS_TIME_H
15971 #include <sys/time.h>
15974 #ifdef HAVE_UTIME_H
15981 static struct utimbuf x; x.actime = x.modtime;
15986 if ac_fn_c_try_compile "$LINENO"; then :
15987 gl_cv_sys_struct_utimbuf=yes
15989 gl_cv_sys_struct_utimbuf=no
15991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
15994 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
15996 if test $gl_cv_sys_struct_utimbuf = yes; then
15998 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16014 if test $ac_cv_header_features_h = yes; then
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16023 $as_echo_n "checking for inttypes.h... " >&6; }
16024 if ${gl_cv_header_inttypes_h+:} false; then :
16025 $as_echo_n "(cached) " >&6
16027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028 /* end confdefs.h. */
16030 #include <sys/types.h>
16031 #include <inttypes.h>
16036 uintmax_t i = (uintmax_t) -1; return !i;
16041 if ac_fn_c_try_compile "$LINENO"; then :
16042 gl_cv_header_inttypes_h=yes
16044 gl_cv_header_inttypes_h=no
16046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16049 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16050 if test $gl_cv_header_inttypes_h = yes; then
16052 cat >>confdefs.h <<_ACEOF
16053 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16060 $as_echo_n "checking for stdint.h... " >&6; }
16061 if ${gl_cv_header_stdint_h+:} false; then :
16062 $as_echo_n "(cached) " >&6
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065 /* end confdefs.h. */
16066 #include <sys/types.h>
16067 #include <stdint.h>
16071 uintmax_t i = (uintmax_t) -1; return !i;
16076 if ac_fn_c_try_compile "$LINENO"; then :
16077 gl_cv_header_stdint_h=yes
16079 gl_cv_header_stdint_h=no
16081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16084 $as_echo "$gl_cv_header_stdint_h" >&6; }
16085 if test $gl_cv_header_stdint_h = yes; then
16087 cat >>confdefs.h <<_ACEOF
16088 #define HAVE_STDINT_H_WITH_UINTMAX 1
16096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16097 $as_echo_n "checking for intmax_t... " >&6; }
16098 if ${gt_cv_c_intmax_t+:} false; then :
16099 $as_echo_n "(cached) " >&6
16101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h. */
16104 #include <stddef.h>
16105 #include <stdlib.h>
16106 #if HAVE_STDINT_H_WITH_UINTMAX
16107 #include <stdint.h>
16109 #if HAVE_INTTYPES_H_WITH_UINTMAX
16110 #include <inttypes.h>
16116 intmax_t x = -1; return !x;
16121 if ac_fn_c_try_compile "$LINENO"; then :
16122 gt_cv_c_intmax_t=yes
16124 gt_cv_c_intmax_t=no
16126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
16129 $as_echo "$gt_cv_c_intmax_t" >&6; }
16130 if test $gt_cv_c_intmax_t = yes; then
16132 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16136 test $ac_cv_type_long_long_int = yes \
16137 && ac_type='long long' \
16140 cat >>confdefs.h <<_ACEOF
16141 #define intmax_t $ac_type
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16148 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16149 if ${gl_cv_cc_double_expbit0+:} false; then :
16150 $as_echo_n "(cached) " >&6
16153 if test "$cross_compiling" = yes; then :
16155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156 /* end confdefs.h. */
16158 #if defined arm || defined __arm || defined __arm__
16163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16164 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16165 gl_cv_cc_double_expbit0="unknown"
16169 if ${ac_cv_c_bigendian+:} false; then :
16170 $as_echo_n "(cached) " >&6
16172 ac_cv_c_bigendian=unknown
16173 # See if we're dealing with a universal compiler.
16174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16175 /* end confdefs.h. */
16176 #ifndef __APPLE_CC__
16177 not a universal capable compiler
16182 if ac_fn_c_try_compile "$LINENO"; then :
16184 # Check for potential -arch flags. It is not universal unless
16185 # there are at least two -arch flags with different values.
16188 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16189 if test -n "$ac_prev"; then
16191 i?86 | x86_64 | ppc | ppc64)
16192 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16195 ac_cv_c_bigendian=universal
16201 elif test "x$ac_word" = "x-arch"; then
16206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16207 if test $ac_cv_c_bigendian = unknown; then
16208 # See if sys/param.h defines the BYTE_ORDER macro.
16209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16210 /* end confdefs.h. */
16211 #include <sys/types.h>
16212 #include <sys/param.h>
16217 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16218 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16220 bogus endian macros
16227 if ac_fn_c_try_compile "$LINENO"; then :
16228 # It does; now see whether it defined to BIG_ENDIAN or not.
16229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230 /* end confdefs.h. */
16231 #include <sys/types.h>
16232 #include <sys/param.h>
16237 #if BYTE_ORDER != BIG_ENDIAN
16245 if ac_fn_c_try_compile "$LINENO"; then :
16246 ac_cv_c_bigendian=yes
16248 ac_cv_c_bigendian=no
16250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16254 if test $ac_cv_c_bigendian = unknown; then
16255 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16257 /* end confdefs.h. */
16258 #include <limits.h>
16263 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16264 bogus endian macros
16271 if ac_fn_c_try_compile "$LINENO"; then :
16272 # It does; now see whether it defined to _BIG_ENDIAN or not.
16273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16274 /* end confdefs.h. */
16275 #include <limits.h>
16280 #ifndef _BIG_ENDIAN
16288 if ac_fn_c_try_compile "$LINENO"; then :
16289 ac_cv_c_bigendian=yes
16291 ac_cv_c_bigendian=no
16293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16297 if test $ac_cv_c_bigendian = unknown; then
16298 # Compile a test program.
16299 if test "$cross_compiling" = yes; then :
16300 # Try to guess by grepping values from an object file.
16301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16302 /* end confdefs.h. */
16303 short int ascii_mm[] =
16304 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16305 short int ascii_ii[] =
16306 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16307 int use_ascii (int i) {
16308 return ascii_mm[i] + ascii_ii[i];
16310 short int ebcdic_ii[] =
16311 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16312 short int ebcdic_mm[] =
16313 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16314 int use_ebcdic (int i) {
16315 return ebcdic_mm[i] + ebcdic_ii[i];
16322 return use_ascii (foo) == use_ebcdic (foo);
16327 if ac_fn_c_try_compile "$LINENO"; then :
16328 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16329 ac_cv_c_bigendian=yes
16331 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16332 if test "$ac_cv_c_bigendian" = unknown; then
16333 ac_cv_c_bigendian=no
16335 # finding both strings is unlikely to happen, but who knows?
16336 ac_cv_c_bigendian=unknown
16340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16343 /* end confdefs.h. */
16344 $ac_includes_default
16349 /* Are we little or big endian? From Harbison&Steele. */
16353 char c[sizeof (long int)];
16356 return u.c[sizeof (long int) - 1] == 1;
16362 if ac_fn_c_try_run "$LINENO"; then :
16363 ac_cv_c_bigendian=no
16365 ac_cv_c_bigendian=yes
16367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16368 conftest.$ac_objext conftest.beam conftest.$ac_ext
16374 case $ac_cv_c_bigendian in #(
16376 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16378 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16381 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16385 gl_cv_cc_double_expbit0="unknown" ;;
16394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395 /* end confdefs.h. */
16398 #include <stddef.h>
16400 #include <string.h>
16402 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16403 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16404 static unsigned int ored_words[NWORDS];
16405 static unsigned int anded_words[NWORDS];
16406 static void add_to_ored_words (double x)
16410 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
16411 memset (&m, 0, sizeof (memory_double));
16413 for (i = 0; i < NWORDS; i++)
16415 ored_words[i] |= m.word[i];
16416 anded_words[i] &= m.word[i];
16422 FILE *fp = fopen ("conftest.out", "w");
16425 for (j = 0; j < NWORDS; j++)
16426 anded_words[j] = ~ (unsigned int) 0;
16427 add_to_ored_words (0.25);
16428 add_to_ored_words (0.5);
16429 add_to_ored_words (1.0);
16430 add_to_ored_words (2.0);
16431 add_to_ored_words (4.0);
16432 /* Remove bits that are common (e.g. if representation of the first mantissa
16433 bit is explicit). */
16434 for (j = 0; j < NWORDS; j++)
16435 ored_words[j] &= ~anded_words[j];
16436 /* Now find the nonzero word. */
16437 for (j = 0; j < NWORDS; j++)
16438 if (ored_words[j] != 0)
16443 for (i = j + 1; i < NWORDS; i++)
16444 if (ored_words[i] != 0)
16446 fprintf (fp, "unknown");
16447 return (fclose (fp) != 0);
16450 if ((ored_words[j] >> i) & 1)
16452 fprintf (fp, "word %d bit %d", (int) j, (int) i);
16453 return (fclose (fp) != 0);
16456 fprintf (fp, "unknown");
16457 return (fclose (fp) != 0);
16461 if ac_fn_c_try_run "$LINENO"; then :
16462 gl_cv_cc_double_expbit0=`cat conftest.out`
16464 gl_cv_cc_double_expbit0="unknown"
16466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16467 conftest.$ac_objext conftest.beam conftest.$ac_ext
16473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16474 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16475 case "$gl_cv_cc_double_expbit0" in
16477 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16478 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16480 cat >>confdefs.h <<_ACEOF
16481 #define DBL_EXPBIT0_WORD $word
16485 cat >>confdefs.h <<_ACEOF
16486 #define DBL_EXPBIT0_BIT $bit
16497 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16499 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16500 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16501 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16502 cat >>confdefs.h <<_ACEOF
16503 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16509 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16511 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16517 cat >>confdefs.h <<_ACEOF
16518 #define HAVE_DECL__SNPRINTF $ac_have_decl
16523 case "$gl_cv_func_snprintf_retval_c99" in
16526 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16531 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16532 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16538 cat >>confdefs.h <<_ACEOF
16539 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16548 GL_COND_LIBTOOL_TRUE=
16549 GL_COND_LIBTOOL_FALSE='#'
16551 GL_COND_LIBTOOL_TRUE='#'
16552 GL_COND_LIBTOOL_FALSE=
16555 gl_cond_libtool=false
16568 gl_source_base='gnu'
16571 if test $ac_cv_func_alloca_works = no; then
16575 # Define an additional variable used in the Makefile substitution.
16576 if test $ac_cv_working_alloca_h = yes; then
16577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16578 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16579 if ${gl_cv_rpl_alloca+:} false; then :
16580 $as_echo_n "(cached) " >&6
16583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16584 /* end confdefs.h. */
16586 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16592 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16593 gl_cv_rpl_alloca=yes
16595 gl_cv_rpl_alloca=no
16601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16602 $as_echo "$gl_cv_rpl_alloca" >&6; }
16603 if test $gl_cv_rpl_alloca = yes; then
16605 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16615 if test -n "$ALLOCA_H"; then
16616 GL_GENERATE_ALLOCA_H_TRUE=
16617 GL_GENERATE_ALLOCA_H_FALSE='#'
16619 GL_GENERATE_ALLOCA_H_TRUE='#'
16620 GL_GENERATE_ALLOCA_H_FALSE=
16626 cat >>confdefs.h <<_ACEOF
16627 #define GNULIB_AREADLINKAT 1
16636 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16638 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16644 cat >>confdefs.h <<_ACEOF
16645 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16647 if test $ac_have_decl = 1; then :
16651 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16655 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16657 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16663 cat >>confdefs.h <<_ACEOF
16664 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16666 if test $ac_have_decl = 1; then :
16670 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16675 # Check if program_invocation_name and program_invocation_short_name
16676 # are defined elsewhere. It is improbable that only one of them will
16677 # be defined and other not, I prefer to stay on the safe side and to
16678 # test each one separately.
16679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16680 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16682 /* end confdefs.h. */
16687 program_invocation_name = "test";
16692 if ac_fn_c_try_link "$LINENO"; then :
16694 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16697 $as_echo "yes" >&6; }
16699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16700 $as_echo "no" >&6; }
16702 rm -f core conftest.err conftest.$ac_objext \
16703 conftest$ac_exeext conftest.$ac_ext
16705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16706 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16708 /* end confdefs.h. */
16713 program_invocation_short_name = "test";
16718 if ac_fn_c_try_link "$LINENO"; then :
16720 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16723 $as_echo "yes" >&6; }
16725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16726 $as_echo "no" >&6; }
16728 rm -f core conftest.err conftest.$ac_objext \
16729 conftest$ac_exeext conftest.$ac_ext
16749 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16753 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16763 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16776 if test $ac_cv_func_btowc = no; then
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16784 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16785 if ${gl_cv_func_btowc_nul+:} false; then :
16786 $as_echo_n "(cached) " >&6
16789 if test "$cross_compiling" = yes; then :
16792 # Guess no on Cygwin.
16793 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16794 # Guess yes otherwise.
16795 *) gl_cv_func_btowc_nul="guessing yes" ;;
16799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16800 /* end confdefs.h. */
16802 #include <string.h>
16803 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16805 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16806 included before <wchar.h>. */
16807 #include <stddef.h>
16813 if (btowc ('\0') != 0)
16818 if ac_fn_c_try_run "$LINENO"; then :
16819 gl_cv_func_btowc_nul=yes
16821 gl_cv_func_btowc_nul=no
16823 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16824 conftest.$ac_objext conftest.beam conftest.$ac_ext
16829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16830 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16833 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16834 if ${gl_cv_func_btowc_eof+:} false; then :
16835 $as_echo_n "(cached) " >&6
16839 # Guess no on IRIX.
16840 irix*) gl_cv_func_btowc_eof="guessing no" ;;
16841 # Guess yes otherwise.
16842 *) gl_cv_func_btowc_eof="guessing yes" ;;
16844 if test $LOCALE_FR != none; then
16845 if test "$cross_compiling" = yes; then :
16848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16849 /* end confdefs.h. */
16851 #include <locale.h>
16852 #include <string.h>
16853 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16855 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16856 included before <wchar.h>. */
16857 #include <stddef.h>
16863 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16865 if (btowc (EOF) != WEOF)
16871 if ac_fn_c_try_run "$LINENO"; then :
16872 gl_cv_func_btowc_eof=yes
16874 gl_cv_func_btowc_eof=no
16876 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16877 conftest.$ac_objext conftest.beam conftest.$ac_ext
16883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16884 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16886 case "$gl_cv_func_btowc_nul" in
16888 *) REPLACE_BTOWC=1 ;;
16890 case "$gl_cv_func_btowc_eof" in
16892 *) REPLACE_BTOWC=1 ;;
16896 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16905 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
16922 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
16929 if test $ac_cv_func_canonicalize_file_name = no; then
16930 HAVE_CANONICALIZE_FILE_NAME=0
16931 if test $ac_cv_func_realpath = no; then
16934 case "$gl_cv_func_realpath_works" in
16936 *) REPLACE_REALPATH=1 ;;
16940 case "$gl_cv_func_realpath_works" in
16944 REPLACE_CANONICALIZE_FILE_NAME=1
16950 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
16959 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
16964 cat >>confdefs.h <<_ACEOF
16965 #define GNULIB_CANONICALIZE_LGPL 1
16974 GNULIB_CANONICALIZE_FILE_NAME=1
16980 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16995 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17011 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17018 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17019 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17020 $as_echo_n "(cached) " >&6
17022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17023 /* end confdefs.h. */
17025 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17027 # include <unistd.h>
17029 #include <limits.h>
17030 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17031 # include <sys/param.h>
17033 #if !defined PATH_MAX && defined MAXPATHLEN
17034 # define PATH_MAX MAXPATHLEN
17038 # define PATH_MAX 1024
17040 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17042 # define PATH_MAX 260
17046 have_arbitrary_file_name_length_limit
17049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17050 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17051 gl_cv_have_arbitrary_file_name_length_limit=yes
17053 gl_cv_have_arbitrary_file_name_length_limit=no
17058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17059 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17061 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17070 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17075 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17084 gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17087 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17096 gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17110 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17117 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17118 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17120 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17121 # programs in the package would end up linked with that potentially-shared
17122 # library, inducing unnecessary run-time overhead.
17125 gl_saved_libs=$LIBS
17126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17127 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17128 if ${ac_cv_search_clock_gettime+:} false; then :
17129 $as_echo_n "(cached) " >&6
17131 ac_func_search_save_LIBS=$LIBS
17132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17133 /* end confdefs.h. */
17135 /* Override any GCC internal prototype to avoid an error.
17136 Use char because int might match the return type of a GCC
17137 builtin and then its argument prototype would still apply. */
17141 char clock_gettime ();
17145 return clock_gettime ();
17150 for ac_lib in '' rt posix4; do
17151 if test -z "$ac_lib"; then
17152 ac_res="none required"
17155 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17157 if ac_fn_c_try_link "$LINENO"; then :
17158 ac_cv_search_clock_gettime=$ac_res
17160 rm -f core conftest.err conftest.$ac_objext \
17162 if ${ac_cv_search_clock_gettime+:} false; then :
17166 if ${ac_cv_search_clock_gettime+:} false; then :
17169 ac_cv_search_clock_gettime=no
17171 rm conftest.$ac_ext
17172 LIBS=$ac_func_search_save_LIBS
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17175 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17176 ac_res=$ac_cv_search_clock_gettime
17177 if test "$ac_res" != no; then :
17178 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17179 test "$ac_cv_search_clock_gettime" = "none required" ||
17180 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17183 for ac_func in clock_gettime clock_settime
17185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17186 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17187 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17188 cat >>confdefs.h <<_ACEOF
17189 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17195 LIBS=$gl_saved_libs
17199 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17205 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17213 if test $ac_cv_header_sys_socket_h != yes; then
17214 for ac_header in winsock2.h
17216 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17217 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17218 cat >>confdefs.h <<_ACEOF
17219 #define HAVE_WINSOCK2_H 1
17227 if test "$ac_cv_header_winsock2_h" = yes; then
17229 UNISTD_H_HAVE_WINSOCK2_H=1
17230 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17236 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17241 if test $REPLACE_CLOSE = 0; then
17245 if test $ac_cv_func_fchdir = no; then
17249 if test $HAVE_FCHDIR = 0; then
17255 if test $REPLACE_CLOSE = 1; then
17264 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17278 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17287 cat >>confdefs.h <<_ACEOF
17288 #define GNULIB_CLOSE_STREAM 1
17295 for ac_func in closedir
17297 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17298 if test "x$ac_cv_func_closedir" = xyes; then :
17299 cat >>confdefs.h <<_ACEOF
17300 #define HAVE_CLOSEDIR 1
17306 if test $ac_cv_func_closedir = no; then
17313 if test $ac_cv_func_fchdir = no; then
17317 if test $HAVE_FCHDIR = 0; then
17318 if test $HAVE_CLOSEDIR = 1; then
17324 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17333 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17347 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17355 if test "x$datarootdir" = x; then
17356 datarootdir='${datadir}'
17359 if test "x$docdir" = x; then
17360 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17363 if test "x$htmldir" = x; then
17364 htmldir='${docdir}'
17367 if test "x$dvidir" = x; then
17371 if test "x$pdfdir" = x; then
17375 if test "x$psdir" = x; then
17379 if test "x$lispdir" = x; then
17380 lispdir='${datarootdir}/emacs/site-lisp'
17383 if test "x$localedir" = x; then
17384 localedir='${datarootdir}/locale'
17387 if test "x$runstatedir" = x; then
17388 runstatedir='${localstatedir}/run'
17392 pkglibexecdir='${libexecdir}/${PACKAGE}'
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17396 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17397 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17398 $as_echo_n "(cached) " >&6
17400 if test "$cross_compiling" = yes; then :
17402 # Guess yes on glibc systems with Linux kernel.
17403 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17404 # If we don't know, assume the worst.
17405 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
17409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17410 /* end confdefs.h. */
17411 #include <sys/types.h>
17412 #include <sys/stat.h>
17413 #include <dirent.h>
17418 DIR *dp = opendir (".");
17426 if (lstat (e->d_name, &st) != 0)
17428 if (e->d_ino != st.st_ino)
17436 if ac_fn_c_try_run "$LINENO"; then :
17437 gl_cv_struct_dirent_d_ino=yes
17439 gl_cv_struct_dirent_d_ino=no
17441 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17442 conftest.$ac_objext conftest.beam conftest.$ac_ext
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17447 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17448 case "$gl_cv_struct_dirent_d_ino" in
17451 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17469 if test $gl_cv_have_include_next = yes; then
17470 gl_cv_next_dirent_h='<'dirent.h'>'
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17473 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17474 if ${gl_cv_next_dirent_h+:} false; then :
17475 $as_echo_n "(cached) " >&6
17478 if test $ac_cv_header_dirent_h = yes; then
17483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17484 /* end confdefs.h. */
17485 #include <dirent.h>
17488 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17489 *) gl_absname_cpp="$ac_cpp" ;;
17494 gl_dirsep_regex='[/\\]'
17497 gl_dirsep_regex='\/'
17500 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17501 gl_header_literal_regex=`echo 'dirent.h' \
17502 | sed -e "$gl_make_literal_regex_sed"`
17503 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17504 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17510 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17511 sed -n "$gl_absolute_header_sed"`
17513 gl_header=$gl_cv_absolute_dirent_h
17514 gl_cv_next_dirent_h='"'$gl_header'"'
17516 gl_cv_next_dirent_h='<'dirent.h'>'
17521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17522 $as_echo "$gl_cv_next_dirent_h" >&6; }
17524 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17526 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17527 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17528 gl_next_as_first_directive='<'dirent.h'>'
17530 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17531 gl_next_as_first_directive=$gl_cv_next_dirent_h
17533 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17538 if test $ac_cv_header_dirent_h = yes; then
17546 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17547 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17549 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17550 if eval \${$as_gl_Symbol+:} false; then :
17551 $as_echo_n "(cached) " >&6
17553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17554 /* end confdefs.h. */
17555 #include <dirent.h>
17566 if ac_fn_c_try_compile "$LINENO"; then :
17567 eval "$as_gl_Symbol=yes"
17569 eval "$as_gl_Symbol=no"
17571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17573 eval ac_res=\$$as_gl_Symbol
17574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17575 $as_echo "$ac_res" >&6; }
17576 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17577 cat >>confdefs.h <<_ACEOF
17578 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17581 eval ac_cv_have_decl_$gl_func=yes
17591 cat >>confdefs.h <<_ACEOF
17592 #define GNULIB_DIRENT_SAFER 1
17601 for ac_func in dirfd
17603 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17604 if test "x$ac_cv_func_dirfd" = xyes; then :
17605 cat >>confdefs.h <<_ACEOF
17606 #define HAVE_DIRFD 1
17612 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17613 #include <dirent.h>
17615 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17621 cat >>confdefs.h <<_ACEOF
17622 #define HAVE_DECL_DIRFD $ac_have_decl
17625 if test $ac_cv_have_decl_dirfd = no; then
17629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17630 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17631 if ${gl_cv_func_dirfd_macro+:} false; then :
17632 $as_echo_n "(cached) " >&6
17634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17635 /* end confdefs.h. */
17637 #include <sys/types.h>
17638 #include <dirent.h>
17640 dirent_header_defines_dirfd
17643 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17644 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17645 gl_cv_func_dirfd_macro=yes
17647 gl_cv_func_dirfd_macro=no
17652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17653 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17655 # Use the replacement only if we have no function or macro with that name.
17656 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17657 if test $ac_cv_have_decl_dirfd = yes; then
17658 # If the system declares dirfd already, let's declare rpl_dirfd instead.
17663 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17672 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17676 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17677 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17678 $as_echo_n "(cached) " >&6
17681 dirfd_save_CFLAGS=$CFLAGS
17682 for ac_expr in d_fd dd_fd; do
17684 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17686 /* end confdefs.h. */
17688 #include <sys/types.h>
17689 #include <dirent.h>
17693 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17698 if ac_fn_c_try_compile "$LINENO"; then :
17702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17703 CFLAGS=$dirfd_save_CFLAGS
17704 test "$dir_fd_found" = yes && break
17706 test "$dir_fd_found" = yes || ac_expr=no_such_member
17708 gl_cv_sys_dir_fd_member_name=$ac_expr
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17713 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17714 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17716 cat >>confdefs.h <<_ACEOF
17717 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17735 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17744 cat >>confdefs.h <<_ACEOF
17745 #define GNULIB_DIRNAME 1
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17756 $as_echo_n "checking whether // is distinct from /... " >&6; }
17757 if ${gl_cv_double_slash_root+:} false; then :
17758 $as_echo_n "(cached) " >&6
17760 if test x"$cross_compiling" = xyes ; then
17761 # When cross-compiling, there is no way to tell whether // is special
17762 # short of a list of hosts. However, the only known hosts to date
17763 # that have a distinct // are Apollo DomainOS (too old to port to),
17764 # Cygwin, and z/OS. If anyone knows of another system for which // has
17765 # special semantics and is distinct from /, please report it to
17766 # <bug-gnulib@gnu.org>.
17768 *-cygwin | i370-ibm-openedition)
17769 gl_cv_double_slash_root=yes ;;
17771 # Be optimistic and assume that / and // are the same when we
17773 gl_cv_double_slash_root='unknown, assuming no' ;;
17776 set x `ls -di / // 2>/dev/null`
17777 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17778 gl_cv_double_slash_root=no
17780 gl_cv_double_slash_root=yes
17784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17785 $as_echo "$gl_cv_double_slash_root" >&6; }
17786 if test "$gl_cv_double_slash_root" = yes; then
17788 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17795 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17802 if test $ac_cv_func_fchdir = no; then
17806 if test $HAVE_FCHDIR = 0; then
17811 if test $REPLACE_DUP = 1; then
17820 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17835 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17844 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17847 if test $HAVE_DUP2 = 1; then
17848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17849 $as_echo_n "checking whether dup2 works... " >&6; }
17850 if ${gl_cv_func_dup2_works+:} false; then :
17851 $as_echo_n "(cached) " >&6
17853 if test "$cross_compiling" = yes; then :
17855 mingw*) # on this platform, dup2 always returns 0 for success
17856 gl_cv_func_dup2_works="guessing no" ;;
17857 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17858 gl_cv_func_dup2_works="guessing no" ;;
17859 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17860 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17861 gl_cv_func_dup2_works="guessing no" ;;
17862 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17863 gl_cv_func_dup2_works="guessing no" ;;
17864 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17865 gl_cv_func_dup2_works="guessing no" ;;
17866 *) gl_cv_func_dup2_works="guessing yes" ;;
17869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17870 /* end confdefs.h. */
17872 #include <unistd.h>
17880 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17883 if (dup2 (1, 1) == 0)
17886 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17890 if (dup2 (0, 0) != -1)
17892 /* Many gnulib modules require POSIX conformance of EBADF. */
17893 if (dup2 (2, 1000000) == -1 && errno != EBADF)
17895 /* Flush out some cygwin core dumps. */
17896 if (dup2 (2, -1) != -1 || errno != EBADF)
17907 if ac_fn_c_try_run "$LINENO"; then :
17908 gl_cv_func_dup2_works=yes
17910 gl_cv_func_dup2_works=no
17912 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17913 conftest.$ac_objext conftest.beam conftest.$ac_ext
17918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
17919 $as_echo "$gl_cv_func_dup2_works" >&6; }
17920 case "$gl_cv_func_dup2_works" in
17924 for ac_func in setdtablesize
17926 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
17927 if test "x$ac_cv_func_setdtablesize" = xyes; then :
17928 cat >>confdefs.h <<_ACEOF
17929 #define HAVE_SETDTABLESIZE 1
17942 if test $ac_cv_func_fchdir = no; then
17946 if test $HAVE_FCHDIR = 0; then
17947 if test $HAVE_DUP2 = 1; then
17953 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
17962 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
17977 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
17993 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
17999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18000 $as_echo_n "checking for error_at_line... " >&6; }
18001 if ${ac_cv_lib_error_at_line+:} false; then :
18002 $as_echo_n "(cached) " >&6
18004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18005 /* end confdefs.h. */
18010 error_at_line (0, 0, "", 0, "an error occurred");
18015 if ac_fn_c_try_link "$LINENO"; then :
18016 ac_cv_lib_error_at_line=yes
18018 ac_cv_lib_error_at_line=no
18020 rm -f core conftest.err conftest.$ac_objext \
18021 conftest$ac_exeext conftest.$ac_ext
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18024 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18026 if test $ac_cv_lib_error_at_line = no; then
18035 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18044 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18048 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18055 for ac_func in euidaccess
18057 ac_fn_c_check_func "$LINENO" "euidaccess" "ac_cv_func_euidaccess"
18058 if test "x$ac_cv_func_euidaccess" = xyes; then :
18059 cat >>confdefs.h <<_ACEOF
18060 #define HAVE_EUIDACCESS 1
18066 if test $ac_cv_func_euidaccess = no; then
18070 if test $HAVE_EUIDACCESS = 0; then
18079 gl_LIBOBJS="$gl_LIBOBJS euidaccess.$ac_objext"
18083 for ac_header in libgen.h
18085 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
18086 if test "x$ac_cv_header_libgen_h" = xyes; then :
18087 cat >>confdefs.h <<_ACEOF
18088 #define HAVE_LIBGEN_H 1
18096 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
18097 if test "x$ac_cv_func_getgroups" = xyes; then :
18102 # If we don't yet have getgroups, see if it's in -lbsd.
18103 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
18105 if test $ac_cv_func_getgroups = no; then
18106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
18107 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
18108 if ${ac_cv_lib_bsd_getgroups+:} false; then :
18109 $as_echo_n "(cached) " >&6
18111 ac_check_lib_save_LIBS=$LIBS
18113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18114 /* end confdefs.h. */
18116 /* Override any GCC internal prototype to avoid an error.
18117 Use char because int might match the return type of a GCC
18118 builtin and then its argument prototype would still apply. */
18126 return getgroups ();
18131 if ac_fn_c_try_link "$LINENO"; then :
18132 ac_cv_lib_bsd_getgroups=yes
18134 ac_cv_lib_bsd_getgroups=no
18136 rm -f core conftest.err conftest.$ac_objext \
18137 conftest$ac_exeext conftest.$ac_ext
18138 LIBS=$ac_check_lib_save_LIBS
18140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
18141 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
18142 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
18143 GETGROUPS_LIB=-lbsd
18148 # Run the program to test the functionality of the system-supplied
18149 # getgroups function only if there is such a function.
18150 if test $ac_cv_func_getgroups = yes; then
18151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
18152 $as_echo_n "checking for working getgroups... " >&6; }
18153 if ${ac_cv_func_getgroups_works+:} false; then :
18154 $as_echo_n "(cached) " >&6
18156 if test "$cross_compiling" = yes; then :
18157 case "$host_os" in # ((
18158 # Guess yes on glibc systems.
18159 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
18160 # If we don't know, assume the worst.
18161 *) ac_cv_func_getgroups_works="guessing no" ;;
18165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18166 /* end confdefs.h. */
18167 $ac_includes_default
18171 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
18172 return getgroups (0, 0) == -1;
18178 if ac_fn_c_try_run "$LINENO"; then :
18179 ac_cv_func_getgroups_works=yes
18181 ac_cv_func_getgroups_works=no
18183 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18184 conftest.$ac_objext conftest.beam conftest.$ac_ext
18189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
18190 $as_echo "$ac_cv_func_getgroups_works" >&6; }
18192 ac_cv_func_getgroups_works=no
18194 case "$ac_cv_func_getgroups_works" in
18197 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
18204 # Solaris 9 and 10 need -lgen to get the eaccess function.
18205 # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all*
18206 # programs in the package would end up linked with that potentially-shared
18207 # library, inducing unnecessary run-time overhead.
18210 gl_saved_libs=$LIBS
18211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing eaccess" >&5
18212 $as_echo_n "checking for library containing eaccess... " >&6; }
18213 if ${ac_cv_search_eaccess+:} false; then :
18214 $as_echo_n "(cached) " >&6
18216 ac_func_search_save_LIBS=$LIBS
18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18218 /* end confdefs.h. */
18220 /* Override any GCC internal prototype to avoid an error.
18221 Use char because int might match the return type of a GCC
18222 builtin and then its argument prototype would still apply. */
18235 for ac_lib in '' gen; do
18236 if test -z "$ac_lib"; then
18237 ac_res="none required"
18240 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18242 if ac_fn_c_try_link "$LINENO"; then :
18243 ac_cv_search_eaccess=$ac_res
18245 rm -f core conftest.err conftest.$ac_objext \
18247 if ${ac_cv_search_eaccess+:} false; then :
18251 if ${ac_cv_search_eaccess+:} false; then :
18254 ac_cv_search_eaccess=no
18256 rm conftest.$ac_ext
18257 LIBS=$ac_func_search_save_LIBS
18259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_eaccess" >&5
18260 $as_echo "$ac_cv_search_eaccess" >&6; }
18261 ac_res=$ac_cv_search_eaccess
18262 if test "$ac_res" != no; then :
18263 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18264 test "$ac_cv_search_eaccess" = "none required" ||
18265 LIB_EACCESS=$ac_cv_search_eaccess
18268 for ac_func in eaccess
18270 ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess"
18271 if test "x$ac_cv_func_eaccess" = xyes; then :
18272 cat >>confdefs.h <<_ACEOF
18273 #define HAVE_EACCESS 1
18279 LIBS=$gl_saved_libs
18287 GNULIB_EUIDACCESS=1
18293 $as_echo "#define GNULIB_TEST_EUIDACCESS 1" >>confdefs.h
18304 if test $ac_cv_func_faccessat = no; then
18308 if test $HAVE_FACCESSAT = 0; then
18317 gl_LIBOBJS="$gl_LIBOBJS faccessat.$ac_objext"
18320 for ac_func in access
18322 ac_fn_c_check_func "$LINENO" "access" "ac_cv_func_access"
18323 if test "x$ac_cv_func_access" = xyes; then :
18324 cat >>confdefs.h <<_ACEOF
18325 #define HAVE_ACCESS 1
18335 cat >>confdefs.h <<_ACEOF
18336 #define GNULIB_FACCESSAT 1
18351 $as_echo "#define GNULIB_TEST_FACCESSAT 1" >>confdefs.h
18360 if test $ac_cv_have_decl_fchdir = no; then
18365 if test $HAVE_FCHDIR = 0; then
18374 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18378 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18381 $as_echo_n "checking whether open can visit directories... " >&6; }
18382 if ${gl_cv_func_open_directory_works+:} false; then :
18383 $as_echo_n "(cached) " >&6
18385 if test "$cross_compiling" = yes; then :
18387 # Guess yes on glibc systems.
18388 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18389 # If we don't know, assume the worst.
18390 *) gl_cv_func_open_directory_works="guessing no" ;;
18394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18395 /* end confdefs.h. */
18401 return open(".", O_RDONLY) < 0;
18406 if ac_fn_c_try_run "$LINENO"; then :
18407 gl_cv_func_open_directory_works=yes
18409 gl_cv_func_open_directory_works=no
18411 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18412 conftest.$ac_objext conftest.beam conftest.$ac_ext
18416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18417 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18418 case "$gl_cv_func_open_directory_works" in
18422 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18439 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18447 if test $ac_cv_func_fchmodat != yes; then
18451 if test $HAVE_FCHMODAT = 0; then
18460 gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18465 cat >>confdefs.h <<_ACEOF
18466 #define GNULIB_FCHMODAT 1
18480 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18488 ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18489 if test "x$ac_cv_func_fchownat" = xyes; then :
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18494 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18495 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
18496 $as_echo_n "(cached) " >&6
18499 gl_dangle=conftest.dangle
18500 # Remove any remnants of a previous test.
18502 # Arrange for deletion of the temporary file this test creates.
18503 ac_clean_files="$ac_clean_files $gl_dangle"
18504 ln -s conftest.no-such $gl_dangle
18505 if test "$cross_compiling" = yes; then :
18506 gl_cv_func_fchownat_nofollow_works=no
18508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h. */
18512 #include <unistd.h>
18513 #include <stdlib.h>
18515 #include <sys/types.h>
18519 return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18520 AT_SYMLINK_NOFOLLOW) != 0
18521 && errno == ENOENT);
18525 if ac_fn_c_try_run "$LINENO"; then :
18526 gl_cv_func_fchownat_nofollow_works=yes
18528 gl_cv_func_fchownat_nofollow_works=no
18530 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18531 conftest.$ac_objext conftest.beam conftest.$ac_ext
18536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18537 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18538 if test $gl_cv_func_fchownat_nofollow_works = no; then :
18541 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
18550 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
18551 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
18552 $as_echo_n "(cached) " >&6
18554 if test "$cross_compiling" = yes; then :
18555 gl_cv_func_fchownat_empty_filename_works="guessing no"
18557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18558 /* end confdefs.h. */
18559 #include <unistd.h>
18567 if (mkdir ("conftestdir", 0700) < 0)
18569 fd = open ("conftestdir", O_RDONLY);
18572 ret = fchownat (fd, "", -1, -1, 0);
18574 rmdir ("conftestdir");
18581 if ac_fn_c_try_run "$LINENO"; then :
18582 gl_cv_func_fchownat_empty_filename_works=yes
18584 gl_cv_func_fchownat_empty_filename_works=no
18586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18587 conftest.$ac_objext conftest.beam conftest.$ac_ext
18592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
18593 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
18594 if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
18597 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
18602 if test $REPLACE_CHOWN = 1; then
18610 if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18619 gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18624 cat >>confdefs.h <<_ACEOF
18625 #define GNULIB_FCHOWNAT 1
18639 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
18648 if test $ac_cv_func_fcntl = no; then
18652 if test $ac_cv_func_fcntl = no; then
18659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18660 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18661 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18662 $as_echo_n "(cached) " >&6
18664 if test "$cross_compiling" = yes; then :
18665 # Guess that it works on glibc systems
18666 case $host_os in #((
18667 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18668 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18672 /* end confdefs.h. */
18681 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18682 if (errno != EINVAL) result |= 2;
18689 if ac_fn_c_try_run "$LINENO"; then :
18690 gl_cv_func_fcntl_f_dupfd_works=yes
18692 gl_cv_func_fcntl_f_dupfd_works=no
18694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18695 conftest.$ac_objext conftest.beam conftest.$ac_ext
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18700 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18701 case $gl_cv_func_fcntl_f_dupfd_works in
18706 if test $ac_cv_func_fcntl = no; then
18713 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18718 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18719 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18720 $as_echo_n "(cached) " >&6
18722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18723 /* end confdefs.h. */
18726 #ifndef F_DUPFD_CLOEXEC
18738 if ac_fn_c_try_compile "$LINENO"; then :
18739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18740 /* end confdefs.h. */
18743 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18744 it to support the semantics on older kernels that failed with EINVAL. */
18756 if ac_fn_c_try_compile "$LINENO"; then :
18757 gl_cv_func_fcntl_f_dupfd_cloexec=yes
18759 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18763 gl_cv_func_fcntl_f_dupfd_cloexec=no
18765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18768 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18769 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18773 if test $ac_cv_func_fcntl = no; then
18785 if test $ac_cv_func_fchdir = no; then
18789 if test $HAVE_FCHDIR = 0; then
18793 if test $ac_cv_func_fcntl = no; then
18802 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18811 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18825 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18840 if test $gl_cv_have_include_next = yes; then
18841 gl_cv_next_fcntl_h='<'fcntl.h'>'
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18844 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18845 if ${gl_cv_next_fcntl_h+:} false; then :
18846 $as_echo_n "(cached) " >&6
18851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18852 /* end confdefs.h. */
18856 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18857 *) gl_absname_cpp="$ac_cpp" ;;
18862 gl_dirsep_regex='[/\\]'
18865 gl_dirsep_regex='\/'
18868 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18869 gl_header_literal_regex=`echo 'fcntl.h' \
18870 | sed -e "$gl_make_literal_regex_sed"`
18871 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18872 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18878 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18879 sed -n "$gl_absolute_header_sed"`
18881 gl_header=$gl_cv_absolute_fcntl_h
18882 gl_cv_next_fcntl_h='"'$gl_header'"'
18886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18887 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18889 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18891 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18892 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18893 gl_next_as_first_directive='<'fcntl.h'>'
18895 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18896 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18898 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18909 for gl_func in fcntl openat; do
18910 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18912 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18913 if eval \${$as_gl_Symbol+:} false; then :
18914 $as_echo_n "(cached) " >&6
18916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18917 /* end confdefs.h. */
18929 if ac_fn_c_try_compile "$LINENO"; then :
18930 eval "$as_gl_Symbol=yes"
18932 eval "$as_gl_Symbol=no"
18934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18936 eval ac_res=\$$as_gl_Symbol
18937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18938 $as_echo "$ac_res" >&6; }
18939 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18940 cat >>confdefs.h <<_ACEOF
18941 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18944 eval ac_cv_have_decl_$gl_func=yes
18954 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18955 #include <dirent.h>
18958 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18964 cat >>confdefs.h <<_ACEOF
18965 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18967 if test $ac_have_decl = 1; then :
18970 HAVE_DECL_FDOPENDIR=0
18974 if test $ac_cv_func_fdopendir = no; then
18977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18978 $as_echo_n "checking whether fdopendir works... " >&6; }
18979 if ${gl_cv_func_fdopendir_works+:} false; then :
18980 $as_echo_n "(cached) " >&6
18982 if test "$cross_compiling" = yes; then :
18984 # Guess yes on glibc systems.
18985 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18986 # If we don't know, assume the worst.
18987 *) gl_cv_func_fdopendir_works="guessing no" ;;
18991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18992 /* end confdefs.h. */
18994 #include <dirent.h>
18996 #include <unistd.h>
18997 #if !HAVE_DECL_FDOPENDIR
18999 # ifdef __cplusplus
19002 DIR *fdopendir (int);
19009 int fd = open ("conftest.c", O_RDONLY);
19010 if (fd < 0) result |= 1;
19011 if (fdopendir (fd)) result |= 2;
19012 if (close (fd)) result |= 4;
19018 if ac_fn_c_try_run "$LINENO"; then :
19019 gl_cv_func_fdopendir_works=yes
19021 gl_cv_func_fdopendir_works=no
19023 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19024 conftest.$ac_objext conftest.beam conftest.$ac_ext
19028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19029 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19030 case "$gl_cv_func_fdopendir_works" in
19033 REPLACE_FDOPENDIR=1
19038 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
19047 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
19061 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19067 cat >>confdefs.h <<_ACEOF
19068 #define GNULIB_FDOPENDIR 1
19074 cat >>confdefs.h <<_ACEOF
19075 #define GNULIB_FDUTIMENSAT 1
19081 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
19082 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
19084 cat >>confdefs.h <<_ACEOF
19085 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
19089 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
19098 if test $ac_cv_member_struct_stat_st_blocks = no; then
19107 gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
19121 REPLACE_FLOAT_LDBL=0
19123 aix* | beos* | openbsd* | mirbsd* | irix*)
19127 case "$host_cpu" in
19132 # On x86_64 systems, the C compiler may still be generating
19134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19135 /* end confdefs.h. */
19136 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19140 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19141 $EGREP "yes" >/dev/null 2>&1; then :
19152 case "$host_cpu" in
19160 aix* | freebsd* | linux*)
19161 if test -n "$FLOAT_H"; then
19162 REPLACE_FLOAT_LDBL=1
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
19169 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
19170 if ${gl_cv_func_itold_works+:} false; then :
19171 $as_echo_n "(cached) " >&6
19174 if test "$cross_compiling" = yes; then :
19177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19178 /* end confdefs.h. */
19179 #if defined __LP64__ || defined __arch64__
19183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19184 $EGREP "yes" >/dev/null 2>&1; then :
19185 gl_cv_func_itold_works="guessing no"
19187 gl_cv_func_itold_works="guessing yes"
19192 *) gl_cv_func_itold_works="guessing yes" ;;
19196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19197 /* end confdefs.h. */
19200 volatile long double ld;
19209 if ac_fn_c_try_run "$LINENO"; then :
19210 gl_cv_func_itold_works=yes
19212 gl_cv_func_itold_works=no
19214 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19215 conftest.$ac_objext conftest.beam conftest.$ac_ext
19220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
19221 $as_echo "$gl_cv_func_itold_works" >&6; }
19222 case "$gl_cv_func_itold_works" in
19229 if test -n "$FLOAT_H"; then
19238 if test $gl_cv_have_include_next = yes; then
19239 gl_cv_next_float_h='<'float.h'>'
19241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19242 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19243 if ${gl_cv_next_float_h+:} false; then :
19244 $as_echo_n "(cached) " >&6
19249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19250 /* end confdefs.h. */
19254 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19255 *) gl_absname_cpp="$ac_cpp" ;;
19260 gl_dirsep_regex='[/\\]'
19263 gl_dirsep_regex='\/'
19266 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19267 gl_header_literal_regex=`echo 'float.h' \
19268 | sed -e "$gl_make_literal_regex_sed"`
19269 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19270 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19276 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19277 sed -n "$gl_absolute_header_sed"`
19279 gl_header=$gl_cv_absolute_float_h
19280 gl_cv_next_float_h='"'$gl_header'"'
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19285 $as_echo "$gl_cv_next_float_h" >&6; }
19287 NEXT_FLOAT_H=$gl_cv_next_float_h
19289 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19290 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19291 gl_next_as_first_directive='<'float.h'>'
19293 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19294 gl_next_as_first_directive=$gl_cv_next_float_h
19296 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19303 if test -n "$FLOAT_H"; then
19304 GL_GENERATE_FLOAT_H_TRUE=
19305 GL_GENERATE_FLOAT_H_FALSE='#'
19307 GL_GENERATE_FLOAT_H_TRUE='#'
19308 GL_GENERATE_FLOAT_H_FALSE=
19313 if test $REPLACE_FLOAT_LDBL = 1; then
19322 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19325 if test $REPLACE_ITOLD = 1; then
19334 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19343 gl_fnmatch_required_lowercase=`
19344 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19346 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19348 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19349 if eval \${$gl_fnmatch_cache_var+:} false; then :
19350 $as_echo_n "(cached) " >&6
19352 if test $gl_fnmatch_required = GNU; then
19353 gl_fnmatch_gnu_start=
19354 gl_fnmatch_gnu_end=
19356 gl_fnmatch_gnu_start='#if 0'
19357 gl_fnmatch_gnu_end='#endif'
19359 if test "$cross_compiling" = yes; then :
19360 eval "$gl_fnmatch_cache_var=\"guessing no\""
19362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19363 /* end confdefs.h. */
19364 #include <fnmatch.h>
19366 y (char const *pattern, char const *string, int flags)
19368 return fnmatch (pattern, string, flags) == 0;
19371 n (char const *pattern, char const *string, int flags)
19373 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19379 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19380 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19381 static char const A_1[] = { 'A' - 1, 0 };
19382 static char const A01[] = { 'A' + 1, 0 };
19383 static char const a_1[] = { 'a' - 1, 0 };
19384 static char const a01[] = { 'a' + 1, 0 };
19385 static char const bs_1[] = { '\\\\' - 1, 0 };
19386 static char const bs01[] = { '\\\\' + 1, 0 };
19388 if (!n ("a*", "", 0))
19390 if (!y ("a*", "abc", 0))
19392 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19394 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19396 if (!y ("a\\\\bc", "abc", 0))
19398 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19400 if (!y ("*x", ".x", 0))
19402 if (!n ("*x", ".x", FNM_PERIOD))
19404 if (!y (Apat, "\\\\", 0))
19406 if (!y (Apat, "A", 0))
19408 if (!y (apat, "\\\\", 0))
19410 if (!y (apat, "a", 0))
19412 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19414 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19416 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19418 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19420 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19422 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19424 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19426 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19428 $gl_fnmatch_gnu_start
19429 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19431 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19433 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19435 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19437 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19439 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19441 $gl_fnmatch_gnu_end
19448 if ac_fn_c_try_run "$LINENO"; then :
19449 eval "$gl_fnmatch_cache_var=yes"
19451 eval "$gl_fnmatch_cache_var=no"
19453 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19454 conftest.$ac_objext conftest.beam conftest.$ac_ext
19459 eval ac_res=\$$gl_fnmatch_cache_var
19460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19461 $as_echo "$ac_res" >&6; }
19462 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19463 if test "$gl_fnmatch_result" = yes; then
19464 rm -f "$gl_source_base/fnmatch.h"
19466 FNMATCH_H=fnmatch.h
19469 if test -n "$FNMATCH_H"; then
19470 GL_GENERATE_FNMATCH_H_TRUE=
19471 GL_GENERATE_FNMATCH_H_FALSE='#'
19473 GL_GENERATE_FNMATCH_H_TRUE='#'
19474 GL_GENERATE_FNMATCH_H_FALSE=
19478 if test -n "$FNMATCH_H"; then
19487 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19491 cat >>confdefs.h <<_ACEOF
19492 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19496 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19498 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19504 cat >>confdefs.h <<_ACEOF
19505 #define HAVE_DECL_ISBLANK $ac_have_decl
19517 if test -n "$FNMATCH_H"; then
19526 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19530 cat >>confdefs.h <<_ACEOF
19531 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19535 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19537 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19543 cat >>confdefs.h <<_ACEOF
19544 #define HAVE_DECL_ISBLANK $ac_have_decl
19555 #if HAVE_STDIO_EXT_H
19556 # include <stdio_ext.h>
19559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpending" >&5
19560 $as_echo_n "checking for __fpending... " >&6; }
19561 if ${gl_cv_func___fpending+:} false; then :
19562 $as_echo_n "(cached) " >&6
19565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19566 /* end confdefs.h. */
19571 return ! __fpending (stdin);
19576 if ac_fn_c_try_link "$LINENO"; then :
19577 gl_cv_func___fpending=yes
19579 gl_cv_func___fpending=no
19581 rm -f core conftest.err conftest.$ac_objext \
19582 conftest$ac_exeext conftest.$ac_ext
19585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func___fpending" >&5
19586 $as_echo "$gl_cv_func___fpending" >&6; }
19587 if test $gl_cv_func___fpending = yes; then
19588 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19590 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19596 cat >>confdefs.h <<_ACEOF
19597 #define HAVE_DECL___FPENDING $ac_have_decl
19602 if test $gl_cv_func___fpending = no; then
19611 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19615 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19616 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19617 $as_echo_n "(cached) " >&6
19623 'fp->_IO_write_ptr - fp->_IO_write_base' \
19625 '# traditional Unix' \
19626 'fp->_ptr - fp->_base' \
19629 'fp->_p - fp->_bf._base' \
19631 '# SCO, Unixware' \
19632 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
19635 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19638 'fp->__bufp - fp->__buffer' \
19640 '# old glibc iostream?' \
19641 'fp->_pptr - fp->_pbase' \
19644 'fp->_ptr - fp->_buffer' \
19647 'fp->_ptr - fp->_buf' \
19650 'fp->wp - fp->buf' \
19653 '(*fp)->_ptr - (*fp)->_base' \
19655 '# e.g., DGUX R4.11; the info is not available' \
19659 # Skip each embedded comment.
19660 case "$ac_expr" in '#'*) continue;; esac
19662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19663 /* end confdefs.h. */
19668 FILE *fp = stdin; (void) ($ac_expr);
19673 if ac_fn_c_try_compile "$LINENO"; then :
19677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19678 test "$fp_done" = yes && break
19681 ac_cv_sys_pending_output_n_bytes=$ac_expr
19685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19686 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19688 cat >>confdefs.h <<_ACEOF
19689 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19697 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19701 if test $REPLACE_FSEEK = 1; then
19710 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
19724 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19737 $as_echo_n "checking for fseeko... " >&6; }
19738 if ${gl_cv_func_fseeko+:} false; then :
19739 $as_echo_n "(cached) " >&6
19742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19743 /* end confdefs.h. */
19749 fseeko (stdin, 0, 0);
19754 if ac_fn_c_try_link "$LINENO"; then :
19755 gl_cv_func_fseeko=yes
19757 gl_cv_func_fseeko=no
19759 rm -f core conftest.err conftest.$ac_objext \
19760 conftest$ac_exeext conftest.$ac_ext
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19764 $as_echo "$gl_cv_func_fseeko" >&6; }
19767 if test $ac_cv_have_decl_fseeko = no; then
19771 if test $gl_cv_func_fseeko = no; then
19774 if test $WINDOWS_64_BIT_OFF_T = 1; then
19777 if test $gl_cv_var_stdin_large_offset = no; then
19783 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19792 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
19795 for ac_func in _fseeki64
19797 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
19798 if test "x$ac_cv_func__fseeki64" = xyes; then :
19799 cat >>confdefs.h <<_ACEOF
19800 #define HAVE__FSEEKI64 1
19819 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
19827 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19832 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19840 if test $ac_cv_func_fchdir = no; then
19844 if test $HAVE_FCHDIR = 0; then
19845 case "$gl_cv_func_open_directory_works" in
19854 if test $REPLACE_FSTAT = 1; then
19863 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19878 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19888 if test $ac_cv_func_fstatat = no; then
19891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19892 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19893 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19894 $as_echo_n "(cached) " >&6
19896 if test "$cross_compiling" = yes; then :
19898 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19899 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19904 /* end confdefs.h. */
19907 #include <sys/stat.h>
19912 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19916 if ac_fn_c_try_run "$LINENO"; then :
19917 gl_cv_func_fstatat_zero_flag=yes
19919 gl_cv_func_fstatat_zero_flag=no
19921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19922 conftest.$ac_objext conftest.beam conftest.$ac_ext
19927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19928 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19930 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19932 *) REPLACE_FSTATAT=1
19933 case $gl_cv_func_fstatat_zero_flag in
19936 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19944 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19953 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19967 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19975 if test $ac_cv_func_futimens = no; then
19978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
19979 $as_echo_n "checking whether futimens works... " >&6; }
19980 if ${gl_cv_func_futimens_works+:} false; then :
19981 $as_echo_n "(cached) " >&6
19983 if test "$cross_compiling" = yes; then :
19984 gl_cv_func_futimens_works="guessing no"
19986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19987 /* end confdefs.h. */
19990 #include <sys/stat.h>
19991 #include <unistd.h>
19997 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
19998 int fd = creat ("conftest.file", 0600);
20000 if (fd < 0) return 1;
20002 if (futimens (AT_FDCWD, NULL) == 0) return 2;
20003 if (errno != EBADF) return 3;
20004 if (futimens (fd, ts)) return 4;
20006 ts[0].tv_nsec = UTIME_NOW;
20007 ts[1].tv_nsec = UTIME_OMIT;
20008 if (futimens (fd, ts)) return 5;
20009 if (fstat (fd, &st)) return 6;
20010 if (st.st_ctime < st.st_atime) return 7;
20016 if ac_fn_c_try_run "$LINENO"; then :
20017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20018 /* end confdefs.h. */
20021 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
20022 in several file systems as recently as 2.6.32. Always replace futimens
20023 to support older kernels. */
20035 if ac_fn_c_try_compile "$LINENO"; then :
20036 gl_cv_func_futimens_works=yes
20038 gl_cv_func_futimens_works="needs runtime check"
20040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20042 gl_cv_func_futimens_works=no
20044 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20045 conftest.$ac_objext conftest.beam conftest.$ac_ext
20048 rm -f conftest.file
20050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
20051 $as_echo "$gl_cv_func_futimens_works" >&6; }
20052 if test "$gl_cv_func_futimens_works" != yes; then
20057 if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
20066 gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
20080 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
20092 gl_cv_func_getcwd_path_max=yes
20100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20101 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20102 if ${gl_cv_func_getcwd_path_max+:} false; then :
20103 $as_echo_n "(cached) " >&6
20105 # Arrange for deletion of the temporary directory this test creates.
20106 ac_clean_files="$ac_clean_files confdir3"
20107 if test "$cross_compiling" = yes; then :
20109 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20110 *) gl_cv_func_getcwd_path_max=no;;
20113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20114 /* end confdefs.h. */
20117 #include <stdlib.h>
20119 # include <unistd.h>
20121 # include <direct.h>
20123 #include <string.h>
20124 #include <limits.h>
20125 #include <sys/stat.h>
20126 #include <sys/types.h>
20130 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20132 # include <unistd.h>
20134 #include <limits.h>
20135 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20136 # include <sys/param.h>
20138 #if !defined PATH_MAX && defined MAXPATHLEN
20139 # define PATH_MAX MAXPATHLEN
20143 # define PATH_MAX 1024
20145 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20147 # define PATH_MAX 260
20152 # define AT_FDCWD 0
20154 #ifdef ENAMETOOLONG
20155 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20157 # define is_ENAMETOOLONG(x) 0
20160 /* Use the getcwd function, not any macro. */
20163 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
20167 # define S_IRWXU 0700
20170 /* The length of this name must be 8. */
20171 #define DIR_NAME "confdir3"
20172 #define DIR_NAME_LEN 8
20173 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20175 /* The length of "../". */
20176 #define DOTDOTSLASH_LEN 3
20178 /* Leftover bytes in the buffer, to work around library or OS bugs. */
20179 #define BUF_SLOP 20
20185 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20186 at least not on a local file system. And if we were to start worrying
20187 about remote file systems, we'd have to enable the wrapper function
20188 all of the time, just to be safe. That's not worth the cost. */
20190 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20191 - DIR_NAME_SIZE - BUF_SLOP) \
20193 /* FIXME: Assuming there's a system for which this is true,
20194 this should be done in a compile test. */
20197 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20198 + DIR_NAME_SIZE + BUF_SLOP];
20199 char *cwd = getcwd (buf, PATH_MAX);
20200 size_t initial_cwd_len;
20203 size_t n_chdirs = 0;
20208 cwd_len = initial_cwd_len = strlen (cwd);
20212 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20215 cwd_len += DIR_NAME_SIZE;
20216 /* If mkdir or chdir fails, it could be that this system cannot create
20217 any file with an absolute name longer than PATH_MAX, such as cygwin.
20218 If so, leave fail as 0, because the current working directory can't
20219 be too long for getcwd if it can't even be created. For other
20220 errors, be pessimistic and consider that as a failure, too. */
20221 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20223 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20228 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20230 c = getcwd (buf, PATH_MAX);
20231 if (!c && errno == ENOENT)
20241 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20248 if (dotdot_max <= cwd_len - initial_cwd_len)
20250 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20252 c = getcwd (buf, cwd_len + 1);
20255 if (! (errno == ERANGE || errno == ENOENT
20256 || is_ENAMETOOLONG (errno)))
20261 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20269 if (c && strlen (c) != cwd_len)
20277 /* Leaving behind such a deep directory is not polite.
20278 So clean up here, right away, even though the driving
20279 shell script would also clean up. */
20283 /* Try rmdir first, in case the chdir failed. */
20285 for (i = 0; i <= n_chdirs; i++)
20287 if (chdir ("..") < 0)
20289 if (rmdir (DIR_NAME) != 0)
20299 if ac_fn_c_try_run "$LINENO"; then :
20300 gl_cv_func_getcwd_path_max=yes
20303 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20304 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20305 *) gl_cv_func_getcwd_path_max=no;;
20308 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20309 conftest.$ac_objext conftest.beam conftest.$ac_ext
20314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20315 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20317 case "$gl_cv_func_getcwd_null" in
20323 for ac_func in getpagesize
20325 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20326 if test "x$ac_cv_func_getpagesize" = xyes; then :
20327 cat >>confdefs.h <<_ACEOF
20328 #define HAVE_GETPAGESIZE 1
20334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20335 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20336 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20337 $as_echo_n "(cached) " >&6
20339 # Remove any remnants of a previous test.
20340 rm -rf confdir-14B---
20341 # Arrange for deletion of the temporary directory this test creates.
20342 ac_clean_files="$ac_clean_files confdir-14B---"
20343 if test "$cross_compiling" = yes; then :
20344 gl_cv_func_getcwd_abort_bug=yes
20346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20347 /* end confdefs.h. */
20350 #include <stdlib.h>
20352 # include <unistd.h>
20353 #else /* on Windows with MSVC */
20354 # include <direct.h>
20356 #include <string.h>
20357 #include <sys/stat.h>
20360 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20362 # include <unistd.h>
20364 #include <limits.h>
20365 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20366 # include <sys/param.h>
20368 #if !defined PATH_MAX && defined MAXPATHLEN
20369 # define PATH_MAX MAXPATHLEN
20373 # define PATH_MAX 1024
20375 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20377 # define PATH_MAX 260
20381 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
20385 # define S_IRWXU 0700
20388 /* FIXME: skip the run-test altogether on systems without getpagesize. */
20389 #if ! HAVE_GETPAGESIZE
20390 # define getpagesize() 0
20393 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20394 the 16kB pagesize on ia64 linux. Those conditions make the code below
20395 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
20396 #define TARGET_LEN (5 * 1024)
20402 size_t initial_cwd_len;
20405 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20406 this relatively expensive and invasive test if that's not true. */
20408 int bug_possible = PATH_MAX < getpagesize ();
20410 int bug_possible = 0;
20412 if (! bug_possible)
20415 cwd = getcwd (NULL, 0);
20419 initial_cwd_len = strlen (cwd);
20424 static char const dir_name[] = "confdir-14B---";
20425 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20426 / sizeof dir_name);
20428 for (d = 0; d < desired_depth; d++)
20430 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20432 if (! (errno == ERANGE || errno == ENAMETOOLONG
20433 || errno == ENOENT))
20434 fail = 3; /* Unable to construct deep hierarchy. */
20439 /* If libc has the bug in question, this invocation of getcwd
20440 results in a failed assertion. */
20441 cwd = getcwd (NULL, 0);
20443 fail = 4; /* getcwd didn't assert, but it failed for a long name
20444 where the answer could have been learned. */
20447 /* Call rmdir first, in case the above chdir failed. */
20451 if (chdir ("..") < 0)
20464 if ac_fn_c_try_run "$LINENO"; then :
20465 gl_cv_func_getcwd_abort_bug=no
20468 if test $ret -ge 128 || test $ret = 4; then
20469 gl_cv_func_getcwd_abort_bug=yes
20471 gl_cv_func_getcwd_abort_bug=no
20474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20475 conftest.$ac_objext conftest.beam conftest.$ac_ext
20480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
20481 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
20482 if test $gl_cv_func_getcwd_abort_bug = yes; then :
20490 case "$gl_cv_func_getcwd_path_max" in
20491 "no"|"no, it has the AIX bug") ;;
20494 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20498 case "$gl_cv_func_getcwd_path_max" in
20499 "no, but it is partly working")
20501 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20506 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20507 || test $gl_cv_func_getcwd_posix_signature != yes \
20508 || test "$gl_cv_func_getcwd_path_max" != yes \
20509 || test $gl_abort_bug = yes; then
20513 if test $REPLACE_GETCWD = 1; then
20522 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20532 cat >>confdefs.h <<_ACEOF
20533 #define GNULIB_GETCWD 1
20548 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20557 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20564 if test $REPLACE_GETCWD = 1; then
20573 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20587 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20599 if test $ac_cv_func_getdelim = yes; then
20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20602 $as_echo_n "checking for working getdelim function... " >&6; }
20603 if ${gl_cv_func_working_getdelim+:} false; then :
20604 $as_echo_n "(cached) " >&6
20606 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20607 if test "$cross_compiling" = yes; then :
20608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20609 /* end confdefs.h. */
20611 #include <features.h>
20612 #ifdef __GNU_LIBRARY__
20613 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20620 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20621 gl_cv_func_working_getdelim="guessing yes"
20623 gl_cv_func_working_getdelim="guessing no"
20629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20630 /* end confdefs.h. */
20632 # include <stdio.h>
20633 # include <stdlib.h>
20634 # include <string.h>
20637 FILE *in = fopen ("./conftest.data", "r");
20641 /* Test result for a NULL buffer and a zero size.
20642 Based on a test program from Karl Heuer. */
20645 int len = getdelim (&line, &siz, '\n', in);
20646 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20650 /* Test result for a NULL buffer and a non-zero size.
20651 This crashes on FreeBSD 8.0. */
20653 size_t siz = (size_t)(~0) / 4;
20654 if (getdelim (&line, &siz, '\n', in) == -1)
20661 if ac_fn_c_try_run "$LINENO"; then :
20662 gl_cv_func_working_getdelim=yes
20664 gl_cv_func_working_getdelim=no
20666 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20667 conftest.$ac_objext conftest.beam conftest.$ac_ext
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20672 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20673 case "$gl_cv_func_working_getdelim" in
20682 if test $ac_cv_have_decl_getdelim = no; then
20683 HAVE_DECL_GETDELIM=0
20686 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20695 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20698 for ac_func in flockfile funlockfile
20700 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20701 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20702 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20703 cat >>confdefs.h <<_ACEOF
20704 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20710 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20711 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20717 cat >>confdefs.h <<_ACEOF
20718 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20734 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20742 if test $ac_cv_func_getdtablesize = yes; then
20743 # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit
20744 # up to an unchangeable hard limit; all other platforms correctly
20745 # require setrlimit before getdtablesize() can report a larger value.
20746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
20747 $as_echo_n "checking whether getdtablesize works... " >&6; }
20748 if ${gl_cv_func_getdtablesize_works+:} false; then :
20749 $as_echo_n "(cached) " >&6
20751 if test "$cross_compiling" = yes; then :
20753 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows
20754 gl_cv_func_getdtablesize_works="guessing no" ;;
20755 *) gl_cv_func_getdtablesize_works="guessing yes" ;;
20758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20759 /* end confdefs.h. */
20761 #include <unistd.h>
20765 int size = getdtablesize();
20766 if (dup2 (0, getdtablesize()) != -1)
20768 if (size != getdtablesize())
20775 if ac_fn_c_try_run "$LINENO"; then :
20776 gl_cv_func_getdtablesize_works=yes
20778 gl_cv_func_getdtablesize_works=no
20780 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20781 conftest.$ac_objext conftest.beam conftest.$ac_ext
20786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
20787 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
20788 case "$gl_cv_func_getdtablesize_works" in
20790 *) REPLACE_GETDTABLESIZE=1 ;;
20793 HAVE_GETDTABLESIZE=0
20796 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then
20805 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20814 GNULIB_GETDTABLESIZE=1
20820 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20829 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
20830 if test "x$ac_cv_func_getgroups" = xyes; then :
20835 # If we don't yet have getgroups, see if it's in -lbsd.
20836 # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1.
20838 if test $ac_cv_func_getgroups = no; then
20839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getgroups in -lbsd" >&5
20840 $as_echo_n "checking for getgroups in -lbsd... " >&6; }
20841 if ${ac_cv_lib_bsd_getgroups+:} false; then :
20842 $as_echo_n "(cached) " >&6
20844 ac_check_lib_save_LIBS=$LIBS
20846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847 /* end confdefs.h. */
20849 /* Override any GCC internal prototype to avoid an error.
20850 Use char because int might match the return type of a GCC
20851 builtin and then its argument prototype would still apply. */
20859 return getgroups ();
20864 if ac_fn_c_try_link "$LINENO"; then :
20865 ac_cv_lib_bsd_getgroups=yes
20867 ac_cv_lib_bsd_getgroups=no
20869 rm -f core conftest.err conftest.$ac_objext \
20870 conftest$ac_exeext conftest.$ac_ext
20871 LIBS=$ac_check_lib_save_LIBS
20873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getgroups" >&5
20874 $as_echo "$ac_cv_lib_bsd_getgroups" >&6; }
20875 if test "x$ac_cv_lib_bsd_getgroups" = xyes; then :
20876 GETGROUPS_LIB=-lbsd
20881 # Run the program to test the functionality of the system-supplied
20882 # getgroups function only if there is such a function.
20883 if test $ac_cv_func_getgroups = yes; then
20884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getgroups" >&5
20885 $as_echo_n "checking for working getgroups... " >&6; }
20886 if ${ac_cv_func_getgroups_works+:} false; then :
20887 $as_echo_n "(cached) " >&6
20889 if test "$cross_compiling" = yes; then :
20890 case "$host_os" in # ((
20891 # Guess yes on glibc systems.
20892 *-gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
20893 # If we don't know, assume the worst.
20894 *) ac_cv_func_getgroups_works="guessing no" ;;
20898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20899 /* end confdefs.h. */
20900 $ac_includes_default
20904 /* On Ultrix 4.3, getgroups (0, 0) always fails. */
20905 return getgroups (0, 0) == -1;
20911 if ac_fn_c_try_run "$LINENO"; then :
20912 ac_cv_func_getgroups_works=yes
20914 ac_cv_func_getgroups_works=no
20916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20917 conftest.$ac_objext conftest.beam conftest.$ac_ext
20922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getgroups_works" >&5
20923 $as_echo "$ac_cv_func_getgroups_works" >&6; }
20925 ac_cv_func_getgroups_works=no
20927 case "$ac_cv_func_getgroups_works" in
20930 $as_echo "#define HAVE_GETGROUPS 1" >>confdefs.h
20936 if test $ac_cv_func_getgroups != yes; then
20939 if test "$ac_cv_type_getgroups" != gid_t \
20940 || { case "$ac_cv_func_getgroups_works" in
20945 REPLACE_GETGROUPS=1
20947 $as_echo "#define GETGROUPS_ZERO_BUG 1" >>confdefs.h
20950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getgroups handles negative values" >&5
20951 $as_echo_n "checking whether getgroups handles negative values... " >&6; }
20952 if ${gl_cv_func_getgroups_works+:} false; then :
20953 $as_echo_n "(cached) " >&6
20955 if test "$cross_compiling" = yes; then :
20957 # Guess yes on glibc systems.
20958 *-gnu*) gl_cv_func_getgroups_works="guessing yes" ;;
20959 # If we don't know, assume the worst.
20960 *) gl_cv_func_getgroups_works="guessing no" ;;
20964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20965 /* end confdefs.h. */
20966 $ac_includes_default
20970 int size = getgroups (0, 0);
20971 gid_t *list = malloc (size * sizeof *list);
20972 return getgroups (-1, list) != -1;
20977 if ac_fn_c_try_run "$LINENO"; then :
20978 gl_cv_func_getgroups_works=yes
20980 gl_cv_func_getgroups_works=no
20982 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20983 conftest.$ac_objext conftest.beam conftest.$ac_ext
20987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getgroups_works" >&5
20988 $as_echo "$gl_cv_func_getgroups_works" >&6; }
20989 case "$gl_cv_func_getgroups_works" in
20991 *) REPLACE_GETGROUPS=1 ;;
20995 test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS"
20997 if test $HAVE_GETGROUPS = 0 || test $REPLACE_GETGROUPS = 1; then
21006 gl_LIBOBJS="$gl_LIBOBJS getgroups.$ac_objext"
21020 $as_echo "#define GNULIB_TEST_GETGROUPS 1" >>confdefs.h
21031 gl_getline_needs_run_time_check=no
21032 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
21033 if test "x$ac_cv_func_getline" = xyes; then :
21034 gl_getline_needs_run_time_check=yes
21036 am_cv_func_working_getline=no
21039 if test $gl_getline_needs_run_time_check = yes; then
21040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21041 $as_echo_n "checking for working getline function... " >&6; }
21042 if ${am_cv_func_working_getline+:} false; then :
21043 $as_echo_n "(cached) " >&6
21045 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
21046 if test "$cross_compiling" = yes; then :
21047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21048 /* end confdefs.h. */
21050 #include <features.h>
21051 #ifdef __GNU_LIBRARY__
21052 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21059 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
21060 am_cv_func_working_getline="guessing yes"
21062 am_cv_func_working_getline="guessing no"
21068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21069 /* end confdefs.h. */
21071 # include <stdio.h>
21072 # include <stdlib.h>
21073 # include <string.h>
21076 FILE *in = fopen ("./conftest.data", "r");
21080 /* Test result for a NULL buffer and a zero size.
21081 Based on a test program from Karl Heuer. */
21084 int len = getline (&line, &siz, in);
21085 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21089 /* Test result for a NULL buffer and a non-zero size.
21090 This crashes on FreeBSD 8.0. */
21092 size_t siz = (size_t)(~0) / 4;
21093 if (getline (&line, &siz, in) == -1)
21100 if ac_fn_c_try_run "$LINENO"; then :
21101 am_cv_func_working_getline=yes
21103 am_cv_func_working_getline=no
21105 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21106 conftest.$ac_objext conftest.beam conftest.$ac_ext
21110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21111 $as_echo "$am_cv_func_working_getline" >&6; }
21114 if test $ac_cv_have_decl_getline = no; then
21115 HAVE_DECL_GETLINE=0
21118 case "$am_cv_func_working_getline" in
21124 if test $REPLACE_GETLINE = 1; then
21133 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
21150 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21159 if test $REPLACE_GETOPT = 1; then
21168 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21178 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21183 GNULIB_GL_UNISTD_H_GETOPT=1
21188 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
21198 if test $REPLACE_GETOPT = 1; then
21202 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
21208 if test $REPLACE_GETOPT = 1; then
21217 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
21227 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
21232 GNULIB_GL_UNISTD_H_GETOPT=1
21238 for ac_func in getpagesize
21240 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
21241 if test "x$ac_cv_func_getpagesize" = xyes; then :
21242 cat >>confdefs.h <<_ACEOF
21243 #define HAVE_GETPAGESIZE 1
21249 if test $ac_cv_func_getpagesize = no; then
21251 for ac_header in OS.h
21253 ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
21254 if test "x$ac_cv_header_OS_h" = xyes; then :
21255 cat >>confdefs.h <<_ACEOF
21256 #define HAVE_OS_H 1
21263 if test $ac_cv_header_OS_h = yes; then
21266 for ac_header in sys/param.h
21268 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
21269 if test "x$ac_cv_header_sys_param_h" = xyes; then :
21270 cat >>confdefs.h <<_ACEOF
21271 #define HAVE_SYS_PARAM_H 1
21278 if test $ac_cv_header_sys_param_h = yes; then
21284 REPLACE_GETPAGESIZE=1
21287 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
21288 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
21291 HAVE_DECL_GETPAGESIZE=0
21295 if test $REPLACE_GETPAGESIZE = 1; then
21304 gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
21312 GNULIB_GETPAGESIZE=1
21318 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
21336 gl_gettimeofday_timezone=void
21337 if test $ac_cv_func_gettimeofday != yes; then
21338 HAVE_GETTIMEOFDAY=0
21343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
21344 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
21345 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
21346 $as_echo_n "(cached) " >&6
21348 if test "$cross_compiling" = yes; then :
21349 # When cross-compiling:
21351 # Guess all is fine on glibc systems.
21352 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
21353 # If we don't know, assume the worst.
21354 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
21358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21359 /* end confdefs.h. */
21360 #include <string.h>
21361 #include <sys/time.h>
21363 #include <stdlib.h>
21371 struct tm saved_lt;
21373 lt = localtime (&t);
21375 gettimeofday (&tv, NULL);
21376 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
21382 if ac_fn_c_try_run "$LINENO"; then :
21383 gl_cv_func_gettimeofday_clobber=no
21385 gl_cv_func_gettimeofday_clobber=yes
21387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21388 conftest.$ac_objext conftest.beam conftest.$ac_ext
21392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
21393 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
21395 case "$gl_cv_func_gettimeofday_clobber" in
21397 REPLACE_GETTIMEOFDAY=1
21400 REPLACE_LOCALTIME=1
21403 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
21408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
21409 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
21410 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
21411 $as_echo_n "(cached) " >&6
21413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21414 /* end confdefs.h. */
21415 #include <sys/time.h>
21417 int gettimeofday (struct timeval *restrict, void *restrict);
21422 /* glibc uses struct timezone * rather than the POSIX void *
21423 if _GNU_SOURCE is defined. However, since the only portable
21424 use of gettimeofday uses NULL as the second parameter, and
21425 since the glibc definition is actually more typesafe, it is
21426 not worth wrapping this to get a compliant signature. */
21427 int (*f) (struct timeval *restrict, void *restrict)
21430 return !(x | c.tv_sec | c.tv_usec);
21436 if ac_fn_c_try_compile "$LINENO"; then :
21437 gl_cv_func_gettimeofday_posix_signature=yes
21439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21440 /* end confdefs.h. */
21441 #include <sys/time.h>
21442 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
21452 if ac_fn_c_try_compile "$LINENO"; then :
21453 gl_cv_func_gettimeofday_posix_signature=almost
21455 gl_cv_func_gettimeofday_posix_signature=no
21457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
21462 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
21463 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
21464 gl_gettimeofday_timezone='struct timezone'
21465 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
21466 REPLACE_GETTIMEOFDAY=1
21468 if test $REPLACE_STRUCT_TIMEVAL = 1; then
21469 REPLACE_GETTIMEOFDAY=1
21474 cat >>confdefs.h <<_ACEOF
21475 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
21479 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
21488 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
21491 for ac_header in sys/timeb.h
21493 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
21494 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
21495 cat >>confdefs.h <<_ACEOF
21496 #define HAVE_SYS_TIMEB_H 1
21503 for ac_func in _ftime
21505 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
21506 if test "x$ac_cv_func__ftime" = xyes; then :
21507 cat >>confdefs.h <<_ACEOF
21508 #define HAVE__FTIME 1
21521 GNULIB_GETTIMEOFDAY=1
21527 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21536 ac_fn_c_check_func "$LINENO" "group_member" "ac_cv_func_group_member"
21537 if test "x$ac_cv_func_group_member" = xyes; then :
21541 HAVE_GROUP_MEMBER=0
21546 if test $HAVE_GROUP_MEMBER = 0; then
21555 gl_LIBOBJS="$gl_LIBOBJS group-member.$ac_objext"
21566 GNULIB_GROUP_MEMBER=1
21572 $as_echo "#define GNULIB_TEST_GROUP_MEMBER 1" >>confdefs.h
21595 if test -n "$STDINT_H"; then
21596 PRIPTR_PREFIX='"l"'
21598 for glpfx in '' l ll I64; do
21600 '') gltype1='int';;
21601 l) gltype1='long int';;
21602 ll) gltype1='long long int';;
21603 I64) gltype1='__int64';;
21605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21606 /* end confdefs.h. */
21607 #include <stdint.h>
21608 extern intptr_t foo;
21609 extern $gltype1 foo;
21618 if ac_fn_c_try_compile "$LINENO"; then :
21619 PRIPTR_PREFIX='"'$glpfx'"'
21621 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21622 test -n "$PRIPTR_PREFIX" && break
21628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21629 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21630 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21631 $as_echo_n "(cached) " >&6
21633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21634 /* end confdefs.h. */
21635 /* Work also in C++ mode. */
21636 #define __STDC_LIMIT_MACROS 1
21638 /* Work if build is not clean. */
21639 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21641 #include <limits.h>
21643 #include <stdint.h>
21646 #if defined INT32_MAX && defined INTMAX_MAX
21647 #define CONDITION (INT32_MAX < INTMAX_MAX)
21648 #elif HAVE_LONG_LONG_INT
21649 #define CONDITION (sizeof (int) < sizeof (long long int))
21651 #define CONDITION 0
21653 int test[CONDITION ? 1 : -1];
21662 if ac_fn_c_try_compile "$LINENO"; then :
21663 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21665 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21670 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21671 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21672 INT32_MAX_LT_INTMAX_MAX=1;
21674 INT32_MAX_LT_INTMAX_MAX=0;
21678 if test $APPLE_UNIVERSAL_BUILD = 0; then
21680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21681 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21682 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21683 $as_echo_n "(cached) " >&6
21685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21686 /* end confdefs.h. */
21687 /* Work also in C++ mode. */
21688 #define __STDC_LIMIT_MACROS 1
21690 /* Work if build is not clean. */
21691 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21693 #include <limits.h>
21695 #include <stdint.h>
21698 #if defined INT64_MAX
21699 #define CONDITION (INT64_MAX == LONG_MAX)
21700 #elif HAVE_LONG_LONG_INT
21701 #define CONDITION (sizeof (long long int) == sizeof (long int))
21703 #define CONDITION 0
21705 int test[CONDITION ? 1 : -1];
21714 if ac_fn_c_try_compile "$LINENO"; then :
21715 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21717 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21722 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21723 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21724 INT64_MAX_EQ_LONG_MAX=1;
21726 INT64_MAX_EQ_LONG_MAX=0;
21731 INT64_MAX_EQ_LONG_MAX=-1
21734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21735 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21736 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21737 $as_echo_n "(cached) " >&6
21739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21740 /* end confdefs.h. */
21741 /* Work also in C++ mode. */
21742 #define __STDC_LIMIT_MACROS 1
21744 /* Work if build is not clean. */
21745 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21747 #include <limits.h>
21749 #include <stdint.h>
21752 #if defined UINT32_MAX && defined UINTMAX_MAX
21753 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21754 #elif HAVE_LONG_LONG_INT
21755 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21757 #define CONDITION 0
21759 int test[CONDITION ? 1 : -1];
21768 if ac_fn_c_try_compile "$LINENO"; then :
21769 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21771 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21776 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21777 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21778 UINT32_MAX_LT_UINTMAX_MAX=1;
21780 UINT32_MAX_LT_UINTMAX_MAX=0;
21784 if test $APPLE_UNIVERSAL_BUILD = 0; then
21786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21787 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21788 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21789 $as_echo_n "(cached) " >&6
21791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21792 /* end confdefs.h. */
21793 /* Work also in C++ mode. */
21794 #define __STDC_LIMIT_MACROS 1
21796 /* Work if build is not clean. */
21797 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21799 #include <limits.h>
21801 #include <stdint.h>
21804 #if defined UINT64_MAX
21805 #define CONDITION (UINT64_MAX == ULONG_MAX)
21806 #elif HAVE_LONG_LONG_INT
21807 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21809 #define CONDITION 0
21811 int test[CONDITION ? 1 : -1];
21820 if ac_fn_c_try_compile "$LINENO"; then :
21821 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21823 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21828 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21829 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21830 UINT64_MAX_EQ_ULONG_MAX=1;
21832 UINT64_MAX_EQ_ULONG_MAX=0;
21837 UINT64_MAX_EQ_ULONG_MAX=-1
21845 mingw*) REPLACE_ISATTY=1 ;;
21848 if test $REPLACE_ISATTY = 1; then
21857 gl_LIBOBJS="$gl_LIBOBJS isatty.$ac_objext"
21872 $as_echo "#define GNULIB_TEST_ISATTY 1" >>confdefs.h
21881 ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
21882 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21884 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
21885 before <wchar.h>. */
21886 #include <stddef.h>
21890 #include <wctype.h>
21893 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
21899 cat >>confdefs.h <<_ACEOF
21900 #define HAVE_DECL_ISWBLANK $ac_have_decl
21903 if test $ac_cv_func_iswblank = no; then
21905 if test $ac_cv_have_decl_iswblank = yes; then
21909 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21912 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21918 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21921 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21930 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
21945 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
21963 if test $gl_cv_have_include_next = yes; then
21964 gl_cv_next_langinfo_h='<'langinfo.h'>'
21966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
21967 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
21968 if ${gl_cv_next_langinfo_h+:} false; then :
21969 $as_echo_n "(cached) " >&6
21972 if test $ac_cv_header_langinfo_h = yes; then
21977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21978 /* end confdefs.h. */
21979 #include <langinfo.h>
21982 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21983 *) gl_absname_cpp="$ac_cpp" ;;
21988 gl_dirsep_regex='[/\\]'
21991 gl_dirsep_regex='\/'
21994 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21995 gl_header_literal_regex=`echo 'langinfo.h' \
21996 | sed -e "$gl_make_literal_regex_sed"`
21997 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21998 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22004 gl_cv_absolute_langinfo_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22005 sed -n "$gl_absolute_header_sed"`
22007 gl_header=$gl_cv_absolute_langinfo_h
22008 gl_cv_next_langinfo_h='"'$gl_header'"'
22010 gl_cv_next_langinfo_h='<'langinfo.h'>'
22015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
22016 $as_echo "$gl_cv_next_langinfo_h" >&6; }
22018 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
22020 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22021 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22022 gl_next_as_first_directive='<'langinfo.h'>'
22024 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22025 gl_next_as_first_directive=$gl_cv_next_langinfo_h
22027 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
22033 HAVE_LANGINFO_CODESET=0
22034 HAVE_LANGINFO_T_FMT_AMPM=0
22035 HAVE_LANGINFO_ERA=0
22036 HAVE_LANGINFO_YESEXPR=0
22038 if test $ac_cv_header_langinfo_h = yes; then
22040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
22041 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
22042 if ${gl_cv_header_langinfo_codeset+:} false; then :
22043 $as_echo_n "(cached) " >&6
22045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22046 /* end confdefs.h. */
22047 #include <langinfo.h>
22058 if ac_fn_c_try_compile "$LINENO"; then :
22059 gl_cv_header_langinfo_codeset=yes
22061 gl_cv_header_langinfo_codeset=no
22063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
22067 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
22068 if test $gl_cv_header_langinfo_codeset = yes; then
22069 HAVE_LANGINFO_CODESET=1
22071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
22072 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
22073 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
22074 $as_echo_n "(cached) " >&6
22076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22077 /* end confdefs.h. */
22078 #include <langinfo.h>
22079 int a = T_FMT_AMPM;
22089 if ac_fn_c_try_compile "$LINENO"; then :
22090 gl_cv_header_langinfo_t_fmt_ampm=yes
22092 gl_cv_header_langinfo_t_fmt_ampm=no
22094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
22098 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
22099 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
22100 HAVE_LANGINFO_T_FMT_AMPM=1
22102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
22103 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
22104 if ${gl_cv_header_langinfo_era+:} false; then :
22105 $as_echo_n "(cached) " >&6
22107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22108 /* end confdefs.h. */
22109 #include <langinfo.h>
22120 if ac_fn_c_try_compile "$LINENO"; then :
22121 gl_cv_header_langinfo_era=yes
22123 gl_cv_header_langinfo_era=no
22125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
22129 $as_echo "$gl_cv_header_langinfo_era" >&6; }
22130 if test $gl_cv_header_langinfo_era = yes; then
22131 HAVE_LANGINFO_ERA=1
22133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
22134 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
22135 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
22136 $as_echo_n "(cached) " >&6
22138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22139 /* end confdefs.h. */
22140 #include <langinfo.h>
22151 if ac_fn_c_try_compile "$LINENO"; then :
22152 gl_cv_header_langinfo_yesexpr=yes
22154 gl_cv_header_langinfo_yesexpr=no
22156 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
22160 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
22161 if test $gl_cv_header_langinfo_yesexpr = yes; then
22162 HAVE_LANGINFO_YESEXPR=1
22174 for gl_func in nl_langinfo; do
22175 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22177 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22178 if eval \${$as_gl_Symbol+:} false; then :
22179 $as_echo_n "(cached) " >&6
22181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22182 /* end confdefs.h. */
22183 #include <langinfo.h>
22194 if ac_fn_c_try_compile "$LINENO"; then :
22195 eval "$as_gl_Symbol=yes"
22197 eval "$as_gl_Symbol=no"
22199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22201 eval ac_res=\$$as_gl_Symbol
22202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22203 $as_echo "$ac_res" >&6; }
22204 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22205 cat >>confdefs.h <<_ACEOF
22206 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22209 eval ac_cv_have_decl_$gl_func=yes
22219 for ac_func in lchown
22221 ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
22222 if test "x$ac_cv_func_lchown" = xyes; then :
22223 cat >>confdefs.h <<_ACEOF
22224 #define HAVE_LCHOWN 1
22230 if test $ac_cv_func_lchown = no; then
22233 case "$gl_cv_func_chown_slash_works" in
22239 case "$gl_cv_func_chown_ctime_works" in
22247 if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
22256 gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
22270 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
22277 if test $ac_cv_func_link = no; then
22280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
22281 $as_echo_n "checking whether link obeys POSIX... " >&6; }
22282 if ${gl_cv_func_link_works+:} false; then :
22283 $as_echo_n "(cached) " >&6
22286 # Assume that if we have lstat, we can also check symlinks.
22287 if test $ac_cv_func_lstat = yes; then
22288 ln -s conftest.a conftest.lnk
22290 if test "$cross_compiling" = yes; then :
22292 # Guess yes on glibc systems.
22293 *-gnu*) gl_cv_func_link_works="guessing yes" ;;
22294 # If we don't know, assume the worst.
22295 *) gl_cv_func_link_works="guessing no" ;;
22299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22300 /* end confdefs.h. */
22301 #include <unistd.h>
22307 if (!link ("conftest.a", "conftest.b/"))
22310 if (!link ("conftest.lnk/", "conftest.b"))
22312 if (rename ("conftest.a", "conftest.b"))
22314 if (!link ("conftest.b", "conftest.lnk"))
22323 if ac_fn_c_try_run "$LINENO"; then :
22324 gl_cv_func_link_works=yes
22326 gl_cv_func_link_works=no
22328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22329 conftest.$ac_objext conftest.beam conftest.$ac_ext
22332 rm -f conftest.a conftest.b conftest.lnk
22334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
22335 $as_echo "$gl_cv_func_link_works" >&6; }
22336 case "$gl_cv_func_link_works" in
22344 if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
22353 gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
22367 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
22372 gl_link_follows_symlinks=0 # assume GNU behavior
22373 if test $ac_cv_func_readlink = yes; then
22374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
22375 $as_echo_n "checking for __xpg4... " >&6; }
22376 if ${gl_cv_have___xpg4+:} false; then :
22377 $as_echo_n "(cached) " >&6
22379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22380 /* end confdefs.h. */
22390 if ac_fn_c_try_link "$LINENO"; then :
22391 gl_cv_have___xpg4=yes
22393 gl_cv_have___xpg4=no
22395 rm -f core conftest.err conftest.$ac_objext \
22396 conftest$ac_exeext conftest.$ac_ext
22399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
22400 $as_echo "$gl_cv_have___xpg4" >&6; }
22401 if test $gl_cv_have___xpg4 = yes; then
22402 gl_link_follows_symlinks=-1
22404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
22405 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
22406 if ${gl_cv_func_link_follows_symlink+:} false; then :
22407 $as_echo_n "(cached) " >&6
22410 # Create a regular file.
22411 echo > conftest.file
22412 if test "$cross_compiling" = yes; then :
22414 # On glibc/Linux we know the result.
22415 linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
22416 # Otherwise, we don't know.
22417 *) gl_cv_func_link_follows_symlink=unknown ;;
22421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22422 /* end confdefs.h. */
22424 # include <sys/types.h>
22425 # include <sys/stat.h>
22426 # include <unistd.h>
22427 # include <stdlib.h>
22429 # define SAME_INODE(Stat_buf_1, Stat_buf_2) \
22430 ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
22431 && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
22436 const char *file = "conftest.file";
22437 const char *sym = "conftest.sym";
22438 const char *hard = "conftest.hard";
22439 struct stat sb_file, sb_hard;
22441 /* Create a symlink to the regular file. */
22442 if (symlink (file, sym))
22445 /* Create a hard link to that symlink. */
22446 if (link (sym, hard))
22449 if (lstat (hard, &sb_hard))
22451 if (lstat (file, &sb_file))
22454 /* If the dev/inode of hard and file are the same, then
22455 the link call followed the symlink. */
22456 return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
22460 if ac_fn_c_try_run "$LINENO"; then :
22461 gl_cv_func_link_follows_symlink=no
22463 gl_cv_func_link_follows_symlink=yes
22465 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22466 conftest.$ac_objext conftest.beam conftest.$ac_ext
22469 rm -f conftest.file conftest.sym conftest.hard
22472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
22473 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
22474 case "$gl_cv_func_link_follows_symlink" in
22475 *yes) gl_link_follows_symlinks=1 ;;
22476 *no) ;; # already defaulted to 0
22477 *) gl_link_follows_symlinks=-2 ;;
22482 cat >>confdefs.h <<_ACEOF
22483 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
22494 if test $ac_cv_func_linkat = no; then
22497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
22498 $as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
22499 if ${gl_cv_func_linkat_follow+:} false; then :
22500 $as_echo_n "(cached) " >&6
22502 rm -rf conftest.f1 conftest.f2
22504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22505 /* end confdefs.h. */
22508 #include <unistd.h>
22510 /* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
22511 until 2.6.18. Always replace linkat to support older kernels. */
22518 return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
22519 AT_SYMLINK_FOLLOW);
22524 if ac_fn_c_try_compile "$LINENO"; then :
22525 gl_cv_func_linkat_follow=yes
22527 gl_cv_func_linkat_follow="need runtime check"
22529 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22530 rm -rf conftest.f1 conftest.f2
22532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
22533 $as_echo "$gl_cv_func_linkat_follow" >&6; }
22534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
22535 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
22536 if ${gl_cv_func_linkat_slash+:} false; then :
22537 $as_echo_n "(cached) " >&6
22539 rm -rf conftest.a conftest.b conftest.c conftest.d
22540 if test "$cross_compiling" = yes; then :
22541 # Guess yes on glibc systems, no otherwise.
22543 *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
22544 *) gl_cv_func_linkat_slash="guessing no";;
22548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22549 /* end confdefs.h. */
22550 #include <unistd.h>
22560 /* Create a regular file. */
22561 fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
22564 if (write (fd, "hello", 5) < 5)
22566 if (close (fd) < 0)
22568 /* Test whether hard links are supported on the current
22570 if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
22571 AT_SYMLINK_FOLLOW) < 0)
22574 /* Test whether a trailing "/" is treated like "/.". */
22575 if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
22576 AT_SYMLINK_FOLLOW) == 0)
22578 if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
22579 AT_SYMLINK_FOLLOW) == 0)
22587 if ac_fn_c_try_run "$LINENO"; then :
22588 gl_cv_func_linkat_slash=yes
22590 gl_cv_func_linkat_slash=no
22592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22593 conftest.$ac_objext conftest.beam conftest.$ac_ext
22596 rm -rf conftest.a conftest.b conftest.c conftest.d
22598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
22599 $as_echo "$gl_cv_func_linkat_slash" >&6; }
22600 case "$gl_cv_func_linkat_slash" in
22601 *yes) gl_linkat_slash_bug=0 ;;
22602 *) gl_linkat_slash_bug=1 ;;
22604 if test "$gl_cv_func_linkat_follow" != yes \
22605 || test $gl_linkat_slash_bug = 1; then
22608 cat >>confdefs.h <<_ACEOF
22609 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
22615 if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
22624 gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
22627 if test $HAVE_LINKAT = 0; then
22636 gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
22650 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
22662 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22675 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22681 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22682 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22683 $as_echo_n "(cached) " >&6
22685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22686 /* end confdefs.h. */
22687 #include <locale.h>
22688 int x = LC_MESSAGES;
22689 int y = sizeof (((struct lconv *) 0)->decimal_point);
22698 if ac_fn_c_try_compile "$LINENO"; then :
22699 gl_cv_header_locale_h_posix2001=yes
22701 gl_cv_header_locale_h_posix2001=no
22703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22706 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22709 if test $ac_cv_header_xlocale_h = yes; then
22711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
22712 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
22713 if ${gl_cv_header_locale_has_locale_t+:} false; then :
22714 $as_echo_n "(cached) " >&6
22716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22717 /* end confdefs.h. */
22718 #include <locale.h>
22728 if ac_fn_c_try_compile "$LINENO"; then :
22729 gl_cv_header_locale_has_locale_t=yes
22731 gl_cv_header_locale_has_locale_t=no
22733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
22737 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
22738 if test $gl_cv_header_locale_has_locale_t = yes; then
22739 gl_cv_header_locale_h_needs_xlocale_h=no
22741 gl_cv_header_locale_h_needs_xlocale_h=yes
22745 gl_cv_header_locale_h_needs_xlocale_h=no
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22750 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22751 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22752 $as_echo_n "(cached) " >&6
22754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22755 /* end confdefs.h. */
22756 #include <locale.h>
22758 int x = sizeof (l.decimal_point);
22759 int y = sizeof (l.int_p_cs_precedes);
22768 if ac_fn_c_try_compile "$LINENO"; then :
22769 gl_cv_sys_struct_lconv_ok=yes
22771 gl_cv_sys_struct_lconv_ok=no
22773 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22777 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22778 if test $gl_cv_sys_struct_lconv_ok = no; then
22779 REPLACE_STRUCT_LCONV=1
22790 if test $gl_cv_have_include_next = yes; then
22791 gl_cv_next_locale_h='<'locale.h'>'
22793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22794 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22795 if ${gl_cv_next_locale_h+:} false; then :
22796 $as_echo_n "(cached) " >&6
22801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22802 /* end confdefs.h. */
22803 #include <locale.h>
22806 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22807 *) gl_absname_cpp="$ac_cpp" ;;
22812 gl_dirsep_regex='[/\\]'
22815 gl_dirsep_regex='\/'
22818 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22819 gl_header_literal_regex=`echo 'locale.h' \
22820 | sed -e "$gl_make_literal_regex_sed"`
22821 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22822 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22828 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22829 sed -n "$gl_absolute_header_sed"`
22831 gl_header=$gl_cv_absolute_locale_h
22832 gl_cv_next_locale_h='"'$gl_header'"'
22836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22837 $as_echo "$gl_cv_next_locale_h" >&6; }
22839 NEXT_LOCALE_H=$gl_cv_next_locale_h
22841 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22842 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22843 gl_next_as_first_directive='<'locale.h'>'
22845 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22846 gl_next_as_first_directive=$gl_cv_next_locale_h
22848 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22855 for gl_func in setlocale duplocale; do
22856 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22858 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22859 if eval \${$as_gl_Symbol+:} false; then :
22860 $as_echo_n "(cached) " >&6
22862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22863 /* end confdefs.h. */
22864 #include <locale.h>
22865 /* Some systems provide declarations in a non-standard header. */
22867 # include <xlocale.h>
22879 if ac_fn_c_try_compile "$LINENO"; then :
22880 eval "$as_gl_Symbol=yes"
22882 eval "$as_gl_Symbol=no"
22884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22886 eval ac_res=\$$as_gl_Symbol
22887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22888 $as_echo "$ac_res" >&6; }
22889 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22890 cat >>confdefs.h <<_ACEOF
22891 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22894 eval ac_cv_have_decl_$gl_func=yes
22903 if test $REPLACE_STRUCT_LCONV = 1; then
22904 REPLACE_LOCALECONV=1
22907 if test $REPLACE_LOCALECONV = 1; then
22916 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
22919 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
22921 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
22923 cat >>confdefs.h <<_ACEOF
22924 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
22937 GNULIB_LOCALECONV=1
22943 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
22953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22954 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22955 if ${gl_cv_func_lseek_pipe+:} false; then :
22956 $as_echo_n "(cached) " >&6
22960 gl_cv_func_lseek_pipe=no
22963 if test $cross_compiling = no; then
22964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22965 /* end confdefs.h. */
22967 #include <sys/types.h> /* for off_t */
22968 #include <stdio.h> /* for SEEK_CUR */
22970 # include <unistd.h>
22971 #else /* on Windows with MSVC */
22979 /* Exit with success only if stdin is seekable. */
22980 return lseek (0, (off_t)0, SEEK_CUR) < 0;
22986 if ac_fn_c_try_link "$LINENO"; then :
22987 if test -s conftest$ac_exeext \
22988 && ./conftest$ac_exeext < conftest.$ac_ext \
22989 && test 1 = "`echo hi \
22990 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22991 gl_cv_func_lseek_pipe=yes
22993 gl_cv_func_lseek_pipe=no
22997 gl_cv_func_lseek_pipe=no
22999 rm -f core conftest.err conftest.$ac_objext \
23000 conftest$ac_exeext conftest.$ac_ext
23002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23003 /* end confdefs.h. */
23005 #if defined __BEOS__
23006 /* BeOS mistakenly return 0 when trying to seek on pipes. */
23010 if ac_fn_c_try_compile "$LINENO"; then :
23011 gl_cv_func_lseek_pipe=yes
23013 gl_cv_func_lseek_pipe=no
23015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
23022 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
23023 if test $gl_cv_func_lseek_pipe = no; then
23026 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
23031 if test $WINDOWS_64_BIT_OFF_T = 1; then
23035 if test $REPLACE_LSEEK = 1; then
23044 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
23058 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
23065 if test $ac_cv_func_lstat = yes; then
23067 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
23076 if test $REPLACE_LSTAT = 1; then
23085 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
23100 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23107 for ac_header in stdlib.h
23109 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
23110 if test "x$ac_cv_header_stdlib_h" = xyes; then :
23111 cat >>confdefs.h <<_ACEOF
23112 #define HAVE_STDLIB_H 1
23119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
23120 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
23121 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
23122 $as_echo_n "(cached) " >&6
23124 if test "$cross_compiling" = yes; then :
23126 # Guess yes on platforms where we know the result.
23127 *-gnu* | freebsd* | netbsd* | openbsd* \
23128 | hpux* | solaris* | cygwin* | mingw*)
23129 ac_cv_func_malloc_0_nonnull=yes ;;
23130 # If we don't know, assume the worst.
23131 *) ac_cv_func_malloc_0_nonnull=no ;;
23135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23136 /* end confdefs.h. */
23137 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
23138 # include <stdlib.h>
23146 return ! malloc (0);
23152 if ac_fn_c_try_run "$LINENO"; then :
23153 ac_cv_func_malloc_0_nonnull=yes
23155 ac_cv_func_malloc_0_nonnull=no
23157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23158 conftest.$ac_objext conftest.beam conftest.$ac_ext
23163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
23164 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
23165 if test $ac_cv_func_malloc_0_nonnull = yes; then :
23167 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
23170 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
23177 if test $REPLACE_MALLOC = 1; then
23186 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23191 cat >>confdefs.h <<_ACEOF
23192 #define GNULIB_MALLOC_GNU 1
23199 if test $gl_cv_func_malloc_posix = yes; then
23201 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23207 if test $REPLACE_MALLOC = 1; then
23216 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
23224 GNULIB_MALLOC_POSIX=1
23230 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23251 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23256 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23257 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23258 $as_echo_n "(cached) " >&6
23262 # Guess no on AIX and OSF/1.
23263 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23264 # Guess yes otherwise.
23265 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23267 if test $LOCALE_JA != none; then
23268 if test "$cross_compiling" = yes; then :
23271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23272 /* end confdefs.h. */
23274 #include <locale.h>
23275 #include <string.h>
23276 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23278 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23279 included before <wchar.h>. */
23280 #include <stddef.h>
23286 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23288 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23292 memset (&state, '\0', sizeof (mbstate_t));
23293 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23294 if (mbsinit (&state))
23300 if ac_fn_c_try_run "$LINENO"; then :
23301 gl_cv_func_mbrtowc_incomplete_state=yes
23303 gl_cv_func_mbrtowc_incomplete_state=no
23305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23306 conftest.$ac_objext conftest.beam conftest.$ac_ext
23312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23313 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23319 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23320 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23321 $as_echo_n "(cached) " >&6
23325 # Guess no on Solaris 8.
23326 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23327 # Guess yes otherwise.
23328 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23330 if test $LOCALE_ZH_CN != none; then
23331 if test "$cross_compiling" = yes; then :
23334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23335 /* end confdefs.h. */
23337 #include <locale.h>
23338 #include <stdlib.h>
23339 #include <string.h>
23340 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23342 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23343 included before <wchar.h>. */
23344 #include <stddef.h>
23350 /* This fails on Solaris 8:
23351 mbrtowc returns 2, and sets wc to 0x00F0.
23352 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23353 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23355 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23359 memset (&state, '\0', sizeof (mbstate_t));
23360 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23361 && mbtowc (&wc, input + 3, 6) == 4)
23367 if ac_fn_c_try_run "$LINENO"; then :
23368 gl_cv_func_mbrtowc_sanitycheck=yes
23370 gl_cv_func_mbrtowc_sanitycheck=no
23372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23373 conftest.$ac_objext conftest.beam conftest.$ac_ext
23379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23380 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23382 REPLACE_MBSTATE_T=0
23383 case "$gl_cv_func_mbrtowc_incomplete_state" in
23385 *) REPLACE_MBSTATE_T=1 ;;
23387 case "$gl_cv_func_mbrtowc_sanitycheck" in
23389 *) REPLACE_MBSTATE_T=1 ;;
23392 REPLACE_MBSTATE_T=1
23397 if test $ac_cv_func_mbrtowc = no; then
23399 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
23400 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23402 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23403 included before <wchar.h>. */
23404 #include <stddef.h>
23410 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
23416 cat >>confdefs.h <<_ACEOF
23417 #define HAVE_DECL_MBRTOWC $ac_have_decl
23420 if test $ac_cv_have_decl_mbrtowc = yes; then
23424 if test $REPLACE_MBSTATE_T = 1; then
23430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
23431 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
23432 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
23433 $as_echo_n "(cached) " >&6
23437 # Guess no on Solaris.
23438 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
23439 # Guess yes otherwise.
23440 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
23442 if test $LOCALE_FR_UTF8 != none; then
23443 if test "$cross_compiling" = yes; then :
23446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23447 /* end confdefs.h. */
23449 #include <locale.h>
23450 #include <stdlib.h>
23451 #include <string.h>
23452 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23454 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23455 included before <wchar.h>. */
23456 #include <stddef.h>
23464 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23466 char input[] = "\303\237er";
23471 memset (&state, '\0', sizeof (mbstate_t));
23472 wc = (wchar_t) 0xBADFACE;
23473 ret = mbrtowc (&wc, input, 5, &state);
23476 if (!mbsinit (&state))
23479 memset (&state, '\0', sizeof (mbstate_t));
23480 ret = mbrtowc (NULL, input, 5, &state);
23481 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
23483 if (!mbsinit (&state))
23489 if ac_fn_c_try_run "$LINENO"; then :
23490 gl_cv_func_mbrtowc_null_arg1=yes
23492 gl_cv_func_mbrtowc_null_arg1=no
23494 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23495 conftest.$ac_objext conftest.beam conftest.$ac_ext
23501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
23502 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
23507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
23508 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
23509 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
23510 $as_echo_n "(cached) " >&6
23514 # Guess no on OSF/1.
23515 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
23516 # Guess yes otherwise.
23517 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
23519 if test $LOCALE_FR_UTF8 != none; then
23520 if test "$cross_compiling" = yes; then :
23523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23524 /* end confdefs.h. */
23526 #include <locale.h>
23527 #include <string.h>
23528 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23530 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23531 included before <wchar.h>. */
23532 #include <stddef.h>
23538 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23544 memset (&state, '\0', sizeof (mbstate_t));
23545 wc = (wchar_t) 0xBADFACE;
23546 mbrtowc (&wc, NULL, 5, &state);
23547 /* Check that wc was not modified. */
23548 if (wc != (wchar_t) 0xBADFACE)
23554 if ac_fn_c_try_run "$LINENO"; then :
23555 gl_cv_func_mbrtowc_null_arg2=yes
23557 gl_cv_func_mbrtowc_null_arg2=no
23559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23560 conftest.$ac_objext conftest.beam conftest.$ac_ext
23566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
23567 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
23574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
23575 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
23576 if ${gl_cv_func_mbrtowc_retval+:} false; then :
23577 $as_echo_n "(cached) " >&6
23581 # Guess no on HP-UX, Solaris, native Windows.
23582 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
23583 # Guess yes otherwise.
23584 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
23586 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
23587 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
23588 if test "$cross_compiling" = yes; then :
23591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23592 /* end confdefs.h. */
23594 #include <locale.h>
23595 #include <string.h>
23596 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23598 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23599 included before <wchar.h>. */
23600 #include <stddef.h>
23607 int found_some_locale = 0;
23608 /* This fails on Solaris. */
23609 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23611 char input[] = "B\303\274\303\237er"; /* "Büßer" */
23615 memset (&state, '\0', sizeof (mbstate_t));
23616 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23619 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23622 found_some_locale = 1;
23624 /* This fails on HP-UX 11.11. */
23625 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23627 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23631 memset (&state, '\0', sizeof (mbstate_t));
23632 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23635 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23638 found_some_locale = 1;
23640 /* This fails on native Windows. */
23641 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23643 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23647 memset (&state, '\0', sizeof (mbstate_t));
23648 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23651 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23654 found_some_locale = 1;
23656 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23658 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23662 memset (&state, '\0', sizeof (mbstate_t));
23663 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23666 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23669 found_some_locale = 1;
23671 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23673 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23677 memset (&state, '\0', sizeof (mbstate_t));
23678 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23681 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23684 found_some_locale = 1;
23686 return (found_some_locale ? result : 77);
23689 if ac_fn_c_try_run "$LINENO"; then :
23690 gl_cv_func_mbrtowc_retval=yes
23692 if test $? != 77; then
23693 gl_cv_func_mbrtowc_retval=no
23697 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23698 conftest.$ac_objext conftest.beam conftest.$ac_ext
23704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23705 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23711 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23712 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23713 $as_echo_n "(cached) " >&6
23717 # Guess no on Solaris 8 and 9.
23718 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23719 # Guess yes otherwise.
23720 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23722 if test $LOCALE_ZH_CN != none; then
23723 if test "$cross_compiling" = yes; then :
23726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23727 /* end confdefs.h. */
23729 #include <locale.h>
23730 #include <string.h>
23731 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23733 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23734 included before <wchar.h>. */
23735 #include <stddef.h>
23741 /* This fails on Solaris 8 and 9. */
23742 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23747 memset (&state, '\0', sizeof (mbstate_t));
23748 if (mbrtowc (&wc, "", 1, &state) != 0)
23754 if ac_fn_c_try_run "$LINENO"; then :
23755 gl_cv_func_mbrtowc_nul_retval=yes
23757 gl_cv_func_mbrtowc_nul_retval=no
23759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23760 conftest.$ac_objext conftest.beam conftest.$ac_ext
23766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23767 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23769 case "$gl_cv_func_mbrtowc_null_arg1" in
23772 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23777 case "$gl_cv_func_mbrtowc_null_arg2" in
23780 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23785 case "$gl_cv_func_mbrtowc_retval" in
23788 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23793 case "$gl_cv_func_mbrtowc_nul_retval" in
23796 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23804 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23813 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23830 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23839 GNULIB_MBSCASECMP=1
23845 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
23860 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23865 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23866 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23867 $as_echo_n "(cached) " >&6
23871 # Guess no on AIX and OSF/1.
23872 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23873 # Guess yes otherwise.
23874 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23876 if test $LOCALE_JA != none; then
23877 if test "$cross_compiling" = yes; then :
23880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23881 /* end confdefs.h. */
23883 #include <locale.h>
23884 #include <string.h>
23885 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23887 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23888 included before <wchar.h>. */
23889 #include <stddef.h>
23895 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23897 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23901 memset (&state, '\0', sizeof (mbstate_t));
23902 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23903 if (mbsinit (&state))
23909 if ac_fn_c_try_run "$LINENO"; then :
23910 gl_cv_func_mbrtowc_incomplete_state=yes
23912 gl_cv_func_mbrtowc_incomplete_state=no
23914 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23915 conftest.$ac_objext conftest.beam conftest.$ac_ext
23921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23922 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23928 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23929 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23930 $as_echo_n "(cached) " >&6
23934 # Guess no on Solaris 8.
23935 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23936 # Guess yes otherwise.
23937 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23939 if test $LOCALE_ZH_CN != none; then
23940 if test "$cross_compiling" = yes; then :
23943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23944 /* end confdefs.h. */
23946 #include <locale.h>
23947 #include <stdlib.h>
23948 #include <string.h>
23949 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23951 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23952 included before <wchar.h>. */
23953 #include <stddef.h>
23959 /* This fails on Solaris 8:
23960 mbrtowc returns 2, and sets wc to 0x00F0.
23961 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23962 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23964 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23968 memset (&state, '\0', sizeof (mbstate_t));
23969 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23970 && mbtowc (&wc, input + 3, 6) == 4)
23976 if ac_fn_c_try_run "$LINENO"; then :
23977 gl_cv_func_mbrtowc_sanitycheck=yes
23979 gl_cv_func_mbrtowc_sanitycheck=no
23981 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23982 conftest.$ac_objext conftest.beam conftest.$ac_ext
23988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23989 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23991 REPLACE_MBSTATE_T=0
23992 case "$gl_cv_func_mbrtowc_incomplete_state" in
23994 *) REPLACE_MBSTATE_T=1 ;;
23996 case "$gl_cv_func_mbrtowc_sanitycheck" in
23998 *) REPLACE_MBSTATE_T=1 ;;
24001 REPLACE_MBSTATE_T=1
24006 if test $ac_cv_func_mbsinit = no; then
24008 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
24009 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24011 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24012 included before <wchar.h>. */
24013 #include <stddef.h>
24019 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
24025 cat >>confdefs.h <<_ACEOF
24026 #define HAVE_DECL_MBSINIT $ac_have_decl
24029 if test $ac_cv_have_decl_mbsinit = yes; then
24033 if test $REPLACE_MBSTATE_T = 1; then
24037 mingw*) REPLACE_MBSINIT=1 ;;
24042 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
24051 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
24068 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
24082 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
24086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24087 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24088 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
24089 $as_echo_n "(cached) " >&6
24093 # Guess no on AIX and OSF/1.
24094 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
24095 # Guess yes otherwise.
24096 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
24098 if test $LOCALE_JA != none; then
24099 if test "$cross_compiling" = yes; then :
24102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24103 /* end confdefs.h. */
24105 #include <locale.h>
24106 #include <string.h>
24107 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24109 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24110 included before <wchar.h>. */
24111 #include <stddef.h>
24117 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24119 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24123 memset (&state, '\0', sizeof (mbstate_t));
24124 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24125 if (mbsinit (&state))
24131 if ac_fn_c_try_run "$LINENO"; then :
24132 gl_cv_func_mbrtowc_incomplete_state=yes
24134 gl_cv_func_mbrtowc_incomplete_state=no
24136 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24137 conftest.$ac_objext conftest.beam conftest.$ac_ext
24143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
24144 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
24149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
24150 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
24151 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
24152 $as_echo_n "(cached) " >&6
24156 # Guess no on Solaris 8.
24157 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
24158 # Guess yes otherwise.
24159 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
24161 if test $LOCALE_ZH_CN != none; then
24162 if test "$cross_compiling" = yes; then :
24165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24166 /* end confdefs.h. */
24168 #include <locale.h>
24169 #include <stdlib.h>
24170 #include <string.h>
24171 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24173 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24174 included before <wchar.h>. */
24175 #include <stddef.h>
24181 /* This fails on Solaris 8:
24182 mbrtowc returns 2, and sets wc to 0x00F0.
24183 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24184 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24186 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24190 memset (&state, '\0', sizeof (mbstate_t));
24191 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24192 && mbtowc (&wc, input + 3, 6) == 4)
24198 if ac_fn_c_try_run "$LINENO"; then :
24199 gl_cv_func_mbrtowc_sanitycheck=yes
24201 gl_cv_func_mbrtowc_sanitycheck=no
24203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24204 conftest.$ac_objext conftest.beam conftest.$ac_ext
24210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24211 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24213 REPLACE_MBSTATE_T=0
24214 case "$gl_cv_func_mbrtowc_incomplete_state" in
24216 *) REPLACE_MBSTATE_T=1 ;;
24218 case "$gl_cv_func_mbrtowc_sanitycheck" in
24220 *) REPLACE_MBSTATE_T=1 ;;
24223 REPLACE_MBSTATE_T=1
24228 if test $ac_cv_func_mbsrtowcs = no; then
24230 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
24231 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24233 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24234 included before <wchar.h>. */
24235 #include <stddef.h>
24241 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
24247 cat >>confdefs.h <<_ACEOF
24248 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
24251 if test $ac_cv_have_decl_mbsrtowcs = yes; then
24252 REPLACE_MBSRTOWCS=1
24255 if test $REPLACE_MBSTATE_T = 1; then
24256 REPLACE_MBSRTOWCS=1
24264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
24265 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
24266 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
24267 $as_echo_n "(cached) " >&6
24271 # Guess no on HP-UX, Solaris, mingw.
24272 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
24273 # Guess yes otherwise.
24274 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
24276 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
24277 if test "$cross_compiling" = yes; then :
24280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24281 /* end confdefs.h. */
24283 #include <locale.h>
24284 #include <string.h>
24285 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
24287 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
24288 included before <wchar.h>. */
24289 #include <stddef.h>
24296 /* Test whether the function supports a NULL destination argument.
24297 This fails on native Windows. */
24298 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
24300 const char input[] = "\337er";
24301 const char *src = input;
24304 memset (&state, '\0', sizeof (mbstate_t));
24305 if (mbsrtowcs (NULL, &src, 1, &state) != 3
24309 /* Test whether the function works when started with a conversion state
24310 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
24311 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24313 const char input[] = "B\303\274\303\237er";
24316 memset (&state, '\0', sizeof (mbstate_t));
24317 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24318 if (!mbsinit (&state))
24320 const char *src = input + 2;
24321 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24325 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24327 const char input[] = "<\306\374\313\334\270\354>";
24330 memset (&state, '\0', sizeof (mbstate_t));
24331 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
24332 if (!mbsinit (&state))
24334 const char *src = input + 4;
24335 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
24339 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24341 const char input[] = "B\250\271\201\060\211\070er";
24344 memset (&state, '\0', sizeof (mbstate_t));
24345 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
24346 if (!mbsinit (&state))
24348 const char *src = input + 2;
24349 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
24356 if ac_fn_c_try_run "$LINENO"; then :
24357 gl_cv_func_mbsrtowcs_works=yes
24359 gl_cv_func_mbsrtowcs_works=no
24361 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24362 conftest.$ac_objext conftest.beam conftest.$ac_ext
24368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
24369 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
24371 case "$gl_cv_func_mbsrtowcs_works" in
24373 *) REPLACE_MBSRTOWCS=1 ;;
24378 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
24387 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
24397 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
24414 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
24425 if test $REPLACE_MBTOWC = 1; then
24434 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
24451 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
24460 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
24469 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
24472 for ac_header in bp-sym.h
24474 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
24475 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
24476 cat >>confdefs.h <<_ACEOF
24477 #define HAVE_BP_SYM_H 1
24497 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
24507 for ac_func in mempcpy
24509 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
24510 if test "x$ac_cv_func_mempcpy" = xyes; then :
24511 cat >>confdefs.h <<_ACEOF
24512 #define HAVE_MEMPCPY 1
24518 if test $ac_cv_func_mempcpy = no; then
24522 if test $HAVE_MEMPCPY = 0; then
24531 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
24548 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
24557 if test $ac_cv_have_decl_memrchr = no; then
24558 HAVE_DECL_MEMRCHR=0
24561 for ac_func in memrchr
24563 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
24564 if test "x$ac_cv_func_memrchr" = xyes; then :
24565 cat >>confdefs.h <<_ACEOF
24566 #define HAVE_MEMRCHR 1
24573 if test $ac_cv_func_memrchr = no; then
24582 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
24597 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24604 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24605 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24606 $as_echo_n "(cached) " >&6
24608 rm -rf conftest.dir
24609 if test "$cross_compiling" = yes; then :
24611 # Guess yes on glibc systems.
24612 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24613 # If we don't know, assume the worst.
24614 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
24618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24619 /* end confdefs.h. */
24621 # include <sys/types.h>
24622 # include <sys/stat.h>
24627 return mkdir ("conftest.dir/", 0700);
24632 if ac_fn_c_try_run "$LINENO"; then :
24633 gl_cv_func_mkdir_trailing_slash_works=yes
24635 gl_cv_func_mkdir_trailing_slash_works=no
24637 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24638 conftest.$ac_objext conftest.beam conftest.$ac_ext
24641 rm -rf conftest.dir
24645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24646 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24647 case "$gl_cv_func_mkdir_trailing_slash_works" in
24654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24655 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24656 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24657 $as_echo_n "(cached) " >&6
24659 rm -rf conftest.dir
24660 if test "$cross_compiling" = yes; then :
24662 # Guess yes on glibc systems.
24663 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24664 # If we don't know, assume the worst.
24665 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24670 /* end confdefs.h. */
24672 # include <sys/types.h>
24673 # include <sys/stat.h>
24678 return !mkdir ("conftest.dir/./", 0700);
24683 if ac_fn_c_try_run "$LINENO"; then :
24684 gl_cv_func_mkdir_trailing_dot_works=yes
24686 gl_cv_func_mkdir_trailing_dot_works=no
24688 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24689 conftest.$ac_objext conftest.beam conftest.$ac_ext
24692 rm -rf conftest.dir
24696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24697 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24698 case "$gl_cv_func_mkdir_trailing_dot_works" in
24703 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24708 if test $REPLACE_MKDIR = 1; then
24717 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24724 if test $ac_cv_func_mkdirat != yes; then
24728 if test $HAVE_MKDIRAT = 0; then
24737 gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
24754 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
24760 for ac_func in mkdtemp
24762 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24763 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24764 cat >>confdefs.h <<_ACEOF
24765 #define HAVE_MKDTEMP 1
24771 if test $ac_cv_func_mkdtemp = no; then
24775 if test $HAVE_MKDTEMP = 0; then
24784 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24800 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24807 if test $ac_cv_func_mkfifo = no; then
24811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
24812 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
24813 if ${gl_cv_func_mkfifo_works+:} false; then :
24814 $as_echo_n "(cached) " >&6
24816 # Assume that if we have lstat, we can also check symlinks.
24817 if test $ac_cv_func_lstat = yes; then
24818 ln -s conftest.tmp conftest.lnk
24820 if test "$cross_compiling" = yes; then :
24822 # Guess yes on glibc systems.
24823 *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
24824 # If we don't know, assume the worst.
24825 *) gl_cv_func_mkfifo_works="guessing no" ;;
24829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24830 /* end confdefs.h. */
24831 #include <sys/stat.h>
24837 if (!mkfifo ("conftest.tmp/", 0600))
24840 if (!mkfifo ("conftest.lnk/", 0600))
24849 if ac_fn_c_try_run "$LINENO"; then :
24850 gl_cv_func_mkfifo_works=yes
24852 gl_cv_func_mkfifo_works=no
24854 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24855 conftest.$ac_objext conftest.beam conftest.$ac_ext
24858 rm -f conftest.tmp conftest.lnk
24860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
24861 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
24862 case "$gl_cv_func_mkfifo_works" in
24866 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
24873 if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
24882 gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
24896 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
24905 if test $ac_cv_func_mkfifoat = no; then
24906 # No known system has mkfifoat but not mknodat
24911 if test $HAVE_MKFIFOAT = 0; then
24920 gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
24923 if test $HAVE_MKNODAT = 0; then
24932 gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
24946 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
24961 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
24970 if test $ac_cv_func_mknod = no; then
24973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
24974 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
24975 if ${gl_cv_func_mknod_works+:} false; then :
24976 $as_echo_n "(cached) " >&6
24978 if test "$cross_compiling" = yes; then :
24980 # Guess yes on glibc systems.
24981 *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
24982 # If we don't know, assume the worst.
24983 *) gl_cv_func_mknod_works="guessing no" ;;
24987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24988 /* end confdefs.h. */
24989 #include <sys/stat.h>
24990 #include <unistd.h>
24992 /* Copied from root-uid.h. FIXME: Just use root-uid.h. */
24994 # define ROOT_UID 65535
24996 # define ROOT_UID 0
25002 /* Indeterminate for super-user, assume no. Why are you running
25003 configure as root, anyway? */
25004 if (geteuid () == ROOT_UID) return 99;
25005 if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
25010 if ac_fn_c_try_run "$LINENO"; then :
25011 gl_cv_func_mknod_works=yes
25013 if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
25014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25015 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25016 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
25017 See \`config.log' for more details" "$LINENO" 5; }
25019 gl_cv_func_mknod_works=no
25021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25022 conftest.$ac_objext conftest.beam conftest.$ac_ext
25025 rm -f conftest.fifo
25027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
25028 $as_echo "$gl_cv_func_mknod_works" >&6; }
25029 case "$gl_cv_func_mknod_works" in
25034 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
25038 if test $REPLACE_MKFIFO = 1; then
25043 if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
25052 gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
25066 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
25076 if test $APPLE_UNIVERSAL_BUILD = 1; then
25077 # A universal build on Apple Mac OS X platforms.
25078 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
25079 # But we need a configuration result that is valid in both modes.
25080 gl_cv_func_working_mktime=no
25082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
25083 $as_echo_n "checking for working mktime... " >&6; }
25084 if ${gl_cv_func_working_mktime+:} false; then :
25085 $as_echo_n "(cached) " >&6
25087 if test "$cross_compiling" = yes; then :
25088 gl_cv_func_working_mktime=no
25090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25091 /* end confdefs.h. */
25092 /* Test program from Paul Eggert and Tony Leneis. */
25093 #include <limits.h>
25094 #include <stdlib.h>
25097 #ifdef HAVE_UNISTD_H
25098 # include <unistd.h>
25101 #if HAVE_DECL_ALARM
25102 # include <signal.h>
25105 /* Work around redefinition to rpl_putenv by other config tests. */
25108 static time_t time_t_max;
25109 static time_t time_t_min;
25111 /* Values we'll use to set the TZ environment variable. */
25112 static char *tz_strings[] = {
25113 (char *) 0, "TZ=GMT0", "TZ=JST-9",
25114 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
25116 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
25118 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
25119 Based on a problem report from Andreas Jaeger. */
25121 spring_forward_gap ()
25123 /* glibc (up to about 1998-10-07) failed this test. */
25126 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25127 instead of "TZ=America/Vancouver" in order to detect the bug even
25128 on systems that don't support the Olson extension, or don't have the
25129 full zoneinfo tables installed. */
25130 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25139 return mktime (&tm) != (time_t) -1;
25143 mktime_test1 (time_t now)
25146 return ! (lt = localtime (&now)) || mktime (lt) == now;
25150 mktime_test (time_t now)
25152 return (mktime_test1 (now)
25153 && mktime_test1 ((time_t) (time_t_max - now))
25154 && mktime_test1 ((time_t) (time_t_min + now)));
25160 /* Based on code from Ariel Faigon. */
25170 return tm.tm_mon == 2 && tm.tm_mday == 31;
25174 bigtime_test (int j)
25178 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
25179 now = mktime (&tm);
25180 if (now != (time_t) -1)
25182 struct tm *lt = localtime (&now);
25184 && lt->tm_year == tm.tm_year
25185 && lt->tm_mon == tm.tm_mon
25186 && lt->tm_mday == tm.tm_mday
25187 && lt->tm_hour == tm.tm_hour
25188 && lt->tm_min == tm.tm_min
25189 && lt->tm_sec == tm.tm_sec
25190 && lt->tm_yday == tm.tm_yday
25191 && lt->tm_wday == tm.tm_wday
25192 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
25193 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
25202 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
25203 ignoring leap seconds. */
25204 unsigned long int answer = 2527315200UL;
25208 tm.tm_year = 2050 - 1900;
25211 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
25214 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
25215 instead of "TZ=America/Vancouver" in order to detect the bug even
25216 on systems that don't support the Olson extension, or don't have the
25217 full zoneinfo tables installed. */
25218 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
25222 /* Check that the result is either a failure, or close enough
25223 to the correct answer that we can assume the discrepancy is
25224 due to leap seconds. */
25225 return (t == (time_t) -1
25226 || (0 < t && answer - 120 <= t && t <= answer + 120));
25235 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
25236 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
25238 #if HAVE_DECL_ALARM
25239 /* This test makes some buggy mktime implementations loop.
25240 Give up after 60 seconds; a mktime slower than that
25241 isn't worth using anyway. */
25242 signal (SIGALRM, SIG_DFL);
25246 time_t_max = (! time_t_signed
25248 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
25250 time_t_min = (! time_t_signed
25252 : time_t_signed_magnitude
25256 delta = time_t_max / 997; /* a suitable prime number */
25257 for (i = 0; i < N_STRINGS; i++)
25260 putenv (tz_strings[i]);
25262 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
25263 if (! mktime_test (t))
25265 if ((result & 2) == 0
25266 && ! (mktime_test ((time_t) 1)
25267 && mktime_test ((time_t) (60 * 60))
25268 && mktime_test ((time_t) (60 * 60 * 24))))
25271 for (j = 1; (result & 4) == 0; j <<= 1)
25273 if (! bigtime_test (j))
25275 if (INT_MAX / 2 < j)
25278 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
25281 if (! irix_6_4_bug ())
25283 if (! spring_forward_gap ())
25285 if (! year_2050_test ())
25290 if ac_fn_c_try_run "$LINENO"; then :
25291 gl_cv_func_working_mktime=yes
25293 gl_cv_func_working_mktime=no
25295 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25296 conftest.$ac_objext conftest.beam conftest.$ac_ext
25301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
25302 $as_echo "$gl_cv_func_working_mktime" >&6; }
25304 if test $gl_cv_func_working_mktime = no; then
25310 if test $REPLACE_MKTIME = 1; then
25319 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
25334 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
25343 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
25344 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
25346 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
25349 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
25353 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25362 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
25368 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25377 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
25385 if test $ac_cv_func_nl_langinfo = yes; then
25386 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
25387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
25388 $as_echo_n "checking whether YESEXPR works... " >&6; }
25389 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
25390 $as_echo_n "(cached) " >&6
25392 if test "$cross_compiling" = yes; then :
25395 # Guess no on irix systems.
25396 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
25397 # Guess yes elsewhere.
25398 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
25402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25403 /* end confdefs.h. */
25404 #include <langinfo.h>
25409 return !*nl_langinfo(YESEXPR);
25415 if ac_fn_c_try_run "$LINENO"; then :
25416 gl_cv_func_nl_langinfo_yesexpr_works=yes
25418 gl_cv_func_nl_langinfo_yesexpr_works=no
25420 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25421 conftest.$ac_objext conftest.beam conftest.$ac_ext
25426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
25427 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
25428 case $gl_cv_func_nl_langinfo_yesexpr_works in
25429 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
25430 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
25433 cat >>confdefs.h <<_ACEOF
25434 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
25437 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
25438 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
25441 REPLACE_NL_LANGINFO=1
25443 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
25450 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
25459 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
25467 GNULIB_NL_LANGINFO=1
25473 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
25489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
25490 $as_echo_n "checking for obstacks... " >&6; }
25491 if ${ac_cv_func_obstack+:} false; then :
25492 $as_echo_n "(cached) " >&6
25494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25495 /* end confdefs.h. */
25496 $ac_includes_default
25497 #include "obstack.h"
25501 struct obstack mem;
25502 #define obstack_chunk_alloc malloc
25503 #define obstack_chunk_free free
25504 obstack_init (&mem);
25505 obstack_free (&mem, 0);
25510 if ac_fn_c_try_link "$LINENO"; then :
25511 ac_cv_func_obstack=yes
25513 ac_cv_func_obstack=no
25515 rm -f core conftest.err conftest.$ac_objext \
25516 conftest$ac_exeext conftest.$ac_ext
25518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
25519 $as_echo "$ac_cv_func_obstack" >&6; }
25520 if test $ac_cv_func_obstack = yes; then
25522 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
25533 gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
25545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
25546 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
25547 if ${gl_cv_func_open_slash+:} false; then :
25548 $as_echo_n "(cached) " >&6
25550 # Assume that if we have lstat, we can also check symlinks.
25551 if test $ac_cv_func_lstat = yes; then
25553 ln -s conftest.tmp conftest.lnk
25555 if test "$cross_compiling" = yes; then :
25558 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
25559 gl_cv_func_open_slash="guessing no" ;;
25561 gl_cv_func_open_slash="guessing yes" ;;
25565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25566 /* end confdefs.h. */
25570 # include <unistd.h>
25576 if (open ("conftest.lnk/", O_RDONLY) != -1)
25579 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
25584 if ac_fn_c_try_run "$LINENO"; then :
25585 gl_cv_func_open_slash=yes
25587 gl_cv_func_open_slash=no
25589 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25590 conftest.$ac_objext conftest.beam conftest.$ac_ext
25593 rm -f conftest.sl conftest.tmp conftest.lnk
25596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
25597 $as_echo "$gl_cv_func_open_slash" >&6; }
25598 case "$gl_cv_func_open_slash" in
25601 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25609 if test $REPLACE_OPEN = 0; then
25613 if test $ac_cv_func_fchdir = no; then
25617 if test $HAVE_FCHDIR = 0; then
25624 if test $REPLACE_OPEN = 1; then
25633 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25651 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25660 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
25664 # Solaris 9 has *at functions, but uniformly mishandles trailing
25665 # slash in all of them.
25673 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25682 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25691 cat >>confdefs.h <<_ACEOF
25692 #define GNULIB_OPENAT 1
25706 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25713 for ac_func in opendir
25715 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25716 if test "x$ac_cv_func_opendir" = xyes; then :
25717 cat >>confdefs.h <<_ACEOF
25718 #define HAVE_OPENDIR 1
25724 if test $ac_cv_func_opendir = no; then
25731 if test $ac_cv_func_fchdir = no; then
25735 if test $HAVE_FCHDIR = 0; then
25736 if test $HAVE_OPENDIR = 1; then
25742 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25751 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25765 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25775 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
25776 #include <$ac_cv_struct_tm>
25779 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
25781 cat >>confdefs.h <<_ACEOF
25782 #define HAVE_STRUCT_TM_TM_ZONE 1
25788 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25790 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
25793 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
25795 if test "x$ac_cv_have_decl_tzname" = xyes; then :
25801 cat >>confdefs.h <<_ACEOF
25802 #define HAVE_DECL_TZNAME $ac_have_decl
25805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
25806 $as_echo_n "checking for tzname... " >&6; }
25807 if ${ac_cv_var_tzname+:} false; then :
25808 $as_echo_n "(cached) " >&6
25810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25811 /* end confdefs.h. */
25813 #if !HAVE_DECL_TZNAME
25814 extern char *tzname[];
25820 return tzname[0][0];
25825 if ac_fn_c_try_link "$LINENO"; then :
25826 ac_cv_var_tzname=yes
25828 ac_cv_var_tzname=no
25830 rm -f core conftest.err conftest.$ac_objext \
25831 conftest$ac_exeext conftest.$ac_ext
25833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
25834 $as_echo "$ac_cv_var_tzname" >&6; }
25835 if test $ac_cv_var_tzname = yes; then
25837 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
25844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25845 /* end confdefs.h. */
25847 #include <time.h> /* for time_t */
25848 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
25849 #define TYPE_MINIMUM(t) \
25850 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
25851 #define TYPE_MAXIMUM(t) \
25852 ((t) ((t) 0 < (t) -1 \
25854 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
25855 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
25856 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
25859 if ac_fn_c_try_compile "$LINENO"; then :
25861 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
25865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25876 if test $ac_cv_func_posix_openpt != yes; then
25877 HAVE_POSIX_OPENPT=0
25880 if test $HAVE_POSIX_OPENPT = 0; then
25889 gl_LIBOBJS="$gl_LIBOBJS posix_openpt.$ac_objext"
25897 GNULIB_POSIX_OPENPT=1
25903 $as_echo "#define GNULIB_TEST_POSIX_OPENPT 1" >>confdefs.h
25908 for ac_func in getppriv
25910 ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
25911 if test "x$ac_cv_func_getppriv" = xyes; then :
25912 cat >>confdefs.h <<_ACEOF
25913 #define HAVE_GETPPRIV 1
25921 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25923 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
25929 cat >>confdefs.h <<_ACEOF
25930 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
25933 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25935 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
25941 cat >>confdefs.h <<_ACEOF
25942 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
25950 for ac_func in ptsname
25952 ac_fn_c_check_func "$LINENO" "ptsname" "ac_cv_func_ptsname"
25953 if test "x$ac_cv_func_ptsname" = xyes; then :
25954 cat >>confdefs.h <<_ACEOF
25955 #define HAVE_PTSNAME 1
25961 if test $ac_cv_func_ptsname = no; then
25964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname sets errno on failure" >&5
25965 $as_echo_n "checking whether ptsname sets errno on failure... " >&6; }
25966 if ${gl_cv_func_ptsname_sets_errno+:} false; then :
25967 $as_echo_n "(cached) " >&6
25969 if test "$cross_compiling" = yes; then :
25971 # Guess yes on glibc systems.
25972 *-gnu*) gl_cv_func_ptsname_sets_errno="guessing yes" ;;
25973 # If we don't know, assume the worst.
25974 *) gl_cv_func_ptsname_sets_errno="guessing no" ;;
25978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25979 /* end confdefs.h. */
25986 return ptsname (-1) || !errno;
25992 if ac_fn_c_try_run "$LINENO"; then :
25993 gl_cv_func_ptsname_sets_errno=yes
25995 gl_cv_func_ptsname_sets_errno=no
25997 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25998 conftest.$ac_objext conftest.beam conftest.$ac_ext
26002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_sets_errno" >&5
26003 $as_echo "$gl_cv_func_ptsname_sets_errno" >&6; }
26004 case $gl_cv_func_ptsname_sets_errno in
26005 *no) REPLACE_PTSNAME=1 ;;
26009 if test $HAVE_PTSNAME = 0 || test $REPLACE_PTSNAME = 1; then
26018 gl_LIBOBJS="$gl_LIBOBJS ptsname.$ac_objext"
26035 $as_echo "#define GNULIB_TEST_PTSNAME 1" >>confdefs.h
26045 if test $ac_cv_func_ptsname_r = no; then
26048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ptsname_r has the same signature as in glibc" >&5
26049 $as_echo_n "checking whether ptsname_r has the same signature as in glibc... " >&6; }
26050 if ${gl_cv_func_ptsname_r_signature_ok+:} false; then :
26051 $as_echo_n "(cached) " >&6
26053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26054 /* end confdefs.h. */
26055 #include <stddef.h>
26056 #include <stdlib.h>
26057 /* Test whether ptsname_r is declared at all. */
26058 int (*f) (int, char *, size_t) = ptsname_r;
26059 /* Test whether it has the same declaration as in glibc. */
26065 int ptsname_r (int, char *, size_t);
26070 return f (0, NULL, 0);
26076 if ac_fn_c_try_compile "$LINENO"; then :
26077 gl_cv_func_ptsname_r_signature_ok=yes
26079 gl_cv_func_ptsname_r_signature_ok=no
26081 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ptsname_r_signature_ok" >&5
26085 $as_echo "$gl_cv_func_ptsname_r_signature_ok" >&6; }
26086 if test $gl_cv_func_ptsname_r_signature_ok = no; then
26087 REPLACE_PTSNAME_R=1
26091 if test $HAVE_PTSNAME_R = 0 || test $REPLACE_PTSNAME_R = 1; then
26100 gl_LIBOBJS="$gl_LIBOBJS ptsname_r.$ac_objext"
26103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isatty sets errno when it fails" >&5
26104 $as_echo_n "checking whether isatty sets errno when it fails... " >&6; }
26105 if ${gl_cv_func_isatty_sets_errno+:} false; then :
26106 $as_echo_n "(cached) " >&6
26108 if test "$cross_compiling" = yes; then :
26110 irix* | solaris* | mingw*)
26111 gl_cv_func_isatty_sets_errno="guessing no";;
26113 gl_cv_func_isatty_sets_errno="guessing yes";;
26117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26118 /* end confdefs.h. */
26120 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
26123 # include <unistd.h>
26138 if ac_fn_c_try_run "$LINENO"; then :
26139 gl_cv_func_isatty_sets_errno=yes
26141 gl_cv_func_isatty_sets_errno=no
26143 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26144 conftest.$ac_objext conftest.beam conftest.$ac_ext
26149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isatty_sets_errno" >&5
26150 $as_echo "$gl_cv_func_isatty_sets_errno" >&6; }
26151 case "$gl_cv_func_isatty_sets_errno" in
26155 $as_echo "#define ISATTY_FAILS_WITHOUT_SETTING_ERRNO 1" >>confdefs.h
26172 $as_echo "#define GNULIB_TEST_PTSNAME_R 1" >>confdefs.h
26177 # Check whether --enable-acl was given.
26178 if test "${enable_acl+set}" = set; then :
26179 enableval=$enable_acl;
26188 if test "x$enable_acl" != "xno"; then
26189 for ac_header in sys/acl.h
26191 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
26192 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
26193 cat >>confdefs.h <<_ACEOF
26194 #define HAVE_SYS_ACL_H 1
26201 if test $ac_cv_header_sys_acl_h = yes; then
26204 if test $use_acl = 0; then
26205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
26206 $as_echo_n "checking for library containing acl_get_file... " >&6; }
26207 if ${ac_cv_search_acl_get_file+:} false; then :
26208 $as_echo_n "(cached) " >&6
26210 ac_func_search_save_LIBS=$LIBS
26211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26212 /* end confdefs.h. */
26214 /* Override any GCC internal prototype to avoid an error.
26215 Use char because int might match the return type of a GCC
26216 builtin and then its argument prototype would still apply. */
26220 char acl_get_file ();
26224 return acl_get_file ();
26229 for ac_lib in '' acl pacl; do
26230 if test -z "$ac_lib"; then
26231 ac_res="none required"
26234 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26236 if ac_fn_c_try_link "$LINENO"; then :
26237 ac_cv_search_acl_get_file=$ac_res
26239 rm -f core conftest.err conftest.$ac_objext \
26241 if ${ac_cv_search_acl_get_file+:} false; then :
26245 if ${ac_cv_search_acl_get_file+:} false; then :
26248 ac_cv_search_acl_get_file=no
26250 rm conftest.$ac_ext
26251 LIBS=$ac_func_search_save_LIBS
26253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
26254 $as_echo "$ac_cv_search_acl_get_file" >&6; }
26255 ac_res=$ac_cv_search_acl_get_file
26256 if test "$ac_res" != no; then :
26257 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26258 if test "$ac_cv_search_acl_get_file" != "none required"; then
26259 LIB_ACL=$ac_cv_search_acl_get_file
26261 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
26262 acl_free acl_from_mode acl_from_text \
26263 acl_delete_def_file acl_extended_file \
26264 acl_delete_fd_np acl_delete_file_np \
26265 acl_copy_ext_native acl_create_entry_np \
26266 acl_to_short_text acl_free_text
26268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
26269 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
26270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
26271 cat >>confdefs.h <<_ACEOF
26272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
26278 # If the acl_get_file bug is detected, don't enable the ACL support.
26280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
26281 $as_echo_n "checking for working acl_get_file... " >&6; }
26282 if ${gl_cv_func_working_acl_get_file+:} false; then :
26283 $as_echo_n "(cached) " >&6
26285 gl_cv_func_working_acl_get_file=no
26286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26287 /* end confdefs.h. */
26288 #include <sys/types.h>
26289 #include <sys/acl.h>
26295 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
26303 if ac_fn_c_try_link "$LINENO"; then :
26304 if test $cross_compiling = yes; then
26305 gl_cv_func_working_acl_get_file="guessing yes"
26306 elif ./conftest$ac_exeext; then
26307 gl_cv_func_working_acl_get_file=yes
26310 rm -f core conftest.err conftest.$ac_objext \
26311 conftest$ac_exeext conftest.$ac_ext
26313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
26314 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
26315 if test "$gl_cv_func_working_acl_get_file" != no; then :
26319 if test $use_acl = 1; then
26320 for ac_header in acl/libacl.h
26322 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
26323 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
26324 cat >>confdefs.h <<_ACEOF
26325 #define HAVE_ACL_LIBACL_H 1
26340 for ac_func in acl_entries
26342 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
26343 if test "x$ac_cv_func_acl_entries" = xyes; then :
26344 cat >>confdefs.h <<_ACEOF
26345 #define HAVE_ACL_ENTRIES 1
26350 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
26356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
26357 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
26358 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
26359 $as_echo_n "(cached) " >&6
26361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26362 /* end confdefs.h. */
26363 #include <sys/types.h>
26364 #include <sys/acl.h>
26365 int type = ACL_FIRST_ENTRY;
26374 if ac_fn_c_try_compile "$LINENO"; then :
26375 gl_cv_acl_ACL_FIRST_ENTRY=yes
26377 gl_cv_acl_ACL_FIRST_ENTRY=no
26379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
26382 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
26383 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
26385 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
26388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
26389 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
26390 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
26391 $as_echo_n "(cached) " >&6
26393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26394 /* end confdefs.h. */
26395 #include <sys/types.h>
26396 #include <sys/acl.h>
26397 int type = ACL_TYPE_EXTENDED;
26406 if ac_fn_c_try_compile "$LINENO"; then :
26407 gl_cv_acl_ACL_TYPE_EXTENDED=yes
26409 gl_cv_acl_ACL_TYPE_EXTENDED=no
26411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
26414 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
26415 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
26417 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
26428 if test $use_acl = 0; then
26429 for ac_func in facl
26431 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
26432 if test "x$ac_cv_func_facl" = xyes; then :
26433 cat >>confdefs.h <<_ACEOF
26434 #define HAVE_FACL 1
26440 if test $ac_cv_func_facl = yes; then
26441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
26442 $as_echo_n "checking for library containing acl_trivial... " >&6; }
26443 if ${ac_cv_search_acl_trivial+:} false; then :
26444 $as_echo_n "(cached) " >&6
26446 ac_func_search_save_LIBS=$LIBS
26447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26448 /* end confdefs.h. */
26450 /* Override any GCC internal prototype to avoid an error.
26451 Use char because int might match the return type of a GCC
26452 builtin and then its argument prototype would still apply. */
26456 char acl_trivial ();
26460 return acl_trivial ();
26465 for ac_lib in '' sec; do
26466 if test -z "$ac_lib"; then
26467 ac_res="none required"
26470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26472 if ac_fn_c_try_link "$LINENO"; then :
26473 ac_cv_search_acl_trivial=$ac_res
26475 rm -f core conftest.err conftest.$ac_objext \
26477 if ${ac_cv_search_acl_trivial+:} false; then :
26481 if ${ac_cv_search_acl_trivial+:} false; then :
26484 ac_cv_search_acl_trivial=no
26486 rm conftest.$ac_ext
26487 LIBS=$ac_func_search_save_LIBS
26489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
26490 $as_echo "$ac_cv_search_acl_trivial" >&6; }
26491 ac_res=$ac_cv_search_acl_trivial
26492 if test "$ac_res" != no; then :
26493 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26494 if test "$ac_cv_search_acl_trivial" != "none required"; then
26495 LIB_ACL=$ac_cv_search_acl_trivial
26500 for ac_func in acl_trivial
26502 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
26503 if test "x$ac_cv_func_acl_trivial" = xyes; then :
26504 cat >>confdefs.h <<_ACEOF
26505 #define HAVE_ACL_TRIVIAL 1
26515 if test $use_acl = 0; then
26516 for ac_func in getacl
26518 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
26519 if test "x$ac_cv_func_getacl" = xyes; then :
26520 cat >>confdefs.h <<_ACEOF
26521 #define HAVE_GETACL 1
26527 if test $ac_cv_func_getacl = yes; then
26530 for ac_header in aclv.h
26532 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
26534 if test "x$ac_cv_header_aclv_h" = xyes; then :
26535 cat >>confdefs.h <<_ACEOF
26536 #define HAVE_ACLV_H 1
26545 if test $use_acl = 0; then
26546 for ac_func in aclx_get
26548 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
26549 if test "x$ac_cv_func_aclx_get" = xyes; then :
26550 cat >>confdefs.h <<_ACEOF
26551 #define HAVE_ACLX_GET 1
26557 if test $ac_cv_func_aclx_get = yes; then
26562 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
26563 for ac_func in statacl
26565 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
26566 if test "x$ac_cv_func_statacl" = xyes; then :
26567 cat >>confdefs.h <<_ACEOF
26568 #define HAVE_STATACL 1
26574 if test $ac_cv_func_statacl = yes; then
26579 if test $use_acl = 0; then
26580 for ac_func in aclsort
26582 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
26583 if test "x$ac_cv_func_aclsort" = xyes; then :
26584 cat >>confdefs.h <<_ACEOF
26585 #define HAVE_ACLSORT 1
26591 if test $ac_cv_func_aclsort = yes; then
26598 if test "x$enable_acl$use_acl" = "xyes0"; then
26599 as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
26600 elif test "x$enable_acl$use_acl" = "xauto0"; then
26601 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
26602 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
26603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
26604 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
26609 cat >>confdefs.h <<_ACEOF
26610 #define USE_ACL $use_acl
26626 for ac_func in raise
26628 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
26629 if test "x$ac_cv_func_raise" = xyes; then :
26630 cat >>confdefs.h <<_ACEOF
26631 #define HAVE_RAISE 1
26637 if test $ac_cv_func_raise = no; then
26640 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26646 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
26655 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
26670 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
26678 for ac_func in rawmemchr
26680 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26681 if test "x$ac_cv_func_rawmemchr" = xyes; then :
26682 cat >>confdefs.h <<_ACEOF
26683 #define HAVE_RAWMEMCHR 1
26689 if test $ac_cv_func_rawmemchr = no; then
26693 if test $HAVE_RAWMEMCHR = 0; then
26702 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
26717 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26724 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26729 if test $REPLACE_READ = 1; then
26738 gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
26753 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
26760 for ac_func in readdir
26762 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
26763 if test "x$ac_cv_func_readdir" = xyes; then :
26764 cat >>confdefs.h <<_ACEOF
26765 #define HAVE_READDIR 1
26771 if test $ac_cv_func_readdir = no; then
26775 if test $HAVE_READDIR = 0; then
26784 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
26798 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
26805 if test $ac_cv_func_readlink = no; then
26808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
26809 $as_echo_n "checking whether readlink signature is correct... " >&6; }
26810 if ${gl_cv_decl_readlink_works+:} false; then :
26811 $as_echo_n "(cached) " >&6
26813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26814 /* end confdefs.h. */
26815 #include <unistd.h>
26816 /* Cause compilation failure if original declaration has wrong type. */
26817 ssize_t readlink (const char *, char *, size_t);
26826 if ac_fn_c_try_compile "$LINENO"; then :
26827 gl_cv_decl_readlink_works=yes
26829 gl_cv_decl_readlink_works=no
26831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
26834 $as_echo "$gl_cv_decl_readlink_works" >&6; }
26835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
26836 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
26837 if ${gl_cv_func_readlink_works+:} false; then :
26838 $as_echo_n "(cached) " >&6
26840 # We have readlink, so assume ln -s works.
26841 ln -s conftest.no-such conftest.link
26842 ln -s conftest.link conftest.lnk2
26843 if test "$cross_compiling" = yes; then :
26845 # Guess yes on glibc systems.
26846 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
26847 # If we don't know, assume the worst.
26848 *) gl_cv_func_readlink_works="guessing no" ;;
26852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26853 /* end confdefs.h. */
26854 #include <unistd.h>
26860 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26865 if ac_fn_c_try_run "$LINENO"; then :
26866 gl_cv_func_readlink_works=yes
26868 gl_cv_func_readlink_works=no
26870 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26871 conftest.$ac_objext conftest.beam conftest.$ac_ext
26874 rm -f conftest.link conftest.lnk2
26876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
26877 $as_echo "$gl_cv_func_readlink_works" >&6; }
26878 case "$gl_cv_func_readlink_works" in
26880 if test "$gl_cv_decl_readlink_works" != yes; then
26886 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26893 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26902 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26919 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26927 if test $ac_cv_func_readlinkat = no; then
26931 if test $HAVE_READLINKAT = 0; then
26940 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26948 GNULIB_READLINKAT=1
26954 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26961 if test $gl_cv_func_malloc_posix = yes; then
26963 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26969 if test $REPLACE_REALLOC = 1; then
26978 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26986 GNULIB_REALLOC_POSIX=1
26992 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26998 # Check whether --with-included-regex was given.
26999 if test "${with_included_regex+set}" = set; then :
27000 withval=$with_included_regex;
27004 case $with_included_regex in #(
27005 yes|no) ac_use_included_regex=$with_included_regex
27008 # If the system regex support is good enough that it passes the
27009 # following run test, then default to *not* using the included regex.c.
27010 # If cross compiling, assume the test would fail and use the included
27014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
27015 $as_echo_n "checking for working re_compile_pattern... " >&6; }
27016 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
27017 $as_echo_n "(cached) " >&6
27019 if test "$cross_compiling" = yes; then :
27020 gl_cv_func_re_compile_pattern_working=no
27022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27023 /* end confdefs.h. */
27026 #include <locale.h>
27027 #include <limits.h>
27028 #include <string.h>
27030 #if defined M_CHECK_ACTION || HAVE_DECL_ALARM
27031 # include <signal.h>
27032 # include <unistd.h>
27036 # include <malloc.h>
27039 #ifdef M_CHECK_ACTION
27040 /* Exit with distinguishable exit code. */
27041 static void sigabrt_no_core (int sig) { raise (SIGTERM); }
27048 static struct re_pattern_buffer regex;
27049 unsigned char folded_chars[UCHAR_MAX + 1];
27052 struct re_registers regs;
27054 /* Some builds of glibc go into an infinite loop on this
27055 test. Use alarm to force death, and mallopt to avoid
27056 malloc recursion in diagnosing the corrupted heap. */
27057 #if HAVE_DECL_ALARM
27058 signal (SIGALRM, SIG_DFL);
27061 #ifdef M_CHECK_ACTION
27062 signal (SIGABRT, sigabrt_no_core);
27063 mallopt (M_CHECK_ACTION, 2);
27066 if (setlocale (LC_ALL, "en_US.UTF-8"))
27069 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
27070 This test needs valgrind to catch the bug on Debian
27071 GNU/Linux 3.1 x86, but it might catch the bug better
27072 on other platforms and it shouldn't hurt to try the
27074 static char const pat[] = "insert into";
27075 static char const data[] =
27076 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
27077 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
27079 memset (®ex, 0, sizeof regex);
27080 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
27083 else if (re_search (®ex, data, sizeof data - 1,
27084 0, sizeof data - 1, ®s)
27090 /* This test is from glibc bug 15078.
27091 The test case is from Andreas Schwab in
27092 <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
27094 static char const pat[] = "[^x]x";
27095 static char const data[] =
27096 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
27107 memset (®ex, 0, sizeof regex);
27108 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
27113 i = re_search (®ex, data, sizeof data - 1,
27114 0, sizeof data - 1, 0);
27115 if (i != 0 && i != 21)
27120 if (! setlocale (LC_ALL, "C"))
27124 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
27125 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
27126 memset (®ex, 0, sizeof regex);
27127 s = re_compile_pattern ("a[^x]b", 6, ®ex);
27130 /* This should fail, but succeeds for glibc-2.5. */
27131 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
27134 /* This regular expression is from Spencer ere test number 75
27136 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
27137 memset (®ex, 0, sizeof regex);
27138 for (i = 0; i <= UCHAR_MAX; i++)
27139 folded_chars[i] = i;
27140 regex.translate = folded_chars;
27141 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
27142 /* This should fail with _Invalid character class name_ error. */
27146 /* Ensure that [b-a] is diagnosed as invalid, when
27147 using RE_NO_EMPTY_RANGES. */
27148 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
27149 memset (®ex, 0, sizeof regex);
27150 s = re_compile_pattern ("a[b-a]", 6, ®ex);
27154 /* This should succeed, but does not for glibc-2.1.3. */
27155 memset (®ex, 0, sizeof regex);
27156 s = re_compile_pattern ("{1", 2, ®ex);
27160 /* The following example is derived from a problem report
27161 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
27162 memset (®ex, 0, sizeof regex);
27163 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
27166 /* This should match, but does not for glibc-2.2.1. */
27167 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
27170 memset (®ex, 0, sizeof regex);
27171 s = re_compile_pattern ("x", 1, ®ex);
27174 /* glibc-2.2.93 does not work with a negative RANGE argument. */
27175 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
27178 /* The version of regex.c in older versions of gnulib
27179 ignored RE_ICASE. Detect that problem too. */
27180 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
27181 memset (®ex, 0, sizeof regex);
27182 s = re_compile_pattern ("x", 1, ®ex);
27185 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
27188 /* Catch a bug reported by Vin Shelton in
27189 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
27191 re_set_syntax (RE_SYNTAX_POSIX_BASIC
27192 & ~RE_CONTEXT_INVALID_DUP
27193 & ~RE_NO_EMPTY_RANGES);
27194 memset (®ex, 0, sizeof regex);
27195 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
27199 /* REG_STARTEND was added to glibc on 2004-01-15.
27200 Reject older versions. */
27201 if (! REG_STARTEND)
27205 /* It would be nice to reject hosts whose regoff_t values are too
27206 narrow (including glibc on hosts with 64-bit ptrdiff_t and
27207 32-bit int), but we should wait until glibc implements this
27208 feature. Otherwise, support for equivalence classes and
27209 multibyte collation symbols would always be broken except
27210 when compiling --without-included-regex. */
27211 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
27212 || sizeof (regoff_t) < sizeof (ssize_t))
27222 if ac_fn_c_try_run "$LINENO"; then :
27223 gl_cv_func_re_compile_pattern_working=yes
27225 gl_cv_func_re_compile_pattern_working=no
27227 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27228 conftest.$ac_objext conftest.beam conftest.$ac_ext
27232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
27233 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
27234 case $gl_cv_func_re_compile_pattern_working in #(
27235 yes) ac_use_included_regex=no;; #(
27236 no) ac_use_included_regex=yes;;
27239 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
27243 if test $ac_use_included_regex = yes; then
27245 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
27248 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
27251 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
27254 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
27257 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
27260 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
27263 $as_echo "#define re_search rpl_re_search" >>confdefs.h
27266 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
27269 $as_echo "#define re_match rpl_re_match" >>confdefs.h
27272 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
27275 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
27278 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
27281 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
27284 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
27287 $as_echo "#define regexec rpl_regexec" >>confdefs.h
27290 $as_echo "#define regerror rpl_regerror" >>confdefs.h
27293 $as_echo "#define regfree rpl_regfree" >>confdefs.h
27297 if test $ac_use_included_regex = yes; then
27306 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
27315 for ac_header in libintl.h
27317 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
27318 if test "x$ac_cv_header_libintl_h" = xyes; then :
27319 cat >>confdefs.h <<_ACEOF
27320 #define HAVE_LIBINTL_H 1
27328 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
27330 if test "x$ac_cv_have_decl_isblank" = xyes; then :
27336 cat >>confdefs.h <<_ACEOF
27337 #define HAVE_DECL_ISBLANK $ac_have_decl
27347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27348 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27349 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
27350 $as_echo_n "(cached) " >&6
27352 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27353 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27354 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27355 # Assume that if we have lstat, we can also check symlinks.
27356 if test $ac_cv_func_lstat = yes; then
27357 ln -s conftest.f conftest.lnk
27359 if test "$cross_compiling" = yes; then :
27361 # Guess yes on glibc systems.
27362 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
27363 # If we don't know, assume the worst.
27364 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
27368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27369 /* end confdefs.h. */
27371 # include <stdio.h>
27372 # include <stdlib.h>
27378 if (rename ("conftest.f1", "conftest.f2/") == 0)
27380 if (rename ("conftest.d1", "conftest.d2/") != 0)
27383 if (rename ("conftest.f", "conftest.lnk/") == 0)
27392 if ac_fn_c_try_run "$LINENO"; then :
27393 gl_cv_func_rename_slash_dst_works=yes
27395 gl_cv_func_rename_slash_dst_works=no
27397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27398 conftest.$ac_objext conftest.beam conftest.$ac_ext
27401 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27405 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27406 case "$gl_cv_func_rename_slash_dst_works" in
27411 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27417 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27418 if ${gl_cv_func_rename_slash_src_works+:} false; then :
27419 $as_echo_n "(cached) " >&6
27421 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27422 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
27423 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27424 # Assume that if we have lstat, we can also check symlinks.
27425 if test $ac_cv_func_lstat = yes; then
27426 ln -s conftest.f conftest.lnk
27428 if test "$cross_compiling" = yes; then :
27430 # Guess yes on glibc systems.
27431 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
27432 # If we don't know, assume the worst.
27433 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
27437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27438 /* end confdefs.h. */
27440 # include <stdio.h>
27441 # include <stdlib.h>
27447 if (rename ("conftest.f1/", "conftest.d3") == 0)
27449 if (rename ("conftest.d1/", "conftest.d2") != 0)
27452 if (rename ("conftest.lnk/", "conftest.f") == 0)
27461 if ac_fn_c_try_run "$LINENO"; then :
27462 gl_cv_func_rename_slash_src_works=yes
27464 gl_cv_func_rename_slash_src_works=no
27466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27467 conftest.$ac_objext conftest.beam conftest.$ac_ext
27470 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27474 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27475 case "$gl_cv_func_rename_slash_src_works" in
27480 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27487 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27488 if ${gl_cv_func_rename_link_works+:} false; then :
27489 $as_echo_n "(cached) " >&6
27491 if test $ac_cv_func_link = yes; then
27492 rm -rf conftest.f conftest.f1
27493 if touch conftest.f && ln conftest.f conftest.f1 &&
27494 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
27495 if test "$cross_compiling" = yes; then :
27497 # Guess yes on glibc systems.
27498 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
27499 # If we don't know, assume the worst.
27500 *) gl_cv_func_rename_link_works="guessing no" ;;
27504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27505 /* end confdefs.h. */
27507 # include <stdio.h>
27508 # include <stdlib.h>
27509 # include <unistd.h>
27515 if (rename ("conftest.f", "conftest.f1"))
27517 if (unlink ("conftest.f1"))
27519 if (rename ("conftest.f", "conftest.f"))
27521 if (rename ("conftest.f1", "conftest.f1") == 0)
27529 if ac_fn_c_try_run "$LINENO"; then :
27530 gl_cv_func_rename_link_works=yes
27532 gl_cv_func_rename_link_works=no
27534 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27535 conftest.$ac_objext conftest.beam conftest.$ac_ext
27539 gl_cv_func_rename_link_works="guessing no"
27541 rm -rf conftest.f conftest.f1
27543 gl_cv_func_rename_link_works=yes
27547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27548 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27549 case "$gl_cv_func_rename_link_works" in
27554 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27560 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27561 if ${gl_cv_func_rename_dest_works+:} false; then :
27562 $as_echo_n "(cached) " >&6
27564 rm -rf conftest.f conftest.d1 conftest.d2
27565 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
27566 as_fn_error $? "cannot create temporary files" "$LINENO" 5
27567 if test "$cross_compiling" = yes; then :
27569 # Guess yes on glibc systems.
27570 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
27571 # If we don't know, assume the worst.
27572 *) gl_cv_func_rename_dest_works="guessing no" ;;
27576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27577 /* end confdefs.h. */
27579 # include <stdio.h>
27580 # include <stdlib.h>
27586 if (rename ("conftest.d1", "conftest.d2") != 0)
27588 if (rename ("conftest.d2", "conftest.f") == 0)
27596 if ac_fn_c_try_run "$LINENO"; then :
27597 gl_cv_func_rename_dest_works=yes
27599 gl_cv_func_rename_dest_works=no
27601 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27602 conftest.$ac_objext conftest.beam conftest.$ac_ext
27605 rm -rf conftest.f conftest.d1 conftest.d2
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27609 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27610 case "$gl_cv_func_rename_dest_works" in
27615 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27620 if test $REPLACE_RENAME = 1; then
27629 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
27643 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27653 if test $ac_cv_func_renameat = no; then
27655 elif test $REPLACE_RENAME = 1; then
27659 if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
27668 gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
27671 if test $HAVE_RENAMEAT = 0; then
27680 gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
27694 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
27701 for ac_func in rewinddir
27703 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27704 if test "x$ac_cv_func_rewinddir" = xyes; then :
27705 cat >>confdefs.h <<_ACEOF
27706 #define HAVE_REWINDDIR 1
27712 if test $ac_cv_func_rewinddir = no; then
27716 if test $HAVE_REWINDDIR = 0; then
27725 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
27739 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27747 $as_echo_n "checking whether rmdir works... " >&6; }
27748 if ${gl_cv_func_rmdir_works+:} false; then :
27749 $as_echo_n "(cached) " >&6
27752 touch conftest.file
27753 if test "$cross_compiling" = yes; then :
27755 # Guess yes on glibc systems.
27756 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
27757 # If we don't know, assume the worst.
27758 *) gl_cv_func_rmdir_works="guessing no" ;;
27762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27763 /* end confdefs.h. */
27767 # include <unistd.h>
27768 #else /* on Windows with MSVC */
27769 # include <direct.h>
27776 if (!rmdir ("conftest.file/"))
27778 else if (errno != ENOTDIR)
27780 if (!rmdir ("conftest.dir/./"))
27788 if ac_fn_c_try_run "$LINENO"; then :
27789 gl_cv_func_rmdir_works=yes
27791 gl_cv_func_rmdir_works=no
27793 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27794 conftest.$ac_objext conftest.beam conftest.$ac_ext
27797 rm -rf conftest.dir conftest.file
27799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27800 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27801 case "$gl_cv_func_rmdir_works" in
27808 if test $REPLACE_RMDIR = 1; then
27817 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
27831 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
27839 for ac_func in rpmatch
27841 ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
27842 if test "x$ac_cv_func_rpmatch" = xyes; then :
27843 cat >>confdefs.h <<_ACEOF
27844 #define HAVE_RPMATCH 1
27850 if test $ac_cv_func_rpmatch = no; then
27854 if test $HAVE_RPMATCH = 0; then
27863 gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
27866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
27867 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
27868 if ${gl_cv_langinfo_yesexpr+:} false; then :
27869 $as_echo_n "(cached) " >&6
27871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27872 /* end confdefs.h. */
27873 #include <langinfo.h>
27877 char* cs = nl_langinfo(YESEXPR); return !cs;
27882 if ac_fn_c_try_link "$LINENO"; then :
27883 gl_cv_langinfo_yesexpr=yes
27885 gl_cv_langinfo_yesexpr=no
27887 rm -f core conftest.err conftest.$ac_objext \
27888 conftest$ac_exeext conftest.$ac_ext
27891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27892 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27893 if test $gl_cv_langinfo_yesexpr = yes; then
27895 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27911 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27934 if test $ac_cv_func_secure_getenv = no; then
27935 HAVE_SECURE_GETENV=0
27938 if test $HAVE_SECURE_GETENV = 0; then
27947 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27950 for ac_func in __secure_getenv
27952 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27953 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27954 cat >>confdefs.h <<_ACEOF
27955 #define HAVE___SECURE_GETENV 1
27961 if test $ac_cv_func___secure_getenv = no; then
27962 for ac_func in issetugid
27964 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
27965 if test "x$ac_cv_func_issetugid" = xyes; then :
27966 cat >>confdefs.h <<_ACEOF
27967 #define HAVE_ISSETUGID 1
27981 GNULIB_SECURE_GETENV=1
27987 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
27991 for ac_header in selinux/flask.h
27993 ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
27994 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
27995 cat >>confdefs.h <<_ACEOF
27996 #define HAVE_SELINUX_FLASK_H 1
28011 gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
28015 if test "$with_selinux" != no; then
28016 for ac_header in selinux/selinux.h
28018 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
28019 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
28020 cat >>confdefs.h <<_ACEOF
28021 #define HAVE_SELINUX_SELINUX_H 1
28029 if test "$ac_cv_header_selinux_selinux_h" = yes; then
28030 # We do have <selinux/selinux.h>, so do compile getfilecon.c
28031 # and arrange to use its wrappers.
28041 if test $gl_cv_have_include_next = yes; then
28042 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
28045 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
28046 if ${gl_cv_next_selinux_selinux_h+:} false; then :
28047 $as_echo_n "(cached) " >&6
28050 if test $ac_cv_header_selinux_selinux_h = yes; then
28055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28056 /* end confdefs.h. */
28057 #include <selinux/selinux.h>
28060 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28061 *) gl_absname_cpp="$ac_cpp" ;;
28066 gl_dirsep_regex='[/\\]'
28069 gl_dirsep_regex='\/'
28072 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28073 gl_header_literal_regex=`echo 'selinux/selinux.h' \
28074 | sed -e "$gl_make_literal_regex_sed"`
28075 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28076 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28082 gl_cv_absolute_selinux_selinux_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28083 sed -n "$gl_absolute_header_sed"`
28085 gl_header=$gl_cv_absolute_selinux_selinux_h
28086 gl_cv_next_selinux_selinux_h='"'$gl_header'"'
28088 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
28093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
28094 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
28096 NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
28098 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28099 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28100 gl_next_as_first_directive='<'selinux/selinux.h'>'
28102 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28103 gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
28105 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
28111 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
28114 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
28117 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
28121 case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
28122 no:*) # already warned
28125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
28126 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
28127 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
28128 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
28131 # Do as if <selinux/selinux.h> does not exist, even if
28132 # AC_CHECK_HEADERS_ONCE has already determined that it exists.
28133 $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
28139 if test "$with_selinux" != no; then
28140 for ac_header in selinux/context.h
28142 ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
28143 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
28144 cat >>confdefs.h <<_ACEOF
28145 #define HAVE_SELINUX_CONTEXT_H 1
28149 SELINUX_CONTEXT_H=selinux/context.h
28155 SELINUX_CONTEXT_H=selinux/context.h
28158 if test -n "$SELINUX_CONTEXT_H"; then
28159 GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
28160 GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
28162 GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
28163 GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
28167 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
28176 gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
28181 if test $ac_cv_func_setenv = no; then
28184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
28185 $as_echo_n "checking whether setenv validates arguments... " >&6; }
28186 if ${gl_cv_func_setenv_works+:} false; then :
28187 $as_echo_n "(cached) " >&6
28189 if test "$cross_compiling" = yes; then :
28191 # Guess yes on glibc systems.
28192 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
28193 # If we don't know, assume the worst.
28194 *) gl_cv_func_setenv_works="guessing no" ;;
28198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28199 /* end confdefs.h. */
28201 #include <stdlib.h>
28203 #include <string.h>
28211 if (setenv ("", "", 0) != -1)
28213 else if (errno != EINVAL)
28217 if (setenv ("a", "=", 1) != 0)
28219 else if (strcmp (getenv ("a"), "=") != 0)
28228 if ac_fn_c_try_run "$LINENO"; then :
28229 gl_cv_func_setenv_works=yes
28231 gl_cv_func_setenv_works=no
28233 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28234 conftest.$ac_objext conftest.beam conftest.$ac_ext
28238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
28239 $as_echo "$gl_cv_func_setenv_works" >&6; }
28240 case "$gl_cv_func_setenv_works" in
28248 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
28257 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
28271 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
28286 if test $gl_cv_have_include_next = yes; then
28287 gl_cv_next_signal_h='<'signal.h'>'
28289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28290 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28291 if ${gl_cv_next_signal_h+:} false; then :
28292 $as_echo_n "(cached) " >&6
28297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28298 /* end confdefs.h. */
28299 #include <signal.h>
28302 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28303 *) gl_absname_cpp="$ac_cpp" ;;
28308 gl_dirsep_regex='[/\\]'
28311 gl_dirsep_regex='\/'
28314 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28315 gl_header_literal_regex=`echo 'signal.h' \
28316 | sed -e "$gl_make_literal_regex_sed"`
28317 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28318 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28324 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28325 sed -n "$gl_absolute_header_sed"`
28327 gl_header=$gl_cv_absolute_signal_h
28328 gl_cv_next_signal_h='"'$gl_header'"'
28332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28333 $as_echo "$gl_cv_next_signal_h" >&6; }
28335 NEXT_SIGNAL_H=$gl_cv_next_signal_h
28337 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28338 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28339 gl_next_as_first_directive='<'signal.h'>'
28341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28342 gl_next_as_first_directive=$gl_cv_next_signal_h
28344 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
28350 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28351 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
28352 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28353 #include <signal.h>
28356 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
28359 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
28368 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28369 #include <signal.h>
28372 if test "x$ac_cv_type_sighandler_t" = xyes; then :
28375 HAVE_SIGHANDLER_T=0
28380 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
28381 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28383 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28384 if eval \${$as_gl_Symbol+:} false; then :
28385 $as_echo_n "(cached) " >&6
28387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28388 /* end confdefs.h. */
28389 #include <signal.h>
28400 if ac_fn_c_try_compile "$LINENO"; then :
28401 eval "$as_gl_Symbol=yes"
28403 eval "$as_gl_Symbol=no"
28405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28407 eval ac_res=\$$as_gl_Symbol
28408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28409 $as_echo "$ac_res" >&6; }
28410 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28411 cat >>confdefs.h <<_ACEOF
28412 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28415 eval ac_cv_have_decl_$gl_func=yes
28421 for ac_header in stdint.h
28423 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
28424 if test "x$ac_cv_header_stdint_h" = xyes; then :
28425 cat >>confdefs.h <<_ACEOF
28426 #define HAVE_STDINT_H 1
28433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
28434 $as_echo_n "checking for SIZE_MAX... " >&6; }
28435 if ${gl_cv_size_max+:} false; then :
28436 $as_echo_n "(cached) " >&6
28440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28441 /* end confdefs.h. */
28443 #include <limits.h>
28445 #include <stdint.h>
28452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28453 $EGREP "Found it" >/dev/null 2>&1; then :
28458 if test -z "$gl_cv_size_max"; then
28459 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
28460 #include <limits.h>"; then :
28463 size_t_bits_minus_1=
28466 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
28472 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
28473 if test $fits_in_uint = 1; then
28474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28475 /* end confdefs.h. */
28476 #include <stddef.h>
28478 extern unsigned long foo;
28488 if ac_fn_c_try_compile "$LINENO"; then :
28491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28493 if test $fits_in_uint = 1; then
28494 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
28496 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
28499 gl_cv_size_max='((size_t)~(size_t)0)'
28504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
28505 $as_echo "$gl_cv_size_max" >&6; }
28506 if test "$gl_cv_size_max" != yes; then
28508 cat >>confdefs.h <<_ACEOF
28509 #define SIZE_MAX $gl_cv_size_max
28517 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
28519 if test "x$ac_cv_have_decl_sleep" = xyes; then :
28525 cat >>confdefs.h <<_ACEOF
28526 #define HAVE_DECL_SLEEP $ac_have_decl
28530 if test $ac_cv_have_decl_sleep != yes; then
28533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
28534 $as_echo_n "checking for working sleep... " >&6; }
28535 if ${gl_cv_func_sleep_works+:} false; then :
28536 $as_echo_n "(cached) " >&6
28538 if test "$cross_compiling" = yes; then :
28540 # Guess yes on glibc systems.
28541 *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
28542 # If we don't know, assume the worst.
28543 *) gl_cv_func_sleep_works="guessing no" ;;
28547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28548 /* end confdefs.h. */
28551 #include <unistd.h>
28552 #include <signal.h>
28554 handle_alarm (int sig)
28556 if (sig != SIGALRM)
28564 /* Failure to compile this test due to missing alarm is okay,
28565 since all such platforms (mingw) also lack sleep. */
28566 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
28567 unsigned int remaining;
28568 signal (SIGALRM, handle_alarm);
28570 remaining = sleep (pentecost);
28571 if (remaining > pentecost)
28573 if (remaining <= pentecost - 10)
28581 if ac_fn_c_try_run "$LINENO"; then :
28582 gl_cv_func_sleep_works=yes
28584 gl_cv_func_sleep_works=no
28586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28587 conftest.$ac_objext conftest.beam conftest.$ac_ext
28591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
28592 $as_echo "$gl_cv_func_sleep_works" >&6; }
28593 case "$gl_cv_func_sleep_works" in
28601 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
28610 gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
28624 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
28630 gl_cv_func_snprintf_usable=no
28631 for ac_func in snprintf
28633 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
28634 if test "x$ac_cv_func_snprintf" = xyes; then :
28635 cat >>confdefs.h <<_ACEOF
28636 #define HAVE_SNPRINTF 1
28642 if test $ac_cv_func_snprintf = yes; then
28646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
28647 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
28648 if ${gl_cv_func_snprintf_size1+:} false; then :
28649 $as_echo_n "(cached) " >&6
28652 if test "$cross_compiling" = yes; then :
28653 gl_cv_func_snprintf_size1="guessing yes"
28655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28656 /* end confdefs.h. */
28660 # define my_snprintf snprintf
28662 # include <stdarg.h>
28663 static int my_snprintf (char *buf, int size, const char *format, ...)
28667 va_start (args, format);
28668 ret = vsnprintf (buf, size, format, args);
28675 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
28676 my_snprintf (buf, 1, "%d", 12345);
28677 return buf[1] != 'E';
28680 if ac_fn_c_try_run "$LINENO"; then :
28681 gl_cv_func_snprintf_size1=yes
28683 gl_cv_func_snprintf_size1=no
28685 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28686 conftest.$ac_objext conftest.beam conftest.$ac_ext
28691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
28692 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
28694 case "$gl_cv_func_snprintf_size1" in
28697 case "$gl_cv_func_snprintf_retval_c99" in
28701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
28702 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
28703 if ${gl_cv_func_printf_positions+:} false; then :
28704 $as_echo_n "(cached) " >&6
28707 if test "$cross_compiling" = yes; then :
28710 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
28711 gl_cv_func_printf_positions="guessing no";;
28712 beos*) gl_cv_func_printf_positions="guessing no";;
28713 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
28714 *) gl_cv_func_printf_positions="guessing yes";;
28718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28719 /* end confdefs.h. */
28722 #include <string.h>
28723 /* The string "%2$d %1$d", with dollar characters protected from the shell's
28724 dollar expansion (possibly an autoconf bug). */
28725 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
28726 static char buf[100];
28729 sprintf (buf, format, 33, 55);
28730 return (strcmp (buf, "55 33") != 0);
28733 if ac_fn_c_try_run "$LINENO"; then :
28734 gl_cv_func_printf_positions=yes
28736 gl_cv_func_printf_positions=no
28738 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28739 conftest.$ac_objext conftest.beam conftest.$ac_ext
28744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
28745 $as_echo "$gl_cv_func_printf_positions" >&6; }
28747 case "$gl_cv_func_printf_positions" in
28749 gl_cv_func_snprintf_usable=yes
28757 if test $gl_cv_func_snprintf_usable = no; then
28768 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
28770 if test $ac_cv_func_snprintf = yes; then
28777 if test $ac_cv_have_decl_snprintf = no; then
28778 HAVE_DECL_SNPRINTF=0
28792 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
28798 cat >>confdefs.h <<_ACEOF
28799 #define GNULIB_SNPRINTF 1
28804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28805 $as_echo_n "checking for ssize_t... " >&6; }
28806 if ${gt_cv_ssize_t+:} false; then :
28807 $as_echo_n "(cached) " >&6
28809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28810 /* end confdefs.h. */
28811 #include <sys/types.h>
28815 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28821 if ac_fn_c_try_compile "$LINENO"; then :
28826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28829 $as_echo "$gt_cv_ssize_t" >&6; }
28830 if test $gt_cv_ssize_t = no; then
28832 $as_echo "#define ssize_t int" >>confdefs.h
28839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
28840 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
28841 if ${gl_cv_func_stat_dir_slash+:} false; then :
28842 $as_echo_n "(cached) " >&6
28844 if test "$cross_compiling" = yes; then :
28846 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
28847 *) gl_cv_func_stat_dir_slash="guessing yes";;
28850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28851 /* end confdefs.h. */
28852 #include <sys/stat.h>
28857 struct stat st; return stat (".", &st) != stat ("./", &st);
28862 if ac_fn_c_try_run "$LINENO"; then :
28863 gl_cv_func_stat_dir_slash=yes
28865 gl_cv_func_stat_dir_slash=no
28867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28868 conftest.$ac_objext conftest.beam conftest.$ac_ext
28872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
28873 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
28874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28875 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28876 if ${gl_cv_func_stat_file_slash+:} false; then :
28877 $as_echo_n "(cached) " >&6
28880 # Assume that if we have lstat, we can also check symlinks.
28881 if test $ac_cv_func_lstat = yes; then
28882 ln -s conftest.tmp conftest.lnk
28884 if test "$cross_compiling" = yes; then :
28886 # Guess yes on glibc systems.
28887 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
28888 # If we don't know, assume the worst.
28889 *) gl_cv_func_stat_file_slash="guessing no" ;;
28893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28894 /* end confdefs.h. */
28895 #include <sys/stat.h>
28902 if (!stat ("conftest.tmp/", &st))
28905 if (!stat ("conftest.lnk/", &st))
28914 if ac_fn_c_try_run "$LINENO"; then :
28915 gl_cv_func_stat_file_slash=yes
28917 gl_cv_func_stat_file_slash=no
28919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28920 conftest.$ac_objext conftest.beam conftest.$ac_ext
28923 rm -f conftest.tmp conftest.lnk
28925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28926 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28927 case $gl_cv_func_stat_dir_slash in
28928 *no) REPLACE_STAT=1
28930 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28933 case $gl_cv_func_stat_file_slash in
28934 *no) REPLACE_STAT=1
28936 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28940 if test $REPLACE_STAT = 1; then
28949 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28964 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28972 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>
28973 #include <sys/stat.h>
28975 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28977 cat >>confdefs.h <<_ACEOF
28978 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28982 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28983 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28984 $as_echo_n "(cached) " >&6
28986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28987 /* end confdefs.h. */
28989 #include <sys/types.h>
28990 #include <sys/stat.h>
28991 #if HAVE_SYS_TIME_H
28992 # include <sys/time.h>
28995 struct timespec ts;
29008 if ac_fn_c_try_compile "$LINENO"; then :
29009 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
29011 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
29013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
29016 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
29017 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
29019 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
29023 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>
29024 #include <sys/stat.h>
29026 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
29028 cat >>confdefs.h <<_ACEOF
29029 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
29034 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
29035 #include <sys/stat.h>
29037 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
29039 cat >>confdefs.h <<_ACEOF
29040 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
29045 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>
29046 #include <sys/stat.h>
29048 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
29050 cat >>confdefs.h <<_ACEOF
29051 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
29067 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>
29068 #include <sys/stat.h>
29070 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
29072 cat >>confdefs.h <<_ACEOF
29073 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
29078 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
29079 #include <sys/stat.h>
29081 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
29083 cat >>confdefs.h <<_ACEOF
29084 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
29089 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>
29090 #include <sys/stat.h>
29092 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
29094 cat >>confdefs.h <<_ACEOF
29095 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
29108 cat >>confdefs.h <<_ACEOF
29109 #define GNULIB_STATAT 1
29113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
29114 $as_echo_n "checking for working stdalign.h... " >&6; }
29115 if ${gl_cv_header_working_stdalign_h+:} false; then :
29116 $as_echo_n "(cached) " >&6
29118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29119 /* end confdefs.h. */
29120 #include <stdalign.h>
29121 #include <stddef.h>
29123 /* Test that alignof yields a result consistent with offsetof.
29124 This catches GCC bug 52023
29125 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
29127 template <class t> struct alignof_helper { char a; t b; };
29128 # define ao(type) offsetof (alignof_helper<type>, b)
29130 # define ao(type) offsetof (struct { char a; type b; }, b)
29132 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
29133 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
29134 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
29136 /* Test _Alignas only on platforms where gnulib can help. */
29138 ((defined __cplusplus && 201103 <= __cplusplus) \
29139 || __GNUC__ || __IBMC__ || __IBMCPP__ || __ICC \
29140 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
29141 struct alignas_test { char c; char alignas (8) alignas_8; };
29142 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
29154 if ac_fn_c_try_compile "$LINENO"; then :
29155 gl_cv_header_working_stdalign_h=yes
29157 gl_cv_header_working_stdalign_h=no
29159 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
29162 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
29164 if test $gl_cv_header_working_stdalign_h = yes; then
29167 STDALIGN_H='stdalign.h'
29171 if test -n "$STDALIGN_H"; then
29172 GL_GENERATE_STDALIGN_H_TRUE=
29173 GL_GENERATE_STDALIGN_H_FALSE='#'
29175 GL_GENERATE_STDALIGN_H_TRUE='#'
29176 GL_GENERATE_STDALIGN_H_FALSE=
29182 NEXT_STDARG_H='<stdarg.h>'
29183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
29184 $as_echo_n "checking for va_copy... " >&6; }
29185 if ${gl_cv_func_va_copy+:} false; then :
29186 $as_echo_n "(cached) " >&6
29189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29190 /* end confdefs.h. */
29191 #include <stdarg.h>
29197 void (*func) (va_list, va_list) = va_copy;
29204 if ac_fn_c_try_compile "$LINENO"; then :
29205 gl_cv_func_va_copy=yes
29207 gl_cv_func_va_copy=no
29209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
29213 $as_echo "$gl_cv_func_va_copy" >&6; }
29214 if test $gl_cv_func_va_copy = no; then
29215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29216 /* end confdefs.h. */
29217 #if defined _AIX && !defined __GNUC__
29222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29223 $EGREP "vaccine" >/dev/null 2>&1; then :
29230 if test $gl_aixcc = yes; then
29240 if test $gl_cv_have_include_next = yes; then
29241 gl_cv_next_stdarg_h='<'stdarg.h'>'
29243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
29244 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
29245 if ${gl_cv_next_stdarg_h+:} false; then :
29246 $as_echo_n "(cached) " >&6
29251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29252 /* end confdefs.h. */
29253 #include <stdarg.h>
29256 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29257 *) gl_absname_cpp="$ac_cpp" ;;
29262 gl_dirsep_regex='[/\\]'
29265 gl_dirsep_regex='\/'
29268 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29269 gl_header_literal_regex=`echo 'stdarg.h' \
29270 | sed -e "$gl_make_literal_regex_sed"`
29271 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29272 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29278 gl_cv_absolute_stdarg_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29279 sed -n "$gl_absolute_header_sed"`
29281 gl_header=$gl_cv_absolute_stdarg_h
29282 gl_cv_next_stdarg_h='"'$gl_header'"'
29286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
29287 $as_echo "$gl_cv_next_stdarg_h" >&6; }
29289 NEXT_STDARG_H=$gl_cv_next_stdarg_h
29291 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29292 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29293 gl_next_as_first_directive='<'stdarg.h'>'
29295 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29296 gl_next_as_first_directive=$gl_cv_next_stdarg_h
29298 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
29303 if test "$gl_cv_next_stdarg_h" = '""'; then
29304 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
29305 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
29309 saved_as_echo_n="$as_echo_n"
29311 if ${gl_cv_func___va_copy+:} false; then :
29312 $as_echo_n "(cached) " >&6
29315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29316 /* end confdefs.h. */
29317 #include <stdarg.h>
29330 if ac_fn_c_try_compile "$LINENO"; then :
29331 gl_cv_func___va_copy=yes
29333 gl_cv_func___va_copy=no
29335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29338 as_echo_n="$saved_as_echo_n"
29340 if test $gl_cv_func___va_copy = yes; then
29342 $as_echo "#define va_copy __va_copy" >>confdefs.h
29347 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
29353 if test -n "$STDARG_H"; then
29354 GL_GENERATE_STDARG_H_TRUE=
29355 GL_GENERATE_STDARG_H_FALSE='#'
29357 GL_GENERATE_STDARG_H_TRUE='#'
29358 GL_GENERATE_STDARG_H_FALSE=
29366 # Define two additional variables used in the Makefile substitution.
29368 if test "$ac_cv_header_stdbool_h" = yes; then
29371 STDBOOL_H='stdbool.h'
29374 if test -n "$STDBOOL_H"; then
29375 GL_GENERATE_STDBOOL_H_TRUE=
29376 GL_GENERATE_STDBOOL_H_FALSE='#'
29378 GL_GENERATE_STDBOOL_H_TRUE='#'
29379 GL_GENERATE_STDBOOL_H_FALSE=
29383 if test "$ac_cv_type__Bool" = yes; then
29394 if test $gt_cv_c_wchar_t = no; then
29398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
29399 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
29400 if ${gl_cv_decl_null_works+:} false; then :
29401 $as_echo_n "(cached) " >&6
29403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29404 /* end confdefs.h. */
29405 #include <stddef.h>
29406 int test[2 * (sizeof NULL == sizeof (void *)) -1];
29416 if ac_fn_c_try_compile "$LINENO"; then :
29417 gl_cv_decl_null_works=yes
29419 gl_cv_decl_null_works=no
29421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
29424 $as_echo "$gl_cv_decl_null_works" >&6; }
29425 if test $gl_cv_decl_null_works = no; then
29430 if test -n "$STDDEF_H"; then
29431 GL_GENERATE_STDDEF_H_TRUE=
29432 GL_GENERATE_STDDEF_H_FALSE='#'
29434 GL_GENERATE_STDDEF_H_TRUE='#'
29435 GL_GENERATE_STDDEF_H_FALSE=
29438 if test -n "$STDDEF_H"; then
29447 if test $gl_cv_have_include_next = yes; then
29448 gl_cv_next_stddef_h='<'stddef.h'>'
29450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
29451 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
29452 if ${gl_cv_next_stddef_h+:} false; then :
29453 $as_echo_n "(cached) " >&6
29458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29459 /* end confdefs.h. */
29460 #include <stddef.h>
29463 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29464 *) gl_absname_cpp="$ac_cpp" ;;
29469 gl_dirsep_regex='[/\\]'
29472 gl_dirsep_regex='\/'
29475 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29476 gl_header_literal_regex=`echo 'stddef.h' \
29477 | sed -e "$gl_make_literal_regex_sed"`
29478 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29479 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29485 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29486 sed -n "$gl_absolute_header_sed"`
29488 gl_header=$gl_cv_absolute_stddef_h
29489 gl_cv_next_stddef_h='"'$gl_header'"'
29493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
29494 $as_echo "$gl_cv_next_stddef_h" >&6; }
29496 NEXT_STDDEF_H=$gl_cv_next_stddef_h
29498 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29499 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29500 gl_next_as_first_directive='<'stddef.h'>'
29502 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29503 gl_next_as_first_directive=$gl_cv_next_stddef_h
29505 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
29523 if test $gl_cv_have_include_next = yes; then
29524 gl_cv_next_stdio_h='<'stdio.h'>'
29526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
29527 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
29528 if ${gl_cv_next_stdio_h+:} false; then :
29529 $as_echo_n "(cached) " >&6
29534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29535 /* end confdefs.h. */
29539 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29540 *) gl_absname_cpp="$ac_cpp" ;;
29545 gl_dirsep_regex='[/\\]'
29548 gl_dirsep_regex='\/'
29551 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29552 gl_header_literal_regex=`echo 'stdio.h' \
29553 | sed -e "$gl_make_literal_regex_sed"`
29554 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29555 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29561 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29562 sed -n "$gl_absolute_header_sed"`
29564 gl_header=$gl_cv_absolute_stdio_h
29565 gl_cv_next_stdio_h='"'$gl_header'"'
29569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
29570 $as_echo "$gl_cv_next_stdio_h" >&6; }
29572 NEXT_STDIO_H=$gl_cv_next_stdio_h
29574 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29575 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29576 gl_next_as_first_directive='<'stdio.h'>'
29578 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29579 gl_next_as_first_directive=$gl_cv_next_stdio_h
29581 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
29590 cat >>confdefs.h <<_ACEOF
29591 #define GNULIB_FSCANF 1
29598 cat >>confdefs.h <<_ACEOF
29599 #define GNULIB_SCANF 1
29624 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
29625 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29627 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29628 if eval \${$as_gl_Symbol+:} false; then :
29629 $as_echo_n "(cached) " >&6
29631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29632 /* end confdefs.h. */
29644 if ac_fn_c_try_compile "$LINENO"; then :
29645 eval "$as_gl_Symbol=yes"
29647 eval "$as_gl_Symbol=no"
29649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29651 eval ac_res=\$$as_gl_Symbol
29652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29653 $as_echo "$ac_res" >&6; }
29654 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29655 cat >>confdefs.h <<_ACEOF
29656 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29659 eval ac_cv_have_decl_$gl_func=yes
29674 if test $gl_cv_have_include_next = yes; then
29675 gl_cv_next_stdlib_h='<'stdlib.h'>'
29677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
29678 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
29679 if ${gl_cv_next_stdlib_h+:} false; then :
29680 $as_echo_n "(cached) " >&6
29685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29686 /* end confdefs.h. */
29687 #include <stdlib.h>
29690 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29691 *) gl_absname_cpp="$ac_cpp" ;;
29696 gl_dirsep_regex='[/\\]'
29699 gl_dirsep_regex='\/'
29702 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29703 gl_header_literal_regex=`echo 'stdlib.h' \
29704 | sed -e "$gl_make_literal_regex_sed"`
29705 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29706 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29712 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29713 sed -n "$gl_absolute_header_sed"`
29715 gl_header=$gl_cv_absolute_stdlib_h
29716 gl_cv_next_stdlib_h='"'$gl_header'"'
29720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
29721 $as_echo "$gl_cv_next_stdlib_h" >&6; }
29723 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
29725 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29726 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29727 gl_next_as_first_directive='<'stdlib.h'>'
29729 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29730 gl_next_as_first_directive=$gl_cv_next_stdlib_h
29732 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
29739 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
29740 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29742 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29743 if eval \${$as_gl_Symbol+:} false; then :
29744 $as_echo_n "(cached) " >&6
29746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29747 /* end confdefs.h. */
29748 #include <stdlib.h>
29749 #if HAVE_SYS_LOADAVG_H
29750 # include <sys/loadavg.h>
29753 # include <random.h>
29765 if ac_fn_c_try_compile "$LINENO"; then :
29766 eval "$as_gl_Symbol=yes"
29768 eval "$as_gl_Symbol=no"
29770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29772 eval ac_res=\$$as_gl_Symbol
29773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29774 $as_echo "$ac_res" >&6; }
29775 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29776 cat >>confdefs.h <<_ACEOF
29777 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29780 eval ac_cv_have_decl_$gl_func=yes
29791 for ac_func in stpcpy
29793 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
29794 if test "x$ac_cv_func_stpcpy" = xyes; then :
29795 cat >>confdefs.h <<_ACEOF
29796 #define HAVE_STPCPY 1
29802 if test $ac_cv_func_stpcpy = no; then
29806 if test $HAVE_STPCPY = 0; then
29815 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
29832 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
29839 for ac_func in strcasecmp
29841 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
29842 if test "x$ac_cv_func_strcasecmp" = xyes; then :
29843 cat >>confdefs.h <<_ACEOF
29844 #define HAVE_STRCASECMP 1
29850 if test $ac_cv_func_strcasecmp = no; then
29856 for ac_func in strncasecmp
29858 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
29859 if test "x$ac_cv_func_strncasecmp" = xyes; then :
29860 cat >>confdefs.h <<_ACEOF
29861 #define HAVE_STRNCASECMP 1
29867 if test $ac_cv_func_strncasecmp = yes; then
29872 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
29873 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
29879 cat >>confdefs.h <<_ACEOF
29880 #define HAVE_DECL_STRNCASECMP $ac_have_decl
29883 if test $ac_cv_have_decl_strncasecmp = no; then
29884 HAVE_DECL_STRNCASECMP=0
29888 if test $HAVE_STRCASECMP = 0; then
29897 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
29903 if test $HAVE_STRNCASECMP = 0; then
29912 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29922 for ac_func in strchrnul
29924 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29925 if test "x$ac_cv_func_strchrnul" = xyes; then :
29926 cat >>confdefs.h <<_ACEOF
29927 #define HAVE_STRCHRNUL 1
29933 if test $ac_cv_func_strchrnul = no; then
29936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29937 $as_echo_n "checking whether strchrnul works... " >&6; }
29938 if ${gl_cv_func_strchrnul_works+:} false; then :
29939 $as_echo_n "(cached) " >&6
29941 if test "$cross_compiling" = yes; then :
29942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29943 /* end confdefs.h. */
29945 #if defined __CYGWIN__
29946 #include <cygwin/version.h>
29947 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29955 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29956 $EGREP "Lucky user" >/dev/null 2>&1; then :
29957 gl_cv_func_strchrnul_works="guessing yes"
29959 gl_cv_func_strchrnul_works="guessing no"
29965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29966 /* end confdefs.h. */
29968 #include <string.h> /* for strchrnul */
29973 const char *buf = "a";
29974 return strchrnul (buf, 'b') != buf + 1;
29980 if ac_fn_c_try_run "$LINENO"; then :
29981 gl_cv_func_strchrnul_works=yes
29983 gl_cv_func_strchrnul_works=no
29985 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29986 conftest.$ac_objext conftest.beam conftest.$ac_ext
29991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29992 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29993 case "$gl_cv_func_strchrnul_works" in
29995 *) REPLACE_STRCHRNUL=1 ;;
29999 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
30008 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
30023 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
30031 if test $ac_cv_func_strdup = yes; then
30032 if test $gl_cv_func_malloc_posix != yes; then
30037 if test $ac_cv_have_decl_strdup = no; then
30041 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
30050 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
30065 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
30074 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
30075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
30076 $as_echo_n "checking for working strerror function... " >&6; }
30077 if ${gl_cv_func_working_strerror+:} false; then :
30078 $as_echo_n "(cached) " >&6
30080 if test "$cross_compiling" = yes; then :
30082 # Guess yes on glibc systems.
30083 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
30084 # If we don't know, assume the worst.
30085 *) gl_cv_func_working_strerror="guessing no" ;;
30089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30090 /* end confdefs.h. */
30091 #include <string.h>
30096 if (!*strerror (-2)) return 1;
30101 if ac_fn_c_try_run "$LINENO"; then :
30102 gl_cv_func_working_strerror=yes
30104 gl_cv_func_working_strerror=no
30106 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30107 conftest.$ac_objext conftest.beam conftest.$ac_ext
30112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
30113 $as_echo "$gl_cv_func_working_strerror" >&6; }
30114 case "$gl_cv_func_working_strerror" in
30125 if test $REPLACE_STRERROR = 1; then
30134 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
30139 cat >>confdefs.h <<_ACEOF
30140 #define GNULIB_STRERROR 1
30155 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
30161 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
30170 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
30176 if test $ac_cv_header_sys_socket_h != yes; then
30177 for ac_header in winsock2.h
30179 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
30180 if test "x$ac_cv_header_winsock2_h" = xyes; then :
30181 cat >>confdefs.h <<_ACEOF
30182 #define HAVE_WINSOCK2_H 1
30190 if test "$ac_cv_header_winsock2_h" = yes; then
30192 UNISTD_H_HAVE_WINSOCK2_H=1
30193 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
30202 # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE.
30210 $as_echo "#define my_strftime nstrftime" >>confdefs.h
30226 if test $ac_cv_have_decl_strndup = no; then
30227 HAVE_DECL_STRNDUP=0
30230 if test $ac_cv_func_strndup = yes; then
30232 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
30233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
30234 $as_echo_n "checking for working strndup... " >&6; }
30235 if ${gl_cv_func_strndup_works+:} false; then :
30236 $as_echo_n "(cached) " >&6
30238 if test "$cross_compiling" = yes; then :
30241 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
30242 *) gl_cv_func_strndup_works="guessing yes";;
30246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30247 /* end confdefs.h. */
30249 #include <string.h>
30250 #include <stdlib.h>
30255 #if !HAVE_DECL_STRNDUP
30260 char *strndup (const char *, size_t);
30263 s = strndup ("some longer string", 15);
30265 s = strndup ("shorter string", 13);
30266 return s[13] != '\0';
30271 if ac_fn_c_try_run "$LINENO"; then :
30272 gl_cv_func_strndup_works=yes
30274 gl_cv_func_strndup_works=no
30276 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30277 conftest.$ac_objext conftest.beam conftest.$ac_ext
30281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
30282 $as_echo "$gl_cv_func_strndup_works" >&6; }
30283 case $gl_cv_func_strndup_works in
30284 *no) REPLACE_STRNDUP=1 ;;
30290 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
30299 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
30313 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
30323 if test $ac_cv_have_decl_strnlen = no; then
30324 HAVE_DECL_STRNLEN=0
30327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
30328 $as_echo_n "checking for working strnlen... " >&6; }
30329 if ${ac_cv_func_strnlen_working+:} false; then :
30330 $as_echo_n "(cached) " >&6
30332 if test "$cross_compiling" = yes; then :
30333 # Guess no on AIX systems, yes otherwise.
30335 aix*) ac_cv_func_strnlen_working=no;;
30336 *) ac_cv_func_strnlen_working=yes;;
30339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30340 /* end confdefs.h. */
30341 $ac_includes_default
30347 #define S_LEN (sizeof S - 1)
30349 /* At least one implementation is buggy: that of AIX 4.3 would
30350 give strnlen (S, 1) == 3. */
30353 for (i = 0; i < S_LEN + 1; ++i)
30355 int expected = i <= S_LEN ? i : S_LEN;
30356 if (strnlen (S, i) != expected)
30365 if ac_fn_c_try_run "$LINENO"; then :
30366 ac_cv_func_strnlen_working=yes
30368 ac_cv_func_strnlen_working=no
30370 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30371 conftest.$ac_objext conftest.beam conftest.$ac_ext
30375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
30376 $as_echo "$ac_cv_func_strnlen_working" >&6; }
30377 test $ac_cv_func_strnlen_working = no && :
30380 if test $ac_cv_func_strnlen_working = no; then
30385 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
30394 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
30409 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
30418 if test "$ac_cv_have_decl_strtoimax" != yes; then
30419 HAVE_DECL_STRTOIMAX=0
30422 if test "$ac_cv_func_strtoimax" = yes; then
30424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtoimax works" >&5
30425 $as_echo_n "checking whether strtoimax works... " >&6; }
30426 if ${gl_cv_func_strtoimax+:} false; then :
30427 $as_echo_n "(cached) " >&6
30429 if test "$cross_compiling" = yes; then :
30431 # Guess no on AIX 5.
30432 aix5*) gl_cv_func_strtoimax="guessing no" ;;
30433 # Guess yes otherwise.
30434 *) gl_cv_func_strtoimax="guessing yes" ;;
30438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30439 /* end confdefs.h. */
30442 #include <string.h>
30443 #include <inttypes.h>
30446 if (sizeof (intmax_t) > sizeof (int))
30448 const char *s = "4294967295";
30452 res = strtoimax (s, &p, 10);
30453 if (p != s + strlen (s))
30457 if (res != (intmax_t) 65535 * (intmax_t) 65537)
30462 const char *s = "2147483647";
30466 res = strtoimax (s, &p, 10);
30467 if (p != s + strlen (s))
30471 if (res != 2147483647)
30478 if ac_fn_c_try_run "$LINENO"; then :
30479 gl_cv_func_strtoimax=yes
30481 gl_cv_func_strtoimax=no
30483 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30484 conftest.$ac_objext conftest.beam conftest.$ac_ext
30489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtoimax" >&5
30490 $as_echo "$gl_cv_func_strtoimax" >&6; }
30491 case "$gl_cv_func_strtoimax" in
30492 *no) REPLACE_STRTOIMAX=1 ;;
30495 if test "$ac_cv_have_decl_strtoimax" = yes; then
30496 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30497 REPLACE_STRTOIMAX=1
30502 if test $HAVE_DECL_STRTOIMAX = 0 || test $REPLACE_STRTOIMAX = 1; then
30511 gl_LIBOBJS="$gl_LIBOBJS strtoimax.$ac_objext"
30514 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
30515 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
30521 cat >>confdefs.h <<_ACEOF
30522 #define HAVE_DECL_STRTOLL $ac_have_decl
30539 for ac_func in strtol
30541 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
30542 if test "x$ac_cv_func_strtol" = xyes; then :
30543 cat >>confdefs.h <<_ACEOF
30544 #define HAVE_STRTOL 1
30551 if test $ac_cv_func_strtol = no; then
30560 gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
30566 if test "$ac_cv_type_long_long_int" = yes; then
30567 for ac_func in strtoll
30569 ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
30570 if test "x$ac_cv_func_strtoll" = xyes; then :
30571 cat >>confdefs.h <<_ACEOF
30572 #define HAVE_STRTOLL 1
30578 if test $ac_cv_func_strtoll = no; then
30583 if test $HAVE_STRTOLL = 0; then
30592 gl_LIBOBJS="$gl_LIBOBJS strtoll.$ac_objext"
30609 $as_echo "#define GNULIB_TEST_STRTOLL 1" >>confdefs.h
30614 for ac_func in strtoul
30616 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
30617 if test "x$ac_cv_func_strtoul" = xyes; then :
30618 cat >>confdefs.h <<_ACEOF
30619 #define HAVE_STRTOUL 1
30626 if test $ac_cv_func_strtoul = no; then
30635 gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
30641 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
30642 for ac_func in strtoull
30644 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
30645 if test "x$ac_cv_func_strtoull" = xyes; then :
30646 cat >>confdefs.h <<_ACEOF
30647 #define HAVE_STRTOULL 1
30653 if test $ac_cv_func_strtoull = no; then
30658 if test $HAVE_STRTOULL = 0; then
30667 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
30684 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
30693 if test "$ac_cv_have_decl_strtoumax" = yes; then
30694 if test "$ac_cv_func_strtoumax" != yes; then
30695 # HP-UX 11.11 has "#define strtoimax(...) ..." but no function.
30696 REPLACE_STRTOUMAX=1
30699 HAVE_DECL_STRTOUMAX=0
30702 if test $HAVE_DECL_STRTOUMAX = 0 || test $REPLACE_STRTOUMAX = 1; then
30711 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
30714 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
30715 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
30721 cat >>confdefs.h <<_ACEOF
30722 #define HAVE_DECL_STRTOULL $ac_have_decl
30741 if test $ac_cv_func_symlink = no; then
30744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
30745 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
30746 if ${gl_cv_func_symlink_works+:} false; then :
30747 $as_echo_n "(cached) " >&6
30749 if test "$cross_compiling" = yes; then :
30751 # Guess yes on glibc systems.
30752 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
30753 # If we don't know, assume the worst.
30754 *) gl_cv_func_symlink_works="guessing no" ;;
30758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30759 /* end confdefs.h. */
30760 #include <unistd.h>
30766 if (!symlink ("a", "conftest.link/"))
30768 if (symlink ("conftest.f", "conftest.lnk2"))
30770 else if (!symlink ("a", "conftest.lnk2/"))
30778 if ac_fn_c_try_run "$LINENO"; then :
30779 gl_cv_func_symlink_works=yes
30781 gl_cv_func_symlink_works=no
30783 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30784 conftest.$ac_objext conftest.beam conftest.$ac_ext
30787 rm -f conftest.f conftest.link conftest.lnk2
30789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
30790 $as_echo "$gl_cv_func_symlink_works" >&6; }
30791 case "$gl_cv_func_symlink_works" in
30799 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
30808 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
30822 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
30831 if test $ac_cv_func_symlinkat = no; then
30835 if test $HAVE_SYMLINKAT = 0; then
30844 gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
30858 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
30876 if test $gl_cv_have_include_next = yes; then
30877 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
30880 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
30881 if ${gl_cv_next_sys_stat_h+:} false; then :
30882 $as_echo_n "(cached) " >&6
30885 if test $ac_cv_header_sys_stat_h = yes; then
30890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891 /* end confdefs.h. */
30892 #include <sys/stat.h>
30895 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30896 *) gl_absname_cpp="$ac_cpp" ;;
30901 gl_dirsep_regex='[/\\]'
30904 gl_dirsep_regex='\/'
30907 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30908 gl_header_literal_regex=`echo 'sys/stat.h' \
30909 | sed -e "$gl_make_literal_regex_sed"`
30910 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30911 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30917 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30918 sed -n "$gl_absolute_header_sed"`
30920 gl_header=$gl_cv_absolute_sys_stat_h
30921 gl_cv_next_sys_stat_h='"'$gl_header'"'
30923 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
30928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
30929 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
30931 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
30933 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30934 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30935 gl_next_as_first_directive='<'sys/stat.h'>'
30937 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30938 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
30940 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
30952 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
30954 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
30958 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30959 #include <sys/stat.h>
30961 if test "x$ac_cv_type_nlink_t" = xyes; then :
30965 $as_echo "#define nlink_t int" >>confdefs.h
30971 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
30972 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30974 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30975 if eval \${$as_gl_Symbol+:} false; then :
30976 $as_echo_n "(cached) " >&6
30978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979 /* end confdefs.h. */
30980 #include <sys/stat.h>
30991 if ac_fn_c_try_compile "$LINENO"; then :
30992 eval "$as_gl_Symbol=yes"
30994 eval "$as_gl_Symbol=no"
30996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30998 eval ac_res=\$$as_gl_Symbol
30999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31000 $as_echo "$ac_res" >&6; }
31001 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31002 cat >>confdefs.h <<_ACEOF
31003 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31006 eval ac_cv_have_decl_$gl_func=yes
31020 if test $ac_cv_header_sysexits_h = yes; then
31031 if test $gl_cv_have_include_next = yes; then
31032 gl_cv_next_sysexits_h='<'sysexits.h'>'
31034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
31035 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
31036 if ${gl_cv_next_sysexits_h+:} false; then :
31037 $as_echo_n "(cached) " >&6
31040 if test $ac_cv_header_sysexits_h = yes; then
31045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31046 /* end confdefs.h. */
31047 #include <sysexits.h>
31050 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31051 *) gl_absname_cpp="$ac_cpp" ;;
31056 gl_dirsep_regex='[/\\]'
31059 gl_dirsep_regex='\/'
31062 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31063 gl_header_literal_regex=`echo 'sysexits.h' \
31064 | sed -e "$gl_make_literal_regex_sed"`
31065 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31066 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31072 gl_cv_absolute_sysexits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31073 sed -n "$gl_absolute_header_sed"`
31075 gl_header=$gl_cv_absolute_sysexits_h
31076 gl_cv_next_sysexits_h='"'$gl_header'"'
31078 gl_cv_next_sysexits_h='<'sysexits.h'>'
31083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
31084 $as_echo "$gl_cv_next_sysexits_h" >&6; }
31086 NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
31088 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31089 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31090 gl_next_as_first_directive='<'sysexits.h'>'
31092 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31093 gl_next_as_first_directive=$gl_cv_next_sysexits_h
31095 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
31100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31101 /* end confdefs.h. */
31102 #include <sysexits.h>
31114 case EX_UNAVAILABLE:
31131 if ac_fn_c_try_compile "$LINENO"; then :
31134 SYSEXITS_H=sysexits.h
31136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31139 SYSEXITS_H=sysexits.h
31143 if test -n "$SYSEXITS_H"; then
31144 GL_GENERATE_SYSEXITS_H_TRUE=
31145 GL_GENERATE_SYSEXITS_H_FALSE='#'
31147 GL_GENERATE_SYSEXITS_H_TRUE='#'
31148 GL_GENERATE_SYSEXITS_H_FALSE=
31166 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
31168 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
31174 cat >>confdefs.h <<_ACEOF
31175 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
31178 if test $ac_cv_have_decl_localtime_r = no; then
31179 HAVE_DECL_LOCALTIME_R=0
31183 if test $ac_cv_func_localtime_r = yes; then
31185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
31186 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
31187 if ${gl_cv_time_r_posix+:} false; then :
31188 $as_echo_n "(cached) " >&6
31190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31191 /* end confdefs.h. */
31196 /* We don't need to append 'restrict's to the argument types,
31197 even though the POSIX signature has the 'restrict's,
31198 since C99 says they can't affect type compatibility. */
31199 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
31201 /* Check the return type is a pointer.
31202 On HP-UX 10 it is 'int'. */
31203 *localtime_r (0, 0);
31209 if ac_fn_c_try_compile "$LINENO"; then :
31210 gl_cv_time_r_posix=yes
31212 gl_cv_time_r_posix=no
31214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
31218 $as_echo "$gl_cv_time_r_posix" >&6; }
31219 if test $gl_cv_time_r_posix = yes; then
31220 REPLACE_LOCALTIME_R=0
31222 REPLACE_LOCALTIME_R=1
31228 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
31237 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
31254 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
31265 if test $ac_cv_have_decl_ttyname_r = no; then
31266 HAVE_DECL_TTYNAME_R=0
31269 for ac_func in ttyname_r
31271 ac_fn_c_check_func "$LINENO" "ttyname_r" "ac_cv_func_ttyname_r"
31272 if test "x$ac_cv_func_ttyname_r" = xyes; then :
31273 cat >>confdefs.h <<_ACEOF
31274 #define HAVE_TTYNAME_R 1
31280 if test $ac_cv_func_ttyname_r = no; then
31284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r is compatible with its POSIX signature" >&5
31285 $as_echo_n "checking whether ttyname_r is compatible with its POSIX signature... " >&6; }
31286 if ${gl_cv_func_ttyname_r_posix+:} false; then :
31287 $as_echo_n "(cached) " >&6
31289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31290 /* end confdefs.h. */
31291 #include <stddef.h>
31292 #include <unistd.h>
31296 *ttyname_r (0, NULL, 0);
31302 if ac_fn_c_try_compile "$LINENO"; then :
31303 gl_cv_func_ttyname_r_posix=no
31305 gl_cv_func_ttyname_r_posix=yes
31307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_posix" >&5
31311 $as_echo "$gl_cv_func_ttyname_r_posix" >&6; }
31312 if test $gl_cv_func_ttyname_r_posix = no; then
31313 REPLACE_TTYNAME_R=1
31316 $as_echo "#define HAVE_POSIXDECL_TTYNAME_R 1" >>confdefs.h
31319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ttyname_r works with small buffers" >&5
31320 $as_echo_n "checking whether ttyname_r works with small buffers... " >&6; }
31321 if ${gl_cv_func_ttyname_r_works+:} false; then :
31322 $as_echo_n "(cached) " >&6
31326 # Guess no on Solaris.
31327 solaris*) gl_cv_func_ttyname_r_works="guessing no" ;;
31328 # Guess no on OSF/1.
31329 osf*) gl_cv_func_ttyname_r_works="guessing no" ;;
31330 # Guess yes otherwise.
31331 *) gl_cv_func_ttyname_r_works="guessing yes" ;;
31333 if test "$cross_compiling" = yes; then :
31336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31337 /* end confdefs.h. */
31340 #include <unistd.h>
31346 char buf[31]; /* use any size < 128 here */
31348 fd = open ("/dev/tty", O_RDONLY);
31351 else if (ttyname_r (fd, buf, sizeof (buf)) != 0)
31353 else if (ttyname_r (fd, buf, 1) == 0)
31358 if ac_fn_c_try_run "$LINENO"; then :
31359 gl_cv_func_ttyname_r_works=yes
31362 17 | 18) gl_cv_func_ttyname_r_works=no ;;
31365 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31366 conftest.$ac_objext conftest.beam conftest.$ac_ext
31371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ttyname_r_works" >&5
31372 $as_echo "$gl_cv_func_ttyname_r_works" >&6; }
31373 case "$gl_cv_func_ttyname_r_works" in
31375 *) REPLACE_TTYNAME_R=1 ;;
31380 if test $HAVE_TTYNAME_R = 0 || test $REPLACE_TTYNAME_R = 1; then
31389 gl_LIBOBJS="$gl_LIBOBJS ttyname_r.$ac_objext"
31392 for ac_func in ttyname
31394 ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname"
31395 if test "x$ac_cv_func_ttyname" = xyes; then :
31396 cat >>confdefs.h <<_ACEOF
31397 #define HAVE_TTYNAME 1
31416 $as_echo "#define GNULIB_TEST_TTYNAME_R 1" >>confdefs.h
31432 if test $gl_cv_have_include_next = yes; then
31433 gl_cv_next_unistd_h='<'unistd.h'>'
31435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
31436 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
31437 if ${gl_cv_next_unistd_h+:} false; then :
31438 $as_echo_n "(cached) " >&6
31441 if test $ac_cv_header_unistd_h = yes; then
31446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31447 /* end confdefs.h. */
31448 #include <unistd.h>
31451 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31452 *) gl_absname_cpp="$ac_cpp" ;;
31457 gl_dirsep_regex='[/\\]'
31460 gl_dirsep_regex='\/'
31463 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31464 gl_header_literal_regex=`echo 'unistd.h' \
31465 | sed -e "$gl_make_literal_regex_sed"`
31466 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31467 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31473 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31474 sed -n "$gl_absolute_header_sed"`
31476 gl_header=$gl_cv_absolute_unistd_h
31477 gl_cv_next_unistd_h='"'$gl_header'"'
31479 gl_cv_next_unistd_h='<'unistd.h'>'
31484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
31485 $as_echo "$gl_cv_next_unistd_h" >&6; }
31487 NEXT_UNISTD_H=$gl_cv_next_unistd_h
31489 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31490 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31491 gl_next_as_first_directive='<'unistd.h'>'
31493 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31494 gl_next_as_first_directive=$gl_cv_next_unistd_h
31496 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
31501 if test $ac_cv_header_unistd_h = yes; then
31513 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
31514 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31516 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31517 if eval \${$as_gl_Symbol+:} false; then :
31518 $as_echo_n "(cached) " >&6
31520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31521 /* end confdefs.h. */
31524 # include <unistd.h>
31526 /* Some systems declare various items in the wrong headers. */
31527 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31528 # include <fcntl.h>
31529 # include <stdio.h>
31530 # include <stdlib.h>
31531 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
31545 if ac_fn_c_try_compile "$LINENO"; then :
31546 eval "$as_gl_Symbol=yes"
31548 eval "$as_gl_Symbol=no"
31550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31552 eval ac_res=\$$as_gl_Symbol
31553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31554 $as_echo "$ac_res" >&6; }
31555 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31556 cat >>confdefs.h <<_ACEOF
31557 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31560 eval ac_cv_have_decl_$gl_func=yes
31570 if { test "$HAVE_LIBUNISTRING" != yes \
31575 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31576 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31577 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31578 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31579 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
31589 LIBUNISTRING_UNITYPES_H='unitypes.h'
31591 LIBUNISTRING_UNITYPES_H=
31597 if { test "$HAVE_LIBUNISTRING" != yes \
31602 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31603 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31604 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31605 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31606 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
31616 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
31618 LIBUNISTRING_UNIWIDTH_H=
31624 if { test "$HAVE_LIBUNISTRING" != yes \
31629 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
31630 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
31631 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
31632 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
31633 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
31643 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
31644 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
31646 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
31647 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
31656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
31657 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
31658 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
31659 $as_echo_n "(cached) " >&6
31661 touch conftest.file
31662 # Assume that if we have lstat, we can also check symlinks.
31663 if test $ac_cv_func_lstat = yes; then
31664 ln -s conftest.file conftest.lnk
31666 if test "$cross_compiling" = yes; then :
31668 # Guess yes on glibc systems.
31669 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
31670 # If we don't know, assume the worst.
31671 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
31675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31676 /* end confdefs.h. */
31678 # include <unistd.h>
31679 #else /* on Windows with MSVC */
31688 if (!unlink ("conftest.file/"))
31690 else if (errno != ENOTDIR)
31693 if (!unlink ("conftest.lnk/"))
31695 else if (errno != ENOTDIR)
31704 if ac_fn_c_try_run "$LINENO"; then :
31705 gl_cv_func_unlink_honors_slashes=yes
31707 gl_cv_func_unlink_honors_slashes=no
31709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31710 conftest.$ac_objext conftest.beam conftest.$ac_ext
31713 rm -f conftest.file conftest.lnk
31715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
31716 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
31717 case "$gl_cv_func_unlink_honors_slashes" in
31723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
31724 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
31725 if ${gl_cv_func_unlink_parent_fails+:} false; then :
31726 $as_echo_n "(cached) " >&6
31731 # Use the mktemp program if available. If not available, hide the error
31733 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
31734 test -n "$tmp" && test -d "$tmp"
31737 # Use a simple mkdir command. It is guaranteed to fail if the directory
31738 # already exists. $RANDOM is bash specific and expands to empty in shells
31739 # other than bash, ksh and zsh. Its use does not increase security;
31740 # rather, it minimizes the probability of failure in a very cluttered /tmp
31742 tmp=/tmp/gt$$-$RANDOM
31743 (umask 077 && mkdir "$tmp")
31745 mkdir "$tmp/subdir"
31746 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
31747 export GL_SUBDIR_FOR_UNLINK
31748 if test "$cross_compiling" = yes; then :
31749 # If we don't know, assume the worst.
31750 gl_cv_func_unlink_parent_fails="guessing no"
31753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31754 /* end confdefs.h. */
31756 #include <stdlib.h>
31758 # include <unistd.h>
31759 #else /* on Windows with MSVC */
31760 # include <direct.h>
31766 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
31768 else if (unlink ("..") == 0)
31774 if ac_fn_c_try_run "$LINENO"; then :
31775 gl_cv_func_unlink_parent_fails=yes
31777 gl_cv_func_unlink_parent_fails=no
31779 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31780 conftest.$ac_objext conftest.beam conftest.$ac_ext
31783 unset GL_SUBDIR_FOR_UNLINK
31786 gl_cv_func_unlink_parent_fails="guessing no"
31790 gl_cv_func_unlink_parent_fails="guessing yes"
31795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
31796 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
31797 case "$gl_cv_func_unlink_parent_fails" in
31801 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
31806 if test $REPLACE_UNLINK = 1; then
31815 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
31829 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
31839 if test $ac_cv_func_unlinkat = no; then
31842 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
31844 # Solaris 9 has *at functions, but uniformly mishandles trailing
31845 # slash in all of them.
31849 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
31850 if test $REPLACE_UNLINK = 1; then
31857 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
31866 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
31880 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
31888 # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
31889 # Cygwin, and mingw never let anyone (even root) unlink directories.
31890 # If anyone knows of another system for which unlink can never
31891 # remove a directory, please report it to <bug-coreutils@gnu.org>.
31892 # Unfortunately this is difficult to test for, since it requires root access
31893 # and might create garbage in the file system,
31894 # so the code below simply relies on the kernel name and version number.
31897 linux-* | linux | \
31898 freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
31902 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
31908 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
31932 for ac_func in unlockpt
31934 ac_fn_c_check_func "$LINENO" "unlockpt" "ac_cv_func_unlockpt"
31935 if test "x$ac_cv_func_unlockpt" = xyes; then :
31936 cat >>confdefs.h <<_ACEOF
31937 #define HAVE_UNLOCKPT 1
31943 if test $ac_cv_func_unlockpt = no; then
31947 if test $HAVE_UNLOCKPT = 0; then
31956 gl_LIBOBJS="$gl_LIBOBJS unlockpt.$ac_objext"
31959 for ac_func in revoke
31961 ac_fn_c_check_func "$LINENO" "revoke" "ac_cv_func_revoke"
31962 if test "x$ac_cv_func_revoke" = xyes; then :
31963 cat >>confdefs.h <<_ACEOF
31964 #define HAVE_REVOKE 1
31983 $as_echo "#define GNULIB_TEST_UNLOCKPT 1" >>confdefs.h
31990 if test $ac_cv_have_decl_unsetenv = no; then
31991 HAVE_DECL_UNSETENV=0
31993 for ac_func in unsetenv
31995 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
31996 if test "x$ac_cv_func_unsetenv" = xyes; then :
31997 cat >>confdefs.h <<_ACEOF
31998 #define HAVE_UNSETENV 1
32004 if test $ac_cv_func_unsetenv = no; then
32008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
32009 $as_echo_n "checking for unsetenv() return type... " >&6; }
32010 if ${gt_cv_func_unsetenv_ret+:} false; then :
32011 $as_echo_n "(cached) " >&6
32013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32014 /* end confdefs.h. */
32017 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
32018 #include <stdlib.h>
32023 int unsetenv (const char *name);
32033 if ac_fn_c_try_compile "$LINENO"; then :
32034 gt_cv_func_unsetenv_ret='int'
32036 gt_cv_func_unsetenv_ret='void'
32038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
32041 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
32042 if test $gt_cv_func_unsetenv_ret = 'void'; then
32044 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
32049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
32050 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
32051 if ${gl_cv_func_unsetenv_works+:} false; then :
32052 $as_echo_n "(cached) " >&6
32054 if test "$cross_compiling" = yes; then :
32056 # Guess yes on glibc systems.
32057 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
32058 # If we don't know, assume the worst.
32059 *) gl_cv_func_unsetenv_works="guessing no" ;;
32063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32064 /* end confdefs.h. */
32066 #include <stdlib.h>
32068 extern char **environ;
32074 char entry1[] = "a=1";
32075 char entry2[] = "b=2";
32076 char *env[] = { entry1, entry2, NULL };
32077 if (putenv ((char *) "a=1")) return 1;
32078 if (putenv (entry2)) return 2;
32081 if (getenv ("a")) return 3;
32082 if (!unsetenv ("") || errno != EINVAL) return 4;
32085 if (!getenv ("a")) return 5;
32088 if (getenv ("a")) return 6;
32094 if ac_fn_c_try_run "$LINENO"; then :
32095 gl_cv_func_unsetenv_works=yes
32097 gl_cv_func_unsetenv_works=no
32099 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32100 conftest.$ac_objext conftest.beam conftest.$ac_ext
32104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
32105 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
32106 case "$gl_cv_func_unsetenv_works" in
32114 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
32123 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
32141 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
32151 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
32152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
32153 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
32154 if ${gl_cv_func_futimesat_works+:} false; then :
32155 $as_echo_n "(cached) " >&6
32157 touch conftest.file
32158 if test "$cross_compiling" = yes; then :
32160 # Guess yes on glibc systems.
32161 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
32162 # If we don't know, assume the worst.
32163 *) gl_cv_func_futimesat_works="guessing no" ;;
32167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32168 /* end confdefs.h. */
32170 #include <stddef.h>
32171 #include <sys/times.h>
32177 int fd = open ("conftest.file", O_RDWR);
32178 if (fd < 0) return 1;
32179 if (futimesat (fd, NULL, NULL)) return 2;
32185 if ac_fn_c_try_run "$LINENO"; then :
32186 gl_cv_func_futimesat_works=yes
32188 gl_cv_func_futimesat_works=no
32190 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32191 conftest.$ac_objext conftest.beam conftest.$ac_ext
32194 rm -f conftest.file
32196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
32197 $as_echo "$gl_cv_func_futimesat_works" >&6; }
32198 case "$gl_cv_func_futimesat_works" in
32202 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
32212 if test $ac_cv_func_utimensat = no; then
32215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
32216 $as_echo_n "checking whether utimensat works... " >&6; }
32217 if ${gl_cv_func_utimensat_works+:} false; then :
32218 $as_echo_n "(cached) " >&6
32220 if test "$cross_compiling" = yes; then :
32221 gl_cv_func_utimensat_works="guessing no"
32223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32224 /* end confdefs.h. */
32227 #include <sys/stat.h>
32228 #include <unistd.h>
32234 const char *f = "conftest.file";
32235 if (close (creat (f, 0600)))
32237 /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported. */
32239 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
32242 /* Test whether UTIME_NOW and UTIME_OMIT work. */
32244 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
32245 if (utimensat (AT_FDCWD, f, ts, 0))
32250 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
32252 if (utimensat (AT_FDCWD, f, ts, 0))
32256 else if (st.st_ctime < st.st_atime)
32265 if ac_fn_c_try_run "$LINENO"; then :
32266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32267 /* end confdefs.h. */
32270 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
32271 in several file systems as recently as 2.6.32. Always replace utimensat
32272 to support older kernels. */
32284 if ac_fn_c_try_compile "$LINENO"; then :
32285 gl_cv_func_utimensat_works=yes
32287 gl_cv_func_utimensat_works="needs runtime check"
32289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32291 gl_cv_func_utimensat_works=no
32293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32294 conftest.$ac_objext conftest.beam conftest.$ac_ext
32298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
32299 $as_echo "$gl_cv_func_utimensat_works" >&6; }
32300 if test "$gl_cv_func_utimensat_works" != yes; then
32301 REPLACE_UTIMENSAT=1
32305 if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
32314 gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
32328 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
32334 if test $ac_cv_func_vasnprintf = no; then
32345 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
32355 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
32365 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
32375 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
32377 if test $ac_cv_func_vasnprintf = yes; then
32379 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
32393 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
32394 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
32398 $as_echo "#define ptrdiff_t long" >>confdefs.h
32412 for ac_func in vasprintf
32414 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
32415 if test "x$ac_cv_func_vasprintf" = xyes; then :
32416 cat >>confdefs.h <<_ACEOF
32417 #define HAVE_VASPRINTF 1
32423 if test $ac_cv_func_vasprintf = no; then
32433 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
32443 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
32446 if test $ac_cv_func_vasprintf = yes; then
32447 REPLACE_VASPRINTF=1
32472 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
32478 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
32482 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
32485 # Check whether --with-packager was given.
32486 if test "${with_packager+set}" = set; then :
32487 withval=$with_packager; case $withval in
32490 cat >>confdefs.h <<_ACEOF
32491 #define PACKAGE_PACKAGER "$withval"
32500 # Check whether --with-packager-version was given.
32501 if test "${with_packager_version+set}" = set; then :
32502 withval=$with_packager_version; case $withval in
32505 cat >>confdefs.h <<_ACEOF
32506 #define PACKAGE_PACKAGER_VERSION "$withval"
32515 # Check whether --with-packager-bug-reports was given.
32516 if test "${with_packager_bug_reports+set}" = set; then :
32517 withval=$with_packager_bug_reports; case $withval in
32520 cat >>confdefs.h <<_ACEOF
32521 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
32529 if test "X$with_packager" = "X" && \
32530 test "X$with_packager_version$with_packager_bug_reports" != "X"
32532 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
32537 gl_cv_func_vsnprintf_usable=no
32538 for ac_func in vsnprintf
32540 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
32541 if test "x$ac_cv_func_vsnprintf" = xyes; then :
32542 cat >>confdefs.h <<_ACEOF
32543 #define HAVE_VSNPRINTF 1
32549 if test $ac_cv_func_vsnprintf = yes; then
32553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
32554 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
32555 if ${gl_cv_func_snprintf_size1+:} false; then :
32556 $as_echo_n "(cached) " >&6
32559 if test "$cross_compiling" = yes; then :
32560 gl_cv_func_snprintf_size1="guessing yes"
32562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32563 /* end confdefs.h. */
32567 # define my_snprintf snprintf
32569 # include <stdarg.h>
32570 static int my_snprintf (char *buf, int size, const char *format, ...)
32574 va_start (args, format);
32575 ret = vsnprintf (buf, size, format, args);
32582 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
32583 my_snprintf (buf, 1, "%d", 12345);
32584 return buf[1] != 'E';
32587 if ac_fn_c_try_run "$LINENO"; then :
32588 gl_cv_func_snprintf_size1=yes
32590 gl_cv_func_snprintf_size1=no
32592 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32593 conftest.$ac_objext conftest.beam conftest.$ac_ext
32598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
32599 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
32601 case "$gl_cv_func_snprintf_size1" in
32604 case "$gl_cv_func_snprintf_retval_c99" in
32608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
32609 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
32610 if ${gl_cv_func_printf_positions+:} false; then :
32611 $as_echo_n "(cached) " >&6
32614 if test "$cross_compiling" = yes; then :
32617 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
32618 gl_cv_func_printf_positions="guessing no";;
32619 beos*) gl_cv_func_printf_positions="guessing no";;
32620 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
32621 *) gl_cv_func_printf_positions="guessing yes";;
32625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32626 /* end confdefs.h. */
32629 #include <string.h>
32630 /* The string "%2$d %1$d", with dollar characters protected from the shell's
32631 dollar expansion (possibly an autoconf bug). */
32632 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
32633 static char buf[100];
32636 sprintf (buf, format, 33, 55);
32637 return (strcmp (buf, "55 33") != 0);
32640 if ac_fn_c_try_run "$LINENO"; then :
32641 gl_cv_func_printf_positions=yes
32643 gl_cv_func_printf_positions=no
32645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32646 conftest.$ac_objext conftest.beam conftest.$ac_ext
32651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
32652 $as_echo "$gl_cv_func_printf_positions" >&6; }
32654 case "$gl_cv_func_printf_positions" in
32656 gl_cv_func_vsnprintf_usable=yes
32664 if test $gl_cv_func_vsnprintf_usable = no; then
32675 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
32677 if test $ac_cv_func_vsnprintf = yes; then
32678 REPLACE_VSNPRINTF=1
32684 if test $ac_cv_have_decl_vsnprintf = no; then
32685 HAVE_DECL_VSNPRINTF=0
32699 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
32715 if test $gl_cv_have_include_next = yes; then
32716 gl_cv_next_wchar_h='<'wchar.h'>'
32718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
32719 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
32720 if ${gl_cv_next_wchar_h+:} false; then :
32721 $as_echo_n "(cached) " >&6
32724 if test $ac_cv_header_wchar_h = yes; then
32729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32730 /* end confdefs.h. */
32734 aix*) gl_absname_cpp="$ac_cpp -C" ;;
32735 *) gl_absname_cpp="$ac_cpp" ;;
32740 gl_dirsep_regex='[/\\]'
32743 gl_dirsep_regex='\/'
32746 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
32747 gl_header_literal_regex=`echo 'wchar.h' \
32748 | sed -e "$gl_make_literal_regex_sed"`
32749 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
32750 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
32756 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
32757 sed -n "$gl_absolute_header_sed"`
32759 gl_header=$gl_cv_absolute_wchar_h
32760 gl_cv_next_wchar_h='"'$gl_header'"'
32762 gl_cv_next_wchar_h='<'wchar.h'>'
32767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
32768 $as_echo "$gl_cv_next_wchar_h" >&6; }
32770 NEXT_WCHAR_H=$gl_cv_next_wchar_h
32772 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
32773 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
32774 gl_next_as_first_directive='<'wchar.h'>'
32776 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
32777 gl_next_as_first_directive=$gl_cv_next_wchar_h
32779 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
32784 if test $ac_cv_header_wchar_h = yes; then
32794 if test $gt_cv_c_wint_t = yes; then
32802 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
32803 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32805 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32806 if eval \${$as_gl_Symbol+:} false; then :
32807 $as_echo_n "(cached) " >&6
32809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32810 /* end confdefs.h. */
32812 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32814 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32815 included before <wchar.h>. */
32816 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32817 # include <stddef.h>
32818 # include <stdio.h>
32832 if ac_fn_c_try_compile "$LINENO"; then :
32833 eval "$as_gl_Symbol=yes"
32835 eval "$as_gl_Symbol=no"
32837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32839 eval ac_res=\$$as_gl_Symbol
32840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32841 $as_echo "$ac_res" >&6; }
32842 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32843 cat >>confdefs.h <<_ACEOF
32844 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32847 eval ac_cv_have_decl_$gl_func=yes
32862 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
32866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
32867 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
32868 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
32869 $as_echo_n "(cached) " >&6
32873 # Guess no on AIX and OSF/1.
32874 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
32875 # Guess yes otherwise.
32876 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
32878 if test $LOCALE_JA != none; then
32879 if test "$cross_compiling" = yes; then :
32882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32883 /* end confdefs.h. */
32885 #include <locale.h>
32886 #include <string.h>
32887 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32889 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32890 included before <wchar.h>. */
32891 #include <stddef.h>
32897 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
32899 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
32903 memset (&state, '\0', sizeof (mbstate_t));
32904 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
32905 if (mbsinit (&state))
32911 if ac_fn_c_try_run "$LINENO"; then :
32912 gl_cv_func_mbrtowc_incomplete_state=yes
32914 gl_cv_func_mbrtowc_incomplete_state=no
32916 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32917 conftest.$ac_objext conftest.beam conftest.$ac_ext
32923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
32924 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
32929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
32930 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
32931 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
32932 $as_echo_n "(cached) " >&6
32936 # Guess no on Solaris 8.
32937 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
32938 # Guess yes otherwise.
32939 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
32941 if test $LOCALE_ZH_CN != none; then
32942 if test "$cross_compiling" = yes; then :
32945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32946 /* end confdefs.h. */
32948 #include <locale.h>
32949 #include <stdlib.h>
32950 #include <string.h>
32951 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32953 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32954 included before <wchar.h>. */
32955 #include <stddef.h>
32961 /* This fails on Solaris 8:
32962 mbrtowc returns 2, and sets wc to 0x00F0.
32963 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
32964 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
32966 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
32970 memset (&state, '\0', sizeof (mbstate_t));
32971 if (mbrtowc (&wc, input + 3, 6, &state) != 4
32972 && mbtowc (&wc, input + 3, 6) == 4)
32978 if ac_fn_c_try_run "$LINENO"; then :
32979 gl_cv_func_mbrtowc_sanitycheck=yes
32981 gl_cv_func_mbrtowc_sanitycheck=no
32983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32984 conftest.$ac_objext conftest.beam conftest.$ac_ext
32990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
32991 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
32993 REPLACE_MBSTATE_T=0
32994 case "$gl_cv_func_mbrtowc_incomplete_state" in
32996 *) REPLACE_MBSTATE_T=1 ;;
32998 case "$gl_cv_func_mbrtowc_sanitycheck" in
33000 *) REPLACE_MBSTATE_T=1 ;;
33003 REPLACE_MBSTATE_T=1
33008 if test $ac_cv_func_wcrtomb = no; then
33010 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
33011 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33013 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33014 included before <wchar.h>. */
33015 #include <stddef.h>
33021 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
33027 cat >>confdefs.h <<_ACEOF
33028 #define HAVE_DECL_WCRTOMB $ac_have_decl
33031 if test $ac_cv_have_decl_wcrtomb = yes; then
33035 if test $REPLACE_MBSTATE_T = 1; then
33043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
33044 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
33045 if ${gl_cv_func_wcrtomb_retval+:} false; then :
33046 $as_echo_n "(cached) " >&6
33050 # Guess no on AIX 4, OSF/1 and Solaris.
33051 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
33052 # Guess yes otherwise.
33053 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
33055 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
33056 if test "$cross_compiling" = yes; then :
33059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33060 /* end confdefs.h. */
33062 #include <locale.h>
33063 #include <string.h>
33064 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33066 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33067 included before <wchar.h>. */
33068 #include <stddef.h>
33075 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
33077 if (wcrtomb (NULL, 0, NULL) != 1)
33080 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
33082 if (wcrtomb (NULL, 0, NULL) != 1)
33085 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
33087 if (wcrtomb (NULL, 0, NULL) != 1)
33090 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
33092 if (wcrtomb (NULL, 0, NULL) != 1)
33098 if ac_fn_c_try_run "$LINENO"; then :
33099 gl_cv_func_wcrtomb_retval=yes
33101 gl_cv_func_wcrtomb_retval=no
33103 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33104 conftest.$ac_objext conftest.beam conftest.$ac_ext
33110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
33111 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
33112 case "$gl_cv_func_wcrtomb_retval" in
33114 *) REPLACE_WCRTOMB=1 ;;
33119 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
33128 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
33145 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
33154 if test $ac_cv_func_iswcntrl = yes; then
33162 if test $gt_cv_c_wint_t = yes; then
33178 if test $gl_cv_have_include_next = yes; then
33179 gl_cv_next_wctype_h='<'wctype.h'>'
33181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
33182 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
33183 if ${gl_cv_next_wctype_h+:} false; then :
33184 $as_echo_n "(cached) " >&6
33187 if test $ac_cv_header_wctype_h = yes; then
33192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33193 /* end confdefs.h. */
33194 #include <wctype.h>
33197 aix*) gl_absname_cpp="$ac_cpp -C" ;;
33198 *) gl_absname_cpp="$ac_cpp" ;;
33203 gl_dirsep_regex='[/\\]'
33206 gl_dirsep_regex='\/'
33209 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
33210 gl_header_literal_regex=`echo 'wctype.h' \
33211 | sed -e "$gl_make_literal_regex_sed"`
33212 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
33213 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
33219 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
33220 sed -n "$gl_absolute_header_sed"`
33222 gl_header=$gl_cv_absolute_wctype_h
33223 gl_cv_next_wctype_h='"'$gl_header'"'
33225 gl_cv_next_wctype_h='<'wctype.h'>'
33230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
33231 $as_echo "$gl_cv_next_wctype_h" >&6; }
33233 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
33235 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
33236 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
33237 gl_next_as_first_directive='<'wctype.h'>'
33239 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
33240 gl_next_as_first_directive=$gl_cv_next_wctype_h
33242 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
33247 if test $ac_cv_header_wctype_h = yes; then
33248 if test $ac_cv_func_iswcntrl = yes; then
33249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
33250 $as_echo_n "checking whether iswcntrl works... " >&6; }
33251 if ${gl_cv_func_iswcntrl_works+:} false; then :
33252 $as_echo_n "(cached) " >&6
33255 if test "$cross_compiling" = yes; then :
33256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33257 /* end confdefs.h. */
33258 #include <stdlib.h>
33259 #if __GNU_LIBRARY__ == 1
33260 Linux libc5 i18n is broken.
33270 if ac_fn_c_try_compile "$LINENO"; then :
33271 gl_cv_func_iswcntrl_works="guessing yes"
33273 gl_cv_func_iswcntrl_works="guessing no"
33275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33279 /* end confdefs.h. */
33281 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33282 included before <wchar.h>.
33283 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33284 must be included before <wchar.h>. */
33285 #include <stddef.h>
33289 #include <wctype.h>
33290 int main () { return iswprint ('x') == 0; }
33293 if ac_fn_c_try_run "$LINENO"; then :
33294 gl_cv_func_iswcntrl_works=yes
33296 gl_cv_func_iswcntrl_works=no
33298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33299 conftest.$ac_objext conftest.beam conftest.$ac_ext
33304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
33305 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
33313 case "$gl_cv_func_iswcntrl_works" in
33314 *yes) REPLACE_ISWCNTRL=0 ;;
33315 *) REPLACE_ISWCNTRL=1 ;;
33319 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
33323 if test $REPLACE_ISWCNTRL = 1; then
33326 for ac_func in towlower
33328 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
33329 if test "x$ac_cv_func_towlower" = xyes; then :
33330 cat >>confdefs.h <<_ACEOF
33331 #define HAVE_TOWLOWER 1
33337 if test $ac_cv_func_towlower = yes; then
33340 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33341 included before <wchar.h>.
33342 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33343 must be included before <wchar.h>. */
33344 #include <stddef.h>
33349 # include <wctype.h>
33353 if test "x$ac_cv_have_decl_towlower" = xyes; then :
33359 cat >>confdefs.h <<_ACEOF
33360 #define HAVE_DECL_TOWLOWER $ac_have_decl
33363 if test $ac_cv_have_decl_towlower = yes; then
33372 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
33376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
33377 $as_echo_n "checking for wctype_t... " >&6; }
33378 if ${gl_cv_type_wctype_t+:} false; then :
33379 $as_echo_n "(cached) " >&6
33381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33382 /* end confdefs.h. */
33383 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33384 included before <wchar.h>.
33385 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33386 must be included before <wchar.h>. */
33387 #include <stddef.h>
33392 # include <wctype.h>
33404 if ac_fn_c_try_compile "$LINENO"; then :
33405 gl_cv_type_wctype_t=yes
33407 gl_cv_type_wctype_t=no
33409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
33413 $as_echo "$gl_cv_type_wctype_t" >&6; }
33414 if test $gl_cv_type_wctype_t = no; then
33418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
33419 $as_echo_n "checking for wctrans_t... " >&6; }
33420 if ${gl_cv_type_wctrans_t+:} false; then :
33421 $as_echo_n "(cached) " >&6
33423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33424 /* end confdefs.h. */
33425 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
33426 included before <wchar.h>.
33427 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
33428 must be included before <wchar.h>. */
33429 #include <stddef.h>
33433 #include <wctype.h>
33444 if ac_fn_c_try_compile "$LINENO"; then :
33445 gl_cv_type_wctrans_t=yes
33447 gl_cv_type_wctrans_t=no
33449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
33453 $as_echo "$gl_cv_type_wctrans_t" >&6; }
33454 if test $gl_cv_type_wctrans_t = no; then
33459 for gl_func in wctype iswctype wctrans towctrans ; do
33460 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
33461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
33462 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
33463 if eval \${$as_gl_Symbol+:} false; then :
33464 $as_echo_n "(cached) " >&6
33466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33467 /* end confdefs.h. */
33469 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33471 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
33472 included before <wchar.h>. */
33473 #if !(defined __GLIBC__ && !defined __UCLIBC__)
33474 # include <stddef.h>
33475 # include <stdio.h>
33477 # include <wchar.h>
33479 #include <wctype.h>
33490 if ac_fn_c_try_compile "$LINENO"; then :
33491 eval "$as_gl_Symbol=yes"
33493 eval "$as_gl_Symbol=no"
33495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33497 eval ac_res=\$$as_gl_Symbol
33498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33499 $as_echo "$ac_res" >&6; }
33500 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
33501 cat >>confdefs.h <<_ACEOF
33502 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
33505 eval ac_cv_have_decl_$gl_func=yes
33521 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
33522 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33523 #include <string.h>
33524 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33526 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33527 before <wchar.h>. */
33528 #include <stddef.h>
33534 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
33540 cat >>confdefs.h <<_ACEOF
33541 #define HAVE_DECL_WCWIDTH $ac_have_decl
33544 if test $ac_cv_have_decl_wcwidth != yes; then
33545 HAVE_DECL_WCWIDTH=0
33548 if test $ac_cv_func_wcwidth = yes; then
33550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
33551 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
33552 if ${gl_cv_func_wcwidth_works+:} false; then :
33553 $as_echo_n "(cached) " >&6
33556 if test "$cross_compiling" = yes; then :
33559 # Guess yes on glibc and AIX 7 systems.
33560 *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
33561 *) gl_cv_func_wcwidth_works="guessing no";;
33565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33566 /* end confdefs.h. */
33568 #include <locale.h>
33569 /* AIX 3.2.5 declares wcwidth in <string.h>. */
33570 #include <string.h>
33571 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
33573 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
33574 before <wchar.h>. */
33575 #include <stddef.h>
33579 #if !HAVE_DECL_WCWIDTH
33581 # ifdef __cplusplus
33589 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
33591 if (wcwidth (0x0301) > 0)
33593 if (wcwidth (0x05B0) > 0)
33595 if (wcwidth (0x200B) > 0)
33601 if ac_fn_c_try_run "$LINENO"; then :
33602 gl_cv_func_wcwidth_works=yes
33604 gl_cv_func_wcwidth_works=no
33606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
33607 conftest.$ac_objext conftest.beam conftest.$ac_ext
33612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
33613 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
33614 case "$gl_cv_func_wcwidth_works" in
33616 *no) REPLACE_WCWIDTH=1 ;;
33622 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
33631 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
33645 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
33652 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
33658 if test $REPLACE_WRITE = 1; then
33667 gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
33682 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
33692 for ac_header in stdint.h
33694 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
33695 if test "x$ac_cv_header_stdint_h" = xyes; then :
33696 cat >>confdefs.h <<_ACEOF
33697 #define HAVE_STDINT_H 1
33716 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
33718 # End of code from modules
33739 gl_source_base='tests'
33740 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
33742 gl_module_indicator_condition=$gltests_WITNESS
33752 LIBGNU_LIBDEPS="$gl_libdeps"
33754 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
33766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
33767 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
33768 if ${ac_cv_header_time+:} false; then :
33769 $as_echo_n "(cached) " >&6
33771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33772 /* end confdefs.h. */
33773 #include <sys/types.h>
33774 #include <sys/time.h>
33780 if ((struct tm *) 0)
33786 if ac_fn_c_try_compile "$LINENO"; then :
33787 ac_cv_header_time=yes
33789 ac_cv_header_time=no
33791 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
33794 $as_echo "$ac_cv_header_time" >&6; }
33795 if test $ac_cv_header_time = yes; then
33797 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
33801 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
33802 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
33804 cat >>confdefs.h <<_ACEOF
33805 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
33809 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
33818 # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
33821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33822 $as_echo_n "checking for library containing setsockopt... " >&6; }
33823 if ${ac_cv_search_setsockopt+:} false; then :
33824 $as_echo_n "(cached) " >&6
33826 ac_func_search_save_LIBS=$LIBS
33827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33828 /* end confdefs.h. */
33830 /* Override any GCC internal prototype to avoid an error.
33831 Use char because int might match the return type of a GCC
33832 builtin and then its argument prototype would still apply. */
33836 char setsockopt ();
33840 return setsockopt ();
33845 for ac_lib in '' socket; do
33846 if test -z "$ac_lib"; then
33847 ac_res="none required"
33850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
33852 if ac_fn_c_try_link "$LINENO"; then :
33853 ac_cv_search_setsockopt=$ac_res
33855 rm -f core conftest.err conftest.$ac_objext \
33857 if ${ac_cv_search_setsockopt+:} false; then :
33861 if ${ac_cv_search_setsockopt+:} false; then :
33864 ac_cv_search_setsockopt=no
33866 rm conftest.$ac_ext
33867 LIBS=$ac_func_search_save_LIBS
33869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33870 $as_echo "$ac_cv_search_setsockopt" >&6; }
33871 ac_res=$ac_cv_search_setsockopt
33872 if test "$ac_res" != no; then :
33873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33877 $as_echo_n "checking for library containing setsockopt... " >&6; }
33878 if ${ac_cv_search_setsockopt+:} false; then :
33879 $as_echo_n "(cached) " >&6
33881 ac_func_search_save_LIBS=$LIBS
33882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33883 /* end confdefs.h. */
33885 /* Override any GCC internal prototype to avoid an error.
33886 Use char because int might match the return type of a GCC
33887 builtin and then its argument prototype would still apply. */
33891 char setsockopt ();
33895 return setsockopt ();
33900 for ac_lib in '' socket; do
33901 if test -z "$ac_lib"; then
33902 ac_res="none required"
33905 LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
33907 if ac_fn_c_try_link "$LINENO"; then :
33908 ac_cv_search_setsockopt=$ac_res
33910 rm -f core conftest.err conftest.$ac_objext \
33912 if ${ac_cv_search_setsockopt+:} false; then :
33916 if ${ac_cv_search_setsockopt+:} false; then :
33919 ac_cv_search_setsockopt=no
33921 rm conftest.$ac_ext
33922 LIBS=$ac_func_search_save_LIBS
33924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33925 $as_echo "$ac_cv_search_setsockopt" >&6; }
33926 ac_res=$ac_cv_search_setsockopt
33927 if test "$ac_res" != no; then :
33928 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
33935 $as_echo_n "checking for library containing setsockopt... " >&6; }
33936 if ${ac_cv_search_setsockopt+:} false; then :
33937 $as_echo_n "(cached) " >&6
33939 ac_func_search_save_LIBS=$LIBS
33940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33941 /* end confdefs.h. */
33943 /* Override any GCC internal prototype to avoid an error.
33944 Use char because int might match the return type of a GCC
33945 builtin and then its argument prototype would still apply. */
33949 char setsockopt ();
33953 return setsockopt ();
33958 for ac_lib in '' nsl; do
33959 if test -z "$ac_lib"; then
33960 ac_res="none required"
33963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
33965 if ac_fn_c_try_link "$LINENO"; then :
33966 ac_cv_search_setsockopt=$ac_res
33968 rm -f core conftest.err conftest.$ac_objext \
33970 if ${ac_cv_search_setsockopt+:} false; then :
33974 if ${ac_cv_search_setsockopt+:} false; then :
33977 ac_cv_search_setsockopt=no
33979 rm conftest.$ac_ext
33980 LIBS=$ac_func_search_save_LIBS
33982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
33983 $as_echo "$ac_cv_search_setsockopt" >&6; }
33984 ac_res=$ac_cv_search_setsockopt
33985 if test "$ac_res" != no; then :
33986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
33991 case "$ac_cv_search_setsockopt" in
33992 -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
33998 if test $ac_cv_header_sys_mtio_h = yes; then
33999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
34000 $as_echo_n "checking for remote tape header files... " >&6; }
34001 if ${pu_cv_header_rmt+:} false; then :
34002 $as_echo_n "(cached) " >&6
34004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34005 /* end confdefs.h. */
34008 # include <sgtty.h>
34010 #include <sys/socket.h>
34012 if ac_fn_c_try_cpp "$LINENO"; then :
34013 pu_cv_header_rmt=yes
34015 pu_cv_header_rmt=no
34017 rm -f conftest.err conftest.i conftest.$ac_ext
34019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
34020 $as_echo "$pu_cv_header_rmt" >&6; }
34021 test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
34026 for ac_header in sys/mtio.h
34028 ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
34029 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
34030 cat >>confdefs.h <<_ACEOF
34031 #define HAVE_SYS_MTIO_H 1
34038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
34039 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
34040 if ${pu_cv_header_mtio_check_field+:} false; then :
34041 $as_echo_n "(cached) " >&6
34043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34044 /* end confdefs.h. */
34045 #include <sys/mtio.h>
34048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34049 $EGREP "mt_model" >/dev/null 2>&1; then :
34050 pu_cv_header_mtio_check_field=mt_model
34052 pu_cv_header_mtio_check_field=mt_type
34057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
34058 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
34060 cat >>confdefs.h <<_ACEOF
34061 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
34067 if test "x$DEFAULT_RMT_DIR" != x; then
34068 DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
34070 DEFAULT_RMT_DIR='$(libexecdir)'
34073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
34074 $as_echo_n "checking whether to build rmt... " >&6; }
34076 # Check whether --with-rmt was given.
34077 if test "${with_rmt+set}" = set; then :
34078 withval=$with_rmt; case $withval in
34079 yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
34080 /*) DEFAULT_RMT_COMMAND=$withval
34081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
34082 $as_echo "no, use $withval instead" >&6; };;
34083 *) as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
34086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34087 $as_echo "yes" >&6; }
34089 if test "$PU_RMT_PROG" = ""; then
34090 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
34091 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
34097 if test "x$DEFAULT_RMT_COMMAND" != x; then
34099 cat >>confdefs.h <<_ACEOF
34100 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
34104 if test "$pu_cv_header_rmt" = yes; then
34106 PU_RMT_COND_FALSE='#'
34108 PU_RMT_COND_TRUE='#'
34121 for ac_header in sys/buf.h
34123 ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
34124 #include <sys/param.h>
34127 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
34128 cat >>confdefs.h <<_ACEOF
34129 #define HAVE_SYS_BUF_H 1
34139 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
34140 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
34142 cat >>confdefs.h <<_ACEOF
34143 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
34155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
34156 $as_echo_n "checking for library containing gethostbyname... " >&6; }
34157 if ${ac_cv_search_gethostbyname+:} false; then :
34158 $as_echo_n "(cached) " >&6
34160 ac_func_search_save_LIBS=$LIBS
34161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34162 /* end confdefs.h. */
34164 /* Override any GCC internal prototype to avoid an error.
34165 Use char because int might match the return type of a GCC
34166 builtin and then its argument prototype would still apply. */
34170 char gethostbyname ();
34174 return gethostbyname ();
34179 for ac_lib in '' nsl; do
34180 if test -z "$ac_lib"; then
34181 ac_res="none required"
34184 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
34186 if ac_fn_c_try_link "$LINENO"; then :
34187 ac_cv_search_gethostbyname=$ac_res
34189 rm -f core conftest.err conftest.$ac_objext \
34191 if ${ac_cv_search_gethostbyname+:} false; then :
34195 if ${ac_cv_search_gethostbyname+:} false; then :
34198 ac_cv_search_gethostbyname=no
34200 rm conftest.$ac_ext
34201 LIBS=$ac_func_search_save_LIBS
34203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
34204 $as_echo "$ac_cv_search_gethostbyname" >&6; }
34205 ac_res=$ac_cv_search_gethostbyname
34206 if test "$ac_res" != no; then :
34207 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34214 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
34215 # ------------------------------------------------
34216 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
34217 # Otherwise, run RUN-IF-NOT-FOUND.
34220 # Check whether --enable-gcc-warnings was given.
34221 if test "${enable_gcc_warnings+set}" = set; then :
34222 enableval=$enable_gcc_warnings; case $enableval in
34224 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
34226 gl_gcc_warnings=$enableval
34229 if test -d "$srcdir"/.git; then
34230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34231 /* end confdefs.h. */
34233 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
34236 # error "your version of gcc is older than 4.6"
34248 if ac_fn_c_try_cpp "$LINENO"; then :
34249 gl_gcc_warnings=yes
34251 rm -f conftest.err conftest.i conftest.$ac_ext
34259 if test "$gl_gcc_warnings" = yes; then
34260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
34261 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
34262 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
34263 $as_echo_n "(cached) " >&6
34266 gl_save_compiler_FLAGS="$CFLAGS"
34267 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
34268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34269 /* end confdefs.h. */
34279 if ac_fn_c_try_link "$LINENO"; then :
34280 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
34282 gl_cv_warn_c__Werror__Wunknown_warning_option=no
34284 rm -f core conftest.err conftest.$ac_objext \
34285 conftest$ac_exeext conftest.$ac_ext
34286 CFLAGS="$gl_save_compiler_FLAGS"
34289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
34290 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
34291 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
34292 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
34294 gl_unknown_warnings_are_errors=
34298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
34299 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
34300 if ${gl_cv_warn_c__Werror+:} false; then :
34301 $as_echo_n "(cached) " >&6
34304 gl_save_compiler_FLAGS="$CFLAGS"
34305 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
34306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34307 /* end confdefs.h. */
34317 if ac_fn_c_try_link "$LINENO"; then :
34318 gl_cv_warn_c__Werror=yes
34320 gl_cv_warn_c__Werror=no
34322 rm -f core conftest.err conftest.$ac_objext \
34323 conftest$ac_exeext conftest.$ac_ext
34324 CFLAGS="$gl_save_compiler_FLAGS"
34327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
34328 $as_echo "$gl_cv_warn_c__Werror" >&6; }
34329 if test "x$gl_cv_warn_c__Werror" = xyes; then :
34330 as_fn_append WERROR_CFLAGS " -Werror"
34337 # This, $nw, is the list of warnings we disable.
34338 nw="$nw -Wformat-nonliteral" # warnings in Fedora 17 stdio.h
34339 nw="$nw -Wvla" # warnings in gettext.h
34340 nw="$nw -Wswitch-default" # Too many warnings for now
34341 nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
34342 nw="$nw -Winline" # It's OK to not inline.
34343 nw="$nw -Wstrict-overflow" # It's OK to optimize strictly.
34344 nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
34348 if test -n "$GCC"; then
34350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
34351 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
34352 if ${gl_cv_cc_nomfi_supported+:} false; then :
34353 $as_echo_n "(cached) " >&6
34356 gl_save_CFLAGS="$CFLAGS"
34357 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
34358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34359 /* end confdefs.h. */
34369 if ac_fn_c_try_compile "$LINENO"; then :
34370 gl_cv_cc_nomfi_supported=yes
34372 gl_cv_cc_nomfi_supported=no
34374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34375 CFLAGS="$gl_save_CFLAGS"
34378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
34379 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
34381 if test "$gl_cv_cc_nomfi_supported" = yes; then
34382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
34383 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
34384 if ${gl_cv_cc_nomfi_needed+:} false; then :
34385 $as_echo_n "(cached) " >&6
34388 gl_save_CFLAGS="$CFLAGS"
34389 CFLAGS="$CFLAGS -W -Werror"
34390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34391 /* end confdefs.h. */
34394 typedef struct { int a; int b; } s_t;
34406 if ac_fn_c_try_compile "$LINENO"; then :
34407 gl_cv_cc_nomfi_needed=no
34409 gl_cv_cc_nomfi_needed=yes
34411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34412 CFLAGS="$gl_save_CFLAGS"
34416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
34417 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
34420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
34421 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
34422 if ${gl_cv_cc_uninitialized_supported+:} false; then :
34423 $as_echo_n "(cached) " >&6
34426 gl_save_CFLAGS="$CFLAGS"
34427 CFLAGS="$CFLAGS -Werror -Wuninitialized"
34428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34429 /* end confdefs.h. */
34439 if ac_fn_c_try_compile "$LINENO"; then :
34440 gl_cv_cc_uninitialized_supported=yes
34442 gl_cv_cc_uninitialized_supported=no
34444 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34445 CFLAGS="$gl_save_CFLAGS"
34448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
34449 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
34453 # List all gcc warning categories.
34455 for gl_manywarn_item in \
34459 -Waggressive-loop-optimizations \
34463 -Wbad-function-cast \
34464 -Wbuiltin-macro-redefined \
34466 -Wchar-subscripts \
34470 -Wcoverage-mismatch \
34473 -Wdeprecated-declarations \
34474 -Wdisabled-optimization \
34476 -Wdouble-promotion \
34481 -Wformat-contains-nul \
34482 -Wformat-extra-args \
34483 -Wformat-nonliteral \
34484 -Wformat-security \
34486 -Wformat-zero-length \
34487 -Wfree-nonheap-object \
34488 -Wignored-qualifiers \
34490 -Wimplicit-function-declaration \
34494 -Wint-to-pointer-cast \
34495 -Winvalid-memory-model \
34497 -Wjump-misses-init \
34500 -Wmaybe-uninitialized \
34502 -Wmissing-declarations \
34503 -Wmissing-field-initializers \
34504 -Wmissing-include-dirs \
34505 -Wmissing-parameter-type \
34506 -Wmissing-prototypes \
34512 -Wold-style-declaration \
34513 -Wold-style-definition \
34515 -Woverlength-strings \
34518 -Wpacked-bitfield-compat \
34522 -Wpointer-to-int-cast \
34524 -Wreturn-local-addr \
34528 -Wsizeof-pointer-memaccess \
34529 -Wstack-protector \
34530 -Wstrict-aliasing \
34531 -Wstrict-overflow \
34532 -Wstrict-prototypes \
34533 -Wsuggest-attribute=const \
34534 -Wsuggest-attribute=format \
34535 -Wsuggest-attribute=noreturn \
34536 -Wsuggest-attribute=pure \
34545 -Wunknown-pragmas \
34546 -Wunsafe-loop-optimizations \
34548 -Wunused-but-set-parameter \
34549 -Wunused-but-set-variable \
34550 -Wunused-function \
34552 -Wunused-local-typedefs \
34554 -Wunused-parameter \
34557 -Wunused-variable \
34559 -Wvariadic-macros \
34560 -Wvector-operation-performance \
34562 -Wvolatile-register-var \
34564 -fdiagnostics-show-option \
34568 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
34571 # Disable specific options as needed.
34572 if test "$gl_cv_cc_nomfi_needed" = yes; then
34573 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
34576 if test "$gl_cv_cc_uninitialized_supported" = no; then
34577 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
34580 ws=$gl_manywarn_set
34588 *" $gl_warn_item "*)
34591 gl_warn_set="$gl_warn_set $gl_warn_item"
34599 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
34601 case $gl_positive in
34602 -Wno-*) gl_positive=-W`expr "X$gl_positive" : 'X-Wno-\(.*\)'` ;;
34604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
34605 $as_echo_n "checking whether C compiler handles $w... " >&6; }
34606 if eval \${$as_gl_Warn+:} false; then :
34607 $as_echo_n "(cached) " >&6
34610 gl_save_compiler_FLAGS="$CFLAGS"
34611 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $gl_positive"
34612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34613 /* end confdefs.h. */
34623 if ac_fn_c_try_link "$LINENO"; then :
34624 eval "$as_gl_Warn=yes"
34626 eval "$as_gl_Warn=no"
34628 rm -f core conftest.err conftest.$ac_objext \
34629 conftest$ac_exeext conftest.$ac_ext
34630 CFLAGS="$gl_save_compiler_FLAGS"
34633 eval ac_res=\$$as_gl_Warn
34634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
34635 $as_echo "$ac_res" >&6; }
34636 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
34637 as_fn_append WARN_CFLAGS " $w"
34643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
34644 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
34645 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
34646 $as_echo_n "(cached) " >&6
34649 gl_save_compiler_FLAGS="$CFLAGS"
34650 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wsign-compare"
34651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34652 /* end confdefs.h. */
34662 if ac_fn_c_try_link "$LINENO"; then :
34663 gl_cv_warn_c__Wno_sign_compare=yes
34665 gl_cv_warn_c__Wno_sign_compare=no
34667 rm -f core conftest.err conftest.$ac_objext \
34668 conftest$ac_exeext conftest.$ac_ext
34669 CFLAGS="$gl_save_compiler_FLAGS"
34672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
34673 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
34674 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
34675 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
34678 # Too many warnings for now
34680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
34681 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
34682 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
34683 $as_echo_n "(cached) " >&6
34686 gl_save_compiler_FLAGS="$CFLAGS"
34687 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wtype-limits"
34688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34689 /* end confdefs.h. */
34699 if ac_fn_c_try_link "$LINENO"; then :
34700 gl_cv_warn_c__Wno_type_limits=yes
34702 gl_cv_warn_c__Wno_type_limits=no
34704 rm -f core conftest.err conftest.$ac_objext \
34705 conftest$ac_exeext conftest.$ac_ext
34706 CFLAGS="$gl_save_compiler_FLAGS"
34709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
34710 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
34711 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
34712 as_fn_append WARN_CFLAGS " -Wno-type-limits"
34715 # It's OK to optimize based on types.
34717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
34718 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
34719 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
34720 $as_echo_n "(cached) " >&6
34723 gl_save_compiler_FLAGS="$CFLAGS"
34724 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wunused-parameter"
34725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34726 /* end confdefs.h. */
34736 if ac_fn_c_try_link "$LINENO"; then :
34737 gl_cv_warn_c__Wno_unused_parameter=yes
34739 gl_cv_warn_c__Wno_unused_parameter=no
34741 rm -f core conftest.err conftest.$ac_objext \
34742 conftest$ac_exeext conftest.$ac_ext
34743 CFLAGS="$gl_save_compiler_FLAGS"
34746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
34747 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
34748 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
34749 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
34752 # Too many warnings for now
34754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
34755 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
34756 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
34757 $as_echo_n "(cached) " >&6
34760 gl_save_compiler_FLAGS="$CFLAGS"
34761 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wformat-nonliteral"
34762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34763 /* end confdefs.h. */
34773 if ac_fn_c_try_link "$LINENO"; then :
34774 gl_cv_warn_c__Wno_format_nonliteral=yes
34776 gl_cv_warn_c__Wno_format_nonliteral=no
34778 rm -f core conftest.err conftest.$ac_objext \
34779 conftest$ac_exeext conftest.$ac_ext
34780 CFLAGS="$gl_save_compiler_FLAGS"
34783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
34784 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
34785 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
34786 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
34792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
34793 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
34794 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
34795 $as_echo_n "(cached) " >&6
34798 gl_save_compiler_FLAGS="$CFLAGS"
34799 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
34800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34801 /* end confdefs.h. */
34811 if ac_fn_c_try_link "$LINENO"; then :
34812 gl_cv_warn_c__fdiagnostics_show_option=yes
34814 gl_cv_warn_c__fdiagnostics_show_option=no
34816 rm -f core conftest.err conftest.$ac_objext \
34817 conftest$ac_exeext conftest.$ac_ext
34818 CFLAGS="$gl_save_compiler_FLAGS"
34821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
34822 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
34823 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
34824 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
34829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
34830 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
34831 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
34832 $as_echo_n "(cached) " >&6
34835 gl_save_compiler_FLAGS="$CFLAGS"
34836 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
34837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34838 /* end confdefs.h. */
34848 if ac_fn_c_try_link "$LINENO"; then :
34849 gl_cv_warn_c__funit_at_a_time=yes
34851 gl_cv_warn_c__funit_at_a_time=no
34853 rm -f core conftest.err conftest.$ac_objext \
34854 conftest$ac_exeext conftest.$ac_ext
34855 CFLAGS="$gl_save_compiler_FLAGS"
34858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
34859 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
34860 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
34861 as_fn_append WARN_CFLAGS " -funit-at-a-time"
34869 $as_echo "#define lint 1" >>confdefs.h
34873 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
34876 # Use a slightly smaller set of warning options for lib/.
34877 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
34879 nw="$nw -Wmissing-prototypes"
34880 nw="$nw -Wunused-macros"
34882 # These are for argp.
34883 nw="$nw -Wmissing-field-initializers"
34888 set x $WARN_CFLAGS; shift
34892 *" $gl_warn_item "*)
34895 gl_warn_set="$gl_warn_set $gl_warn_item"
34899 GNULIB_WARN_CFLAGS=$gl_warn_set
34902 # This is also for argp.
34904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
34905 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
34906 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
34907 $as_echo_n "(cached) " >&6
34910 gl_save_compiler_FLAGS="$CFLAGS"
34911 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wmissing-field-initializers"
34912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34913 /* end confdefs.h. */
34923 if ac_fn_c_try_link "$LINENO"; then :
34924 gl_cv_warn_c__Wno_missing_field_initializers=yes
34926 gl_cv_warn_c__Wno_missing_field_initializers=no
34928 rm -f core conftest.err conftest.$ac_objext \
34929 conftest$ac_exeext conftest.$ac_ext
34930 CFLAGS="$gl_save_compiler_FLAGS"
34933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
34934 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
34935 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
34936 as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
34943 # For gnulib-tests, the set is slightly smaller still.
34945 # It's not worth being this picky about test programs.
34946 nw="$nw -Wsuggest-attribute=const"
34949 set x $GNULIB_WARN_CFLAGS; shift
34953 *" $gl_warn_item "*)
34956 gl_warn_set="$gl_warn_set $gl_warn_item"
34960 GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
34967 # Check whether --with-xattrs was given.
34968 if test "${with_xattrs+set}" = set; then :
34969 withval=$with_xattrs;
34976 # First check for <sys/xattr.h>
34977 for ac_header in sys/xattr.h
34979 ac_fn_c_check_header_mongrel "$LINENO" "sys/xattr.h" "ac_cv_header_sys_xattr_h" "$ac_includes_default"
34980 if test "x$ac_cv_header_sys_xattr_h" = xyes; then :
34981 cat >>confdefs.h <<_ACEOF
34982 #define HAVE_SYS_XATTR_H 1
34989 if test "$ac_cv_header_sys_xattr_h" = yes; then
34990 TAR_COND_XATTR_H_TRUE=
34991 TAR_COND_XATTR_H_FALSE='#'
34993 TAR_COND_XATTR_H_TRUE='#'
34994 TAR_COND_XATTR_H_FALSE=
34999 TAR_LIB_ATTR_FALSE='#'
35001 TAR_LIB_ATTR_TRUE='#'
35002 TAR_LIB_ATTR_FALSE=
35005 if test "$ac_cv_header_sys_xattr_h" = yes; then
35006 for ac_func in getxattr fgetxattr lgetxattr \
35007 setxattr fsetxattr lsetxattr \
35008 listxattr flistxattr llistxattr
35010 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35011 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35012 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35013 cat >>confdefs.h <<_ACEOF
35014 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35016 # only when functions are present
35018 $as_echo "#define HAVE_SYS_XATTR_H 1" >>confdefs.h
35020 if test "$with_xattrs" != no; then
35022 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
35031 # If <sys/xattr.h> is not found, then check for <attr/xattr.h>
35032 if test "$ac_cv_header_sys_xattr_h" != yes; then
35033 for ac_header in attr/xattr.h
35035 ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
35036 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
35037 cat >>confdefs.h <<_ACEOF
35038 #define HAVE_ATTR_XATTR_H 1
35045 if test "$ac_cv_header_attr_xattr_h" = yes; then
35046 TAR_COND_XATTR_H_TRUE=
35047 TAR_COND_XATTR_H_FALSE='#'
35049 TAR_COND_XATTR_H_TRUE='#'
35050 TAR_COND_XATTR_H_FALSE=
35053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
35054 $as_echo_n "checking for fgetxattr in -lattr... " >&6; }
35055 if ${ac_cv_lib_attr_fgetxattr+:} false; then :
35056 $as_echo_n "(cached) " >&6
35058 ac_check_lib_save_LIBS=$LIBS
35059 LIBS="-lattr $LIBS"
35060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35061 /* end confdefs.h. */
35063 /* Override any GCC internal prototype to avoid an error.
35064 Use char because int might match the return type of a GCC
35065 builtin and then its argument prototype would still apply. */
35073 return fgetxattr ();
35078 if ac_fn_c_try_link "$LINENO"; then :
35079 ac_cv_lib_attr_fgetxattr=yes
35081 ac_cv_lib_attr_fgetxattr=no
35083 rm -f core conftest.err conftest.$ac_objext \
35084 conftest$ac_exeext conftest.$ac_ext
35085 LIBS=$ac_check_lib_save_LIBS
35087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
35088 $as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
35089 if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
35090 cat >>confdefs.h <<_ACEOF
35091 #define HAVE_LIBATTR 1
35094 LIBS="-lattr $LIBS"
35098 if test "$ac_cv_lib_attr_fgetxattr" = yes; then
35100 TAR_LIB_ATTR_FALSE='#'
35102 TAR_LIB_ATTR_TRUE='#'
35103 TAR_LIB_ATTR_FALSE=
35106 if test "$ac_cv_header_attr_xattr_h" = yes; then
35107 for ac_func in getxattr fgetxattr lgetxattr \
35108 setxattr fsetxattr lsetxattr \
35109 listxattr flistxattr llistxattr
35111 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
35112 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
35113 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
35114 cat >>confdefs.h <<_ACEOF
35115 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
35117 # only when functions are present
35119 $as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
35121 if test "$with_xattrs" != no; then
35123 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
35139 if test $ac_cv_func_grantpt = yes; then
35140 TAR_COND_GRANTPT_TRUE=
35141 TAR_COND_GRANTPT_FALSE='#'
35143 TAR_COND_GRANTPT_TRUE='#'
35144 TAR_COND_GRANTPT_FALSE=
35148 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
35150 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
35156 cat >>confdefs.h <<_ACEOF
35157 #define HAVE_DECL_GETGRGID $ac_have_decl
35160 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
35162 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
35168 cat >>confdefs.h <<_ACEOF
35169 #define HAVE_DECL_GETPWUID $ac_have_decl
35172 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
35174 if test "x$ac_cv_have_decl_time" = xyes; then :
35180 cat >>confdefs.h <<_ACEOF
35181 #define HAVE_DECL_TIME $ac_have_decl
35185 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
35186 if test "x$ac_cv_func_waitpid" = xyes; then :
35187 $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
35190 case " $LIBOBJS " in
35191 *" waitpid.$ac_objext "* ) ;;
35192 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
35201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
35202 $as_echo_n "checking for remote shell... " >&6; }
35203 if ${tar_cv_path_RSH+:} false; then :
35204 $as_echo_n "(cached) " >&6
35206 if test -n "$RSH"; then
35207 tar_cv_path_RSH=$RSH
35210 for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
35211 /usr/bin/nsh /usr/bin/rcmd
35213 # Prefer a non-symlink rsh to a symlink one, so that binaries built
35214 # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
35215 # will run on AIX 4.3.0, which has only /usr/bin/rsh.
35216 if test -f $ac_file; then
35217 if (test -h $ac_file) 2>/dev/null; then
35218 test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
35220 tar_cv_path_RSH=$ac_file
35227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
35228 $as_echo "$tar_cv_path_RSH" >&6; }
35229 if test $tar_cv_path_RSH = no; then
35230 for ac_header in netdb.h
35232 ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
35233 if test "x$ac_cv_header_netdb_h" = xyes; then :
35234 cat >>confdefs.h <<_ACEOF
35235 #define HAVE_NETDB_H 1
35244 cat >>confdefs.h <<_ACEOF
35245 #define REMOTE_SHELL "$tar_cv_path_RSH"
35254 # Check whether --with-compress was given.
35255 if test "${with_compress+set}" = set; then :
35256 withval=$with_compress; tar_cv_compressor_compress=${withval}
35258 tar_cv_compressor_compress=compress
35262 cat >>confdefs.h <<_ACEOF
35263 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
35270 # Check whether --with-gzip was given.
35271 if test "${with_gzip+set}" = set; then :
35272 withval=$with_gzip; tar_cv_compressor_gzip=${withval}
35274 tar_cv_compressor_gzip=gzip
35278 cat >>confdefs.h <<_ACEOF
35279 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
35286 # Check whether --with-bzip2 was given.
35287 if test "${with_bzip2+set}" = set; then :
35288 withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
35290 tar_cv_compressor_bzip2=bzip2
35294 cat >>confdefs.h <<_ACEOF
35295 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
35302 # Check whether --with-lzip was given.
35303 if test "${with_lzip+set}" = set; then :
35304 withval=$with_lzip; tar_cv_compressor_lzip=${withval}
35306 tar_cv_compressor_lzip=lzip
35310 cat >>confdefs.h <<_ACEOF
35311 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
35318 # Check whether --with-lzma was given.
35319 if test "${with_lzma+set}" = set; then :
35320 withval=$with_lzma; tar_cv_compressor_lzma=${withval}
35322 tar_cv_compressor_lzma=lzma
35326 cat >>confdefs.h <<_ACEOF
35327 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
35334 # Check whether --with-lzop was given.
35335 if test "${with_lzop+set}" = set; then :
35336 withval=$with_lzop; tar_cv_compressor_lzop=${withval}
35338 tar_cv_compressor_lzop=lzop
35342 cat >>confdefs.h <<_ACEOF
35343 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
35350 # Check whether --with-xz was given.
35351 if test "${with_xz+set}" = set; then :
35352 withval=$with_xz; tar_cv_compressor_xz=${withval}
35354 tar_cv_compressor_xz=xz
35358 cat >>confdefs.h <<_ACEOF
35359 #define XZ_PROGRAM "$tar_cv_compressor_xz"
35363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
35364 $as_echo_n "checking for default archive format... " >&6; }
35368 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
35369 DEFAULT_ARCHIVE_FORMAT="GNU"
35371 case $DEFAULT_ARCHIVE_FORMAT in
35372 V7|OLDGNU|USTAR|POSIX|GNU) ;;
35373 *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
35376 cat >>confdefs.h <<_ACEOF
35377 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
35380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
35381 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
35383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
35384 $as_echo_n "checking for default archive... " >&6; }
35387 if test -z "$DEFAULT_ARCHIVE"; then
35390 if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
35391 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
35392 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
35394 # FIXME: Look for DEFTAPE in <sys/mtio.h>.
35395 # FIXME: Let DEVICE_PREFIX be configured from the environment.
35396 # FIXME: Rearrange, here.
35397 case $DEFAULT_ARCHIVE in
35400 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
35402 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
35405 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
35411 case "$device_prefix" in
35414 cat >>confdefs.h <<_ACEOF
35415 #define DEVICE_PREFIX "$device_prefix"
35422 cat >>confdefs.h <<_ACEOF
35423 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
35426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
35427 $as_echo "$DEFAULT_ARCHIVE" >&6; }
35430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
35431 $as_echo_n "checking for default blocking... " >&6; }
35432 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
35434 cat >>confdefs.h <<_ACEOF
35435 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
35438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
35439 $as_echo "$DEFAULT_BLOCKING" >&6; }
35441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
35442 $as_echo_n "checking for default quoting style... " >&6; }
35445 DEFAULT_QUOTING_STYLE="escape"
35448 case $DEFAULT_QUOTING_STYLE in
35449 literal|shell|shell-always|c|escape|locale|clocale) ;;
35450 *) as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
35452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
35453 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
35454 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
35456 cat >>confdefs.h <<_ACEOF
35457 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
35463 if test "X$prefix" = "XNONE"; then
35464 acl_final_prefix="$ac_default_prefix"
35466 acl_final_prefix="$prefix"
35468 if test "X$exec_prefix" = "XNONE"; then
35469 acl_final_exec_prefix='${prefix}'
35471 acl_final_exec_prefix="$exec_prefix"
35473 acl_save_prefix="$prefix"
35474 prefix="$acl_final_prefix"
35475 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
35476 prefix="$acl_save_prefix"
35480 # Check whether --with-gnu-ld was given.
35481 if test "${with_gnu_ld+set}" = set; then :
35482 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
35487 # Prepare PATH_SEPARATOR.
35488 # The user is always right.
35489 if test "${PATH_SEPARATOR+set}" != set; then
35490 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35491 # contains only /bin. Note that ksh looks also at the FPATH variable,
35492 # so we have to set that as well for the test.
35494 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35495 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35496 || PATH_SEPARATOR=';'
35501 if test "$GCC" = yes; then
35502 # Check if gcc -print-prog-name=ld gives a path.
35503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
35504 $as_echo_n "checking for ld used by $CC... " >&6; }
35507 # gcc leaves a trailing carriage return which upsets mingw
35508 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
35510 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
35513 # Accept absolute paths.
35515 re_direlt='/[^/][^/]*/\.\./'
35516 # Canonicalize the pathname of ld
35517 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
35518 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
35519 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
35521 test -z "$LD" && LD="$ac_prog"
35524 # If it fails, then pretend we aren't using GCC.
35528 # If it is relative, then search for the first ld in PATH.
35529 with_gnu_ld=unknown
35532 elif test "$with_gnu_ld" = yes; then
35533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
35534 $as_echo_n "checking for GNU ld... " >&6; }
35536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
35537 $as_echo_n "checking for non-GNU ld... " >&6; }
35539 if ${acl_cv_path_LD+:} false; then :
35540 $as_echo_n "(cached) " >&6
35542 if test -z "$LD"; then
35543 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
35544 for ac_dir in $PATH; do
35545 IFS="$acl_save_ifs"
35546 test -z "$ac_dir" && ac_dir=.
35547 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
35548 acl_cv_path_LD="$ac_dir/$ac_prog"
35549 # Check to see if the program is GNU ld. I'd rather use --version,
35550 # but apparently some variants of GNU ld only accept -v.
35551 # Break only if it was the GNU/non-GNU ld that we prefer.
35552 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
35553 *GNU* | *'with BFD'*)
35554 test "$with_gnu_ld" != no && break
35557 test "$with_gnu_ld" != yes && break
35562 IFS="$acl_save_ifs"
35564 acl_cv_path_LD="$LD" # Let the user override the test with a path.
35568 LD="$acl_cv_path_LD"
35569 if test -n "$LD"; then
35570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35571 $as_echo "$LD" >&6; }
35573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35574 $as_echo "no" >&6; }
35576 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
35577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
35578 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
35579 if ${acl_cv_prog_gnu_ld+:} false; then :
35580 $as_echo_n "(cached) " >&6
35582 # I'd rather use --version here, but apparently some GNU lds only accept -v.
35583 case `$LD -v 2>&1 </dev/null` in
35584 *GNU* | *'with BFD'*)
35585 acl_cv_prog_gnu_ld=yes
35588 acl_cv_prog_gnu_ld=no
35592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
35593 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
35594 with_gnu_ld=$acl_cv_prog_gnu_ld
35599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
35600 $as_echo_n "checking for shared library run path origin... " >&6; }
35601 if ${acl_cv_rpath+:} false; then :
35602 $as_echo_n "(cached) " >&6
35605 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
35606 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
35608 rm -f ./conftest.sh
35612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
35613 $as_echo "$acl_cv_rpath" >&6; }
35615 acl_libext="$acl_cv_libext"
35616 acl_shlibext="$acl_cv_shlibext"
35617 acl_libname_spec="$acl_cv_libname_spec"
35618 acl_library_names_spec="$acl_cv_library_names_spec"
35619 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
35620 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
35621 acl_hardcode_direct="$acl_cv_hardcode_direct"
35622 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
35623 # Check whether --enable-rpath was given.
35624 if test "${enable_rpath+set}" = set; then :
35625 enableval=$enable_rpath; :
35637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
35638 $as_echo_n "checking for 64-bit host... " >&6; }
35639 if ${gl_cv_solaris_64bit+:} false; then :
35640 $as_echo_n "(cached) " >&6
35642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35643 /* end confdefs.h. */
35650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
35651 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
35652 gl_cv_solaris_64bit=yes
35654 gl_cv_solaris_64bit=no
35660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
35661 $as_echo "$gl_cv_solaris_64bit" >&6; }
35662 if test $gl_cv_solaris_64bit = yes; then
35663 acl_libdirstem=lib/64
35664 case "$host_cpu" in
35665 sparc*) acl_libdirstem2=lib/sparcv9 ;;
35666 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
35671 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
35672 if test -n "$searchpath"; then
35673 acl_save_IFS="${IFS= }"; IFS=":"
35674 for searchdir in $searchpath; do
35675 if test -d "$searchdir"; then
35676 case "$searchdir" in
35677 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
35679 # Better ignore directories of this form. They are misleading.
35681 *) searchdir=`cd "$searchdir" && pwd`
35682 case "$searchdir" in
35683 */lib64 ) acl_libdirstem=lib64 ;;
35688 IFS="$acl_save_IFS"
35692 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
35707 acl_save_prefix="$prefix"
35708 prefix="$acl_final_prefix"
35709 acl_save_exec_prefix="$exec_prefix"
35710 exec_prefix="$acl_final_exec_prefix"
35712 eval additional_includedir=\"$includedir\"
35713 eval additional_libdir=\"$libdir\"
35715 exec_prefix="$acl_save_exec_prefix"
35716 prefix="$acl_save_prefix"
35719 # Check whether --with-libiconv-prefix was given.
35720 if test "${with_libiconv_prefix+set}" = set; then :
35721 withval=$with_libiconv_prefix;
35722 if test "X$withval" = "Xno"; then
35725 if test "X$withval" = "X"; then
35727 acl_save_prefix="$prefix"
35728 prefix="$acl_final_prefix"
35729 acl_save_exec_prefix="$exec_prefix"
35730 exec_prefix="$acl_final_exec_prefix"
35732 eval additional_includedir=\"$includedir\"
35733 eval additional_libdir=\"$libdir\"
35735 exec_prefix="$acl_save_exec_prefix"
35736 prefix="$acl_save_prefix"
35739 additional_includedir="$withval/include"
35740 additional_libdir="$withval/$acl_libdirstem"
35741 if test "$acl_libdirstem2" != "$acl_libdirstem" \
35742 && ! test -d "$withval/$acl_libdirstem"; then
35743 additional_libdir="$withval/$acl_libdirstem2"
35757 names_already_handled=
35758 names_next_round='iconv '
35759 while test -n "$names_next_round"; do
35760 names_this_round="$names_next_round"
35762 for name in $names_this_round; do
35764 for n in $names_already_handled; do
35765 if test "$n" = "$name"; then
35766 already_handled=yes
35770 if test -z "$already_handled"; then
35771 names_already_handled="$names_already_handled $name"
35772 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35773 eval value=\"\$HAVE_LIB$uppername\"
35774 if test -n "$value"; then
35775 if test "$value" = yes; then
35776 eval value=\"\$LIB$uppername\"
35777 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
35778 eval value=\"\$LTLIB$uppername\"
35779 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
35788 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
35789 if test -n "$acl_shlibext"; then
35790 shrext=".$acl_shlibext" # typically: shrext=.so
35794 if test $use_additional = yes; then
35795 dir="$additional_libdir"
35796 if test -n "$acl_shlibext"; then
35797 if test -f "$dir/$libname$shrext"; then
35799 found_so="$dir/$libname$shrext"
35801 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35802 ver=`(cd "$dir" && \
35803 for f in "$libname$shrext".*; do echo "$f"; done \
35804 | sed -e "s,^$libname$shrext\\\\.,," \
35805 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35806 | sed 1q ) 2>/dev/null`
35807 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35809 found_so="$dir/$libname$shrext.$ver"
35812 eval library_names=\"$acl_library_names_spec\"
35813 for f in $library_names; do
35814 if test -f "$dir/$f"; then
35823 if test "X$found_dir" = "X"; then
35824 if test -f "$dir/$libname.$acl_libext"; then
35826 found_a="$dir/$libname.$acl_libext"
35829 if test "X$found_dir" != "X"; then
35830 if test -f "$dir/$libname.la"; then
35831 found_la="$dir/$libname.la"
35835 if test "X$found_dir" = "X"; then
35836 for x in $LDFLAGS $LTLIBICONV; do
35838 acl_save_prefix="$prefix"
35839 prefix="$acl_final_prefix"
35840 acl_save_exec_prefix="$exec_prefix"
35841 exec_prefix="$acl_final_exec_prefix"
35843 exec_prefix="$acl_save_exec_prefix"
35844 prefix="$acl_save_prefix"
35848 dir=`echo "X$x" | sed -e 's/^X-L//'`
35849 if test -n "$acl_shlibext"; then
35850 if test -f "$dir/$libname$shrext"; then
35852 found_so="$dir/$libname$shrext"
35854 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35855 ver=`(cd "$dir" && \
35856 for f in "$libname$shrext".*; do echo "$f"; done \
35857 | sed -e "s,^$libname$shrext\\\\.,," \
35858 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35859 | sed 1q ) 2>/dev/null`
35860 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35862 found_so="$dir/$libname$shrext.$ver"
35865 eval library_names=\"$acl_library_names_spec\"
35866 for f in $library_names; do
35867 if test -f "$dir/$f"; then
35876 if test "X$found_dir" = "X"; then
35877 if test -f "$dir/$libname.$acl_libext"; then
35879 found_a="$dir/$libname.$acl_libext"
35882 if test "X$found_dir" != "X"; then
35883 if test -f "$dir/$libname.la"; then
35884 found_la="$dir/$libname.la"
35889 if test "X$found_dir" != "X"; then
35894 if test "X$found_dir" != "X"; then
35895 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
35896 if test "X$found_so" != "X"; then
35897 if test "$enable_rpath" = no \
35898 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35899 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35900 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35903 for x in $ltrpathdirs; do
35904 if test "X$x" = "X$found_dir"; then
35909 if test -z "$haveit"; then
35910 ltrpathdirs="$ltrpathdirs $found_dir"
35912 if test "$acl_hardcode_direct" = yes; then
35913 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35915 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35916 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35918 for x in $rpathdirs; do
35919 if test "X$x" = "X$found_dir"; then
35924 if test -z "$haveit"; then
35925 rpathdirs="$rpathdirs $found_dir"
35929 for x in $LDFLAGS $LIBICONV; do
35931 acl_save_prefix="$prefix"
35932 prefix="$acl_final_prefix"
35933 acl_save_exec_prefix="$exec_prefix"
35934 exec_prefix="$acl_final_exec_prefix"
35936 exec_prefix="$acl_save_exec_prefix"
35937 prefix="$acl_save_prefix"
35939 if test "X$x" = "X-L$found_dir"; then
35944 if test -z "$haveit"; then
35945 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
35947 if test "$acl_hardcode_minus_L" != no; then
35948 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
35950 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
35956 if test "X$found_a" != "X"; then
35957 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
35959 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
35962 additional_includedir=
35963 case "$found_dir" in
35964 */$acl_libdirstem | */$acl_libdirstem/)
35965 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
35966 if test "$name" = 'iconv'; then
35967 LIBICONV_PREFIX="$basedir"
35969 additional_includedir="$basedir/include"
35971 */$acl_libdirstem2 | */$acl_libdirstem2/)
35972 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
35973 if test "$name" = 'iconv'; then
35974 LIBICONV_PREFIX="$basedir"
35976 additional_includedir="$basedir/include"
35979 if test "X$additional_includedir" != "X"; then
35980 if test "X$additional_includedir" != "X/usr/include"; then
35982 if test "X$additional_includedir" = "X/usr/local/include"; then
35983 if test -n "$GCC"; then
35985 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
35989 if test -z "$haveit"; then
35990 for x in $CPPFLAGS $INCICONV; do
35992 acl_save_prefix="$prefix"
35993 prefix="$acl_final_prefix"
35994 acl_save_exec_prefix="$exec_prefix"
35995 exec_prefix="$acl_final_exec_prefix"
35997 exec_prefix="$acl_save_exec_prefix"
35998 prefix="$acl_save_prefix"
36000 if test "X$x" = "X-I$additional_includedir"; then
36005 if test -z "$haveit"; then
36006 if test -d "$additional_includedir"; then
36007 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
36013 if test -n "$found_la"; then
36014 save_libdir="$libdir"
36015 case "$found_la" in
36016 */* | *\\*) . "$found_la" ;;
36017 *) . "./$found_la" ;;
36019 libdir="$save_libdir"
36020 for dep in $dependency_libs; do
36023 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36024 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36025 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36027 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36028 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36029 if test -n "$GCC"; then
36031 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36035 if test -z "$haveit"; then
36037 for x in $LDFLAGS $LIBICONV; do
36039 acl_save_prefix="$prefix"
36040 prefix="$acl_final_prefix"
36041 acl_save_exec_prefix="$exec_prefix"
36042 exec_prefix="$acl_final_exec_prefix"
36044 exec_prefix="$acl_save_exec_prefix"
36045 prefix="$acl_save_prefix"
36047 if test "X$x" = "X-L$additional_libdir"; then
36052 if test -z "$haveit"; then
36053 if test -d "$additional_libdir"; then
36054 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
36058 for x in $LDFLAGS $LTLIBICONV; do
36060 acl_save_prefix="$prefix"
36061 prefix="$acl_final_prefix"
36062 acl_save_exec_prefix="$exec_prefix"
36063 exec_prefix="$acl_final_exec_prefix"
36065 exec_prefix="$acl_save_exec_prefix"
36066 prefix="$acl_save_prefix"
36068 if test "X$x" = "X-L$additional_libdir"; then
36073 if test -z "$haveit"; then
36074 if test -d "$additional_libdir"; then
36075 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
36082 dir=`echo "X$dep" | sed -e 's/^X-R//'`
36083 if test "$enable_rpath" != no; then
36085 for x in $rpathdirs; do
36086 if test "X$x" = "X$dir"; then
36091 if test -z "$haveit"; then
36092 rpathdirs="$rpathdirs $dir"
36095 for x in $ltrpathdirs; do
36096 if test "X$x" = "X$dir"; then
36101 if test -z "$haveit"; then
36102 ltrpathdirs="$ltrpathdirs $dir"
36107 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36110 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36113 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
36114 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
36120 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
36121 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
36127 if test "X$rpathdirs" != "X"; then
36128 if test -n "$acl_hardcode_libdir_separator"; then
36130 for found_dir in $rpathdirs; do
36131 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36133 acl_save_libdir="$libdir"
36135 eval flag=\"$acl_hardcode_libdir_flag_spec\"
36136 libdir="$acl_save_libdir"
36137 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36139 for found_dir in $rpathdirs; do
36140 acl_save_libdir="$libdir"
36141 libdir="$found_dir"
36142 eval flag=\"$acl_hardcode_libdir_flag_spec\"
36143 libdir="$acl_save_libdir"
36144 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
36148 if test "X$ltrpathdirs" != "X"; then
36149 for found_dir in $ltrpathdirs; do
36150 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
36165 am_save_CPPFLAGS="$CPPFLAGS"
36167 for element in $INCICONV; do
36169 for x in $CPPFLAGS; do
36171 acl_save_prefix="$prefix"
36172 prefix="$acl_final_prefix"
36173 acl_save_exec_prefix="$exec_prefix"
36174 exec_prefix="$acl_final_exec_prefix"
36176 exec_prefix="$acl_save_exec_prefix"
36177 prefix="$acl_save_prefix"
36179 if test "X$x" = "X$element"; then
36184 if test -z "$haveit"; then
36185 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
36191 $as_echo_n "checking for iconv... " >&6; }
36192 if ${am_cv_func_iconv+:} false; then :
36193 $as_echo_n "(cached) " >&6
36196 am_cv_func_iconv="no, consider installing GNU libiconv"
36198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36199 /* end confdefs.h. */
36201 #include <stdlib.h>
36207 iconv_t cd = iconv_open("","");
36208 iconv(cd,NULL,NULL,NULL,NULL);
36214 if ac_fn_c_try_link "$LINENO"; then :
36215 am_cv_func_iconv=yes
36217 rm -f core conftest.err conftest.$ac_objext \
36218 conftest$ac_exeext conftest.$ac_ext
36219 if test "$am_cv_func_iconv" != yes; then
36220 am_save_LIBS="$LIBS"
36221 LIBS="$LIBS $LIBICONV"
36222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36223 /* end confdefs.h. */
36225 #include <stdlib.h>
36231 iconv_t cd = iconv_open("","");
36232 iconv(cd,NULL,NULL,NULL,NULL);
36238 if ac_fn_c_try_link "$LINENO"; then :
36239 am_cv_lib_iconv=yes
36240 am_cv_func_iconv=yes
36242 rm -f core conftest.err conftest.$ac_objext \
36243 conftest$ac_exeext conftest.$ac_ext
36244 LIBS="$am_save_LIBS"
36248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
36249 $as_echo "$am_cv_func_iconv" >&6; }
36250 if test "$am_cv_func_iconv" = yes; then
36251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
36252 $as_echo_n "checking for working iconv... " >&6; }
36253 if ${am_cv_func_iconv_works+:} false; then :
36254 $as_echo_n "(cached) " >&6
36257 am_save_LIBS="$LIBS"
36258 if test $am_cv_lib_iconv = yes; then
36259 LIBS="$LIBS $LIBICONV"
36261 if test "$cross_compiling" = yes; then :
36264 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
36265 *) am_cv_func_iconv_works="guessing yes" ;;
36269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36270 /* end confdefs.h. */
36273 #include <string.h>
36277 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
36280 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
36281 if (cd_utf8_to_88591 != (iconv_t)(-1))
36283 static const char input[] = "\342\202\254"; /* EURO SIGN */
36285 const char *inptr = input;
36286 size_t inbytesleft = strlen (input);
36287 char *outptr = buf;
36288 size_t outbytesleft = sizeof (buf);
36289 size_t res = iconv (cd_utf8_to_88591,
36290 (char **) &inptr, &inbytesleft,
36291 &outptr, &outbytesleft);
36294 iconv_close (cd_utf8_to_88591);
36297 /* Test against Solaris 10 bug: Failures are not distinguishable from
36298 successful returns. */
36300 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
36301 if (cd_ascii_to_88591 != (iconv_t)(-1))
36303 static const char input[] = "\263";
36305 const char *inptr = input;
36306 size_t inbytesleft = strlen (input);
36307 char *outptr = buf;
36308 size_t outbytesleft = sizeof (buf);
36309 size_t res = iconv (cd_ascii_to_88591,
36310 (char **) &inptr, &inbytesleft,
36311 &outptr, &outbytesleft);
36314 iconv_close (cd_ascii_to_88591);
36317 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
36319 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
36320 if (cd_88591_to_utf8 != (iconv_t)(-1))
36322 static const char input[] = "\304";
36323 static char buf[2] = { (char)0xDE, (char)0xAD };
36324 const char *inptr = input;
36325 size_t inbytesleft = 1;
36326 char *outptr = buf;
36327 size_t outbytesleft = 1;
36328 size_t res = iconv (cd_88591_to_utf8,
36329 (char **) &inptr, &inbytesleft,
36330 &outptr, &outbytesleft);
36331 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
36333 iconv_close (cd_88591_to_utf8);
36336 #if 0 /* This bug could be worked around by the caller. */
36337 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
36339 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
36340 if (cd_88591_to_utf8 != (iconv_t)(-1))
36342 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
36344 const char *inptr = input;
36345 size_t inbytesleft = strlen (input);
36346 char *outptr = buf;
36347 size_t outbytesleft = sizeof (buf);
36348 size_t res = iconv (cd_88591_to_utf8,
36349 (char **) &inptr, &inbytesleft,
36350 &outptr, &outbytesleft);
36353 iconv_close (cd_88591_to_utf8);
36357 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
36359 if (/* Try standardized names. */
36360 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
36361 /* Try IRIX, OSF/1 names. */
36362 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
36363 /* Try AIX names. */
36364 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
36365 /* Try HP-UX names. */
36366 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
36371 if ac_fn_c_try_run "$LINENO"; then :
36372 am_cv_func_iconv_works=yes
36374 am_cv_func_iconv_works=no
36376 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
36377 conftest.$ac_objext conftest.beam conftest.$ac_ext
36380 LIBS="$am_save_LIBS"
36383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
36384 $as_echo "$am_cv_func_iconv_works" >&6; }
36385 case "$am_cv_func_iconv_works" in
36386 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
36387 *) am_func_iconv=yes ;;
36390 am_func_iconv=no am_cv_lib_iconv=no
36392 if test "$am_func_iconv" = yes; then
36394 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
36397 if test "$am_cv_lib_iconv" = yes; then
36398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
36399 $as_echo_n "checking how to link with libiconv... " >&6; }
36400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
36401 $as_echo "$LIBICONV" >&6; }
36403 CPPFLAGS="$am_save_CPPFLAGS"
36410 if test "$am_cv_func_iconv" = yes; then
36411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
36412 $as_echo_n "checking for iconv declaration... " >&6; }
36413 if ${am_cv_proto_iconv+:} false; then :
36414 $as_echo_n "(cached) " >&6
36417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36418 /* end confdefs.h. */
36420 #include <stdlib.h>
36426 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
36427 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
36440 if ac_fn_c_try_compile "$LINENO"; then :
36441 am_cv_proto_iconv_arg1=""
36443 am_cv_proto_iconv_arg1="const"
36445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36446 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
36449 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
36450 { $as_echo "$as_me:${as_lineno-$LINENO}: result:
36451 $am_cv_proto_iconv" >&5
36453 $am_cv_proto_iconv" >&6; }
36455 cat >>confdefs.h <<_ACEOF
36456 #define ICONV_CONST $am_cv_proto_iconv_arg1
36462 for ac_header in iconv.h
36464 ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
36465 if test "x$ac_cv_header_iconv_h" = xyes; then :
36466 cat >>confdefs.h <<_ACEOF
36467 #define HAVE_ICONV_H 1
36474 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
36475 #ifdef HAVE_ICONV_H
36476 # include <iconv.h>
36480 if test "x$ac_cv_type_iconv_t" = xyes; then :
36484 $as_echo "#define iconv_t int" >>confdefs.h
36490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
36491 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
36492 if ${ac_cv_path_SED+:} false; then :
36493 $as_echo_n "(cached) " >&6
36495 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
36496 for ac_i in 1 2 3 4 5 6 7; do
36497 ac_script="$ac_script$as_nl$ac_script"
36499 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
36500 { ac_script=; unset ac_script;}
36501 if test -z "$SED"; then
36502 ac_path_SED_found=false
36503 # Loop through the user's path and test for each of PROGNAME-LIST
36504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36505 for as_dir in $PATH
36508 test -z "$as_dir" && as_dir=.
36509 for ac_prog in sed gsed; do
36510 for ac_exec_ext in '' $ac_executable_extensions; do
36511 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
36512 as_fn_executable_p "$ac_path_SED" || continue
36513 # Check for GNU ac_path_SED and select it if it is found.
36514 # Check for GNU $ac_path_SED
36515 case `"$ac_path_SED" --version 2>&1` in
36517 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
36520 $as_echo_n 0123456789 >"conftest.in"
36523 cat "conftest.in" "conftest.in" >"conftest.tmp"
36524 mv "conftest.tmp" "conftest.in"
36525 cp "conftest.in" "conftest.nl"
36526 $as_echo '' >> "conftest.nl"
36527 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
36528 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
36529 as_fn_arith $ac_count + 1 && ac_count=$as_val
36530 if test $ac_count -gt ${ac_path_SED_max-0}; then
36531 # Best one so far, save it but keep looking for a better one
36532 ac_cv_path_SED="$ac_path_SED"
36533 ac_path_SED_max=$ac_count
36535 # 10*(2^10) chars as input seems more than enough
36536 test $ac_count -gt 10 && break
36538 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
36541 $ac_path_SED_found && break 3
36546 if test -z "$ac_cv_path_SED"; then
36547 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
36550 ac_cv_path_SED=$SED
36554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
36555 $as_echo "$ac_cv_path_SED" >&6; }
36556 SED="$ac_cv_path_SED"
36560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
36561 $as_echo_n "checking whether NLS is requested... " >&6; }
36562 # Check whether --enable-nls was given.
36563 if test "${enable_nls+set}" = set; then :
36564 enableval=$enable_nls; USE_NLS=$enableval
36569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36570 $as_echo "$USE_NLS" >&6; }
36575 GETTEXT_MACRO_VERSION=0.18
36580 # Prepare PATH_SEPARATOR.
36581 # The user is always right.
36582 if test "${PATH_SEPARATOR+set}" != set; then
36583 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36584 # contains only /bin. Note that ksh looks also at the FPATH variable,
36585 # so we have to set that as well for the test.
36587 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36588 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36589 || PATH_SEPARATOR=';'
36593 # Find out how to test for executable files. Don't use a zero-byte file,
36594 # as systems may use methods other than mode bits to determine executability.
36595 cat >conf$$.file <<_ASEOF
36599 chmod +x conf$$.file
36600 if test -x conf$$.file >/dev/null 2>&1; then
36601 ac_executable_p="test -x"
36603 ac_executable_p="test -f"
36607 # Extract the first word of "msgfmt", so it can be a program name with args.
36608 set dummy msgfmt; ac_word=$2
36609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36610 $as_echo_n "checking for $ac_word... " >&6; }
36611 if ${ac_cv_path_MSGFMT+:} false; then :
36612 $as_echo_n "(cached) " >&6
36616 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
36619 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36620 for ac_dir in $PATH; do
36622 test -z "$ac_dir" && ac_dir=.
36623 for ac_exec_ext in '' $ac_executable_extensions; do
36624 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36625 echo "$as_me: trying $ac_dir/$ac_word..." >&5
36626 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
36627 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
36628 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
36635 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
36639 MSGFMT="$ac_cv_path_MSGFMT"
36640 if test "$MSGFMT" != ":"; then
36641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
36642 $as_echo "$MSGFMT" >&6; }
36644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645 $as_echo "no" >&6; }
36648 # Extract the first word of "gmsgfmt", so it can be a program name with args.
36649 set dummy gmsgfmt; ac_word=$2
36650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36651 $as_echo_n "checking for $ac_word... " >&6; }
36652 if ${ac_cv_path_GMSGFMT+:} false; then :
36653 $as_echo_n "(cached) " >&6
36657 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
36660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36661 for as_dir in $PATH
36664 test -z "$as_dir" && as_dir=.
36665 for ac_exec_ext in '' $ac_executable_extensions; do
36666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36667 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
36668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36675 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
36679 GMSGFMT=$ac_cv_path_GMSGFMT
36680 if test -n "$GMSGFMT"; then
36681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
36682 $as_echo "$GMSGFMT" >&6; }
36684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36685 $as_echo "no" >&6; }
36690 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36691 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
36692 *) MSGFMT_015=$MSGFMT ;;
36695 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36696 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
36697 *) GMSGFMT_015=$GMSGFMT ;;
36702 # Prepare PATH_SEPARATOR.
36703 # The user is always right.
36704 if test "${PATH_SEPARATOR+set}" != set; then
36705 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36706 # contains only /bin. Note that ksh looks also at the FPATH variable,
36707 # so we have to set that as well for the test.
36709 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36710 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36711 || PATH_SEPARATOR=';'
36715 # Find out how to test for executable files. Don't use a zero-byte file,
36716 # as systems may use methods other than mode bits to determine executability.
36717 cat >conf$$.file <<_ASEOF
36721 chmod +x conf$$.file
36722 if test -x conf$$.file >/dev/null 2>&1; then
36723 ac_executable_p="test -x"
36725 ac_executable_p="test -f"
36729 # Extract the first word of "xgettext", so it can be a program name with args.
36730 set dummy xgettext; ac_word=$2
36731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36732 $as_echo_n "checking for $ac_word... " >&6; }
36733 if ${ac_cv_path_XGETTEXT+:} false; then :
36734 $as_echo_n "(cached) " >&6
36736 case "$XGETTEXT" in
36738 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
36741 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36742 for ac_dir in $PATH; do
36744 test -z "$ac_dir" && ac_dir=.
36745 for ac_exec_ext in '' $ac_executable_extensions; do
36746 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36747 echo "$as_me: trying $ac_dir/$ac_word..." >&5
36748 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
36749 (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
36750 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
36757 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
36761 XGETTEXT="$ac_cv_path_XGETTEXT"
36762 if test "$XGETTEXT" != ":"; then
36763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
36764 $as_echo "$XGETTEXT" >&6; }
36766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36767 $as_echo "no" >&6; }
36772 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
36773 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
36774 *) XGETTEXT_015=$XGETTEXT ;;
36779 # Prepare PATH_SEPARATOR.
36780 # The user is always right.
36781 if test "${PATH_SEPARATOR+set}" != set; then
36782 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
36783 # contains only /bin. Note that ksh looks also at the FPATH variable,
36784 # so we have to set that as well for the test.
36786 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36787 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
36788 || PATH_SEPARATOR=';'
36792 # Find out how to test for executable files. Don't use a zero-byte file,
36793 # as systems may use methods other than mode bits to determine executability.
36794 cat >conf$$.file <<_ASEOF
36798 chmod +x conf$$.file
36799 if test -x conf$$.file >/dev/null 2>&1; then
36800 ac_executable_p="test -x"
36802 ac_executable_p="test -f"
36806 # Extract the first word of "msgmerge", so it can be a program name with args.
36807 set dummy msgmerge; ac_word=$2
36808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36809 $as_echo_n "checking for $ac_word... " >&6; }
36810 if ${ac_cv_path_MSGMERGE+:} false; then :
36811 $as_echo_n "(cached) " >&6
36813 case "$MSGMERGE" in
36815 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
36818 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
36819 for ac_dir in $PATH; do
36821 test -z "$ac_dir" && ac_dir=.
36822 for ac_exec_ext in '' $ac_executable_extensions; do
36823 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
36824 echo "$as_me: trying $ac_dir/$ac_word..." >&5
36825 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
36826 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
36833 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
36837 MSGMERGE="$ac_cv_path_MSGMERGE"
36838 if test "$MSGMERGE" != ":"; then
36839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
36840 $as_echo "$MSGMERGE" >&6; }
36842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36843 $as_echo "no" >&6; }
36847 test -n "$localedir" || localedir='${datadir}/locale'
36850 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
36853 ac_config_commands="$ac_config_commands po-directories"
36880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
36881 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
36882 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
36883 $as_echo_n "(cached) " >&6
36885 gt_save_LIBS="$LIBS"
36886 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36888 /* end confdefs.h. */
36889 #include <CoreFoundation/CFPreferences.h>
36893 CFPreferencesCopyAppValue(NULL, NULL)
36898 if ac_fn_c_try_link "$LINENO"; then :
36899 gt_cv_func_CFPreferencesCopyAppValue=yes
36901 gt_cv_func_CFPreferencesCopyAppValue=no
36903 rm -f core conftest.err conftest.$ac_objext \
36904 conftest$ac_exeext conftest.$ac_ext
36905 LIBS="$gt_save_LIBS"
36907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
36908 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
36909 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
36911 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
36914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
36915 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
36916 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
36917 $as_echo_n "(cached) " >&6
36919 gt_save_LIBS="$LIBS"
36920 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
36921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36922 /* end confdefs.h. */
36923 #include <CoreFoundation/CFLocale.h>
36927 CFLocaleCopyCurrent();
36932 if ac_fn_c_try_link "$LINENO"; then :
36933 gt_cv_func_CFLocaleCopyCurrent=yes
36935 gt_cv_func_CFLocaleCopyCurrent=no
36937 rm -f core conftest.err conftest.$ac_objext \
36938 conftest$ac_exeext conftest.$ac_ext
36939 LIBS="$gt_save_LIBS"
36941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
36942 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
36943 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36945 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
36949 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
36950 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
36962 case " $gt_needs " in
36963 *" need-formatstring-macros "*) gt_api_version=3 ;;
36964 *" need-ngettext "*) gt_api_version=2 ;;
36965 *) gt_api_version=1 ;;
36967 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
36968 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
36970 if test "$USE_NLS" = "yes"; then
36971 gt_use_preinstalled_gnugettext=no
36974 if test $gt_api_version -ge 3; then
36975 gt_revision_test_code='
36976 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
36977 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
36979 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
36982 gt_revision_test_code=
36984 if test $gt_api_version -ge 2; then
36985 gt_expression_test_code=' + * ngettext ("", "", 0)'
36987 gt_expression_test_code=
36990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
36991 $as_echo_n "checking for GNU gettext in libc... " >&6; }
36992 if eval \${$gt_func_gnugettext_libc+:} false; then :
36993 $as_echo_n "(cached) " >&6
36995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36996 /* end confdefs.h. */
36998 #include <libintl.h>
36999 $gt_revision_test_code
37000 extern int _nl_msg_cat_cntr;
37001 extern int *_nl_domain_bindings;
37007 bindtextdomain ("", "");
37008 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
37014 if ac_fn_c_try_link "$LINENO"; then :
37015 eval "$gt_func_gnugettext_libc=yes"
37017 eval "$gt_func_gnugettext_libc=no"
37019 rm -f core conftest.err conftest.$ac_objext \
37020 conftest$ac_exeext conftest.$ac_ext
37022 eval ac_res=\$$gt_func_gnugettext_libc
37023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37024 $as_echo "$ac_res" >&6; }
37026 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
37032 am_save_CPPFLAGS="$CPPFLAGS"
37034 for element in $INCICONV; do
37036 for x in $CPPFLAGS; do
37038 acl_save_prefix="$prefix"
37039 prefix="$acl_final_prefix"
37040 acl_save_exec_prefix="$exec_prefix"
37041 exec_prefix="$acl_final_exec_prefix"
37043 exec_prefix="$acl_save_exec_prefix"
37044 prefix="$acl_save_prefix"
37046 if test "X$x" = "X$element"; then
37051 if test -z "$haveit"; then
37052 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
37058 $as_echo_n "checking for iconv... " >&6; }
37059 if ${am_cv_func_iconv+:} false; then :
37060 $as_echo_n "(cached) " >&6
37063 am_cv_func_iconv="no, consider installing GNU libiconv"
37065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37066 /* end confdefs.h. */
37068 #include <stdlib.h>
37074 iconv_t cd = iconv_open("","");
37075 iconv(cd,NULL,NULL,NULL,NULL);
37081 if ac_fn_c_try_link "$LINENO"; then :
37082 am_cv_func_iconv=yes
37084 rm -f core conftest.err conftest.$ac_objext \
37085 conftest$ac_exeext conftest.$ac_ext
37086 if test "$am_cv_func_iconv" != yes; then
37087 am_save_LIBS="$LIBS"
37088 LIBS="$LIBS $LIBICONV"
37089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37090 /* end confdefs.h. */
37092 #include <stdlib.h>
37098 iconv_t cd = iconv_open("","");
37099 iconv(cd,NULL,NULL,NULL,NULL);
37105 if ac_fn_c_try_link "$LINENO"; then :
37106 am_cv_lib_iconv=yes
37107 am_cv_func_iconv=yes
37109 rm -f core conftest.err conftest.$ac_objext \
37110 conftest$ac_exeext conftest.$ac_ext
37111 LIBS="$am_save_LIBS"
37115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
37116 $as_echo "$am_cv_func_iconv" >&6; }
37117 if test "$am_cv_func_iconv" = yes; then
37118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
37119 $as_echo_n "checking for working iconv... " >&6; }
37120 if ${am_cv_func_iconv_works+:} false; then :
37121 $as_echo_n "(cached) " >&6
37124 am_save_LIBS="$LIBS"
37125 if test $am_cv_lib_iconv = yes; then
37126 LIBS="$LIBS $LIBICONV"
37128 if test "$cross_compiling" = yes; then :
37131 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
37132 *) am_cv_func_iconv_works="guessing yes" ;;
37136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37137 /* end confdefs.h. */
37140 #include <string.h>
37144 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
37147 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
37148 if (cd_utf8_to_88591 != (iconv_t)(-1))
37150 static const char input[] = "\342\202\254"; /* EURO SIGN */
37152 const char *inptr = input;
37153 size_t inbytesleft = strlen (input);
37154 char *outptr = buf;
37155 size_t outbytesleft = sizeof (buf);
37156 size_t res = iconv (cd_utf8_to_88591,
37157 (char **) &inptr, &inbytesleft,
37158 &outptr, &outbytesleft);
37161 iconv_close (cd_utf8_to_88591);
37164 /* Test against Solaris 10 bug: Failures are not distinguishable from
37165 successful returns. */
37167 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
37168 if (cd_ascii_to_88591 != (iconv_t)(-1))
37170 static const char input[] = "\263";
37172 const char *inptr = input;
37173 size_t inbytesleft = strlen (input);
37174 char *outptr = buf;
37175 size_t outbytesleft = sizeof (buf);
37176 size_t res = iconv (cd_ascii_to_88591,
37177 (char **) &inptr, &inbytesleft,
37178 &outptr, &outbytesleft);
37181 iconv_close (cd_ascii_to_88591);
37184 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
37186 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
37187 if (cd_88591_to_utf8 != (iconv_t)(-1))
37189 static const char input[] = "\304";
37190 static char buf[2] = { (char)0xDE, (char)0xAD };
37191 const char *inptr = input;
37192 size_t inbytesleft = 1;
37193 char *outptr = buf;
37194 size_t outbytesleft = 1;
37195 size_t res = iconv (cd_88591_to_utf8,
37196 (char **) &inptr, &inbytesleft,
37197 &outptr, &outbytesleft);
37198 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
37200 iconv_close (cd_88591_to_utf8);
37203 #if 0 /* This bug could be worked around by the caller. */
37204 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
37206 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
37207 if (cd_88591_to_utf8 != (iconv_t)(-1))
37209 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
37211 const char *inptr = input;
37212 size_t inbytesleft = strlen (input);
37213 char *outptr = buf;
37214 size_t outbytesleft = sizeof (buf);
37215 size_t res = iconv (cd_88591_to_utf8,
37216 (char **) &inptr, &inbytesleft,
37217 &outptr, &outbytesleft);
37220 iconv_close (cd_88591_to_utf8);
37224 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
37226 if (/* Try standardized names. */
37227 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
37228 /* Try IRIX, OSF/1 names. */
37229 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
37230 /* Try AIX names. */
37231 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
37232 /* Try HP-UX names. */
37233 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
37238 if ac_fn_c_try_run "$LINENO"; then :
37239 am_cv_func_iconv_works=yes
37241 am_cv_func_iconv_works=no
37243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
37244 conftest.$ac_objext conftest.beam conftest.$ac_ext
37247 LIBS="$am_save_LIBS"
37250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
37251 $as_echo "$am_cv_func_iconv_works" >&6; }
37252 case "$am_cv_func_iconv_works" in
37253 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
37254 *) am_func_iconv=yes ;;
37257 am_func_iconv=no am_cv_lib_iconv=no
37259 if test "$am_func_iconv" = yes; then
37261 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
37264 if test "$am_cv_lib_iconv" = yes; then
37265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
37266 $as_echo_n "checking how to link with libiconv... " >&6; }
37267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
37268 $as_echo "$LIBICONV" >&6; }
37270 CPPFLAGS="$am_save_CPPFLAGS"
37287 acl_save_prefix="$prefix"
37288 prefix="$acl_final_prefix"
37289 acl_save_exec_prefix="$exec_prefix"
37290 exec_prefix="$acl_final_exec_prefix"
37292 eval additional_includedir=\"$includedir\"
37293 eval additional_libdir=\"$libdir\"
37295 exec_prefix="$acl_save_exec_prefix"
37296 prefix="$acl_save_prefix"
37299 # Check whether --with-libintl-prefix was given.
37300 if test "${with_libintl_prefix+set}" = set; then :
37301 withval=$with_libintl_prefix;
37302 if test "X$withval" = "Xno"; then
37305 if test "X$withval" = "X"; then
37307 acl_save_prefix="$prefix"
37308 prefix="$acl_final_prefix"
37309 acl_save_exec_prefix="$exec_prefix"
37310 exec_prefix="$acl_final_exec_prefix"
37312 eval additional_includedir=\"$includedir\"
37313 eval additional_libdir=\"$libdir\"
37315 exec_prefix="$acl_save_exec_prefix"
37316 prefix="$acl_save_prefix"
37319 additional_includedir="$withval/include"
37320 additional_libdir="$withval/$acl_libdirstem"
37321 if test "$acl_libdirstem2" != "$acl_libdirstem" \
37322 && ! test -d "$withval/$acl_libdirstem"; then
37323 additional_libdir="$withval/$acl_libdirstem2"
37337 names_already_handled=
37338 names_next_round='intl '
37339 while test -n "$names_next_round"; do
37340 names_this_round="$names_next_round"
37342 for name in $names_this_round; do
37344 for n in $names_already_handled; do
37345 if test "$n" = "$name"; then
37346 already_handled=yes
37350 if test -z "$already_handled"; then
37351 names_already_handled="$names_already_handled $name"
37352 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
37353 eval value=\"\$HAVE_LIB$uppername\"
37354 if test -n "$value"; then
37355 if test "$value" = yes; then
37356 eval value=\"\$LIB$uppername\"
37357 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
37358 eval value=\"\$LTLIB$uppername\"
37359 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
37368 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
37369 if test -n "$acl_shlibext"; then
37370 shrext=".$acl_shlibext" # typically: shrext=.so
37374 if test $use_additional = yes; then
37375 dir="$additional_libdir"
37376 if test -n "$acl_shlibext"; then
37377 if test -f "$dir/$libname$shrext"; then
37379 found_so="$dir/$libname$shrext"
37381 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37382 ver=`(cd "$dir" && \
37383 for f in "$libname$shrext".*; do echo "$f"; done \
37384 | sed -e "s,^$libname$shrext\\\\.,," \
37385 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37386 | sed 1q ) 2>/dev/null`
37387 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37389 found_so="$dir/$libname$shrext.$ver"
37392 eval library_names=\"$acl_library_names_spec\"
37393 for f in $library_names; do
37394 if test -f "$dir/$f"; then
37403 if test "X$found_dir" = "X"; then
37404 if test -f "$dir/$libname.$acl_libext"; then
37406 found_a="$dir/$libname.$acl_libext"
37409 if test "X$found_dir" != "X"; then
37410 if test -f "$dir/$libname.la"; then
37411 found_la="$dir/$libname.la"
37415 if test "X$found_dir" = "X"; then
37416 for x in $LDFLAGS $LTLIBINTL; do
37418 acl_save_prefix="$prefix"
37419 prefix="$acl_final_prefix"
37420 acl_save_exec_prefix="$exec_prefix"
37421 exec_prefix="$acl_final_exec_prefix"
37423 exec_prefix="$acl_save_exec_prefix"
37424 prefix="$acl_save_prefix"
37428 dir=`echo "X$x" | sed -e 's/^X-L//'`
37429 if test -n "$acl_shlibext"; then
37430 if test -f "$dir/$libname$shrext"; then
37432 found_so="$dir/$libname$shrext"
37434 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
37435 ver=`(cd "$dir" && \
37436 for f in "$libname$shrext".*; do echo "$f"; done \
37437 | sed -e "s,^$libname$shrext\\\\.,," \
37438 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
37439 | sed 1q ) 2>/dev/null`
37440 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
37442 found_so="$dir/$libname$shrext.$ver"
37445 eval library_names=\"$acl_library_names_spec\"
37446 for f in $library_names; do
37447 if test -f "$dir/$f"; then
37456 if test "X$found_dir" = "X"; then
37457 if test -f "$dir/$libname.$acl_libext"; then
37459 found_a="$dir/$libname.$acl_libext"
37462 if test "X$found_dir" != "X"; then
37463 if test -f "$dir/$libname.la"; then
37464 found_la="$dir/$libname.la"
37469 if test "X$found_dir" != "X"; then
37474 if test "X$found_dir" != "X"; then
37475 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
37476 if test "X$found_so" != "X"; then
37477 if test "$enable_rpath" = no \
37478 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
37479 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
37480 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37483 for x in $ltrpathdirs; do
37484 if test "X$x" = "X$found_dir"; then
37489 if test -z "$haveit"; then
37490 ltrpathdirs="$ltrpathdirs $found_dir"
37492 if test "$acl_hardcode_direct" = yes; then
37493 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37495 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
37496 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37498 for x in $rpathdirs; do
37499 if test "X$x" = "X$found_dir"; then
37504 if test -z "$haveit"; then
37505 rpathdirs="$rpathdirs $found_dir"
37509 for x in $LDFLAGS $LIBINTL; do
37511 acl_save_prefix="$prefix"
37512 prefix="$acl_final_prefix"
37513 acl_save_exec_prefix="$exec_prefix"
37514 exec_prefix="$acl_final_exec_prefix"
37516 exec_prefix="$acl_save_exec_prefix"
37517 prefix="$acl_save_prefix"
37519 if test "X$x" = "X-L$found_dir"; then
37524 if test -z "$haveit"; then
37525 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
37527 if test "$acl_hardcode_minus_L" != no; then
37528 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
37530 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37536 if test "X$found_a" != "X"; then
37537 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
37539 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
37542 additional_includedir=
37543 case "$found_dir" in
37544 */$acl_libdirstem | */$acl_libdirstem/)
37545 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
37546 if test "$name" = 'intl'; then
37547 LIBINTL_PREFIX="$basedir"
37549 additional_includedir="$basedir/include"
37551 */$acl_libdirstem2 | */$acl_libdirstem2/)
37552 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
37553 if test "$name" = 'intl'; then
37554 LIBINTL_PREFIX="$basedir"
37556 additional_includedir="$basedir/include"
37559 if test "X$additional_includedir" != "X"; then
37560 if test "X$additional_includedir" != "X/usr/include"; then
37562 if test "X$additional_includedir" = "X/usr/local/include"; then
37563 if test -n "$GCC"; then
37565 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37569 if test -z "$haveit"; then
37570 for x in $CPPFLAGS $INCINTL; do
37572 acl_save_prefix="$prefix"
37573 prefix="$acl_final_prefix"
37574 acl_save_exec_prefix="$exec_prefix"
37575 exec_prefix="$acl_final_exec_prefix"
37577 exec_prefix="$acl_save_exec_prefix"
37578 prefix="$acl_save_prefix"
37580 if test "X$x" = "X-I$additional_includedir"; then
37585 if test -z "$haveit"; then
37586 if test -d "$additional_includedir"; then
37587 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
37593 if test -n "$found_la"; then
37594 save_libdir="$libdir"
37595 case "$found_la" in
37596 */* | *\\*) . "$found_la" ;;
37597 *) . "./$found_la" ;;
37599 libdir="$save_libdir"
37600 for dep in $dependency_libs; do
37603 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
37604 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
37605 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
37607 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
37608 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
37609 if test -n "$GCC"; then
37611 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
37615 if test -z "$haveit"; then
37617 for x in $LDFLAGS $LIBINTL; do
37619 acl_save_prefix="$prefix"
37620 prefix="$acl_final_prefix"
37621 acl_save_exec_prefix="$exec_prefix"
37622 exec_prefix="$acl_final_exec_prefix"
37624 exec_prefix="$acl_save_exec_prefix"
37625 prefix="$acl_save_prefix"
37627 if test "X$x" = "X-L$additional_libdir"; then
37632 if test -z "$haveit"; then
37633 if test -d "$additional_libdir"; then
37634 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
37638 for x in $LDFLAGS $LTLIBINTL; do
37640 acl_save_prefix="$prefix"
37641 prefix="$acl_final_prefix"
37642 acl_save_exec_prefix="$exec_prefix"
37643 exec_prefix="$acl_final_exec_prefix"
37645 exec_prefix="$acl_save_exec_prefix"
37646 prefix="$acl_save_prefix"
37648 if test "X$x" = "X-L$additional_libdir"; then
37653 if test -z "$haveit"; then
37654 if test -d "$additional_libdir"; then
37655 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
37662 dir=`echo "X$dep" | sed -e 's/^X-R//'`
37663 if test "$enable_rpath" != no; then
37665 for x in $rpathdirs; do
37666 if test "X$x" = "X$dir"; then
37671 if test -z "$haveit"; then
37672 rpathdirs="$rpathdirs $dir"
37675 for x in $ltrpathdirs; do
37676 if test "X$x" = "X$dir"; then
37681 if test -z "$haveit"; then
37682 ltrpathdirs="$ltrpathdirs $dir"
37687 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
37690 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
37693 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
37694 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
37700 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
37701 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
37707 if test "X$rpathdirs" != "X"; then
37708 if test -n "$acl_hardcode_libdir_separator"; then
37710 for found_dir in $rpathdirs; do
37711 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
37713 acl_save_libdir="$libdir"
37715 eval flag=\"$acl_hardcode_libdir_flag_spec\"
37716 libdir="$acl_save_libdir"
37717 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37719 for found_dir in $rpathdirs; do
37720 acl_save_libdir="$libdir"
37721 libdir="$found_dir"
37722 eval flag=\"$acl_hardcode_libdir_flag_spec\"
37723 libdir="$acl_save_libdir"
37724 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
37728 if test "X$ltrpathdirs" != "X"; then
37729 for found_dir in $ltrpathdirs; do
37730 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
37739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
37740 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
37741 if eval \${$gt_func_gnugettext_libintl+:} false; then :
37742 $as_echo_n "(cached) " >&6
37744 gt_save_CPPFLAGS="$CPPFLAGS"
37745 CPPFLAGS="$CPPFLAGS $INCINTL"
37746 gt_save_LIBS="$LIBS"
37747 LIBS="$LIBS $LIBINTL"
37748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37749 /* end confdefs.h. */
37751 #include <libintl.h>
37752 $gt_revision_test_code
37753 extern int _nl_msg_cat_cntr;
37758 const char *_nl_expand_alias (const char *);
37764 bindtextdomain ("", "");
37765 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37771 if ac_fn_c_try_link "$LINENO"; then :
37772 eval "$gt_func_gnugettext_libintl=yes"
37774 eval "$gt_func_gnugettext_libintl=no"
37776 rm -f core conftest.err conftest.$ac_objext \
37777 conftest$ac_exeext conftest.$ac_ext
37778 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
37779 LIBS="$LIBS $LIBICONV"
37780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
37781 /* end confdefs.h. */
37783 #include <libintl.h>
37784 $gt_revision_test_code
37785 extern int _nl_msg_cat_cntr;
37790 const char *_nl_expand_alias (const char *);
37796 bindtextdomain ("", "");
37797 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
37803 if ac_fn_c_try_link "$LINENO"; then :
37804 LIBINTL="$LIBINTL $LIBICONV"
37805 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
37806 eval "$gt_func_gnugettext_libintl=yes"
37809 rm -f core conftest.err conftest.$ac_objext \
37810 conftest$ac_exeext conftest.$ac_ext
37812 CPPFLAGS="$gt_save_CPPFLAGS"
37813 LIBS="$gt_save_LIBS"
37815 eval ac_res=\$$gt_func_gnugettext_libintl
37816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
37817 $as_echo "$ac_res" >&6; }
37820 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
37821 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
37822 && test "$PACKAGE" != gettext-runtime \
37823 && test "$PACKAGE" != gettext-tools; }; then
37824 gt_use_preinstalled_gnugettext=yes
37833 if test -n "$INTL_MACOSX_LIBS"; then
37834 if test "$gt_use_preinstalled_gnugettext" = "yes" \
37835 || test "$nls_cv_use_gnu_gettext" = "yes"; then
37836 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
37837 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
37841 if test "$gt_use_preinstalled_gnugettext" = "yes" \
37842 || test "$nls_cv_use_gnu_gettext" = "yes"; then
37844 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
37851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
37852 $as_echo_n "checking whether to use NLS... " >&6; }
37853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
37854 $as_echo "$USE_NLS" >&6; }
37855 if test "$USE_NLS" = "yes"; then
37856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
37857 $as_echo_n "checking where the gettext function comes from... " >&6; }
37858 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37859 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37860 gt_source="external libintl"
37865 gt_source="included intl directory"
37867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
37868 $as_echo "$gt_source" >&6; }
37871 if test "$USE_NLS" = "yes"; then
37873 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
37874 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
37875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
37876 $as_echo_n "checking how to link with libintl... " >&6; }
37877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
37878 $as_echo "$LIBINTL" >&6; }
37880 for element in $INCINTL; do
37882 for x in $CPPFLAGS; do
37884 acl_save_prefix="$prefix"
37885 prefix="$acl_final_prefix"
37886 acl_save_exec_prefix="$exec_prefix"
37887 exec_prefix="$acl_final_exec_prefix"
37889 exec_prefix="$acl_save_exec_prefix"
37890 prefix="$acl_save_prefix"
37892 if test "X$x" = "X$element"; then
37897 if test -z "$haveit"; then
37898 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
37905 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
37908 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
37917 INTLLIBS="$LIBINTL"
37926 # Initialize the test suite.
37927 ac_config_commands="$ac_config_commands tests/atconfig"
37929 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
37930 # FIXME: tests/preset?
37932 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
37937 # Check whether --enable-backup-scripts was given.
37938 if test "${enable_backup_scripts+set}" = set; then :
37939 enableval=$enable_backup_scripts; case $enableval in
37940 yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
37941 BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
37948 if date +%Y-%m-%d 2>/dev/null >&2; then
37949 BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
37951 BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
37954 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
37956 cat >confcache <<\_ACEOF
37957 # This file is a shell script that caches the results of configure
37958 # tests run on this system so they can be shared between configure
37959 # scripts and configure runs, see configure's option --config-cache.
37960 # It is not useful on other systems. If it contains results you don't
37961 # want to keep, you may remove or edit it.
37963 # config.status only pays attention to the cache file if you give it
37964 # the --recheck option to rerun configure.
37966 # `ac_cv_env_foo' variables (set or unset) will be overridden when
37967 # loading this file, other *unset* `ac_cv_foo' will be assigned the
37968 # following values.
37972 # The following way of writing the cache mishandles newlines in values,
37973 # but we know of no workaround that is simple, portable, and efficient.
37974 # So, we kill variables containing newlines.
37975 # Ultrix sh set writes to stderr and can't be redirected directly,
37976 # and sets the high bit in the cache file unless we assign to the vars.
37978 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
37979 eval ac_val=\$$ac_var
37983 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
37984 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
37987 _ | IFS | as_nl) ;; #(
37988 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
37989 *) { eval $ac_var=; unset $ac_var;} ;;
37995 case $as_nl`(ac_space=' '; set) 2>&1` in #(
37996 *${as_nl}ac_space=\ *)
37997 # `set' does not quote correctly, so add quotes: double-quote
37998 # substitution turns \\\\ into \\, and sed turns \\ into \.
38001 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
38004 # `set' quotes correctly as required by POSIX, so do not add quotes.
38005 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
38014 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
38016 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
38018 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
38019 if test -w "$cache_file"; then
38020 if test "x$cache_file" != "x/dev/null"; then
38021 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
38022 $as_echo "$as_me: updating cache $cache_file" >&6;}
38023 if test ! -f "$cache_file" || test -h "$cache_file"; then
38024 cat confcache >"$cache_file"
38026 case $cache_file in #(
38028 mv -f confcache "$cache_file"$$ &&
38029 mv -f "$cache_file"$$ "$cache_file" ;; #(
38031 mv -f confcache "$cache_file" ;;
38036 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
38037 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
38042 test "x$prefix" = xNONE && prefix=$ac_default_prefix
38043 # Let make expand exec_prefix.
38044 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
38046 DEFS=-DHAVE_CONFIG_H
38051 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
38052 # 1. Remove the extension, and $U if already installed.
38053 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
38054 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
38055 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
38056 # will be set to the directory where LIBOBJS objects are built.
38057 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
38058 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
38060 LIBOBJS=$ac_libobjs
38062 LTLIBOBJS=$ac_ltlibobjs
38065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
38066 $as_echo_n "checking that generated files are newer than configure... " >&6; }
38067 if test -n "$am_sleep_pid"; then
38068 # Hide warnings about reused PIDs.
38069 wait $am_sleep_pid 2>/dev/null
38071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
38072 $as_echo "done" >&6; }
38073 if test -n "$EXEEXT"; then
38075 am__EXEEXT_FALSE='#'
38077 am__EXEEXT_TRUE='#'
38081 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
38082 as_fn_error $? "conditional \"AMDEP\" was never defined.
38083 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38085 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
38086 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
38087 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38089 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
38090 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
38091 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38093 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
38094 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
38095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38097 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
38098 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
38099 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38101 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
38102 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
38103 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38105 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
38106 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
38107 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38109 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
38110 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
38111 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38113 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38114 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38115 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38117 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38118 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38119 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38121 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
38122 as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
38123 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38125 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
38126 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
38127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38129 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
38130 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
38131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38133 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
38134 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
38135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38137 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
38138 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
38139 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38141 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
38142 as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
38143 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38145 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
38146 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
38147 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38153 if test -n "$gl_LIBOBJS"; then
38154 # Remove the extension.
38155 sed_drop_objext='s/\.o$//;s/\.obj$//'
38156 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38157 gl_libobjs="$gl_libobjs $i.$ac_objext"
38158 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
38161 gl_LIBOBJS=$gl_libobjs
38163 gl_LTLIBOBJS=$gl_ltlibobjs
38169 if test -n "$gltests_LIBOBJS"; then
38170 # Remove the extension.
38171 sed_drop_objext='s/\.o$//;s/\.obj$//'
38172 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
38173 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
38174 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
38177 gltests_LIBOBJS=$gltests_libobjs
38179 gltests_LTLIBOBJS=$gltests_ltlibobjs
38182 if test -z "${PU_RMT_COND_TRUE}" && test -z "${PU_RMT_COND_FALSE}"; then
38183 as_fn_error $? "conditional \"PU_RMT_COND\" was never defined.
38184 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38186 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38187 as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38188 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38190 if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
38191 as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
38192 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38194 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
38195 as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
38196 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38198 if test -z "${TAR_LIB_ATTR_TRUE}" && test -z "${TAR_LIB_ATTR_FALSE}"; then
38199 as_fn_error $? "conditional \"TAR_LIB_ATTR\" was never defined.
38200 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38202 if test -z "${TAR_COND_GRANTPT_TRUE}" && test -z "${TAR_COND_GRANTPT_FALSE}"; then
38203 as_fn_error $? "conditional \"TAR_COND_GRANTPT\" was never defined.
38204 Usually this means the macro was only invoked conditionally." "$LINENO" 5
38207 : "${CONFIG_STATUS=./config.status}"
38209 ac_clean_files_save=$ac_clean_files
38210 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
38211 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
38212 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
38214 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
38216 # Generated by $as_me.
38217 # Run this file to recreate the current configuration.
38218 # Compiler output produced by configure, useful for debugging
38219 # configure, is in config.log if it exists.
38222 ac_cs_recheck=false
38225 SHELL=\${CONFIG_SHELL-$SHELL}
38228 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
38229 ## -------------------- ##
38230 ## M4sh Initialization. ##
38231 ## -------------------- ##
38233 # Be more Bourne compatible
38234 DUALCASE=1; export DUALCASE # for MKS sh
38235 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
38238 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
38239 # is contrary to our usage. Disable this feature.
38240 alias -g '${1+"$@"}'='"$@"'
38241 setopt NO_GLOB_SUBST
38243 case `(set -o) 2>/dev/null` in #(
38255 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38256 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38257 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
38258 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
38259 # Prefer a ksh shell builtin over an external printf program on Solaris,
38260 # but without wasting forks for bash or zsh.
38261 if test -z "$BASH_VERSION$ZSH_VERSION" \
38262 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
38263 as_echo='print -r --'
38264 as_echo_n='print -rn --'
38265 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
38266 as_echo='printf %s\n'
38267 as_echo_n='printf %s'
38269 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
38270 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
38271 as_echo_n='/usr/ucb/echo -n'
38273 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
38274 as_echo_n_body='eval
38278 expr "X$arg" : "X\\(.*\\)$as_nl";
38279 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
38281 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
38283 export as_echo_n_body
38284 as_echo_n='sh -c $as_echo_n_body as_echo'
38286 export as_echo_body
38287 as_echo='sh -c $as_echo_body as_echo'
38290 # The user is always right.
38291 if test "${PATH_SEPARATOR+set}" != set; then
38293 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
38294 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
38301 # We need space, tab and new line, in precisely that order. Quoting is
38302 # there to prevent editors from complaining about space-tab.
38303 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
38304 # splitting by setting IFS to empty value.)
38307 # Find who we are. Look in the path if we contain no directory separator.
38310 *[\\/]* ) as_myself=$0 ;;
38311 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38312 for as_dir in $PATH
38315 test -z "$as_dir" && as_dir=.
38316 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
38322 # We did not find ourselves, most probably we were run as `sh COMMAND'
38323 # in which case we are not to be found in the path.
38324 if test "x$as_myself" = x; then
38327 if test ! -f "$as_myself"; then
38328 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
38332 # Unset variables that we do not need and which cause bugs (e.g. in
38333 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
38334 # suppresses any "Segmentation fault" message there. '((' could
38335 # trigger a bug in pdksh 5.2.14.
38336 for as_var in BASH_ENV ENV MAIL MAILPATH
38337 do eval test x\${$as_var+set} = xset \
38338 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
38351 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
38354 # as_fn_error STATUS ERROR [LINENO LOG_FD]
38355 # ----------------------------------------
38356 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
38357 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
38358 # script with STATUS, using 1 if that was 0.
38361 as_status=$1; test $as_status -eq 0 && as_status=1
38363 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
38364 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
38366 $as_echo "$as_me: error: $2" >&2
38367 as_fn_exit $as_status
38371 # as_fn_set_status STATUS
38372 # -----------------------
38373 # Set $? to STATUS, without forking.
38374 as_fn_set_status ()
38377 } # as_fn_set_status
38379 # as_fn_exit STATUS
38380 # -----------------
38381 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
38385 as_fn_set_status $1
38391 # Portably unset VAR.
38394 { eval $1=; unset $1;}
38396 as_unset=as_fn_unset
38397 # as_fn_append VAR VALUE
38398 # ----------------------
38399 # Append the text in VALUE to the end of the definition contained in VAR. Take
38400 # advantage of any shell optimizations that allow amortized linear growth over
38401 # repeated appends, instead of the typical quadratic growth present in naive
38403 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38404 eval 'as_fn_append ()
38415 # as_fn_arith ARG...
38416 # ------------------
38417 # Perform arithmetic evaluation on the ARGs, and store the result in the
38418 # global $as_val. Take advantage of shells that can avoid forks. The arguments
38419 # must be portable across $(()) and expr.
38420 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
38421 eval 'as_fn_arith ()
38428 as_val=`expr "$@" || test $? -eq 1`
38433 if expr a : '\(a\)' >/dev/null 2>&1 &&
38434 test "X`expr 00001 : '.*\(...\)'`" = X001; then
38440 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
38441 as_basename=basename
38446 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
38452 as_me=`$as_basename -- "$0" ||
38453 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
38454 X"$0" : 'X\(//\)$' \| \
38455 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
38457 sed '/^.*\/\([^/][^/]*\)\/*$/{
38471 # Avoid depending upon Character Ranges.
38472 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38473 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
38474 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38475 as_cr_digits='0123456789'
38476 as_cr_alnum=$as_cr_Letters$as_cr_digits
38478 ECHO_C= ECHO_N= ECHO_T=
38479 case `echo -n x` in #(((((
38481 case `echo 'xy\c'` in
38482 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
38484 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
38491 rm -f conf$$ conf$$.exe conf$$.file
38492 if test -d conf$$.dir; then
38493 rm -f conf$$.dir/conf$$.file
38496 mkdir conf$$.dir 2>/dev/null
38498 if (echo >conf$$.file) 2>/dev/null; then
38499 if ln -s conf$$.file conf$$ 2>/dev/null; then
38501 # ... but there are two gotchas:
38502 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
38503 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
38504 # In both cases, we have to default to `cp -pR'.
38505 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
38507 elif ln conf$$.file conf$$ 2>/dev/null; then
38515 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
38516 rmdir conf$$.dir 2>/dev/null
38521 # Create "$as_dir" as a directory, including parents if necessary.
38526 -*) as_dir=./$as_dir;;
38528 test -d "$as_dir" || eval $as_mkdir_p || {
38532 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
38533 *) as_qdir=$as_dir;;
38535 as_dirs="'$as_qdir' $as_dirs"
38536 as_dir=`$as_dirname -- "$as_dir" ||
38537 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
38538 X"$as_dir" : 'X\(//\)[^/]' \| \
38539 X"$as_dir" : 'X\(//\)$' \| \
38540 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
38541 $as_echo X"$as_dir" |
38542 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
38546 /^X\(\/\/\)[^/].*/{
38559 test -d "$as_dir" && break
38561 test -z "$as_dirs" || eval "mkdir $as_dirs"
38562 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
38566 if mkdir -p . 2>/dev/null; then
38567 as_mkdir_p='mkdir -p "$as_dir"'
38569 test -d ./-p && rmdir ./-p
38574 # as_fn_executable_p FILE
38575 # -----------------------
38576 # Test if FILE is an executable regular file.
38577 as_fn_executable_p ()
38579 test -f "$1" && test -x "$1"
38580 } # as_fn_executable_p
38581 as_test_x='test -x'
38582 as_executable_p=as_fn_executable_p
38584 # Sed expression to map a string onto a valid CPP name.
38585 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
38587 # Sed expression to map a string onto a valid variable name.
38588 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
38592 ## ----------------------------------- ##
38593 ## Main body of $CONFIG_STATUS script. ##
38594 ## ----------------------------------- ##
38596 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
38598 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38599 # Save the log message, to keep $0 and so on meaningful, and to
38600 # report actual input values of CONFIG_FILES etc. instead of their
38601 # values after options handling.
38603 This file was extended by GNU tar $as_me 1.28, which was
38604 generated by GNU Autoconf 2.69. Invocation command line was
38606 CONFIG_FILES = $CONFIG_FILES
38607 CONFIG_HEADERS = $CONFIG_HEADERS
38608 CONFIG_LINKS = $CONFIG_LINKS
38609 CONFIG_COMMANDS = $CONFIG_COMMANDS
38612 on `(hostname || uname -n) 2>/dev/null | sed 1q`
38617 case $ac_config_files in *"
38618 "*) set x $ac_config_files; shift; ac_config_files=$*;;
38621 case $ac_config_headers in *"
38622 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
38626 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38627 # Files that config.status was made for.
38628 config_files="$ac_config_files"
38629 config_headers="$ac_config_headers"
38630 config_commands="$ac_config_commands"
38634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38636 \`$as_me' instantiates files and other configuration actions
38637 from templates according to the current configuration. Unless the files
38638 and actions are specified as TAGs, all are instantiated by default.
38640 Usage: $0 [OPTION]... [TAG]...
38642 -h, --help print this help, then exit
38643 -V, --version print version number and configuration settings, then exit
38644 --config print configuration, then exit
38645 -q, --quiet, --silent
38646 do not print progress messages
38647 -d, --debug don't remove temporary files
38648 --recheck update $as_me by reconfiguring in the same conditions
38649 --file=FILE[:TEMPLATE]
38650 instantiate the configuration file FILE
38651 --header=FILE[:TEMPLATE]
38652 instantiate the configuration header FILE
38654 Configuration files:
38657 Configuration headers:
38660 Configuration commands:
38663 Report bugs to <bug-tar@gnu.org>.
38664 GNU tar home page: <http://www.gnu.org/software/tar/>.
38665 General help using GNU software: <http://www.gnu.org/gethelp/>."
38668 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38669 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
38671 GNU tar config.status 1.28
38672 configured by $0, generated by GNU Autoconf 2.69,
38673 with options \\"\$ac_cs_config\\"
38675 Copyright (C) 2012 Free Software Foundation, Inc.
38676 This config.status script is free software; the Free Software Foundation
38677 gives unlimited permission to copy, distribute and modify it."
38684 test -n "\$AWK" || AWK=awk
38687 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38688 # The default lists apply if the user does not specify any file.
38694 ac_option=`expr "X$1" : 'X\([^=]*\)='`
38695 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
38699 ac_option=`expr "X$1" : 'X\([^=]*\)='`
38711 # Handling of the options.
38712 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
38714 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
38715 $as_echo "$ac_cs_version"; exit ;;
38716 --config | --confi | --conf | --con | --co | --c )
38717 $as_echo "$ac_cs_config"; exit ;;
38718 --debug | --debu | --deb | --de | --d | -d )
38720 --file | --fil | --fi | --f )
38723 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38724 '') as_fn_error $? "missing file argument" ;;
38726 as_fn_append CONFIG_FILES " '$ac_optarg'"
38727 ac_need_defaults=false;;
38728 --header | --heade | --head | --hea )
38731 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
38733 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
38734 ac_need_defaults=false;;
38736 # Conflict between --help and --header
38737 as_fn_error $? "ambiguous option: \`$1'
38738 Try \`$0 --help' for more information.";;
38739 --help | --hel | -h )
38740 $as_echo "$ac_cs_usage"; exit ;;
38741 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
38742 | -silent | --silent | --silen | --sile | --sil | --si | --s)
38745 # This is an error.
38746 -*) as_fn_error $? "unrecognized option: \`$1'
38747 Try \`$0 --help' for more information." ;;
38749 *) as_fn_append ac_config_targets " $1"
38750 ac_need_defaults=false ;;
38756 ac_configure_extra_args=
38758 if $ac_cs_silent; then
38760 ac_configure_extra_args="$ac_configure_extra_args --silent"
38764 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38765 if \$ac_cs_recheck; then
38766 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
38768 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
38769 CONFIG_SHELL='$SHELL'
38770 export CONFIG_SHELL
38775 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38779 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
38780 ## Running $as_me. ##
38786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38790 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
38791 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
38792 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
38793 # from automake < 1.5.
38794 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
38795 # Capture the value of LINGUAS because we need it to compute CATALOGS.
38796 LINGUAS="${LINGUAS-%UNSET%}"
38802 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38804 # Handling of arguments.
38805 for ac_config_target in $ac_config_targets
38807 case $ac_config_target in
38808 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
38809 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
38810 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
38811 "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
38812 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
38813 "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
38814 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
38815 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
38816 "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
38817 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
38818 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
38819 "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
38820 "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
38821 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
38823 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
38828 # If the user did not use the arguments to specify the items to instantiate,
38829 # then the envvar interface is used. Set only those that are not.
38830 # We use the long form for the default assignment because of an extremely
38831 # bizarre bug on SunOS 4.1.3.
38832 if $ac_need_defaults; then
38833 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
38834 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
38835 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
38838 # Have a temporary directory for convenience. Make it in the build tree
38839 # simply because there is no reason against having it here, and in addition,
38840 # creating and moving files from /tmp can sometimes cause problems.
38841 # Hook for its removal unless debugging.
38842 # Note that there is a small window in which the directory will not be cleaned:
38843 # after its creation but before its name has been assigned to `$tmp'.
38847 trap 'exit_status=$?
38848 : "${ac_tmp:=$tmp}"
38849 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
38851 trap 'as_fn_exit 1' 1 2 13 15
38853 # Create a (secure) tmp directory for tmp files.
38856 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
38860 tmp=./conf$$-$RANDOM
38861 (umask 077 && mkdir "$tmp")
38862 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
38865 # Set up the scripts for CONFIG_FILES section.
38866 # No need to generate them if there are no CONFIG_FILES.
38867 # This happens for instance with `./config.status config.h'.
38868 if test -n "$CONFIG_FILES"; then
38871 ac_cr=`echo X | tr X '\015'`
38872 # On cygwin, bash can eat \r inside `` if the user requested igncr.
38873 # But we know of no other shell where ac_cr would be empty at this
38874 # point, so we can use a bashism as a fallback.
38875 if test "x$ac_cr" = x; then
38876 eval ac_cr=\$\'\\r\'
38878 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
38879 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
38882 ac_cs_awk_cr=$ac_cr
38885 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
38890 echo "cat >conf$$subs.awk <<_ACEOF" &&
38891 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
38893 } >conf$$subs.sh ||
38894 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38895 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
38897 for ac_last_try in false false false false false :; do
38898 . ./conf$$subs.sh ||
38899 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38901 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
38902 if test $ac_delim_n = $ac_delim_num; then
38904 elif $ac_last_try; then
38905 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
38907 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
38910 rm -f conf$$subs.sh
38912 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38913 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
38917 s/^/S["/; s/!.*/"]=/
38927 s/\(.\{148\}\)..*/\1/
38929 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
38934 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38941 s/\(.\{148\}\)..*/\1/
38943 s/["\\]/\\&/g; s/^/"/; s/$/"/
38947 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
38952 ' <conf$$subs.awk | sed '
38957 ' >>$CONFIG_STATUS || ac_write_fail=1
38958 rm -f conf$$subs.awk
38959 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38961 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
38962 for (key in S) S_is_set[key] = 1
38968 nfields = split(line, field, "@")
38970 len = length(field[1])
38971 for (i = 2; i < nfields; i++) {
38973 keylen = length(key)
38974 if (S_is_set[key]) {
38976 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
38977 len += length(value) + length(field[++i])
38988 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38989 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
38990 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
38993 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
38994 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
38997 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
38998 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
38999 # trailing colons and then remove the whole line if VPATH becomes empty
39000 # (actually we leave an empty line to preserve line numbers).
39001 if test "x$srcdir" = x.; then
39002 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
39020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39021 fi # test -n "$CONFIG_FILES"
39023 # Set up the scripts for CONFIG_HEADERS section.
39024 # No need to generate them if there are no CONFIG_HEADERS.
39025 # This happens for instance with `./config.status Makefile'.
39026 if test -n "$CONFIG_HEADERS"; then
39027 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
39031 # Transform confdefs.h into an awk script `defines.awk', embedded as
39032 # here-document in config.status, that substitutes the proper values into
39033 # config.h.in to produce config.h.
39035 # Create a delimiter string that does not exist in confdefs.h, to ease
39036 # handling of long lines.
39038 for ac_last_try in false false :; do
39039 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
39040 if test -z "$ac_tt"; then
39042 elif $ac_last_try; then
39043 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
39045 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
39049 # For the awk script, D is an array of macro values keyed by name,
39050 # likewise P contains macro parameters if any. Preserve backslash
39051 # newline sequences.
39053 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
39055 s/.\{148\}/&'"$ac_delim"'/g
39058 s/^[ ]*#[ ]*define[ ][ ]*/ /
39065 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
39067 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
39071 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
39072 D["\1"]=" \3\\\\\\n"\\/p
39074 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
39079 s/.\{148\}/&'"$ac_delim"'/g
39084 s/["\\]/\\&/g; s/^/"/; s/$/"/p
39087 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
39089 ' <confdefs.h | sed '
39090 s/'"$ac_delim"'/"\\\
39091 "/g' >>$CONFIG_STATUS || ac_write_fail=1
39093 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39094 for (key in D) D_is_set[key] = 1
39097 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
39099 split(line, arg, " ")
39100 if (arg[1] == "#") {
39104 defundef = substr(arg[1], 2)
39107 split(mac1, mac2, "(") #)
39109 prefix = substr(line, 1, index(line, defundef) - 1)
39110 if (D_is_set[macro]) {
39111 # Preserve the white space surrounding the "#".
39112 print prefix "define", macro P[macro] D[macro]
39115 # Replace #undef with comments. This is necessary, for example,
39116 # in the case of _POSIX_SOURCE, which is predefined and required
39117 # on some systems where configure will not decide to define it.
39118 if (defundef == "undef") {
39119 print "/*", prefix defundef, macro, "*/"
39127 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39128 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
39129 fi # test -n "$CONFIG_HEADERS"
39132 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
39137 :[FHLC]) ac_mode=$ac_tag; continue;;
39139 case $ac_mode$ac_tag in
39141 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
39142 :[FH]-) ac_tag=-:-;;
39143 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
39160 -) ac_f="$ac_tmp/stdin";;
39161 *) # Look for the file first in the build tree, then in the source tree
39162 # (if the path is not absolute). The absolute path cannot be DOS-style,
39163 # because $ac_f cannot contain `:'.
39167 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
39169 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
39171 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
39172 as_fn_append ac_file_inputs " '$ac_f'"
39175 # Let's still pretend it is `configure' which instantiates (i.e., don't
39176 # use $as_me), people would be surprised to read:
39177 # /* config.h. Generated by config.status. */
39178 configure_input='Generated from '`
39179 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
39181 if test x"$ac_file" != x-; then
39182 configure_input="$ac_file. $configure_input"
39183 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
39184 $as_echo "$as_me: creating $ac_file" >&6;}
39186 # Neutralize special characters interpreted by sed in replacement strings.
39187 case $configure_input in #(
39188 *\&* | *\|* | *\\* )
39189 ac_sed_conf_input=`$as_echo "$configure_input" |
39190 sed 's/[\\\\&|]/\\\\&/g'`;; #(
39191 *) ac_sed_conf_input=$configure_input;;
39195 *:-:* | *:-) cat >"$ac_tmp/stdin" \
39196 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
39201 ac_dir=`$as_dirname -- "$ac_file" ||
39202 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39203 X"$ac_file" : 'X\(//\)[^/]' \| \
39204 X"$ac_file" : 'X\(//\)$' \| \
39205 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
39206 $as_echo X"$ac_file" |
39207 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39211 /^X\(\/\/\)[^/].*/{
39224 as_dir="$ac_dir"; as_fn_mkdir_p
39228 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
39230 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
39231 # A ".." for each directory in $ac_dir_suffix.
39232 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
39233 case $ac_top_builddir_sub in
39234 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
39235 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
39238 ac_abs_top_builddir=$ac_pwd
39239 ac_abs_builddir=$ac_pwd$ac_dir_suffix
39240 # for backward compatibility:
39241 ac_top_builddir=$ac_top_build_prefix
39244 .) # We are building in place.
39246 ac_top_srcdir=$ac_top_builddir_sub
39247 ac_abs_top_srcdir=$ac_pwd ;;
39248 [\\/]* | ?:[\\/]* ) # Absolute name.
39249 ac_srcdir=$srcdir$ac_dir_suffix;
39250 ac_top_srcdir=$srcdir
39251 ac_abs_top_srcdir=$srcdir ;;
39252 *) # Relative name.
39253 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
39254 ac_top_srcdir=$ac_top_build_prefix$srcdir
39255 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
39257 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
39267 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
39268 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
39270 ac_MKDIR_P=$MKDIR_P
39272 [\\/$]* | ?:[\\/]* ) ;;
39273 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
39277 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39278 # If the template does not know about datarootdir, expand it.
39279 # FIXME: This hack should be removed a few years after 2.60.
39280 ac_datarootdir_hack=; ac_datarootdir_seen=
39291 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
39292 *datarootdir*) ac_datarootdir_seen=yes;;
39293 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
39294 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
39295 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
39297 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39298 ac_datarootdir_hack='
39299 s&@datadir@&$datadir&g
39300 s&@docdir@&$docdir&g
39301 s&@infodir@&$infodir&g
39302 s&@localedir@&$localedir&g
39303 s&@mandir@&$mandir&g
39304 s&\\\${datarootdir}&$datarootdir&g' ;;
39308 # Neutralize VPATH when `$srcdir' = `.'.
39309 # Shell code in configure.ac might set extrasub.
39310 # FIXME: do we really want to maintain this feature?
39311 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39312 ac_sed_extra="$ac_vpsub
39315 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39317 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
39318 s|@configure_input@|$ac_sed_conf_input|;t t
39319 s&@top_builddir@&$ac_top_builddir_sub&;t t
39320 s&@top_build_prefix@&$ac_top_build_prefix&;t t
39321 s&@srcdir@&$ac_srcdir&;t t
39322 s&@abs_srcdir@&$ac_abs_srcdir&;t t
39323 s&@top_srcdir@&$ac_top_srcdir&;t t
39324 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
39325 s&@builddir@&$ac_builddir&;t t
39326 s&@abs_builddir@&$ac_abs_builddir&;t t
39327 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
39328 s&@INSTALL@&$ac_INSTALL&;t t
39329 s&@MKDIR_P@&$ac_MKDIR_P&;t t
39330 $ac_datarootdir_hack
39332 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
39333 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39335 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
39336 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
39337 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
39338 "$ac_tmp/out"`; test -z "$ac_out"; } &&
39339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39340 which seems to be undefined. Please make sure it is defined" >&5
39341 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
39342 which seems to be undefined. Please make sure it is defined" >&2;}
39344 rm -f "$ac_tmp/stdin"
39346 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
39347 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
39349 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39355 if test x"$ac_file" != x-; then
39357 $as_echo "/* $configure_input */" \
39358 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
39359 } >"$ac_tmp/config.h" \
39360 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39361 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
39362 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
39363 $as_echo "$as_me: $ac_file is unchanged" >&6;}
39366 mv "$ac_tmp/config.h" "$ac_file" \
39367 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
39370 $as_echo "/* $configure_input */" \
39371 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
39372 || as_fn_error $? "could not create -" "$LINENO" 5
39374 # Compute "$ac_file"'s index in $config_headers.
39377 for _am_header in $config_headers :; do
39378 case $_am_header in
39379 $_am_arg | $_am_arg:* )
39382 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
39385 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
39386 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39387 X"$_am_arg" : 'X\(//\)[^/]' \| \
39388 X"$_am_arg" : 'X\(//\)$' \| \
39389 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
39390 $as_echo X"$_am_arg" |
39391 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39395 /^X\(\/\/\)[^/].*/{
39407 s/.*/./; q'`/stamp-h$_am_stamp_count
39410 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
39411 $as_echo "$as_me: executing $ac_file commands" >&6;}
39416 case $ac_file$ac_mode in
39417 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
39418 # Older Autoconf quotes --file arguments for eval, but not when files
39419 # are listed without --file. Let's play safe and only enable the eval
39420 # if we detect the quoting.
39421 case $CONFIG_FILES in
39422 *\'*) eval set x "$CONFIG_FILES" ;;
39423 *) set x $CONFIG_FILES ;;
39428 # Strip MF so we end up with the name of the file.
39429 mf=`echo "$mf" | sed -e 's/:.*$//'`
39430 # Check whether this is an Automake generated Makefile or not.
39431 # We used to match only the files named 'Makefile.in', but
39432 # some people rename them; so instead we look at the file content.
39433 # Grep'ing the first line is not enough: some people post-process
39434 # each Makefile.in and add a new line on top of each file to say so.
39435 # Grep'ing the whole file is not good either: AIX grep has a line
39436 # limit of 2048, but all sed's we know have understand at least 4000.
39437 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
39438 dirpart=`$as_dirname -- "$mf" ||
39439 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39440 X"$mf" : 'X\(//\)[^/]' \| \
39441 X"$mf" : 'X\(//\)$' \| \
39442 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
39444 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39448 /^X\(\/\/\)[^/].*/{
39464 # Extract the definition of DEPDIR, am__include, and am__quote
39465 # from the Makefile without running 'make'.
39466 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
39467 test -z "$DEPDIR" && continue
39468 am__include=`sed -n 's/^am__include = //p' < "$mf"`
39469 test -z "$am__include" && continue
39470 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
39471 # Find all dependency output files, they are included files with
39472 # $(DEPDIR) in their names. We invoke sed twice because it is the
39473 # simplest approach to changing $(DEPDIR) to its actual value in the
39475 for file in `sed -n "
39476 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
39477 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
39478 # Make sure the directory exists.
39479 test -f "$dirpart/$file" && continue
39480 fdir=`$as_dirname -- "$file" ||
39481 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
39482 X"$file" : 'X\(//\)[^/]' \| \
39483 X"$file" : 'X\(//\)$' \| \
39484 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
39485 $as_echo X"$file" |
39486 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
39490 /^X\(\/\/\)[^/].*/{
39503 as_dir=$dirpart/$fdir; as_fn_mkdir_p
39504 # echo "creating $dirpart/$file"
39505 echo '# dummy' > "$dirpart/$file"
39510 "po-directories":C)
39511 for ac_file in $CONFIG_FILES; do
39512 # Support "outfile[:infile[:infile...]]"
39514 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
39516 # PO directories have a Makefile.in generated from Makefile.in.in.
39517 case "$ac_file" in */Makefile.in)
39518 # Adjust a relative srcdir.
39519 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
39520 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
39521 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
39522 # In autoconf-2.13 it is called $ac_given_srcdir.
39523 # In autoconf-2.50 it is called $srcdir.
39524 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
39525 case "$ac_given_srcdir" in
39526 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
39527 /*) top_srcdir="$ac_given_srcdir" ;;
39528 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
39530 # Treat a directory as a PO directory if and only if it has a
39531 # POTFILES.in file. This allows packages to have multiple PO
39532 # directories under different names or in different locations.
39533 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
39534 rm -f "$ac_dir/POTFILES"
39535 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
39536 gt_tab=`printf '\t'`
39537 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"
39538 POMAKEFILEDEPS="POTFILES.in"
39539 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
39540 # on $ac_dir but don't depend on user-specified configuration
39542 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
39543 # The LINGUAS file contains the set of available languages.
39544 if test -n "$OBSOLETE_ALL_LINGUAS"; then
39545 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
39547 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
39548 # Hide the ALL_LINGUAS assignment from automake < 1.5.
39549 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
39550 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
39552 # The set of available languages was given in configure.in.
39553 # Hide the ALL_LINGUAS assignment from automake < 1.5.
39554 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
39557 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
39558 # Compute UPDATEPOFILES
39559 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
39560 # Compute DUMMYPOFILES
39561 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
39563 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
39564 case "$ac_given_srcdir" in
39566 *) srcdirpre='$(srcdir)/' ;;
39572 for lang in $ALL_LINGUAS; do
39573 POFILES="$POFILES $srcdirpre$lang.po"
39574 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
39575 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
39576 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
39578 # CATALOGS depends on both $ac_dir and the user's LINGUAS
39579 # environment variable.
39581 if test -n "$ALL_LINGUAS"; then
39582 for presentlang in $ALL_LINGUAS; do
39584 if test "%UNSET%" != "$LINGUAS"; then
39585 desiredlanguages="$LINGUAS"
39587 desiredlanguages="$ALL_LINGUAS"
39589 for desiredlang in $desiredlanguages; do
39590 # Use the presentlang catalog if desiredlang is
39591 # a. equal to presentlang, or
39592 # b. a variant of presentlang (because in this case,
39593 # presentlang can be used as a fallback for messages
39594 # which are not translated in the desiredlang catalog).
39595 case "$desiredlang" in
39596 "$presentlang"*) useit=yes;;
39599 if test $useit = yes; then
39600 INST_LINGUAS="$INST_LINGUAS $presentlang"
39605 if test -n "$INST_LINGUAS"; then
39606 for lang in $INST_LINGUAS; do
39607 CATALOGS="$CATALOGS $lang.gmo"
39610 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
39611 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"
39612 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
39613 if test -f "$f"; then
39615 *.orig | *.bak | *~) ;;
39616 *) cat "$f" >> "$ac_dir/Makefile" ;;
39624 "tests/atconfig":C) cat >tests/atconfig <<ATEOF
39625 # Configurable variable values for building test suites.
39627 # Copyright (C) 2012 Free Software Foundation, Inc.
39629 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
39631 abs_builddir='$ac_abs_builddir'
39632 at_srcdir='$ac_srcdir'
39633 abs_srcdir='$ac_abs_srcdir'
39634 at_top_srcdir='$ac_top_srcdir'
39635 abs_top_srcdir='$ac_abs_top_srcdir'
39636 at_top_build_prefix='$ac_top_build_prefix'
39637 abs_top_builddir='$ac_abs_top_builddir'
39639 # Backward compatibility with Autotest <= 2.59b:
39640 at_top_builddir=\$at_top_build_prefix
39642 AUTOTEST_PATH='tests'
39644 SHELL=\${CONFIG_SHELL-'$SHELL'}
39654 ac_clean_files=$ac_clean_files_save
39656 test $ac_write_fail = 0 ||
39657 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
39660 # configure is writing to config.log, and then calls config.status.
39661 # config.status does its own redirection, appending to config.log.
39662 # Unfortunately, on DOS this fails, as config.log is still kept open
39663 # by configure, so config.status won't be able to write to it; its
39664 # output is simply discarded. So we exec the FD to /dev/null,
39665 # effectively closing config.log, so it can be properly (re)opened and
39666 # appended to by config.status. When coming back to configure, we
39667 # need to make the FD available again.
39668 if test "$no_create" != yes; then
39670 ac_config_status_args=
39671 test "$silent" = yes &&
39672 ac_config_status_args="$ac_config_status_args --quiet"
39674 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
39676 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
39677 # would make configure fail if this is the last instruction.
39678 $ac_cs_success || as_fn_exit 1
39680 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
39681 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
39682 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}